diff options
| author | Malkierian <malkierian@gmail.com> | 2023-11-13 22:12:08 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-14 00:12:08 -0500 |
| commit | 304016ddd2ac45e5101e03faa66f0a88f431d213 (patch) | |
| tree | 876410b3ec5a4d8d85868d252f55e295474a237e /soh/src/code | |
| parent | fe9c0fa4f722e01a099addb13268a4dedb2d71c7 (diff) | |
[Feature Fix] Tunics stolen by like likes now removed from the item buttons (#3375)
* Extends `Assignable Boots and Tunics` functionality to check for and remove Goron and Zora tunics from item buttons when like likes steal them.
* Comment documentation.
Diffstat (limited to 'soh/src/code')
| -rw-r--r-- | soh/src/code/code_80097A00.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/soh/src/code/code_80097A00.c b/soh/src/code/code_80097A00.c index 9e20d66aa..eb83738e3 100644 --- a/soh/src/code/code_80097A00.c +++ b/soh/src/code/code_80097A00.c @@ -204,6 +204,17 @@ u8 Inventory_DeleteEquipment(PlayState* play, s16 equipment) { if (equipment == EQUIP_TYPE_TUNIC) { gSaveContext.equips.equipment |= EQUIP_VALUE_TUNIC_KOKIRI << (EQUIP_TYPE_TUNIC * 4); + // non-vanilla: remove goron and zora tunics from item buttons if assignable tunics is on + if (CVarGetInteger("gAssignableTunicsAndBoots", 0) && equipValue != EQUIP_VALUE_TUNIC_KOKIRI) { + ItemID item = (equipValue == EQUIP_VALUE_TUNIC_GORON ? ITEM_TUNIC_GORON : ITEM_TUNIC_ZORA); + for (int i = 1; i < ARRAY_COUNT(gSaveContext.equips.buttonItems); i++) { + if (gSaveContext.equips.buttonItems[i] == item) { + gSaveContext.equips.buttonItems[i] = ITEM_NONE; + gSaveContext.equips.cButtonSlots[i - 1] = SLOT_NONE; + } + } + } + // end non-vanilla } if (equipment == EQUIP_TYPE_SWORD) { |
