New MS compat flag: Block splashes don't block the player
This commit is contained in:
parent
df0ab43e70
commit
55c4c574ec
@ -261,6 +261,10 @@ export const COMPAT_FLAGS = [
|
||||
key: 'emulate_spring_mining',
|
||||
label: "Spring mining is possible",
|
||||
rulesets: new Set(['steam-strict']),
|
||||
}, {
|
||||
key: 'block_splashes_dont_block',
|
||||
label: "Block splashes don't block the player",
|
||||
rulesets: new Set(['ms']),
|
||||
/* XXX not implemented
|
||||
}, {
|
||||
key: 'emulate_flicking',
|
||||
|
||||
@ -160,6 +160,7 @@ export const CC2_TILESET_LAYOUT = {
|
||||
explosion_nb: [[0, 5], [1, 5], [2, 5], [3, 5]],
|
||||
splash_slime: [[0, 5], [1, 5], [2, 5], [3, 5]],
|
||||
splash: [[4, 5], [5, 5], [6, 5], [7, 5]],
|
||||
splash_nb: [[4, 5], [5, 5], [6, 5], [7, 5]],
|
||||
flame_jet_off: [8, 5],
|
||||
flame_jet_on: {
|
||||
__special__: 'animated',
|
||||
@ -910,6 +911,7 @@ export const TILE_WORLD_TILESET_LAYOUT = {
|
||||
cloner: [3, 1],
|
||||
force_floor_all: [3, 2],
|
||||
splash: [3, 3],
|
||||
splash_nb: [3, 3],
|
||||
bogus_player_drowned: [3, 3],
|
||||
bogus_player_burned_fire: [3, 4],
|
||||
bogus_player_burned: [3, 5],
|
||||
@ -2033,6 +2035,7 @@ export const LL_TILESET_LAYOUT = {
|
||||
explosion: [[16, 26], [17, 26], [18, 26], [19, 26]],
|
||||
explosion_nb: [[16, 26], [17, 26], [18, 26], [19, 26]],
|
||||
splash: [[16, 27], [17, 27], [18, 27], [19, 27]],
|
||||
splash_nb: [[16, 27], [17, 27], [18, 27], [19, 27]],
|
||||
splash_slime: [[16, 28], [17, 28], [18, 28], [19, 28]],
|
||||
fall: [[16, 29], [17, 29], [18, 29], [19, 29]],
|
||||
player1_exit: [[20, 28], [21, 28], [22, 28], [23, 28]],
|
||||
|
||||
@ -882,30 +882,31 @@ const TILE_TYPES = {
|
||||
on_arrive(me, level, other) {
|
||||
// TODO cc1 allows items under water, i think; water was on the upper layer
|
||||
level.sfx.play_once('splash', me.cell);
|
||||
let splash_type = level.compat.block_splashes_dont_block ? 'splash_nb' : 'splash';
|
||||
if (other.type.name === 'dirt_block') {
|
||||
level.transmute_tile(other, 'splash');
|
||||
level.transmute_tile(other, splash_type);
|
||||
level.transmute_tile(me, 'dirt');
|
||||
}
|
||||
else if (other.type.name === 'frame_block') {
|
||||
level.transmute_tile(other, 'splash');
|
||||
level.transmute_tile(other, splash_type);
|
||||
level.transmute_tile(me, 'floor');
|
||||
}
|
||||
else if (other.type.name === 'glass_block') {
|
||||
level.transmute_tile(other, 'splash');
|
||||
level.transmute_tile(other, splash_type);
|
||||
level.transmute_tile(me, 'floor');
|
||||
}
|
||||
else if (other.type.name === 'ice_block') {
|
||||
level.transmute_tile(other, 'splash');
|
||||
level.transmute_tile(other, splash_type);
|
||||
level.transmute_tile(me, 'ice');
|
||||
}
|
||||
else if (other.type.name === 'boulder') {
|
||||
level.transmute_tile(other, 'splash');
|
||||
level.transmute_tile(other, splash_type);
|
||||
level.transmute_tile(me, 'gravel');
|
||||
}
|
||||
else if (other.type.name === 'circuit_block') {
|
||||
level.transmute_tile(me, 'floor');
|
||||
level._set_tile_prop(me, 'wire_directions', other.wire_directions);
|
||||
level.transmute_tile(other, 'splash');
|
||||
level.transmute_tile(other, splash_type);
|
||||
level.recalculate_circuitry_next_wire_phase = true;
|
||||
}
|
||||
else if (other.type.name === 'sokoban_block') {
|
||||
@ -915,7 +916,7 @@ const TILE_TYPES = {
|
||||
yellow: 'floor_custom_yellow',
|
||||
green: 'floor_custom_green',
|
||||
})[other.color]);
|
||||
level.transmute_tile(other, 'splash');
|
||||
level.transmute_tile(other, splash_type);
|
||||
}
|
||||
else {
|
||||
level.kill_actor(other, me, 'splash', null, 'drowned');
|
||||
@ -3262,6 +3263,13 @@ const TILE_TYPES = {
|
||||
}
|
||||
},
|
||||
},
|
||||
// Non-blocking splash used for visual effect in MS
|
||||
splash_nb: {
|
||||
layer: LAYERS.vfx,
|
||||
is_actor: true,
|
||||
collision_mask: 0,
|
||||
ttl: 16,
|
||||
},
|
||||
// Non-blocking explosion used for better handling edge cases with dynamite and bowling balls,
|
||||
// without changing gameplay
|
||||
explosion_nb: {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user