mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: deduplicate game mode consumales and powers
This commit is contained in:
1 parent
c27d3a3b6a
commit
9061335292
1 file changed
+27
-2
@@ -83,11 +83,36 @@ for (const gameModeIdString in gameModeRoleSets) {
|
|||||||
for (const roleId of roles) {
|
for (const roleId of roles) {
|
||||||
const role = gameDefinitions.roles[roleId];
|
const role = gameDefinitions.roles[roleId];
|
||||||
|
|
||||||
for (const id of role.consumables) {
|
outerLoop: for (const id of role.consumables) {
|
||||||
|
const name =
|
||||||
|
consumableDefinitions.consumables[id].name.locales[locales.default];
|
||||||
|
|
||||||
|
for (const otherConsumable of consumables.values()) {
|
||||||
|
const otherName =
|
||||||
|
consumableDefinitions.consumables[otherConsumable].name.locales[
|
||||||
|
locales.default
|
||||||
|
];
|
||||||
|
|
||||||
|
if (name === otherName) continue outerLoop;
|
||||||
|
}
|
||||||
|
|
||||||
consumables.add(id);
|
consumables.add(id);
|
||||||
allGameModeConsumables.add(id);
|
allGameModeConsumables.add(id);
|
||||||
}
|
}
|
||||||
for (const id of role.provisions) {
|
|
||||||
|
outerLoop: for (const id of role.provisions) {
|
||||||
|
const name =
|
||||||
|
provisionDefinitions.provisions[id].name.locales[locales.default];
|
||||||
|
|
||||||
|
for (const otherProvision of provisions.values()) {
|
||||||
|
const otherName =
|
||||||
|
provisionDefinitions.provisions[otherProvision].name.locales[
|
||||||
|
locales.default
|
||||||
|
];
|
||||||
|
|
||||||
|
if (name === otherName) continue outerLoop;
|
||||||
|
}
|
||||||
|
|
||||||
provisions.add(id);
|
provisions.add(id);
|
||||||
allGameModeProvisions.add(id);
|
allGameModeProvisions.add(id);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user