From ea2ab890c57a4f3161d63478c8cf8ef80b2faf72 Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Sun, 28 Mar 2021 14:54:17 -0400 Subject: [PATCH] Allow for a specific kind of victim to be exclusively spawned --- features.js | 11 +++++++++++ game.js | 5 +++++ stroll.html | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/features.js b/features.js index b3b0ab6..c99706d 100644 --- a/features.js +++ b/features.js @@ -890,6 +890,17 @@ options = [ "name": "Micros", "id": "victimsMicros", "type": "checkbox" + }, + { + "name": "Single Victim Type", + "id": "singleVictimType", + "type": "select", + "default": "Disabled", + "tooltip": "Only spawns one specific kind of victim.", + "choices": + ["Disabled"].concat(Object.keys(things)).map(thing => { + return thing === "Container" ? null : thing + }).filter(x => x !== null).map(x => { return { name: x, value: x} }) } ] }, diff --git a/game.js b/game.js index 57d30b8..34d4c8a 100644 --- a/game.js +++ b/game.js @@ -2203,6 +2203,11 @@ function getWeights(region, area) { } } + if (macro.singleVictimType != "Disabled") { + weights = {} + weights[macro.singleVictimType] = 0.25; + } + return weights; } diff --git a/stroll.html b/stroll.html index 3c5d115..2e35fcc 100644 --- a/stroll.html +++ b/stroll.html @@ -7,11 +7,11 @@ - +