![]() |
Routines |
| Prev: 38590 | Up: Map | Next: 38746 |
|
Open the named door, airlock or container.
|
||||
| ActionOpen | 38631 | CALL Parser_ValidateDirectObject | Return if the command does not name a single object. | |
| 38634 | RET C | |||
| 38635 | JR ActionOpen_Step1 | Continue at ActionOpen_Step1 to match what the player wants to open. | ||
| ActionOpen_Loop1 | 38637 | LD HL,25691 | Print "You can't." and start a new line. | |
| ActionOpen_Loop2 | 38640 | CALL PrintStringAndANewline | ||
| 38643 | RET | Return. | ||
| ActionOpen_Step1 | 38644 | LD HL,35529 | Jump to ActionOpen_Step3 unless the command matches the phrase at 35529 (The airlock is closed. (14)). | |
| 38647 | CALL Parser_AdvanceToSeparator | |||
| 38650 | JR NZ,ActionOpen_Step3 | |||
| 38652 | LD A,14 | |||
| 38654 | CALL IsObjectInCurrentRoom | |||
| 38657 | JR Z,ActionOpen_Step2 | |||
| 38659 | LD A,15 | Jump to ActionOpen_Step2 when The airlock is closed. (15) is here or being carried. | ||
| 38661 | CALL IsObjectInCurrentRoom | |||
| 38664 | JR Z,ActionOpen_Step2 | |||
| 38666 | LD HL,30684 | Print "It's already open." and start a new line. | ||
| 38669 | JR ActionOpen_Loop2 | |||
| ActionOpen_Step2 | 38671 | LD BC,3584 | Move The airlock is closed. (14) to nowhere (0). | |
| 38674 | CALL UpdateObjectLocation | |||
| 38677 | LD BC,3840 | Move The airlock is closed. (15) to nowhere (0). | ||
| 38680 | CALL UpdateObjectLocation | |||
| 38683 | LD BC,4100 | Move The airlock is open. (16) to In the Galaxy at rest,on a landing pad. (4). | ||
| 38686 | CALL UpdateObjectLocation | |||
| 38689 | LD BC,4357 | Move The airlock is open. (17) to The Landing Pad. (5). | ||
| 38692 | CALL UpdateObjectLocation | |||
| 38695 | CALL ResponseOK | Call ResponseOK to say the player is not carrying it. | ||
| 38698 | RET | Return. | ||
| ActionOpen_Step3 | 38699 | LD HL,35531 | Jump to ActionOpen_Step5 unless the command matches the phrase at 35531 (An open door. (29)). | |
| 38702 | CALL Parser_AdvanceToSeparator | |||
| 38705 | JR NZ,ActionOpen_Step5 | |||
| 38707 | LD A,29 | |||
| 38709 | CALL IsObjectInCurrentRoom | |||
| 38712 | JR NZ,ActionOpen_Step4 | |||
| 38714 | LD HL,30684 | Print "It's already open." and start a new line. | ||
| 38717 | JP ActionOpen_Loop2 | |||
| ActionOpen_Step4 | 38720 | LD BC,7168 | Move A closed door. (28) to nowhere (0). | |
| 38723 | CALL UpdateObjectLocation | |||
| 38726 | LD BC,7467 | Move An open door. (29) to The Lower Store Room. (43). | ||
| 38729 | CALL UpdateObjectLocation | |||
| 38732 | LD A,49 | Open the way down from The Lower Store Room.. | ||
| 38734 | LD (35937),A | |||
| 38737 | LD HL,32438 | Print "The door opens,revealing a passage leading down." and start a new line. | ||
| 38740 | JP ActionOpen_Loop2 | |||
| ActionOpen_Step5 | 38743 | JP ActionOpen_Loop1 | Continue at ActionOpen_Loop1 to say the player can't. | |
| Prev: 38590 | Up: Map | Next: 38746 |