Don't on_stand() on arrival; fix the CC1 force-floor compat flag

This commit is contained in:
Eevee (Evelyn Woods) 2024-04-10 18:15:35 -06:00
parent a1f357f317
commit f140804713
3 changed files with 23 additions and 33 deletions

View File

@ -160,7 +160,7 @@ export const COMPAT_FLAGS = [
rulesets: new Set(['steam', 'steam-strict']), rulesets: new Set(['steam', 'steam-strict']),
}, { }, {
key: 'player_moves_last', key: 'player_moves_last',
label: "Player always moves last", label: "Players always move last",
rulesets: new Set(['lynx', 'ms']), rulesets: new Set(['lynx', 'ms']),
}, { }, {
key: 'player_protected_by_items', key: 'player_protected_by_items',
@ -197,11 +197,11 @@ export const COMPAT_FLAGS = [
rulesets: new Set(['ms']), rulesets: new Set(['ms']),
}, { }, {
key: 'no_backwards_override', key: 'no_backwards_override',
label: "Player can't override backwards on a force floor", label: "Players can't override backwards on a force floor",
rulesets: new Set(['lynx']), rulesets: new Set(['lynx']),
}, { }, {
key: 'force_floors_inert_on_first_tic', key: 'force_floors_on_arrive',
label: "Force floors don't trigger on the first tic", label: "Force floors trigger on arrival",
rulesets: new Set(['lynx', 'ms']), rulesets: new Set(['lynx', 'ms']),
}, { }, {
key: 'traps_like_lynx', key: 'traps_like_lynx',
@ -239,7 +239,8 @@ export const COMPAT_FLAGS = [
// Blocks // Blocks
{ {
key: 'no_early_push', key: 'no_early_push',
label: "Pushing blocks happens at move time", label: "Pushing blocks happens at move time (block slapping is disabled)",
// XXX wait but the DEFAULT behavior allows block slapping, which lynx has, so why is lynx listed here?
rulesets: new Set(['lynx', 'ms']), rulesets: new Set(['lynx', 'ms']),
}, { }, {
key: 'use_legacy_hooking', key: 'use_legacy_hooking',
@ -272,7 +273,7 @@ export const COMPAT_FLAGS = [
// TODO what does ms do when a tank is on ice or a ff? wiki's description is wacky // TODO what does ms do when a tank is on ice or a ff? wiki's description is wacky
// TODO yellow tanks seem to have memory too?? // TODO yellow tanks seem to have memory too??
key: 'tanks_always_obey_button', key: 'tanks_always_obey_button',
label: "Blue tanks always obey blue buttons", label: "Blue tanks on cloners obey blue buttons",
rulesets: new Set(['steam-strict']), rulesets: new Set(['steam-strict']),
}, { }, {
key: 'tanks_ignore_button_while_moving', key: 'tanks_ignore_button_while_moving',

View File

@ -2017,12 +2017,6 @@ export class Level extends LevelInterface {
tile.type.on_arrive(tile, this, actor); tile.type.on_arrive(tile, this, actor);
} }
if (tile.type.on_stand && !actor.slide_ignores(tile.type.name)) {
// XXX according to notcc, cc2 also has actors "stand" on tiles immediately upon
// arrival, even though they'll do it anyway on their idle phase
tile.type.on_stand(tile, this, actor);
}
if (tile.type.slide_automatically) { if (tile.type.slide_automatically) {
// This keeps a player on force floor consistently using their sliding pose, even if // This keeps a player on force floor consistently using their sliding pose, even if
// drawn between moves. It also simplifies checks elsewhere, so that's nice // drawn between moves. It also simplifies checks elsewhere, so that's nice

View File

@ -58,16 +58,16 @@ function _define_force_floor(direction, opposite_type) {
speed_factor: 2, speed_factor: 2,
slide_automatically: true, slide_automatically: true,
allow_player_override: true, allow_player_override: true,
on_stand(me, level, other) { on_arrive(me, level, other) {
if (level.compat.force_floors_on_arrive) {
// Lynx: Force floors activate when stepped on, not when stood on
level.schedule_actor_slide(other, direction);
}
},
on_stand(me, level, other) {
if (! level.compat.force_floors_on_arrive) {
level.schedule_actor_slide(other, direction); level.schedule_actor_slide(other, direction);
// FIXME i think it's really that in lynx these push on arrival; try that and see if
// it's better
/*
if (level.compat.force_floors_inert_on_first_tic && level.tic_counter === 0) {
// Lynx: Force floors don't push on the first tic
return null;
} }
*/
}, },
activate(me, level) { activate(me, level) {
level.transmute_tile(me, opposite_type); level.transmute_tile(me, opposite_type);
@ -985,21 +985,16 @@ const TILE_TYPES = {
return (level.compat.rff_blocks_monsters && return (level.compat.rff_blocks_monsters &&
(other.type.collision_mask & COLLISION.monster_typical)); (other.type.collision_mask & COLLISION.monster_typical));
}, },
on_stand(me, level, other) { on_arrive(me, level, other) {
// XXX this check is necessary because of step_on_cell and then the idle phase causing if (level.compat.force_floors_on_arrive) {
// us to be called twice. who is correct?? is the step_on_cell call supposed to be // Lynx: Force floors activate when stepped on, not when stood on
// there?
if (! other.is_pending_slide) {
level.schedule_actor_slide(other, level.get_force_floor_direction()); level.schedule_actor_slide(other, level.get_force_floor_direction());
} }
// FIXME i think it's really that in lynx these push on arrival; try that and see if },
// it's better on_stand(me, level, other) {
/* if (! level.compat.force_floors_on_arrive) {
if (level.compat.force_floors_inert_on_first_tic && level.tic_counter === 0) { level.schedule_actor_slide(other, level.get_force_floor_direction());
// Lynx: Force floors don't push on the first tic
return null;
} }
*/
}, },
}, },
slime: { slime: {