Prev: 36034 Up: Map Next: 36150
36101: CrewAction2_DuctTransit — climb through a grille (action state 2)
Dispatched via CrewActionDispatch entry 2: the actor crosses between a room and the duct run above it (queued by MoveThroughGrille or the AI's duct hop at 37132). The cramped ducts cost a point of courage to enter; climbing back out earns it back.
36101 LD E,(IX+1) E = current room (bit 6 = in ducts)
36104 LD A,(IX+5) A = courage
36107 BIT 6,E climbing out of the ducts?
36109 JR NZ,36113 yes: net +1 courage
36111 DEC A no, crawling in: net -1
36112 DEC A
36113 INC A
36114 CP 127 clamp an underflow to 0
36116 JR C,36119
36118 XOR A
36119 LD (IX+5),A
36122 LD A,E flip the in-ducts flag:
36123 XOR 64 same room, other side of the grille
36125 LD (IX+1),A
36128 CALL 36187 recompute room-mates and morale
36131 LD A,(31252) room view on screen (mode 1)?
36134 CP 1
36136 RET NZ no: done
36137 LD A,(33700) is this the crew member being viewed?
36140 LD HL,31241
36143 CP (HL)
36144 JP Z,32719 yes: rebuild the whole room view
36147 JP 45338 no: refresh the info panel / condition
Prev: 36034 Up: Map Next: 36150