chore: limit number of kubrow eggs that can be acquired at once
All checks were successful
Build / build (18) (push) Successful in 40s
Build / build (22) (push) Successful in 1m12s
Build / build (20) (push) Successful in 1m14s
Build Docker image / docker (push) Successful in 38s

This commit is contained in:
Sainan 2025-04-02 22:33:35 +02:00
parent 6dc54ed893
commit 1b7b5a28bc

View File

@ -308,8 +308,8 @@ export const addItem = async (
};
} else if (ExportResources[typeName].productCategory == "KubrowPetEggs") {
const changes: IKubrowPetEggClient[] = [];
if (quantity < 0) {
throw new Error(`removal of KubrowPetEggs not handled`);
if (quantity < 0 || quantity > 100) {
throw new Error(`unexpected acquisition quantity of KubrowPetEggs: ${quantity}`);
}
for (let i = 0; i != quantity; ++i) {
const egg: IKubrowPetEggDatabase = {