XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFESpaceNinjaServer

fix: purchasing of ship decorations (#761)

e8e918ff
Sainan <sainan@calamity.inc>
提交于

代码差异

1 个文件 +13 -29
Modified src/services/inventoryService.ts +13 -29
@@ -142,6 +142,19 @@ export const addItem = async (
142 142 } else if (ExportResources[typeName].productCategory == "CrewShips") {
143 143 const inventoryChanges = addCrewShip(inventory, typeName);
144 144 return { InventoryChanges: inventoryChanges };
145 } else if (ExportResources[typeName].productCategory == "ShipDecorations") {
146 const changes = [
147 {
148 ItemType: typeName,
149 ItemCount: quantity
150 } satisfies IMiscItem
151 ];
152 addShipDecorations(inventory, changes);
153 return {
154 InventoryChanges: {
155 ShipDecorations: changes
156 }
157 };
145 158 } else {
146 159 const miscItemChanges = [
147 160 {
@@ -253,21 +266,6 @@ export const addItem = async (
253 266 }
254 267 };
255 268 }
256 case "Objects": {
257 // /Lotus/Objects/Tenno/Props/TnoLisetTextProjector (Note Beacon)
258 const changes = [
259 {
260 ItemType: typeName,
261 ItemCount: quantity
262 } satisfies IMiscItem
263 ];
264 addShipDecorations(inventory, changes);
265 return {
266 InventoryChanges: {
267 ShipDecorations: changes
268 }
269 };
270 }
271 269 case "Types":
272 270 switch (typeName.substr(1).split("/")[2]) {
273 271 case "Sentinels": {
@@ -282,20 +280,6 @@ export const addItem = async (
282 280 }
283 281 case "Items": {
284 282 switch (typeName.substr(1).split("/")[3]) {
285 case "ShipDecos": {
286 const changes = [
287 {
288 ItemType: typeName,
289 ItemCount: quantity
290 } satisfies IMiscItem
291 ];
292 addShipDecorations(inventory, changes);
293 return {
294 InventoryChanges: {
295 ShipDecorations: changes
296 }
297 };
298 }
299 283 default: {
300 284 const miscItemChanges = [
301 285 {