From 71abc13330d2cf06320c8f4644f2db270575d85f Mon Sep 17 00:00:00 2001 From: Timothy Stiles Date: Sat, 20 Nov 2021 12:57:58 +1100 Subject: [PATCH] let any actor with a key unlock gates (unlike doors) --- js/editor/editordefs.js | 2 +- js/tiletypes.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/js/editor/editordefs.js b/js/editor/editordefs.js index 4be0ffe..9ab37c8 100644 --- a/js/editor/editordefs.js +++ b/js/editor/editordefs.js @@ -894,7 +894,7 @@ export const TILE_DESCRIPTIONS = { }, gate_red: { 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: { name: "Sand", diff --git a/js/tiletypes.js b/js/tiletypes.js index 96698e0..2697a9a 100644 --- a/js/tiletypes.js +++ b/js/tiletypes.js @@ -34,8 +34,7 @@ function _define_door(key) { function _define_gate(key) { return { layer: LAYERS.canopy, - // Doors can be opened by ice blocks, but not dirt blocks or monsters - blocks_collision: COLLISION.block_cc1 | COLLISION.monster_typical, + // Unlike doors, anything with the key (or a ghost) can step on them blocks(me, level, other) { if (other.type.name === 'ghost') return false;