Prev: 38631 Up: Map Next: 38858
38746: Action: Close
Close the named door or airlock.
ActionClose 38746 CALL Parser_ValidateDirectObject Return if the command does not name a single object.
38749 RET C
38750 JR ActionClose_Step1 Continue at ActionClose_Step1 to match what the player wants to close.
ActionClose_Loop1 38752 LD HL,25691 Print "You can't." and start a new line.
ActionClose_Loop2 38755 CALL PrintStringAndANewline
38758 RET Return.
ActionClose_Step1 38759 LD HL,35529 Jump to ActionClose_Step3 unless the command matches the phrase at 35529 (The airlock is open. (16)).
38762 CALL Parser_AdvanceToSeparator
38765 JR NZ,ActionClose_Step3
38767 LD A,16
38769 CALL IsObjectInCurrentRoom
38772 JR Z,ActionClose_Step2
38774 LD A,17 Jump to ActionClose_Step2 when The airlock is open. (17) is here or being carried.
38776 CALL IsObjectInCurrentRoom
38779 JR Z,ActionClose_Step2
38781 LD HL,30748 Print "It's already closed." and start a new line.
38784 JR ActionClose_Loop2
ActionClose_Step2 38786 LD BC,4096 Move The airlock is open. (16) to nowhere (0).
38789 CALL UpdateObjectLocation
38792 LD BC,4352 Move The airlock is open. (17) to nowhere (0).
38795 CALL UpdateObjectLocation
38798 LD BC,3588 Move The airlock is closed. (14) to In the Galaxy at rest,on a landing pad. (4).
38801 CALL UpdateObjectLocation
38804 LD BC,3845 Move The airlock is closed. (15) to The Landing Pad. (5).
38807 CALL UpdateObjectLocation
38810 CALL ResponseOK Call ResponseOK to say the player is not carrying it.
38813 RET Return.
ActionClose_Step3 38814 LD HL,35531 Jump to ActionClose_Step5 unless the command matches the phrase at 35531 (A closed door. (28)).
38817 CALL Parser_AdvanceToSeparator
38820 JR NZ,ActionClose_Step5
38822 LD A,28
38824 CALL IsObjectInCurrentRoom
38827 JR NZ,ActionClose_Step4
38829 LD HL,30748 Print "It's already closed." and start a new line.
38832 JP ActionClose_Loop2
ActionClose_Step4 38835 LD BC,7424 Move An open door. (29) to nowhere (0).
38838 CALL UpdateObjectLocation
38841 LD BC,7211 Move A closed door. (28) to The Lower Store Room. (43).
38844 CALL UpdateObjectLocation
38847 XOR A Seal the way down from The Lower Store Room..
38848 LD (35937),A
38851 CALL ResponseOK Call ResponseOK to say the player is not carrying it.
38854 RET Return.
ActionClose_Step5 38855 JP ActionClose_Loop1 Continue at ActionClose_Loop1 to say the player can't.
Prev: 38631 Up: Map Next: 38858