fix: properly convert personal room decos to and from inventory types #2279
@ -13,6 +13,7 @@ import { config } from "./configService";
|
|||||||
import { Guild } from "../models/guildModel";
|
import { Guild } from "../models/guildModel";
|
||||||
import { hasGuildPermission } from "./guildService";
|
import { hasGuildPermission } from "./guildService";
|
||||||
import { GuildPermission } from "../types/guildTypes";
|
import { GuildPermission } from "../types/guildTypes";
|
||||||
|
import { ExportResources } from "warframe-public-export-plus";
|
||||||
|
|
||||||
export const setShipCustomizations = async (
|
export const setShipCustomizations = async (
|
||||||
accountId: string,
|
accountId: string,
|
||||||
@ -121,7 +122,8 @@ export const handleSetShipDecorations = async (
|
|||||||
|
|
||||||
if (!config.unlockAllShipDecorations) {
|
if (!config.unlockAllShipDecorations) {
|
||||||
const inventory = await getInventory(accountId);
|
const inventory = await getInventory(accountId);
|
||||||
addShipDecorations(inventory, [{ ItemType: placedDecoration.Type, ItemCount: 1 }]);
|
const itemType = Object.entries(ExportResources).find(arr => arr[1].deco == placedDecoration.Type)![0];
|
||||||
|
addShipDecorations(inventory, [{ ItemType: itemType, ItemCount: 1 }]);
|
||||||
await inventory.save();
|
await inventory.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,7 +136,8 @@ export const handleSetShipDecorations = async (
|
|||||||
} else {
|
} else {
|
||||||
if (!config.unlockAllShipDecorations) {
|
if (!config.unlockAllShipDecorations) {
|
||||||
const inventory = await getInventory(accountId);
|
const inventory = await getInventory(accountId);
|
||||||
addShipDecorations(inventory, [{ ItemType: placedDecoration.Type, ItemCount: -1 }]);
|
const itemType = Object.entries(ExportResources).find(arr => arr[1].deco == placedDecoration.Type)![0];
|
||||||
|
addShipDecorations(inventory, [{ ItemType: itemType, ItemCount: -1 }]);
|
||||||
await inventory.save();
|
await inventory.save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user