mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-12-05 07:43:49 +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();
|
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 = [];
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user