bestowal_bow => gift_bow, directional_block => frame_block
This commit is contained in:
parent
bd4cc10b16
commit
823fe4de37
@ -85,7 +85,7 @@ class HintTileEditor extends TileEditorOverlay {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class DirectionalBlockTileEditor extends TileEditorOverlay {
|
class FrameBlockTileEditor extends TileEditorOverlay {
|
||||||
constructor(conductor) {
|
constructor(conductor) {
|
||||||
super(conductor);
|
super(conductor);
|
||||||
|
|
||||||
@ -244,7 +244,7 @@ class RailroadTileEditor extends TileEditorOverlay {
|
|||||||
export const TILES_WITH_PROPS = {
|
export const TILES_WITH_PROPS = {
|
||||||
floor_letter: LetterTileEditor,
|
floor_letter: LetterTileEditor,
|
||||||
hint: HintTileEditor,
|
hint: HintTileEditor,
|
||||||
directional_block: DirectionalBlockTileEditor,
|
frame_block: FrameBlockTileEditor,
|
||||||
railroad: RailroadTileEditor,
|
railroad: RailroadTileEditor,
|
||||||
// TODO various wireable tiles (hmm not sure how that ui works)
|
// TODO various wireable tiles (hmm not sure how that ui works)
|
||||||
// TODO initial value of counter
|
// TODO initial value of counter
|
||||||
|
|||||||
@ -624,7 +624,7 @@ const TILE_ENCODING = {
|
|||||||
has_next: true,
|
has_next: true,
|
||||||
},
|
},
|
||||||
0x81: {
|
0x81: {
|
||||||
name: 'directional_block',
|
name: 'frame_block',
|
||||||
extra_args: [
|
extra_args: [
|
||||||
arg_direction,
|
arg_direction,
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1169,7 +1169,7 @@ const EDITOR_PALETTE = [{
|
|||||||
'flippers', 'fire_boots', 'cleats', 'suction_boots',
|
'flippers', 'fire_boots', 'cleats', 'suction_boots',
|
||||||
'bribe', 'railroad_sign', 'hiking_boots', 'speed_boots',
|
'bribe', 'railroad_sign', 'hiking_boots', 'speed_boots',
|
||||||
'xray_eye', 'helmet', 'foil', 'lightning_bolt',
|
'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',
|
'score_10', 'score_100', 'score_1000', 'score_2x',
|
||||||
],
|
],
|
||||||
}, {
|
}, {
|
||||||
@ -1198,12 +1198,12 @@ const EDITOR_PALETTE = [{
|
|||||||
tiles: [
|
tiles: [
|
||||||
'dirt_block',
|
'dirt_block',
|
||||||
'ice_block',
|
'ice_block',
|
||||||
'directional_block/0',
|
'frame_block/0',
|
||||||
'directional_block/1',
|
'frame_block/1',
|
||||||
'directional_block/2a',
|
'frame_block/2a',
|
||||||
'directional_block/2o',
|
'frame_block/2o',
|
||||||
'directional_block/3',
|
'frame_block/3',
|
||||||
'directional_block/4',
|
'frame_block/4',
|
||||||
|
|
||||||
'green_floor',
|
'green_floor',
|
||||||
'green_wall',
|
'green_wall',
|
||||||
@ -1256,12 +1256,12 @@ const EDITOR_PALETTE = [{
|
|||||||
}];
|
}];
|
||||||
|
|
||||||
const SPECIAL_PALETTE_ENTRIES = {
|
const SPECIAL_PALETTE_ENTRIES = {
|
||||||
'directional_block/0': { name: 'directional_block', arrows: new Set },
|
'frame_block/0': { name: 'frame_block', direction: 'south', arrows: new Set },
|
||||||
'directional_block/1': { name: 'directional_block', arrows: new Set(['north']) },
|
'frame_block/1': { name: 'frame_block', direction: 'north', arrows: new Set(['north']) },
|
||||||
'directional_block/2a': { name: 'directional_block', arrows: new Set(['north', 'east']) },
|
'frame_block/2a': { name: 'frame_block', direction: 'north', arrows: new Set(['north', 'east']) },
|
||||||
'directional_block/2o': { name: 'directional_block', arrows: new Set(['north', 'south']) },
|
'frame_block/2o': { name: 'frame_block', direction: 'south', arrows: new Set(['north', 'south']) },
|
||||||
'directional_block/3': { name: 'directional_block', arrows: new Set(['north', 'east', 'south']) },
|
'frame_block/3': { name: 'frame_block', direction: 'south', arrows: new Set(['north', 'east', 'south']) },
|
||||||
'directional_block/4': { name: 'directional_block', arrows: new Set(['north', 'east', 'south', 'west']) },
|
'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
|
// 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/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' },
|
'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_LEFT = [3, 0, 1, 2, 5, 4];
|
||||||
const _RAILROAD_ROTATED_RIGHT = [1, 2, 3, 0, 5, 4];
|
const _RAILROAD_ROTATED_RIGHT = [1, 2, 3, 0, 5, 4];
|
||||||
const SPECIAL_PALETTE_BEHAVIOR = {
|
const SPECIAL_PALETTE_BEHAVIOR = {
|
||||||
directional_block: {
|
frame_block: {
|
||||||
pick_palette_entry(tile) {
|
pick_palette_entry(tile) {
|
||||||
if (tile.arrows.size === 2) {
|
if (tile.arrows.size === 2) {
|
||||||
let [a, b] = tile.arrows.keys();
|
let [a, b] = tile.arrows.keys();
|
||||||
if (a === DIRECTIONS[b].opposite) {
|
if (a === DIRECTIONS[b].opposite) {
|
||||||
return 'directional_block/2o';
|
return 'frame_block/2o';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return 'directional_block/2a';
|
return 'frame_block/2a';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return `directional_block/${tile.arrows.size}`;
|
return `frame_block/${tile.arrows.size}`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
rotate_left(tile) {
|
rotate_left(tile) {
|
||||||
|
|||||||
@ -159,7 +159,7 @@ export const CC2_TILESET_LAYOUT = {
|
|||||||
},
|
},
|
||||||
popdown_floor_visible: [13, 5],
|
popdown_floor_visible: [13, 5],
|
||||||
no_sign: [14, 5],
|
no_sign: [14, 5],
|
||||||
directional_block: {
|
frame_block: {
|
||||||
base: [15, 5],
|
base: [15, 5],
|
||||||
arrows: [3, 10],
|
arrows: [3, 10],
|
||||||
},
|
},
|
||||||
@ -850,7 +850,7 @@ export const LL_TILESET_LAYOUT = Object.assign({}, CC2_TILESET_LAYOUT, {
|
|||||||
|
|
||||||
// Custom tiles
|
// Custom tiles
|
||||||
popwall2: [9, 32],
|
popwall2: [9, 32],
|
||||||
bestowal_bow: [10, 32],
|
gift_bow: [10, 32],
|
||||||
circuit_block: {
|
circuit_block: {
|
||||||
base: [13, 32],
|
base: [13, 32],
|
||||||
wired: [11, 32],
|
wired: [11, 32],
|
||||||
|
|||||||
@ -466,7 +466,7 @@ const TILE_TYPES = {
|
|||||||
level._set_tile_prop(me, 'entered_direction', other.direction);
|
level._set_tile_prop(me, 'entered_direction', other.direction);
|
||||||
},
|
},
|
||||||
on_depart(me, level, other) {
|
on_depart(me, level, other) {
|
||||||
if (other.type.name === 'directional_block') {
|
if (other.type.name === 'frame_block') {
|
||||||
// Directional blocks are rotated when they leave
|
// Directional blocks are rotated when they leave
|
||||||
// FIXME this isn't right, they rotate by the difference between their attempted
|
// FIXME this isn't right, they rotate by the difference between their attempted
|
||||||
// move and their redirected move
|
// move and their redirected move
|
||||||
@ -627,7 +627,7 @@ const TILE_TYPES = {
|
|||||||
level.transmute_tile(other, 'splash');
|
level.transmute_tile(other, 'splash');
|
||||||
level.transmute_tile(me, 'dirt');
|
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(other, 'splash');
|
||||||
level.transmute_tile(me, 'floor');
|
level.transmute_tile(me, 'floor');
|
||||||
}
|
}
|
||||||
@ -868,7 +868,7 @@ const TILE_TYPES = {
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
bestowal_bow: {
|
gift_bow: {
|
||||||
draw_layer: DRAW_LAYERS.item_mod,
|
draw_layer: DRAW_LAYERS.item_mod,
|
||||||
item_modifier: 'pickup',
|
item_modifier: 'pickup',
|
||||||
},
|
},
|
||||||
@ -895,10 +895,10 @@ const TILE_TYPES = {
|
|||||||
movement_speed: 4,
|
movement_speed: 4,
|
||||||
pushes: {
|
pushes: {
|
||||||
ice_block: true,
|
ice_block: true,
|
||||||
directional_block: true,
|
frame_block: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
directional_block: {
|
frame_block: {
|
||||||
// TODO directional, obviously
|
// TODO directional, obviously
|
||||||
// TODO floor in water
|
// TODO floor in water
|
||||||
// TODO destroyed in slime
|
// TODO destroyed in slime
|
||||||
@ -917,7 +917,7 @@ const TILE_TYPES = {
|
|||||||
pushes: {
|
pushes: {
|
||||||
dirt_block: true,
|
dirt_block: true,
|
||||||
ice_block: true,
|
ice_block: true,
|
||||||
directional_block: true,
|
frame_block: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
green_floor: {
|
green_floor: {
|
||||||
@ -1027,7 +1027,7 @@ const TILE_TYPES = {
|
|||||||
// FIXME add this underneath, just above the cloner, so the new actor is on top
|
// FIXME add this underneath, just above the cloner, so the new actor is on top
|
||||||
let new_template = new actor.constructor(type, direction);
|
let new_template = new actor.constructor(type, direction);
|
||||||
// TODO maybe make a type method for this
|
// 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);
|
new_template.arrows = new Set(actor.arrows);
|
||||||
}
|
}
|
||||||
level.add_tile(new_template, me.cell);
|
level.add_tile(new_template, me.cell);
|
||||||
@ -1793,7 +1793,7 @@ const TILE_TYPES = {
|
|||||||
pushes: {
|
pushes: {
|
||||||
dirt_block: true,
|
dirt_block: true,
|
||||||
ice_block: true,
|
ice_block: true,
|
||||||
directional_block: true,
|
frame_block: true,
|
||||||
circuit_block: true,
|
circuit_block: true,
|
||||||
},
|
},
|
||||||
movement_speed: 4,
|
movement_speed: 4,
|
||||||
@ -1963,7 +1963,7 @@ const TILE_TYPES = {
|
|||||||
// actors who aren't supposed to have an inventory
|
// actors who aren't supposed to have an inventory
|
||||||
// TODO make this a... flag? i don't know?
|
// TODO make this a... flag? i don't know?
|
||||||
// TODO major difference from lynx...
|
// 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);
|
level.attempt_take(other, me);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -2108,7 +2108,7 @@ const TILE_TYPES = {
|
|||||||
pushes: {
|
pushes: {
|
||||||
dirt_block: true,
|
dirt_block: true,
|
||||||
ice_block: true,
|
ice_block: true,
|
||||||
directional_block: true,
|
frame_block: true,
|
||||||
circuit_block: true,
|
circuit_block: true,
|
||||||
},
|
},
|
||||||
infinite_items: {
|
infinite_items: {
|
||||||
@ -2130,7 +2130,7 @@ const TILE_TYPES = {
|
|||||||
pushes: {
|
pushes: {
|
||||||
dirt_block: true,
|
dirt_block: true,
|
||||||
ice_block: true,
|
ice_block: true,
|
||||||
directional_block: true,
|
frame_block: true,
|
||||||
circuit_block: true,
|
circuit_block: true,
|
||||||
},
|
},
|
||||||
infinite_items: {
|
infinite_items: {
|
||||||
@ -2151,7 +2151,7 @@ const TILE_TYPES = {
|
|||||||
pushes: {
|
pushes: {
|
||||||
dirt_block: true,
|
dirt_block: true,
|
||||||
ice_block: true,
|
ice_block: true,
|
||||||
directional_block: true,
|
frame_block: true,
|
||||||
circuit_block: true,
|
circuit_block: true,
|
||||||
},
|
},
|
||||||
infinite_items: {
|
infinite_items: {
|
||||||
@ -2181,7 +2181,7 @@ const TILE_TYPES = {
|
|||||||
pushes: {
|
pushes: {
|
||||||
dirt_block: true,
|
dirt_block: true,
|
||||||
ice_block: true,
|
ice_block: true,
|
||||||
directional_block: true,
|
frame_block: true,
|
||||||
circuit_block: true,
|
circuit_block: true,
|
||||||
},
|
},
|
||||||
infinite_items: {
|
infinite_items: {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user