Prev: 37099 Up: Map Next: 37176
37134: Action: Open Or Close
Opens or closes the current object. Reached through the action lists of 1 - "Heavy Rock Door", 5 - "Round Green Door", 8 - "Red Door", 10 - "Goblins Back Door", 19 - "Barrel", 30 - "Trap Door", 32 - "Heavy Curtain", 33 - "Large Cupboard" and 37 - "Wooden Chest" for action 16, dispatched by TriggerAction.
ActionOpenOrClose 37134 CALL Action_ReadTheObjectLockFlag Call Action_ReadTheObjectLockFlag to read the object's lock flag.
37137 JP NZ,Message_NameFromThisRecord Jump to Message_NameFromThisRecord to say so if Action_ReadTheObjectLockFlag found the object locked (128) or already open (133).
If the message is held back, the object is not opened or closed.
37140 CALL ConditionSuppressTheMessage Call ConditionSuppressTheMessage. If the message is held back, the object is not opened or closed.
This entry point is used by the routines at Action_TalkTo and ActionBurn.
ActionOpenOrClose_0 37143 SET 5,(IX+7) Mark the object open.
37147 LD A,(IX+0) Read the copy count from the object record.
37150 DEC A Return unless this object has one copy.
37151 RET NZ
37152 LD A,(46824) Read *CurrentObject.
Count the objects being held.
37155 CALL ObjectCount Call ObjectCount to count the visible objects.
37158 AND A Return if ObjectCount counted nothing inside the current object.
37159 RET Z
37160 LD A,(46824) Read *CurrentObject.
37163 CALL TableListWhatIsHere Call TableListWhatIsHere to list what is here.
37166 RET C Return if TableListWhatIsHere set the carry flag.
37167 LD B,(IX+16) Read the location from the object record.
37170 LD A,(46824) Read *CurrentObject.
37173 JP Message_ListWithASeparator Jump to Message_ListWithASeparator to list what is here.
Prev: 37099 Up: Map Next: 37176