返回提交历史
Modified
src/services/inventoryService.ts
+2
-2
XFEstudio/SpaceNinjaServer
chore: limit number of kubrow eggs that can be acquired at once
1b7b5a28
代码差异
1 个文件
+2
-2
@@ -308,8 +308,8 @@ export const addItem = async (
308
308
};
309
309
} else if (ExportResources[typeName].productCategory == "KubrowPetEggs") {
310
310
const changes: IKubrowPetEggClient[] = [];
311
if (quantity < 0) {
312
throw new Error(`removal of KubrowPetEggs not handled`);
311
if (quantity < 0 || quantity > 100) {
312
throw new Error(`unexpected acquisition quantity of KubrowPetEggs: ${quantity}`);
313
313
}
314
314
for (let i = 0; i != quantity; ++i) {
315
315
const egg: IKubrowPetEggDatabase = {