mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-19 21:03:42 -07:00
[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.
This commit is contained in:
parent
fe9c0fa4f7
commit
304016ddd2
1 changed files with 11 additions and 0 deletions
|
@ -204,6 +204,17 @@ u8 Inventory_DeleteEquipment(PlayState* play, s16 equipment) {
|
||||||
|
|
||||||
if (equipment == EQUIP_TYPE_TUNIC) {
|
if (equipment == EQUIP_TYPE_TUNIC) {
|
||||||
gSaveContext.equips.equipment |= EQUIP_VALUE_TUNIC_KOKIRI << (EQUIP_TYPE_TUNIC * 4);
|
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) {
|
if (equipment == EQUIP_TYPE_SWORD) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue