mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-12-04 23:32:54 +01:00
omit rando consumables
This commit is contained in:
1 file changed
+11
-4
@@ -9,18 +9,25 @@ export abstract class ServerBlitzKitAPI6 extends ServerBlitzKitAPI5 {
|
||||
const consumableDefinitions = ConsumableDefinitions.create();
|
||||
|
||||
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 = {
|
||||
id: consumable.id,
|
||||
game_mode_exclusive: "gameModeFilter" in consumable,
|
||||
game_mode_exclusive,
|
||||
name: this.getString(consumable.userString),
|
||||
exclude: [],
|
||||
include: [],
|
||||
};
|
||||
consumableDefinitions.consumables[consumable.id] = entry;
|
||||
|
||||
const includeRaw = consumable.vehicleFilter?.include.vehicle;
|
||||
const excludeRaw = consumable.vehicleFilter?.exclude?.vehicle;
|
||||
|
||||
if (includeRaw) {
|
||||
entry.include = [];
|
||||
|
||||
|
||||
Reference in new issue
Block a user