1
mirror of https://github.com/thepeacockproject/Peacock synced 2024-11-22 22:12:45 +01:00

Add sniper unlockables to H2/3 maps

This commit is contained in:
AnthonyFuller 2023-07-25 00:02:54 +01:00
parent 46052c7b0e
commit 4d6e4c1085

View File

@ -416,12 +416,19 @@ export function getUnlockableById(
): Unlockable | undefined {
if (caches[gameVersion].size === 0) {
// no data is loaded yet (to save memory), so load it now
const unlockables = getVersionedConfig<readonly Unlockable[]>(
let unlockables = getVersionedConfig<readonly Unlockable[]>(
"allunlockables",
gameVersion,
false,
)
if (["h2", "h3"].includes(gameVersion)) {
unlockables = [
...unlockables,
...getConfig<readonly Unlockable[]>("SniperUnlockables", false),
]
}
for (const unlockable of unlockables) {
caches[gameVersion].set(unlockable.Id, unlockable)
}