Allow only players, ice blocks, directional blocks, and rovers to reveal walls

This commit is contained in:
Eevee (Evelyn Woods) 2020-09-15 00:32:24 -06:00
parent 6d26362cb0
commit 325960b609
2 changed files with 16 additions and 3 deletions

View File

@ -790,6 +790,7 @@ const EDITOR_PALETTE = [{
tiles: [
'bomb',
'dirt_block',
'ice_block',
'button_blue',
'button_red', 'cloner',
'button_brown', 'trap',

View File

@ -65,7 +65,9 @@ const TILE_TYPES = {
draw_layer: LAYER_TERRAIN,
blocks_all: true,
on_bump(me, level, other) {
if (other.type.can_reveal_walls) {
level.transmute_tile(me, 'wall');
}
},
},
popwall: {
@ -101,14 +103,18 @@ const TILE_TYPES = {
draw_layer: LAYER_TERRAIN,
blocks_all: true,
on_bump(me, level, other) {
if (other.type.can_reveal_walls) {
level.transmute_tile(me, 'wall');
}
},
},
fake_floor: {
draw_layer: LAYER_TERRAIN,
blocks_all: true,
on_bump(me, level, other) {
if (other.type.can_reveal_walls) {
level.transmute_tile(me, 'floor');
}
},
},
popdown_wall: {
@ -506,6 +512,7 @@ const TILE_TYPES = {
blocks_all: true,
is_actor: true,
is_block: true,
can_reveal_walls: true,
movement_speed: 4,
pushes: {
ice_block: true,
@ -521,6 +528,7 @@ const TILE_TYPES = {
blocks_all: true,
is_actor: true,
is_block: true,
can_reveal_walls: true,
load(me, template) {
me.arrows = template.directional_block_arrows;
},
@ -956,11 +964,13 @@ const TILE_TYPES = {
},
rover: {
// TODO this guy is a nightmare
// TODO pushes blocks apparently??
draw_layer: LAYER_ACTOR,
is_actor: true,
is_monster: true,
blocks_monsters: true,
blocks_blocks: true,
can_reveal_walls: true,
movement_mode: 'random',
movement_speed: 4,
},
@ -1095,6 +1105,7 @@ const TILE_TYPES = {
is_actor: true,
is_player: true,
has_inventory: true,
can_reveal_walls: true,
movement_speed: 4,
pushes: {
dirt_block: true,
@ -1111,6 +1122,7 @@ const TILE_TYPES = {
is_actor: true,
is_player: true,
has_inventory: true,
can_reveal_walls: true,
movement_speed: 4,
ignores: new Set(['ice', 'ice_nw', 'ice_ne', 'ice_sw', 'ice_se']),
pushes: {