feat: deduplicate game mode consumales and powers

This commit is contained in:
TrèsAbhi committed 2026-01-07 20:11:54 -06:00
1 parent c27d3a3b6a
commit 9061335292
1 file changed
+27 -2
@@ -83,11 +83,36 @@ for (const gameModeIdString in gameModeRoleSets) {
for (const roleId of roles) {
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);
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);
allGameModeProvisions.add(id);
}