let any actor with a key unlock gates (unlike doors)

This commit is contained in:
Timothy Stiles 2021-11-20 12:57:58 +11:00
parent 8feb732a8f
commit 71abc13330
2 changed files with 2 additions and 3 deletions

View File

@ -894,7 +894,7 @@ export const TILE_DESCRIPTIONS = {
}, },
gate_red: { gate_red: {
name: "Red gate", name: "Red gate",
desc: "Requires a red key. Unlike doors, may be placed on top of other terrain.", desc: "Requires a red key. Unlike doors, may be placed on top of other terrain, and any actor with the key may unlock it.",
}, },
sand: { sand: {
name: "Sand", name: "Sand",

View File

@ -34,8 +34,7 @@ function _define_door(key) {
function _define_gate(key) { function _define_gate(key) {
return { return {
layer: LAYERS.canopy, layer: LAYERS.canopy,
// Doors can be opened by ice blocks, but not dirt blocks or monsters // Unlike doors, anything with the key (or a ghost) can step on them
blocks_collision: COLLISION.block_cc1 | COLLISION.monster_typical,
blocks(me, level, other) { blocks(me, level, other) {
if (other.type.name === 'ghost') if (other.type.name === 'ghost')
return false; return false;