lexy w/ skates and cerise now crack but don't slide on cracked ice (fixes #82)
This commit is contained in:
parent
d675cddafb
commit
a87db67d84
@ -1881,7 +1881,7 @@ export class Level extends LevelInterface {
|
|||||||
// Whether we're sliding is determined entirely by whether we most recently moved onto a
|
// Whether we're sliding is determined entirely by whether we most recently moved onto a
|
||||||
// sliding tile that we don't ignore. This could /almost/ be computed on the fly, except
|
// sliding tile that we don't ignore. This could /almost/ be computed on the fly, except
|
||||||
// that an actor that starts on e.g. ice or a teleporter is not considered sliding.
|
// that an actor that starts on e.g. ice or a teleporter is not considered sliding.
|
||||||
this._set_tile_prop(actor, 'is_sliding', terrain.type.slide_mode && ! actor.ignores(terrain.type.name));
|
this._set_tile_prop(actor, 'is_sliding', terrain.type.slide_mode && !actor.ignores(terrain.type.name) && !actor.slide_ignores(terrain.type.name));
|
||||||
|
|
||||||
// Do Lexy-style hooking here: only attempt to pull things just after we've actually moved
|
// Do Lexy-style hooking here: only attempt to pull things just after we've actually moved
|
||||||
// successfully, which means the hook can never stop us from moving and hook slapping is not
|
// successfully, which means the hook can never stop us from moving and hook slapping is not
|
||||||
@ -1969,8 +1969,6 @@ export class Level extends LevelInterface {
|
|||||||
continue;
|
continue;
|
||||||
if (actor.ignores(tile.type.name))
|
if (actor.ignores(tile.type.name))
|
||||||
continue;
|
continue;
|
||||||
if (actor.slide_ignores(tile.type.name))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (tile.type.on_approach) {
|
if (tile.type.on_approach) {
|
||||||
tile.type.on_approach(tile, this, actor);
|
tile.type.on_approach(tile, this, actor);
|
||||||
@ -2036,7 +2034,8 @@ export class Level extends LevelInterface {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (tile.type.on_arrive) {
|
else if (tile.type.on_arrive && !actor.slide_ignores(tile.type.name)) {
|
||||||
|
// Kind of weird putting slide_ignores here, except that all sliding happens on on_arrive, and tiles that make you slide in on_arrive don't do anything else, so for now it works
|
||||||
tile.type.on_arrive(tile, this, actor);
|
tile.type.on_arrive(tile, this, actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3006,7 +3006,8 @@ const TILE_TYPES = {
|
|||||||
item_pickup_priority: PICKUP_PRIORITIES.real_player,
|
item_pickup_priority: PICKUP_PRIORITIES.real_player,
|
||||||
can_reveal_walls: true,
|
can_reveal_walls: true,
|
||||||
movement_speed: 4,
|
movement_speed: 4,
|
||||||
ignores: new Set(['ice', 'ice_nw', 'ice_ne', 'ice_sw', 'ice_se', 'cracked_ice']),
|
ignores: new Set(['ice', 'ice_nw', 'ice_ne', 'ice_sw', 'ice_se']),
|
||||||
|
slide_ignores: new Set(['cracked_ice']),
|
||||||
pushes: {
|
pushes: {
|
||||||
dirt_block: true,
|
dirt_block: true,
|
||||||
ice_block: true,
|
ice_block: true,
|
||||||
@ -3060,7 +3061,8 @@ const TILE_TYPES = {
|
|||||||
item_pickup_priority: PICKUP_PRIORITIES.player,
|
item_pickup_priority: PICKUP_PRIORITIES.player,
|
||||||
can_reveal_walls: true, // XXX i think?
|
can_reveal_walls: true, // XXX i think?
|
||||||
movement_speed: 4,
|
movement_speed: 4,
|
||||||
ignores: new Set(['ice', 'ice_nw', 'ice_ne', 'ice_sw', 'ice_se', 'cracked_ice']),
|
ignores: new Set(['ice', 'ice_nw', 'ice_ne', 'ice_sw', 'ice_se']),
|
||||||
|
slide_ignores: new Set(['cracked_ice']),
|
||||||
pushes: {
|
pushes: {
|
||||||
dirt_block: true,
|
dirt_block: true,
|
||||||
ice_block: true,
|
ice_block: true,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user