omit rando consumables

This commit is contained in:
tresabhi committed 2026-12-03 23:06:55 -06:00
1 parent 1ec5c4b6fb
commit 0e268288e6
1 file changed
+11 -4
@@ -9,18 +9,25 @@ export abstract class ServerBlitzKitAPI6 extends ServerBlitzKitAPI5 {
const consumableDefinitions = ConsumableDefinitions.create(); const consumableDefinitions = ConsumableDefinitions.create();
Object.entries(this.consumablesCommon).forEach(([key, consumable]) => { Object.entries(this.consumablesCommon).forEach(([key, consumable]) => {
const includeRaw = consumable.vehicleFilter?.include.vehicle;
const excludeRaw = consumable.vehicleFilter?.exclude?.vehicle;
// event-only consumables granted by scripts (like on respawn) skip the
// gameModeFilter and instead lock out every tank with an empty tier range
// these are the consumables the new tier 11's mount to go goblin mode
const game_mode_exclusive =
"gameModeFilter" in consumable ||
(includeRaw !== undefined &&
"minLevel" in includeRaw &&
includeRaw.minLevel > includeRaw.maxLevel);
const entry: Consumable = { const entry: Consumable = {
id: consumable.id, id: consumable.id,
game_mode_exclusive: "gameModeFilter" in consumable, game_mode_exclusive,
name: this.getString(consumable.userString), name: this.getString(consumable.userString),
exclude: [], exclude: [],
include: [], include: [],
}; };
consumableDefinitions.consumables[consumable.id] = entry; consumableDefinitions.consumables[consumable.id] = entry;
const includeRaw = consumable.vehicleFilter?.include.vehicle;
const excludeRaw = consumable.vehicleFilter?.exclude?.vehicle;
if (includeRaw) { if (includeRaw) {
entry.include = []; entry.include = [];