Prev: 96E7 Up: Map Next: 97CA
975A: Action: Close
Close the named door or airlock.
ActionClose 975A CALL Parser_ValidateDirectObject Return if the command does not name a single object.
975D RET C
975E JR ActionClose_Step1 Continue at ActionClose_Step1 to match what the player wants to close.
ActionClose_Loop1 9760 LD HL,$645B Print "You can't." and start a new line.
ActionClose_Loop2 9763 CALL PrintStringAndANewline
9766 RET Return.
ActionClose_Step1 9767 LD HL,$8AC9 Jump to ActionClose_Step3 unless the command matches the phrase at 8AC9 (The airlock is open. (10)).
976A CALL Parser_AdvanceToSeparator
976D JR NZ,ActionClose_Step3
976F LD A,$10
9771 CALL IsObjectInCurrentRoom
9774 JR Z,ActionClose_Step2
9776 LD A,$11 Jump to ActionClose_Step2 when The airlock is open. (11) is here or being carried.
9778 CALL IsObjectInCurrentRoom
977B JR Z,ActionClose_Step2
977D LD HL,$781C Print "It's already closed." and start a new line.
9780 JR ActionClose_Loop2
ActionClose_Step2 9782 LD BC,$1000 Move The airlock is open. (10) to nowhere (00).
9785 CALL UpdateObjectLocation
9788 LD BC,$1100 Move The airlock is open. (11) to nowhere (00).
978B CALL UpdateObjectLocation
978E LD BC,$0E04 Move The airlock is closed. (0E) to In the Galaxy at rest,on a landing pad. (04).
9791 CALL UpdateObjectLocation
9794 LD BC,$0F05 Move The airlock is closed. (0F) to The Landing Pad. (05).
9797 CALL UpdateObjectLocation
979A CALL ResponseOK Call ResponseOK to say the player is not carrying it.
979D RET Return.
ActionClose_Step3 979E LD HL,$8ACB Jump to ActionClose_Step5 unless the command matches the phrase at 8ACB (A closed door. (1C)).
97A1 CALL Parser_AdvanceToSeparator
97A4 JR NZ,ActionClose_Step5
97A6 LD A,$1C
97A8 CALL IsObjectInCurrentRoom
97AB JR NZ,ActionClose_Step4
97AD LD HL,$781C Print "It's already closed." and start a new line.
97B0 JP ActionClose_Loop2
ActionClose_Step4 97B3 LD BC,$1D00 Move An open door. (1D) to nowhere (00).
97B6 CALL UpdateObjectLocation
97B9 LD BC,$1C2B Move A closed door. (1C) to The Lower Store Room. (2B).
97BC CALL UpdateObjectLocation
97BF XOR A Seal the way down from The Lower Store Room..
97C0 LD ($8C61),A
97C3 CALL ResponseOK Call ResponseOK to say the player is not carrying it.
97C6 RET Return.
ActionClose_Step5 97C7 JP ActionClose_Loop1 Continue at ActionClose_Loop1 to say the player can't.
Prev: 96E7 Up: Map Next: 97CA