From b87ce730f253a8a531cc7d3075b2d380737a426a Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Mon, 25 Jan 2021 16:54:09 -0700 Subject: [PATCH] Don't blow up players that start on mines by default; fixes CCLP4 #38 --- js/main.js | 4 ++++ js/tiletypes.js | 2 ++ 2 files changed, 6 insertions(+) diff --git a/js/main.js b/js/main.js index ce3e023..0e92771 100644 --- a/js/main.js +++ b/js/main.js @@ -2937,6 +2937,10 @@ const COMPAT_FLAGS = [{ key: 'no_immediate_detonate_bombs', label: "Don't immediately detonate populated mines", rulesets: new Set(['lynx', 'ms']), +}, { + key: 'detonate_bombs_under_players', + label: "Detonate mines populated by players", + rulesets: new Set(['steam', 'steam-strict']), }, { key: 'tanks_teeth_push_ice_blocks', label: "Blue tanks and teeth can push ice blocks", diff --git a/js/tiletypes.js b/js/tiletypes.js index ea58f2f..72ae140 100644 --- a/js/tiletypes.js +++ b/js/tiletypes.js @@ -878,6 +878,8 @@ const TILE_TYPES = { // In CC2, actors on a bomb (but not a green one) are immediately blown up let actor = me.cell.get_actor(); if (actor && ! actor.ignores(this.name)) { + if (actor.type.is_real_player && ! level.compat.detonate_bombs_under_players) + return; this.on_arrive(me, level, actor); } },