Make hook load, canopy work, and force floors reverse with gray button
This commit is contained in:
parent
411005eaa6
commit
0885bfc9d2
@ -672,10 +672,9 @@ const TILE_ENCODING = {
|
|||||||
name: 'speed_boots',
|
name: 'speed_boots',
|
||||||
has_next: true,
|
has_next: true,
|
||||||
},
|
},
|
||||||
0x91: {
|
0x92: {
|
||||||
name: 'hook',
|
name: 'hook',
|
||||||
has_next: true,
|
has_next: true,
|
||||||
error: "The hook is not yet implemented, sorry!",
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
const REVERSE_TILE_ENCODING = {};
|
const REVERSE_TILE_ENCODING = {};
|
||||||
|
|||||||
@ -105,7 +105,8 @@ export const CC2_TILESET_LAYOUT = {
|
|||||||
chip: [11, 3],
|
chip: [11, 3],
|
||||||
bribe: [12, 3],
|
bribe: [12, 3],
|
||||||
speed_boots: [13, 3],
|
speed_boots: [13, 3],
|
||||||
// canopy, xray
|
canopy: [14, 3],
|
||||||
|
// canopy xray
|
||||||
|
|
||||||
// TODO lit
|
// TODO lit
|
||||||
dynamite: [0, 4],
|
dynamite: [0, 4],
|
||||||
@ -552,6 +553,7 @@ export const CC2_TILESET_LAYOUT = {
|
|||||||
dirt: [4, 31],
|
dirt: [4, 31],
|
||||||
no_player2_sign: [5, 31],
|
no_player2_sign: [5, 31],
|
||||||
no_player1_sign: [6, 31],
|
no_player1_sign: [6, 31],
|
||||||
|
hook: [7, 31],
|
||||||
// misc other stuff
|
// misc other stuff
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -848,7 +850,7 @@ export class Tileset {
|
|||||||
_draw_letter(drawspec, tile, tic, blit) {
|
_draw_letter(drawspec, tile, tic, blit) {
|
||||||
this._draw_standard(drawspec.base, tile, tic, blit);
|
this._draw_standard(drawspec.base, tile, tic, blit);
|
||||||
|
|
||||||
let glyph = tile.overlaid_glyph;
|
let glyph = tile ? tile.overlaid_glyph : "?";
|
||||||
if (drawspec.letter_glyphs[glyph]) {
|
if (drawspec.letter_glyphs[glyph]) {
|
||||||
let [x, y] = drawspec.letter_glyphs[glyph];
|
let [x, y] = drawspec.letter_glyphs[glyph];
|
||||||
// XXX size is hardcoded here, but not below, meh
|
// XXX size is hardcoded here, but not below, meh
|
||||||
|
|||||||
@ -640,6 +640,9 @@ const TILE_TYPES = {
|
|||||||
on_arrive(me, level, other) {
|
on_arrive(me, level, other) {
|
||||||
level.set_actor_direction(other, 'north');
|
level.set_actor_direction(other, 'north');
|
||||||
},
|
},
|
||||||
|
on_gray_button(me, level) {
|
||||||
|
level.transmute_tile(me, 'force_floor_s');
|
||||||
|
},
|
||||||
},
|
},
|
||||||
force_floor_e: {
|
force_floor_e: {
|
||||||
draw_layer: DRAW_LAYERS.terrain,
|
draw_layer: DRAW_LAYERS.terrain,
|
||||||
@ -648,6 +651,9 @@ const TILE_TYPES = {
|
|||||||
on_arrive(me, level, other) {
|
on_arrive(me, level, other) {
|
||||||
level.set_actor_direction(other, 'east');
|
level.set_actor_direction(other, 'east');
|
||||||
},
|
},
|
||||||
|
on_gray_button(me, level) {
|
||||||
|
level.transmute_tile(me, 'force_floor_w');
|
||||||
|
},
|
||||||
},
|
},
|
||||||
force_floor_s: {
|
force_floor_s: {
|
||||||
draw_layer: DRAW_LAYERS.terrain,
|
draw_layer: DRAW_LAYERS.terrain,
|
||||||
@ -656,6 +662,9 @@ const TILE_TYPES = {
|
|||||||
on_arrive(me, level, other) {
|
on_arrive(me, level, other) {
|
||||||
level.set_actor_direction(other, 'south');
|
level.set_actor_direction(other, 'south');
|
||||||
},
|
},
|
||||||
|
on_gray_button(me, level) {
|
||||||
|
level.transmute_tile(me, 'force_floor_n');
|
||||||
|
},
|
||||||
},
|
},
|
||||||
force_floor_w: {
|
force_floor_w: {
|
||||||
draw_layer: DRAW_LAYERS.terrain,
|
draw_layer: DRAW_LAYERS.terrain,
|
||||||
@ -664,6 +673,9 @@ const TILE_TYPES = {
|
|||||||
on_arrive(me, level, other) {
|
on_arrive(me, level, other) {
|
||||||
level.set_actor_direction(other, 'west');
|
level.set_actor_direction(other, 'west');
|
||||||
},
|
},
|
||||||
|
on_gray_button(me, level) {
|
||||||
|
level.transmute_tile(me, 'force_floor_e');
|
||||||
|
},
|
||||||
},
|
},
|
||||||
force_floor_all: {
|
force_floor_all: {
|
||||||
draw_layer: DRAW_LAYERS.terrain,
|
draw_layer: DRAW_LAYERS.terrain,
|
||||||
@ -1710,6 +1722,12 @@ const TILE_TYPES = {
|
|||||||
is_tool: true,
|
is_tool: true,
|
||||||
blocks_collision: COLLISION.block_cc1 | COLLISION.monster_solid,
|
blocks_collision: COLLISION.block_cc1 | COLLISION.monster_solid,
|
||||||
},
|
},
|
||||||
|
hook: {
|
||||||
|
draw_layer: DRAW_LAYERS.item,
|
||||||
|
is_item: true,
|
||||||
|
is_tool: true,
|
||||||
|
blocks_collision: COLLISION.block_cc1 | COLLISION.monster_solid,
|
||||||
|
},
|
||||||
|
|
||||||
// Progression
|
// Progression
|
||||||
player: {
|
player: {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user