summaryrefslogtreecommitdiff
path: root/mm/src/code
diff options
context:
space:
mode:
authorGarrett Cox <garrettjcox@gmail.com>2024-05-23 20:57:33 -0500
committerGitHub <noreply@github.com>2024-05-23 21:57:33 -0400
commit9d1f21041ef0eecf16cc4f9968ca6fb89c58ab89 (patch)
tree66f585cf12270b973f56b3c42d71fc635f62dc46 /mm/src/code
parentad298b314035e7f587e4e6c1e019139950ef6090 (diff)
Add unrestricted items cheat (#457)
Diffstat (limited to 'mm/src/code')
-rw-r--r--mm/src/code/z_parameter.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/mm/src/code/z_parameter.c b/mm/src/code/z_parameter.c
index 1020d0b9c..6a6df41cd 100644
--- a/mm/src/code/z_parameter.c
+++ b/mm/src/code/z_parameter.c
@@ -2764,7 +2764,9 @@ void Interface_UpdateButtonsPart2(PlayState* play) {
if (GET_PLAYER_FORM == player->transformation) {
for (i = EQUIP_SLOT_C_LEFT; i <= EQUIP_SLOT_C_RIGHT; i++) {
// Individual C button
- if (!gPlayerFormItemRestrictions[GET_PLAYER_FORM][GET_CUR_FORM_BTN_ITEM(i)]) {
+ ItemId itemId = GET_CUR_FORM_BTN_ITEM(i);
+ if (GameInteractor_Should(GI_VB_ITEM_BE_RESTRICTED,
+ !gPlayerFormItemRestrictions[GET_PLAYER_FORM][itemId], &itemId)) {
// Item not usable in current playerForm
if (gSaveContext.buttonStatus[i] != BTN_DISABLED) {
gSaveContext.buttonStatus[i] = BTN_DISABLED;
@@ -2909,7 +2911,9 @@ void Interface_UpdateButtonsPart2(PlayState* play) {
// #region 2S2H [Dpad]
for (s16 j = EQUIP_SLOT_D_RIGHT; j <= EQUIP_SLOT_D_UP; j++) {
// Individual D button
- if (!gPlayerFormItemRestrictions[GET_PLAYER_FORM][DPAD_GET_CUR_FORM_BTN_ITEM(j)]) {
+ ItemId itemId = DPAD_GET_CUR_FORM_BTN_ITEM(j);
+ if (GameInteractor_Should(GI_VB_ITEM_BE_RESTRICTED,
+ !gPlayerFormItemRestrictions[GET_PLAYER_FORM][itemId], &itemId)) {
// Item not usable in current playerForm
if (gSaveContext.shipSaveContext.dpad.status[j] != BTN_DISABLED) {
gSaveContext.shipSaveContext.dpad.status[j] = BTN_DISABLED;