![]() |
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. | ||
|
Print "You can't.".
|
||||
| ActionOpen_Loop1 | 38637 | LD HL,25691 | HL=Messaging_YouCanT. | |
| ActionOpen_Loop2 | 38640 | CALL PrintStringAndANewline | Call PrintStringAndANewline. | |
| 38643 | RET | Return. | ||
|
Was the player trying to open the airlock?
|
||||
| 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 | |||
|
Print "It's already open.".
|
||||
| 38666 | LD HL,30684 | HL=Messaging_ItSAlreadyOpen. | ||
| 38669 | JR ActionOpen_Loop2 | Jump to 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 room 4: " In the Galaxy at rest". | ||
| 38686 | CALL UpdateObjectLocation | |||
| 38689 | LD BC,4357 | Move The airlock is open. (17) to room 5: " The Landing Pad". | ||
| 38692 | CALL UpdateObjectLocation | |||
| 38695 | CALL ResponseOK | Call ResponseOK to say the player is not carrying it. | ||
| 38698 | RET | Return. | ||
|
Was the player trying to open the door?
|
||||
| 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 | |||
|
Print "It's already open.".
|
||||
| 38714 | LD HL,30684 | HL=Messaging_ItSAlreadyOpen. | ||
| 38717 | JP ActionOpen_Loop2 | Jump to 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 room 43: " The Lower Store Room". | ||
| 38729 | CALL UpdateObjectLocation | |||
|
This action changes the map:
|
||||
| 38732 | LD A,49 | Open the way down from The Lower Store Room. | ||
| 38734 | LD (35937),A | |||
|
Print "The door opens,revealing a
passage leading down.".
|
||||
| 38737 | LD HL,32438 | HL=Messaging_TheDoorOpensRevealingAPassageLeadingDown. | ||
| 38740 | JP ActionOpen_Loop2 | Jump to ActionOpen_Loop2. | ||
| ActionOpen_Step5 | 38743 | JP ActionOpen_Loop1 | Continue at ActionOpen_Loop1 to say the player can't. | |
|
View the equivalent code in;
|
||||
| Prev: 38590 | Up: Map | Next: 38746 |