From 823fe4de379e3d20d9c53261d0abf14000feb27e Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Thu, 10 Dec 2020 13:28:40 -0700 Subject: [PATCH] bestowal_bow => gift_bow, directional_block => frame_block --- js/editor-tile-overlays.js | 4 ++-- js/format-c2g.js | 2 +- js/main-editor.js | 34 +++++++++++++++++----------------- js/tileset.js | 4 ++-- js/tiletypes.js | 26 +++++++++++++------------- 5 files changed, 35 insertions(+), 35 deletions(-) diff --git a/js/editor-tile-overlays.js b/js/editor-tile-overlays.js index 92ffc4a..686f5d3 100644 --- a/js/editor-tile-overlays.js +++ b/js/editor-tile-overlays.js @@ -85,7 +85,7 @@ class HintTileEditor extends TileEditorOverlay { } } -class DirectionalBlockTileEditor extends TileEditorOverlay { +class FrameBlockTileEditor extends TileEditorOverlay { constructor(conductor) { super(conductor); @@ -244,7 +244,7 @@ class RailroadTileEditor extends TileEditorOverlay { export const TILES_WITH_PROPS = { floor_letter: LetterTileEditor, hint: HintTileEditor, - directional_block: DirectionalBlockTileEditor, + frame_block: FrameBlockTileEditor, railroad: RailroadTileEditor, // TODO various wireable tiles (hmm not sure how that ui works) // TODO initial value of counter diff --git a/js/format-c2g.js b/js/format-c2g.js index ef2ef36..dc4b403 100644 --- a/js/format-c2g.js +++ b/js/format-c2g.js @@ -624,7 +624,7 @@ const TILE_ENCODING = { has_next: true, }, 0x81: { - name: 'directional_block', + name: 'frame_block', extra_args: [ arg_direction, { diff --git a/js/main-editor.js b/js/main-editor.js index 1202f5e..e86a56a 100644 --- a/js/main-editor.js +++ b/js/main-editor.js @@ -1169,7 +1169,7 @@ const EDITOR_PALETTE = [{ 'flippers', 'fire_boots', 'cleats', 'suction_boots', 'bribe', 'railroad_sign', 'hiking_boots', 'speed_boots', 'xray_eye', 'helmet', 'foil', 'lightning_bolt', - 'bowling_ball', 'dynamite', 'no_sign', 'bestowal_bow', + 'bowling_ball', 'dynamite', 'no_sign', 'gift_bow', 'score_10', 'score_100', 'score_1000', 'score_2x', ], }, { @@ -1198,12 +1198,12 @@ const EDITOR_PALETTE = [{ tiles: [ 'dirt_block', 'ice_block', - 'directional_block/0', - 'directional_block/1', - 'directional_block/2a', - 'directional_block/2o', - 'directional_block/3', - 'directional_block/4', + 'frame_block/0', + 'frame_block/1', + 'frame_block/2a', + 'frame_block/2o', + 'frame_block/3', + 'frame_block/4', 'green_floor', 'green_wall', @@ -1256,12 +1256,12 @@ const EDITOR_PALETTE = [{ }]; const SPECIAL_PALETTE_ENTRIES = { - 'directional_block/0': { name: 'directional_block', arrows: new Set }, - 'directional_block/1': { name: 'directional_block', arrows: new Set(['north']) }, - 'directional_block/2a': { name: 'directional_block', arrows: new Set(['north', 'east']) }, - 'directional_block/2o': { name: 'directional_block', arrows: new Set(['north', 'south']) }, - 'directional_block/3': { name: 'directional_block', arrows: new Set(['north', 'east', 'south']) }, - 'directional_block/4': { name: 'directional_block', arrows: new Set(['north', 'east', 'south', 'west']) }, + 'frame_block/0': { name: 'frame_block', direction: 'south', arrows: new Set }, + 'frame_block/1': { name: 'frame_block', direction: 'north', arrows: new Set(['north']) }, + 'frame_block/2a': { name: 'frame_block', direction: 'north', arrows: new Set(['north', 'east']) }, + 'frame_block/2o': { name: 'frame_block', direction: 'south', arrows: new Set(['north', 'south']) }, + 'frame_block/3': { name: 'frame_block', direction: 'south', arrows: new Set(['north', 'east', 'south']) }, + 'frame_block/4': { name: 'frame_block', direction: 'south', arrows: new Set(['north', 'east', 'south', 'west']) }, // FIXME these should be additive/subtractive, but a track picked up from the level should replace 'railroad/straight': { name: 'railroad', tracks: 1 << 5, track_switch: null, entered_direction: 'north' }, 'railroad/curve': { name: 'railroad', tracks: 1 << 0, track_switch: null, entered_direction: 'north' }, @@ -1279,19 +1279,19 @@ const SPECIAL_PALETTE_ENTRIES = { const _RAILROAD_ROTATED_LEFT = [3, 0, 1, 2, 5, 4]; const _RAILROAD_ROTATED_RIGHT = [1, 2, 3, 0, 5, 4]; const SPECIAL_PALETTE_BEHAVIOR = { - directional_block: { + frame_block: { pick_palette_entry(tile) { if (tile.arrows.size === 2) { let [a, b] = tile.arrows.keys(); if (a === DIRECTIONS[b].opposite) { - return 'directional_block/2o'; + return 'frame_block/2o'; } else { - return 'directional_block/2a'; + return 'frame_block/2a'; } } else { - return `directional_block/${tile.arrows.size}`; + return `frame_block/${tile.arrows.size}`; } }, rotate_left(tile) { diff --git a/js/tileset.js b/js/tileset.js index ef96220..6e3b853 100644 --- a/js/tileset.js +++ b/js/tileset.js @@ -159,7 +159,7 @@ export const CC2_TILESET_LAYOUT = { }, popdown_floor_visible: [13, 5], no_sign: [14, 5], - directional_block: { + frame_block: { base: [15, 5], arrows: [3, 10], }, @@ -850,7 +850,7 @@ export const LL_TILESET_LAYOUT = Object.assign({}, CC2_TILESET_LAYOUT, { // Custom tiles popwall2: [9, 32], - bestowal_bow: [10, 32], + gift_bow: [10, 32], circuit_block: { base: [13, 32], wired: [11, 32], diff --git a/js/tiletypes.js b/js/tiletypes.js index b938682..712fcd6 100644 --- a/js/tiletypes.js +++ b/js/tiletypes.js @@ -466,7 +466,7 @@ const TILE_TYPES = { level._set_tile_prop(me, 'entered_direction', other.direction); }, on_depart(me, level, other) { - if (other.type.name === 'directional_block') { + if (other.type.name === 'frame_block') { // Directional blocks are rotated when they leave // FIXME this isn't right, they rotate by the difference between their attempted // move and their redirected move @@ -627,7 +627,7 @@ const TILE_TYPES = { level.transmute_tile(other, 'splash'); level.transmute_tile(me, 'dirt'); } - else if (other.type.name === 'directional_block') { + else if (other.type.name === 'frame_block') { level.transmute_tile(other, 'splash'); level.transmute_tile(me, 'floor'); } @@ -868,7 +868,7 @@ const TILE_TYPES = { return false; }, }, - bestowal_bow: { + gift_bow: { draw_layer: DRAW_LAYERS.item_mod, item_modifier: 'pickup', }, @@ -895,10 +895,10 @@ const TILE_TYPES = { movement_speed: 4, pushes: { ice_block: true, - directional_block: true, + frame_block: true, }, }, - directional_block: { + frame_block: { // TODO directional, obviously // TODO floor in water // TODO destroyed in slime @@ -917,7 +917,7 @@ const TILE_TYPES = { pushes: { dirt_block: true, ice_block: true, - directional_block: true, + frame_block: true, }, }, green_floor: { @@ -1027,7 +1027,7 @@ const TILE_TYPES = { // FIXME add this underneath, just above the cloner, so the new actor is on top let new_template = new actor.constructor(type, direction); // TODO maybe make a type method for this - if (type.name === 'directional_block') { + if (type.name === 'frame_block') { new_template.arrows = new Set(actor.arrows); } level.add_tile(new_template, me.cell); @@ -1793,7 +1793,7 @@ const TILE_TYPES = { pushes: { dirt_block: true, ice_block: true, - directional_block: true, + frame_block: true, circuit_block: true, }, movement_speed: 4, @@ -1963,7 +1963,7 @@ const TILE_TYPES = { // actors who aren't supposed to have an inventory // TODO make this a... flag? i don't know? // TODO major difference from lynx... - if (other.type.name !== 'ice_block' && other.type.name !== 'directional_block') { + if (other.type.name !== 'ice_block' && other.type.name !== 'frame_block') { level.attempt_take(other, me); } }, @@ -2108,7 +2108,7 @@ const TILE_TYPES = { pushes: { dirt_block: true, ice_block: true, - directional_block: true, + frame_block: true, circuit_block: true, }, infinite_items: { @@ -2130,7 +2130,7 @@ const TILE_TYPES = { pushes: { dirt_block: true, ice_block: true, - directional_block: true, + frame_block: true, circuit_block: true, }, infinite_items: { @@ -2151,7 +2151,7 @@ const TILE_TYPES = { pushes: { dirt_block: true, ice_block: true, - directional_block: true, + frame_block: true, circuit_block: true, }, infinite_items: { @@ -2181,7 +2181,7 @@ const TILE_TYPES = { pushes: { dirt_block: true, ice_block: true, - directional_block: true, + frame_block: true, circuit_block: true, }, infinite_items: {