Eject actors from open traps immediately
This commit is contained in:
parent
787cd0d3a7
commit
459120313e
@ -622,7 +622,11 @@ const TILE_TYPES = {
|
|||||||
trap: {
|
trap: {
|
||||||
draw_layer: LAYER_TERRAIN,
|
draw_layer: LAYER_TERRAIN,
|
||||||
on_arrive(me, level, other) {
|
on_arrive(me, level, other) {
|
||||||
if (! me.open) {
|
if (me.open) {
|
||||||
|
// Traps immediately eject their contents, if possible
|
||||||
|
level.attempt_step(other, other.direction);
|
||||||
|
}
|
||||||
|
else {
|
||||||
level.set_actor_stuck(other, true);
|
level.set_actor_stuck(other, true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user