make puffle items award correctly when using CATALOG type codes (#107)

* misc fixes

houdini.sql: fixed a bug that can cause penguins to be deleted if an item or puffle is deleted, missing pin dates, mascot item types, missing rooms, incorrect tourdude quest reward, and various minor mascot issues.

houdini.data.penguin: reflect database changes

houdini.handlers.play.epf: use correct error code for not enough medals

houdini.handlers.play.igloo: use proper error codes for when player owns flooring/igloo/location, or max furniture quantity

houdini.handlers.play.item: fixed an issue where the stampbook would display pin dates one day ahead

houdini.handlers.play.pet: fixed digging not allowing multiple puffle items/furniture, cost of puffle creatures, adopting gold/rainbow puffles does not give their toys/food, and use correct error codes for puffle items

* fix missed keys

* fix ordering

* fix walking key

* fix issue with super exclusive bonus items

* fix typo making puffle items not award correctly

* make codes case insensitive
This commit is contained in:
JeffTheRock
2025-11-06 03:19:48 -05:00
committed by GitHub
parent 0024588b6b
commit 238364241b
2 changed files with 4 additions and 3 deletions

View File

@@ -629,7 +629,7 @@ async def handle_add_puffle_care_item(p, item_id: int):
if care_item_id in p.puffle_items:
penguin_care_item = p.puffle_items[care_item_id]
if care_item.play_external == "superplay":
if penguin_care_item.play_external == "superplay":
return await p.send_error(408)
if penguin_care_item.quantity >= 100:

View File

@@ -144,7 +144,7 @@ async def handle_code_legacy(p, redemption_code: str):
query = RedemptionCode.distinct(RedemptionCode.id)\
.load(cards=RedemptionAwardCard.distinct(RedemptionAwardCard.card_id),
items=RedemptionAwardItem.distinct(RedemptionAwardItem.item_id))\
.query.where(RedemptionCode.code == redemption_code.upper())
.query.where(RedemptionCode.code.upper() == redemption_code.upper())
codes = await query.gino.all()
if not codes:
return await p.send_error(720)
@@ -200,7 +200,7 @@ async def handle_code_vanilla(p, redemption_code: str):
locations=RedemptionAwardLocation.distinct(RedemptionAwardLocation.location_id),
puffles=RedemptionAwardPuffle.distinct(RedemptionAwardPuffle.puffle_id),
puffle_items=RedemptionAwardPuffleItem.distinct(RedemptionAwardPuffleItem.puffle_item_id))\
.query.where(RedemptionCode.code == redemption_code.upper())
.query.where(RedemptionCode.code.upper() == redemption_code.upper())
codes = await query.gino.all()
if not codes:
return await p.send_error(720)
@@ -280,6 +280,7 @@ async def handle_code_vanilla(p, redemption_code: str):
awards.append(f'p{award.puffle_id},{int(item_allowed)}')
if code.puffle_items:
for award in code.puffle_items:
item_allowed = True
if award.puffle_item_id in p.puffle_items:
penguin_care_item = p.puffle_items[award.puffle_item_id]
if penguin_care_item.quantity >= 100: