glass block-with-item can't move onto a tile with an item in it
This commit is contained in:
parent
6971eb4d54
commit
e4ce9d0bcc
@ -92,8 +92,11 @@ export class Tile {
|
||||
other.type.name !== 'ghost')
|
||||
return true;
|
||||
|
||||
if (this.type.blocks)
|
||||
return this.type.blocks(this, level, other, direction);
|
||||
if (this.type.blocks && this.type.blocks(this, level, other, direction))
|
||||
return true;
|
||||
|
||||
if (other.type.blocked_by && other.type.blocked_by(other, level, this))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1350,6 +1350,9 @@ const TILE_TYPES = {
|
||||
on_finishing_move(me, level) {
|
||||
this.try_pickup_item(me, level);
|
||||
},
|
||||
blocked_by(me, level, other) {
|
||||
return other.cell.get_item() !== null && me.encased_item !== null;
|
||||
},
|
||||
on_death(me, level) {
|
||||
//needs to be called by transmute_tile to ttl and by lit_dynamite before remove_tile
|
||||
if (me.encased_item !== null) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user