Skip to content

Commit 8f17475

Browse files
committed
fix door opening sh
1 parent f91a53e commit 8f17475

File tree

1 file changed

+2
-1
lines changed
  • tool/rlc/test/examples/space_hulk

1 file changed

+2
-1
lines changed

tool/rlc/test/examples/space_hulk/main.rl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ act action_phase(ctx Board board, frm Faction current_faction) -> ActionPhase:
159159
act toggle_door(UnitArgType unit_id) {
160160
board.unit_id_is_valid(unit_id.value),
161161
board.units.get(unit_id.value).action_points != 0,
162-
board.is_facing_door(board.units.get(unit_id.value))
162+
board.is_facing_door(board.units.get(unit_id.value)),
163+
board.units.get(unit_id.value).faction() == current_faction
163164
}
164165
ref unit = board.units.get(unit_id.value)
165166
unit.action_points = unit.action_points - 1

0 commit comments

Comments
 (0)