Reformat compare + goto_if/call_if to single statements
This commit is contained in:
@@ -21,25 +21,19 @@ ShoalCave_LowTideEntranceRoom_EventScript_ShellBellExpert::
|
||||
dotimebasedevents
|
||||
call_if_set FLAG_SYS_SHOAL_ITEM, ShoalCave_LowTideEntranceRoom_EventScript_ResetShoalItems
|
||||
checkitem ITEM_SHOAL_SALT, 4
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_NotEnoughShoalSaltOrShells
|
||||
goto_if_eq VAR_RESULT, FALSE, ShoalCave_LowTideEntranceRoom_EventScript_NotEnoughShoalSaltOrShells
|
||||
checkitem ITEM_SHOAL_SHELL, 4
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_NotEnoughShoalSaltOrShells
|
||||
goto_if_eq VAR_RESULT, FALSE, ShoalCave_LowTideEntranceRoom_EventScript_NotEnoughShoalSaltOrShells
|
||||
msgbox ShoalCave_LowTideEntranceRoom_Text_WouldYouLikeShellBell, MSGBOX_YESNO
|
||||
compare VAR_RESULT, NO
|
||||
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_DeclineShellBell
|
||||
goto_if_eq VAR_RESULT, NO, ShoalCave_LowTideEntranceRoom_EventScript_DeclineShellBell
|
||||
checkitemspace ITEM_SHELL_BELL
|
||||
compare VAR_RESULT, FALSE
|
||||
call_if_eq ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreed
|
||||
compare VAR_RESULT, 2
|
||||
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_NoRoomForShellBell
|
||||
call_if_eq VAR_RESULT, FALSE, ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreed
|
||||
goto_if_eq VAR_RESULT, 2, ShoalCave_LowTideEntranceRoom_EventScript_NoRoomForShellBell
|
||||
msgbox ShoalCave_LowTideEntranceRoom_Text_MakeShellBellRightAway, MSGBOX_DEFAULT
|
||||
removeitem ITEM_SHOAL_SALT, 4
|
||||
removeitem ITEM_SHOAL_SHELL, 4
|
||||
giveitem ITEM_SHELL_BELL
|
||||
compare VAR_RESULT, FALSE
|
||||
goto_if_eq Common_EventScript_ShowBagIsFull
|
||||
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
|
||||
msgbox ShoalCave_LowTideEntranceRoom_Text_ExplainShellBell, MSGBOX_DEFAULT
|
||||
setflag FLAG_TEMP_2
|
||||
release
|
||||
@@ -48,14 +42,12 @@ ShoalCave_LowTideEntranceRoom_EventScript_ShellBellExpert::
|
||||
@ If the bag is full, check if a slot will be freed when 4 Shoal Salt or Shells are given
|
||||
ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreed::
|
||||
checkitem ITEM_SHOAL_SALT, 5
|
||||
compare VAR_RESULT, TRUE
|
||||
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreedShells
|
||||
goto_if_eq VAR_RESULT, TRUE, ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreedShells
|
||||
return
|
||||
|
||||
ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreedShells::
|
||||
checkitem ITEM_SHOAL_SHELL, 5
|
||||
compare VAR_RESULT, TRUE
|
||||
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_NoSpaceWillBeFreed
|
||||
goto_if_eq VAR_RESULT, TRUE, ShoalCave_LowTideEntranceRoom_EventScript_NoSpaceWillBeFreed
|
||||
return
|
||||
|
||||
ShoalCave_LowTideEntranceRoom_EventScript_NoSpaceWillBeFreed::
|
||||
@@ -69,11 +61,9 @@ ShoalCave_LowTideEntranceRoom_EventScript_NoRoomForShellBell::
|
||||
|
||||
ShoalCave_LowTideEntranceRoom_EventScript_NotEnoughShoalSaltOrShells::
|
||||
checkitem ITEM_SHOAL_SALT
|
||||
compare VAR_RESULT, TRUE
|
||||
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell
|
||||
goto_if_eq VAR_RESULT, TRUE, ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell
|
||||
checkitem ITEM_SHOAL_SHELL
|
||||
compare VAR_RESULT, TRUE
|
||||
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell
|
||||
goto_if_eq VAR_RESULT, TRUE, ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell
|
||||
msgbox ShoalCave_LowTideEntranceRoom_Text_AreYouPlanningOnGoingInThere, MSGBOX_DEFAULT
|
||||
release
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user