feat(import): Consumables (#895)
All checks were successful
Build / build (18) (push) Successful in 35s
Build / build (20) (push) Successful in 53s
Build Docker image / docker (push) Successful in 30s
Build / build (22) (push) Successful in 1m13s

Closes #894

Reviewed-on: http://209.141.38.3/OpenWF/SpaceNinjaServer/pulls/895
This commit is contained in:
Sainan 2025-02-04 09:19:14 -08:00
parent f15f2bfdbd
commit a5d74b92c8

View File

@ -155,7 +155,7 @@ export const importInventory = (db: TInventoryDatabaseDocument, client: Partial<
if (client.Upgrades !== undefined) { if (client.Upgrades !== undefined) {
replaceArray<IUpgradeDatabase>(db.Upgrades, client.Upgrades.map(convertUpgrade)); replaceArray<IUpgradeDatabase>(db.Upgrades, client.Upgrades.map(convertUpgrade));
} }
for (const key of ["RawUpgrades", "MiscItems"] as const) { for (const key of ["RawUpgrades", "MiscItems", "Consumables"] as const) {
if (client[key] !== undefined) { if (client[key] !== undefined) {
db[key].splice(0, db[key].length); db[key].splice(0, db[key].length);
client[key].forEach(x => { client[key].forEach(x => {