forked from OpenWF/SpaceNinjaServer
fix: purchasing of ship decorations (#761)
This commit is contained in:
parent
fb8e19403e
commit
e8e918ff0c
@ -142,6 +142,19 @@ export const addItem = async (
|
|||||||
} else if (ExportResources[typeName].productCategory == "CrewShips") {
|
} else if (ExportResources[typeName].productCategory == "CrewShips") {
|
||||||
const inventoryChanges = addCrewShip(inventory, typeName);
|
const inventoryChanges = addCrewShip(inventory, typeName);
|
||||||
return { InventoryChanges: inventoryChanges };
|
return { InventoryChanges: inventoryChanges };
|
||||||
|
} else if (ExportResources[typeName].productCategory == "ShipDecorations") {
|
||||||
|
const changes = [
|
||||||
|
{
|
||||||
|
ItemType: typeName,
|
||||||
|
ItemCount: quantity
|
||||||
|
} satisfies IMiscItem
|
||||||
|
];
|
||||||
|
addShipDecorations(inventory, changes);
|
||||||
|
return {
|
||||||
|
InventoryChanges: {
|
||||||
|
ShipDecorations: changes
|
||||||
|
}
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
const miscItemChanges = [
|
const miscItemChanges = [
|
||||||
{
|
{
|
||||||
@ -253,21 +266,6 @@ export const addItem = async (
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
case "Objects": {
|
|
||||||
// /Lotus/Objects/Tenno/Props/TnoLisetTextProjector (Note Beacon)
|
|
||||||
const changes = [
|
|
||||||
{
|
|
||||||
ItemType: typeName,
|
|
||||||
ItemCount: quantity
|
|
||||||
} satisfies IMiscItem
|
|
||||||
];
|
|
||||||
addShipDecorations(inventory, changes);
|
|
||||||
return {
|
|
||||||
InventoryChanges: {
|
|
||||||
ShipDecorations: changes
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
case "Types":
|
case "Types":
|
||||||
switch (typeName.substr(1).split("/")[2]) {
|
switch (typeName.substr(1).split("/")[2]) {
|
||||||
case "Sentinels": {
|
case "Sentinels": {
|
||||||
@ -282,20 +280,6 @@ export const addItem = async (
|
|||||||
}
|
}
|
||||||
case "Items": {
|
case "Items": {
|
||||||
switch (typeName.substr(1).split("/")[3]) {
|
switch (typeName.substr(1).split("/")[3]) {
|
||||||
case "ShipDecos": {
|
|
||||||
const changes = [
|
|
||||||
{
|
|
||||||
ItemType: typeName,
|
|
||||||
ItemCount: quantity
|
|
||||||
} satisfies IMiscItem
|
|
||||||
];
|
|
||||||
addShipDecorations(inventory, changes);
|
|
||||||
return {
|
|
||||||
InventoryChanges: {
|
|
||||||
ShipDecorations: changes
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
default: {
|
default: {
|
||||||
const miscItemChanges = [
|
const miscItemChanges = [
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user