dynamite vs electrified floor, holes and cracked floor (60 partial fix)
This commit is contained in:
parent
ee718323cd
commit
6971eb4d54
@ -2587,11 +2587,12 @@ export class Level extends LevelInterface {
|
||||
this._set_tile_prop(tile, 'last_extra_cooldown_tic', null);
|
||||
}
|
||||
this._do_extra_cooldown(tile);
|
||||
}
|
||||
|
||||
if (old_type.on_death) {
|
||||
old_type.on_death(tile, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Have an actor try to pick up a particular tile; it's prevented if there's a no sign, and the
|
||||
// tile is removed if successful
|
||||
|
||||
@ -1079,6 +1079,8 @@ const TILE_TYPES = {
|
||||
if (other === level.player) {
|
||||
level.sfx.play_once('popwall', me.cell);
|
||||
}
|
||||
},
|
||||
on_death(me, level) {
|
||||
//update hole visual state
|
||||
me.type.on_begin(me, level);
|
||||
var one_south = level.cell(me.cell.x, me.cell.y + 1);
|
||||
@ -1860,6 +1862,11 @@ const TILE_TYPES = {
|
||||
on_depower(me, level) {
|
||||
level._set_tile_prop(me, 'is_active', false);
|
||||
},
|
||||
on_death(me, level) {
|
||||
//need to remove our wires since they're an implementation detail
|
||||
level._set_tile_prop(me, 'wire_directions', 0);
|
||||
level.recalculate_circuitry_next_wire_phase = true;
|
||||
},
|
||||
visual_state(me) {
|
||||
return ! me || me.is_active ? 'active' : 'inactive';
|
||||
},
|
||||
@ -2687,7 +2694,14 @@ const TILE_TYPES = {
|
||||
}
|
||||
else if (terrain) {
|
||||
// Anything other than these babies gets blown up and turned into floor
|
||||
if (!(
|
||||
if (terrain.type.name === 'hole') {
|
||||
//do nothing
|
||||
}
|
||||
else if (terrain.type.name === 'cracked_floor') {
|
||||
level.transmute_tile(terrain, 'hole');
|
||||
removed_anything = true;
|
||||
}
|
||||
else if (!(
|
||||
terrain.type.name === 'steel' || terrain.type.name === 'socket' ||
|
||||
terrain.type.name === 'logic_gate' || terrain.type.name === 'floor'))
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user