Add a compat flag for the MSCC ice patch behavior

This commit is contained in:
Eevee (Evelyn Woods) 2021-01-13 01:55:04 -07:00
parent 1650a3fc94
commit ed814cbf60
2 changed files with 12 additions and 4 deletions

View File

@ -296,7 +296,14 @@ export class Cell extends Array {
if (push_mode === null)
return false;
if (! actor.can_push(tile, direction)) {
if (actor.can_push(tile, direction) || (
level.compat.tanks_teeth_push_ice_blocks && tile.type.name === 'ice_block' &&
(actor.type.name === 'teeth' || actor.type.name === 'teeth_timid' || actor.type.name === 'tank_blue')
)) {
// Collect pushables for later, so we don't inadvertently push through a wall
pushable_tiles.push(tile);
}
else {
// It's in our way and we can't push it, so we're done here
if (push_mode === 'push') {
if (actor.type.on_blocked) {
@ -305,9 +312,6 @@ export class Cell extends Array {
}
return false;
}
// Collect pushables for later, so we don't inadvertently push through a wall
pushable_tiles.push(tile);
}
// If we got this far, all that's left is to deal with pushables

View File

@ -2808,6 +2808,10 @@ const COMPAT_FLAGS = [{
key: 'no_immediate_detonate_bombs',
label: "Don't immediately detonate populated mines",
rulesets: new Set(['lynx', 'ms']),
}, {
key: 'tanks_teeth_push_ice_blocks',
label: "Blue tanks and teeth can push ice blocks",
rulesets: new Set(['ms']),
}, {
key: 'sliding_tanks_ignore_button',
label: "Blue tanks ignore blue buttons while sliding",