mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-13 01:57:18 -07:00
Tweak: Unique GetItemEntry for Progressive Bombchus with particle effects (#2732)
* give progressive bombchus its own getitementry to allow custom draw effects * fix timestamp item check
This commit is contained in:
parent
37c0345529
commit
42ff9742ed
3 changed files with 46 additions and 32 deletions
|
@ -1703,7 +1703,7 @@ void Randomizer_GameplayStats_SetTimestamp(uint16_t item) {
|
|||
return;
|
||||
}
|
||||
// Count any bombchu pack as bombchus
|
||||
if (item >= RG_BOMBCHU_5 && item <= RG_BOMBCHU_DROP) {
|
||||
if ((item >= RG_BOMBCHU_5 && item <= RG_BOMBCHU_DROP) || item == RG_PROGRESSIVE_BOMBCHUS) {
|
||||
if (gSaveContext.sohStats.itemTimestamp[ITEM_BOMBCHU] = 0) {
|
||||
gSaveContext.sohStats.itemTimestamp[ITEM_BOMBCHU] = time;
|
||||
}
|
||||
|
@ -2548,6 +2548,19 @@ u16 Randomizer_Item_Give(PlayState* play, GetItemEntry giEntry) {
|
|||
return Return_Item_Entry(giEntry, RG_NONE);
|
||||
}
|
||||
|
||||
if (item == RG_PROGRESSIVE_BOMBCHUS) {
|
||||
if (INV_CONTENT(ITEM_BOMBCHU) == ITEM_NONE) {
|
||||
INV_CONTENT(ITEM_BOMBCHU) = ITEM_BOMBCHU;
|
||||
AMMO(ITEM_BOMBCHU) = 20;
|
||||
} else {
|
||||
AMMO(ITEM_BOMBCHU) += AMMO(ITEM_BOMBCHU) < 5 ? 10 : 5;
|
||||
if (AMMO(ITEM_BOMBCHU) > 50) {
|
||||
AMMO(ITEM_BOMBCHU) = 50;
|
||||
}
|
||||
}
|
||||
return Return_Item_Entry(giEntry, RG_NONE);
|
||||
}
|
||||
|
||||
temp = gSaveContext.inventory.items[slot];
|
||||
osSyncPrintf("Item_Register(%d)=%d %d\n", slot, item, temp);
|
||||
INV_CONTENT(item) = item;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue