mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-19 04:50:05 -07:00
Correct gNoRestrictAge for gTimelessEquipment (#1856)
This commit is contained in:
parent
4a686cf800
commit
76e4e97a72
3 changed files with 5 additions and 5 deletions
|
@ -1750,11 +1750,11 @@ void Message_OpenText(GlobalContext* globalCtx, u16 textId) {
|
||||||
//font->msgLength, __FILE__, __LINE__);
|
//font->msgLength, __FILE__, __LINE__);
|
||||||
|
|
||||||
} else if (CVar_GetS32("gAskToEquip", 0) &&
|
} else if (CVar_GetS32("gAskToEquip", 0) &&
|
||||||
(((LINK_IS_ADULT || CVar_GetS32("gNoRestrictAge", 0)) &&
|
(((LINK_IS_ADULT || CVar_GetS32("gTimelessEquipment", 0)) &&
|
||||||
// 0C = Biggoron, 4B = Giant's, 4E = Mirror Shield, 50-51 = Tunics
|
// 0C = Biggoron, 4B = Giant's, 4E = Mirror Shield, 50-51 = Tunics
|
||||||
(textId == 0x0C || textId == 0x4B || textId == 0x4E ||
|
(textId == 0x0C || textId == 0x4B || textId == 0x4E ||
|
||||||
textId == 0x50 || textId == 0x51)) ||
|
textId == 0x50 || textId == 0x51)) ||
|
||||||
((!LINK_IS_ADULT || CVar_GetS32("gNoRestrictAge", 0)) &&
|
((!LINK_IS_ADULT || CVar_GetS32("gTimelessEquipment", 0)) &&
|
||||||
// 4C = Deku Shield, A4 = Kokiri Sword
|
// 4C = Deku Shield, A4 = Kokiri Sword
|
||||||
(textId == 0x4C || textId == 0xA4)) ||
|
(textId == 0x4C || textId == 0xA4)) ||
|
||||||
// 4D == Hylian Shield
|
// 4D == Hylian Shield
|
||||||
|
|
|
@ -9573,7 +9573,7 @@ void Player_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
||||||
for (uint16_t cSlotIndex = 0; cSlotIndex < ARRAY_COUNT(gSaveContext.equips.cButtonSlots); cSlotIndex++) {
|
for (uint16_t cSlotIndex = 0; cSlotIndex < ARRAY_COUNT(gSaveContext.equips.cButtonSlots); cSlotIndex++) {
|
||||||
if (gSaveContext.equips.cButtonSlots[cSlotIndex] == SLOT_TRADE_CHILD &&
|
if (gSaveContext.equips.cButtonSlots[cSlotIndex] == SLOT_TRADE_CHILD &&
|
||||||
(gItemAgeReqs[gSaveContext.equips.buttonItems[cSlotIndex + 1]] != 9 && LINK_IS_ADULT &&
|
(gItemAgeReqs[gSaveContext.equips.buttonItems[cSlotIndex + 1]] != 9 && LINK_IS_ADULT &&
|
||||||
!CVar_GetS32("gNoRestrictAge", 0))) {
|
!CVar_GetS32("gTimelessEquipment", 0))) {
|
||||||
gSaveContext.equips.cButtonSlots[cSlotIndex] = SLOT_NONE;
|
gSaveContext.equips.cButtonSlots[cSlotIndex] = SLOT_NONE;
|
||||||
gSaveContext.equips.buttonItems[cSlotIndex + 1] = ITEM_NONE;
|
gSaveContext.equips.buttonItems[cSlotIndex + 1] = ITEM_NONE;
|
||||||
}
|
}
|
||||||
|
@ -12587,7 +12587,7 @@ s32 func_8084DFF4(GlobalContext* globalCtx, Player* this) {
|
||||||
equipItem = giEntry.itemId;
|
equipItem = giEntry.itemId;
|
||||||
equipNow = CVar_GetS32("gAskToEquip", 0) && equipItem >= ITEM_SWORD_KOKIRI && equipItem <= ITEM_TUNIC_ZORA &&
|
equipNow = CVar_GetS32("gAskToEquip", 0) && equipItem >= ITEM_SWORD_KOKIRI && equipItem <= ITEM_TUNIC_ZORA &&
|
||||||
((gItemAgeReqs[equipItem] == 9 || gItemAgeReqs[equipItem] == gSaveContext.linkAge) ||
|
((gItemAgeReqs[equipItem] == 9 || gItemAgeReqs[equipItem] == gSaveContext.linkAge) ||
|
||||||
CVar_GetS32("gNoRestrictAge", 0));
|
CVar_GetS32("gTimelessEquipment", 0));
|
||||||
|
|
||||||
Message_StartTextbox(globalCtx, giEntry.textId, &this->actor);
|
Message_StartTextbox(globalCtx, giEntry.textId, &this->actor);
|
||||||
// RANDOTODO: Macro this boolean check.
|
// RANDOTODO: Macro this boolean check.
|
||||||
|
|
|
@ -394,7 +394,7 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) {
|
||||||
}
|
}
|
||||||
for (uint16_t cSlotIndex = 0; cSlotIndex < ARRAY_COUNT(gSaveContext.equips.cButtonSlots); cSlotIndex++) {
|
for (uint16_t cSlotIndex = 0; cSlotIndex < ARRAY_COUNT(gSaveContext.equips.cButtonSlots); cSlotIndex++) {
|
||||||
if (gSaveContext.equips.cButtonSlots[cSlotIndex] == SLOT_TRADE_CHILD) {
|
if (gSaveContext.equips.cButtonSlots[cSlotIndex] == SLOT_TRADE_CHILD) {
|
||||||
if (!LINK_IS_ADULT || CVar_GetS32("gNoRestrictAge", 0)) {
|
if (!LINK_IS_ADULT || CVar_GetS32("gTimelessEquipment", 0)) {
|
||||||
gSaveContext.equips.buttonItems[cSlotIndex+1] = INV_CONTENT(ITEM_TRADE_CHILD);
|
gSaveContext.equips.buttonItems[cSlotIndex+1] = INV_CONTENT(ITEM_TRADE_CHILD);
|
||||||
} else if (INV_CONTENT(ITEM_TRADE_CHILD) != gSaveContext.equips.buttonItems[cSlotIndex+1]) {
|
} else if (INV_CONTENT(ITEM_TRADE_CHILD) != gSaveContext.equips.buttonItems[cSlotIndex+1]) {
|
||||||
gSaveContext.equips.cButtonSlots[cSlotIndex] = SLOT_NONE;
|
gSaveContext.equips.cButtonSlots[cSlotIndex] = SLOT_NONE;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue