Remove the item lock tile

This commit is contained in:
Eevee (Evelyn Woods) 2021-03-07 00:43:56 -07:00
parent e5fd2b67da
commit e69ac492c7
3 changed files with 0 additions and 61 deletions

View File

@ -1608,7 +1608,6 @@ const EDITOR_PALETTE = [{
'teleport_blue_exit', 'teleport_blue_exit',
'electrified_floor', 'electrified_floor',
'halo', 'halo',
'item_lock',
'score_5x', 'score_5x',
'boulder', 'boulder',
'glass_block', 'glass_block',
@ -2243,10 +2242,6 @@ const EDITOR_TILE_DESCRIPTIONS = {
name: "Boulder", name: "Boulder",
desc: "Similar to a dirt block, but rolls when pushed. Boulders transfer momentum to each other. Has ice block/frame block collision. Turns into gravel in water. Spreads slime.", desc: "Similar to a dirt block, but rolls when pushed. Boulders transfer momentum to each other. Has ice block/frame block collision. Turns into gravel in water. Spreads slime.",
}, },
item_lock: {
name: "Item lock",
desc: "When placed atop an item, you must have that item to enter the tile. When you do, pay the item and destroy the item lock. Also can be placed on top of a bonus, and you must pay that amount of bonus to enter.",
},
dash_floor: { dash_floor: {
name: "Dash floor", name: "Dash floor",
desc: "Anything walking on it moves at double speed. Stacks with speed shoes!", desc: "Anything walking on it moves at double speed. Stacks with speed shoes!",

View File

@ -1982,8 +1982,6 @@ export const LL_TILESET_LAYOUT = {
transmogrify_flash: [[24, 26], [25, 26], [26, 26], [27, 26], [28, 26], [29, 26], [30, 26], [31, 26]], transmogrify_flash: [[24, 26], [25, 26], [26, 26], [27, 26], [28, 26], [29, 26], [30, 26], [31, 26]],
teleport_flash: [[24, 27], [25, 27], [26, 27], [27, 27]], teleport_flash: [[24, 27], [25, 27], [26, 27], [27, 27]],
puff: [[24, 28], [25, 28], [26, 28], [27, 28]], puff: [[24, 28], [25, 28], [26, 28], [27, 28]],
item_lock: [26, 31], // XXX delete this
}; };
export const TILESET_LAYOUTS = { export const TILESET_LAYOUTS = {

View File

@ -1195,60 +1195,6 @@ const TILE_TYPES = {
layer: LAYERS.item_mod, layer: LAYERS.item_mod,
item_modifier: 'pickup', item_modifier: 'pickup',
}, },
item_lock: {
layer: LAYERS.item_mod,
item_modifier: 'ignore',
blocks(me, level, other) {
let item = me.cell.get_item();
if (item === null) {
return false;
}
if (item.type.name == 'score_10') {
return !(other.type.is_real_player && level.bonus_points >= 10);
}
else if (item.type.name == 'score_100') {
return !(other.type.is_real_player && level.bonus_points >= 100);
}
else if (item.type.name == 'score_1000') {
return !(other.type.is_real_player && level.bonus_points >= 1000);
}
else if (item.type.name == 'score_2x') {
return !(other.type.is_real_player && level.bonus_points >= 1);
}
else if (item.type.name == 'score_5x') {
return !(other.type.is_real_player && level.bonus_points >= 1);
}
return !other.has_item(item.type.name);
},
on_arrive(me, level, other) {
let item = me.cell.get_item();
if (item === null) {
return;
}
if (item.type.name == 'score_10') {
level.adjust_bonus(-10);
}
else if (item.type.name == 'score_100') {
level.adjust_bonus(-100);
}
else if (item.type.name == 'score_1000') {
level.adjust_bonus(-1000);
}
else if (item.type.name == 'score_2x') {
level.adjust_bonus(0, 1/2);
}
else if (item.type.name == 'score_5x') {
level.adjust_bonus(0, 1/5);
}
else {
level.take_key_from_actor(other, item.type.name, true) || level.take_tool_from_actor(other, item.type.name);
}
level.sfx.play_once('door', me.cell);
level.spawn_animation(me.cell, 'puff');
level.remove_tile(me);
level.remove_tile(item);
},
},
// Mechanisms // Mechanisms
dirt_block: { dirt_block: {