Rovers can pick up items and push blocks

This commit is contained in:
Eevee (Evelyn Woods) 2020-12-19 17:39:20 -07:00
parent aa0bb5cbc2
commit 78800214d0

View File

@ -1970,11 +1970,19 @@ const TILE_TYPES = {
draw_layer: DRAW_LAYERS.actor, draw_layer: DRAW_LAYERS.actor,
is_actor: true, is_actor: true,
is_monster: true, is_monster: true,
has_inventory: true,
collision_mask: COLLISION.rover, collision_mask: COLLISION.rover,
blocks_collision: COLLISION.all_but_player, blocks_collision: COLLISION.all_but_player,
can_reveal_walls: true, can_reveal_walls: true,
movement_speed: 8, movement_speed: 8,
movement_parity: 2, movement_parity: 2,
// FIXME basically everyone has this same set of objects listed?
pushes: {
dirt_block: true,
ice_block: true,
frame_block: true,
circuit_block: true,
},
on_ready(me, level) { on_ready(me, level) {
me.current_emulatee = 0; me.current_emulatee = 0;
me.attempted_moves = 0; me.attempted_moves = 0;
@ -2033,13 +2041,14 @@ const TILE_TYPES = {
draw_layer: DRAW_LAYERS.item, draw_layer: DRAW_LAYERS.item,
is_item: true, is_item: true,
is_key: true, is_key: true,
blocks_collision: COLLISION.block_cc1 | COLLISION.monster_solid, // FIXME ok this is ghastly
blocks_collision: COLLISION.block_cc1 | (COLLISION.monster_solid & ~COLLISION.rover),
}, },
key_green: { key_green: {
draw_layer: DRAW_LAYERS.item, draw_layer: DRAW_LAYERS.item,
is_item: true, is_item: true,
is_key: true, is_key: true,
blocks_collision: COLLISION.block_cc1 | COLLISION.monster_solid, blocks_collision: COLLISION.block_cc1 | (COLLISION.monster_solid & ~COLLISION.rover),
}, },
// Boots // Boots
// TODO note: ms allows blocks to pass over tools // TODO note: ms allows blocks to pass over tools
@ -2047,14 +2056,14 @@ const TILE_TYPES = {
draw_layer: DRAW_LAYERS.item, draw_layer: DRAW_LAYERS.item,
is_item: true, is_item: true,
is_tool: true, is_tool: true,
blocks_collision: COLLISION.block_cc1 | COLLISION.monster_solid, blocks_collision: COLLISION.block_cc1 | (COLLISION.monster_solid & ~COLLISION.rover),
item_ignores: new Set(['ice', 'ice_nw', 'ice_ne', 'ice_sw', 'ice_se']), item_ignores: new Set(['ice', 'ice_nw', 'ice_ne', 'ice_sw', 'ice_se']),
}, },
suction_boots: { suction_boots: {
draw_layer: DRAW_LAYERS.item, draw_layer: DRAW_LAYERS.item,
is_item: true, is_item: true,
is_tool: true, is_tool: true,
blocks_collision: COLLISION.block_cc1 | COLLISION.monster_solid, blocks_collision: COLLISION.block_cc1 | (COLLISION.monster_solid & ~COLLISION.rover),
item_ignores: new Set([ item_ignores: new Set([
'force_floor_n', 'force_floor_n',
'force_floor_s', 'force_floor_s',
@ -2067,21 +2076,21 @@ const TILE_TYPES = {
draw_layer: DRAW_LAYERS.item, draw_layer: DRAW_LAYERS.item,
is_item: true, is_item: true,
is_tool: true, is_tool: true,
blocks_collision: COLLISION.block_cc1 | COLLISION.monster_solid, blocks_collision: COLLISION.block_cc1 | (COLLISION.monster_solid & ~COLLISION.rover),
item_ignores: new Set(['fire', 'flame_jet_on']), item_ignores: new Set(['fire', 'flame_jet_on']),
}, },
flippers: { flippers: {
draw_layer: DRAW_LAYERS.item, draw_layer: DRAW_LAYERS.item,
is_item: true, is_item: true,
is_tool: true, is_tool: true,
blocks_collision: COLLISION.block_cc1 | COLLISION.monster_solid, blocks_collision: COLLISION.block_cc1 | (COLLISION.monster_solid & ~COLLISION.rover),
item_ignores: new Set(['water']), item_ignores: new Set(['water']),
}, },
hiking_boots: { hiking_boots: {
draw_layer: DRAW_LAYERS.item, draw_layer: DRAW_LAYERS.item,
is_item: true, is_item: true,
is_tool: true, is_tool: true,
blocks_collision: COLLISION.block_cc1 | COLLISION.monster_solid, blocks_collision: COLLISION.block_cc1 | (COLLISION.monster_solid & ~COLLISION.rover),
// FIXME uhh these "ignore" that dirt and gravel block us, but they don't ignore the on_arrive, so, uhhhh // FIXME uhh these "ignore" that dirt and gravel block us, but they don't ignore the on_arrive, so, uhhhh
}, },
// Other tools // Other tools
@ -2089,7 +2098,7 @@ const TILE_TYPES = {
draw_layer: DRAW_LAYERS.item, draw_layer: DRAW_LAYERS.item,
is_item: true, is_item: true,
is_tool: true, is_tool: true,
blocks_collision: COLLISION.block_cc1 | COLLISION.monster_solid, blocks_collision: COLLISION.block_cc1 | (COLLISION.monster_solid & ~COLLISION.rover),
on_drop(level, owner) { on_drop(level, owner) {
// FIXME not if the cell has a no sign // FIXME not if the cell has a no sign
if (! owner.type.is_real_player) { if (! owner.type.is_real_player) {
@ -2191,7 +2200,7 @@ const TILE_TYPES = {
draw_layer: DRAW_LAYERS.item, draw_layer: DRAW_LAYERS.item,
is_item: true, is_item: true,
is_tool: true, is_tool: true,
blocks_collision: COLLISION.block_cc1 | COLLISION.monster_solid, blocks_collision: COLLISION.block_cc1 | (COLLISION.monster_solid & ~COLLISION.rover),
on_drop(level, owner) { on_drop(level, owner) {
return 'rolling_ball'; return 'rolling_ball';
}, },
@ -2237,54 +2246,54 @@ const TILE_TYPES = {
draw_layer: DRAW_LAYERS.item, draw_layer: DRAW_LAYERS.item,
is_item: true, is_item: true,
is_tool: true, is_tool: true,
blocks_collision: COLLISION.block_cc1 | COLLISION.monster_solid, blocks_collision: COLLISION.block_cc1 | (COLLISION.monster_solid & ~COLLISION.rover),
}, },
helmet: { helmet: {
// TODO not implemented // TODO not implemented
draw_layer: DRAW_LAYERS.item, draw_layer: DRAW_LAYERS.item,
is_item: true, is_item: true,
is_tool: true, is_tool: true,
blocks_collision: COLLISION.block_cc1 | COLLISION.monster_solid, blocks_collision: COLLISION.block_cc1 | (COLLISION.monster_solid & ~COLLISION.rover),
}, },
railroad_sign: { railroad_sign: {
draw_layer: DRAW_LAYERS.item, draw_layer: DRAW_LAYERS.item,
is_item: true, is_item: true,
is_tool: true, is_tool: true,
blocks_collision: COLLISION.block_cc1 | COLLISION.monster_solid, blocks_collision: COLLISION.block_cc1 | (COLLISION.monster_solid & ~COLLISION.rover),
}, },
foil: { foil: {
// TODO not implemented // TODO not implemented
draw_layer: DRAW_LAYERS.item, draw_layer: DRAW_LAYERS.item,
is_item: true, is_item: true,
is_tool: true, is_tool: true,
blocks_collision: COLLISION.block_cc1 | COLLISION.monster_solid, blocks_collision: COLLISION.block_cc1 | (COLLISION.monster_solid & ~COLLISION.rover),
}, },
lightning_bolt: { lightning_bolt: {
// TODO not implemented // TODO not implemented
draw_layer: DRAW_LAYERS.item, draw_layer: DRAW_LAYERS.item,
is_item: true, is_item: true,
is_tool: true, is_tool: true,
blocks_collision: COLLISION.block_cc1 | COLLISION.monster_solid, blocks_collision: COLLISION.block_cc1 | (COLLISION.monster_solid & ~COLLISION.rover),
}, },
speed_boots: { speed_boots: {
// TODO not implemented // TODO not implemented
draw_layer: DRAW_LAYERS.item, draw_layer: DRAW_LAYERS.item,
is_item: true, is_item: true,
is_tool: true, is_tool: true,
blocks_collision: COLLISION.block_cc1 | COLLISION.monster_solid, blocks_collision: COLLISION.block_cc1 | (COLLISION.monster_solid & ~COLLISION.rover),
}, },
bribe: { bribe: {
// TODO not implemented // TODO not implemented
draw_layer: DRAW_LAYERS.item, draw_layer: DRAW_LAYERS.item,
is_item: true, is_item: true,
is_tool: true, is_tool: true,
blocks_collision: COLLISION.block_cc1 | COLLISION.monster_solid, blocks_collision: COLLISION.block_cc1 | (COLLISION.monster_solid & ~COLLISION.rover),
}, },
hook: { hook: {
draw_layer: DRAW_LAYERS.item, draw_layer: DRAW_LAYERS.item,
is_item: true, is_item: true,
is_tool: true, is_tool: true,
blocks_collision: COLLISION.block_cc1 | COLLISION.monster_solid, blocks_collision: COLLISION.block_cc1 | (COLLISION.monster_solid & ~COLLISION.rover),
}, },
// Progression // Progression