Fix dirt block direction in DAT; remove clone block, which serves no purpose for us

This commit is contained in:
Eevee (Evelyn Woods) 2020-09-18 22:22:38 -06:00
parent 569a3c0f3d
commit fcbd2b17be
3 changed files with 13 additions and 24 deletions

View File

@ -12,14 +12,17 @@ const TILE_ENCODING = {
0x07: 'thinwall_w',
0x08: 'thinwall_s',
0x09: 'thinwall_e',
0x0a: 'dirt_block',
// This is MSCC's incomprehensible non-directional dirt block, which needs a direction for Lynx
// purposes; Tile World defaults it to north
0x0a: ['dirt_block', 'north'],
0x0b: 'dirt',
0x0c: 'ice',
0x0d: 'force_floor_s',
0x0e: ['clone_block', 'north'],
0x0f: ['clone_block', 'west'],
0x10: ['clone_block', 'south'],
0x11: ['clone_block', 'east'],
// These are the "clone blocks", which for us are just regular blocks
0x0e: ['dirt_block', 'north'],
0x0f: ['dirt_block', 'west'],
0x10: ['dirt_block', 'south'],
0x11: ['dirt_block', 'east'],
0x12: 'force_floor_n',
0x13: 'force_floor_e',
0x14: 'force_floor_w',

View File

@ -23,7 +23,6 @@ export const CC2_TILESET_LAYOUT = {
key_yellow: [6, 1],
key_green: [7, 1],
dirt_block: [8, 1],
clone_block: [8, 1],
// xray
ice: [10, 1],
ice_se: [11, 1],
@ -372,11 +371,12 @@ export const TILE_WORLD_TILESET_LAYOUT = {
thinwall_w: [0, 7],
thinwall_s: [0, 8],
thinwall_e: [0, 9],
dirt_block: [0, 10],
// This is the non-directed dirt block, which we don't have
// dirt_block: [0, 10],
dirt: [0, 11],
ice: [0, 12],
force_floor_s: [0, 13],
clone_block: {
dirt_block: {
north: [0, 14],
west: [0, 15],
south: [1, 0],

View File

@ -331,7 +331,7 @@ const TILE_TYPES = {
draw_layer: LAYER_TERRAIN,
on_arrive(me, level, other) {
// TODO cc1 allows items under water, i think; water was on the upper layer
if (other.type.name === 'dirt_block' || other.type.name === 'clone_block') {
if (other.type.name === 'dirt_block') {
level.transmute_tile(other, 'splash');
level.transmute_tile(me, 'dirt');
}
@ -452,7 +452,7 @@ const TILE_TYPES = {
// FIXME kills everything except ghosts, blobs, blocks
// FIXME blobs spread slime onto floor tiles, even destroying wiring
on_arrive(me, level, other) {
if (other.type.name === 'dirt_block' || other.type.name === 'clone_block' || other.type.name === 'ice_block') {
if (other.type.name === 'dirt_block' || other.type.name === 'ice_block') {
level.transmute_tile(me, 'floor');
}
},
@ -516,15 +516,6 @@ const TILE_TYPES = {
ignores: new Set(['fire']),
movement_speed: 4,
},
clone_block: {
draw_layer: LAYER_ACTOR,
// TODO is this in any way distinct from dirt block
blocks_all: true,
is_actor: true,
is_block: true,
ignores: new Set(['fire']),
movement_speed: 4,
},
ice_block: {
draw_layer: LAYER_ACTOR,
blocks_all: true,
@ -551,7 +542,6 @@ const TILE_TYPES = {
movement_speed: 4,
pushes: {
dirt_block: true,
clone_block: true,
ice_block: true,
directional_block: true,
},
@ -652,7 +642,6 @@ const TILE_TYPES = {
// TODO mirror players too
dirt_block: 'ice_block',
clone_block: 'ice_block',
ice_block: 'dirt_block',
ball: 'walker',
@ -910,7 +899,6 @@ const TILE_TYPES = {
blocks_blocks: true,
pushes: {
dirt_block: true,
clone_block: true,
ice_block: true,
directional_block: true,
},
@ -1124,7 +1112,6 @@ const TILE_TYPES = {
movement_speed: 4,
pushes: {
dirt_block: true,
clone_block: true,
ice_block: true,
directional_block: true,
},
@ -1143,7 +1130,6 @@ const TILE_TYPES = {
ignores: new Set(['ice', 'ice_nw', 'ice_ne', 'ice_sw', 'ice_se']),
pushes: {
dirt_block: true,
clone_block: true,
ice_block: true,
directional_block: true,
},