chore(webui): allow negative quantity for "add items" & "add mods" (#1113)
Closes #1111 Reviewed-on: OpenWF/SpaceNinjaServer#1113 Co-authored-by: Sainan <sainan@calamity.inc> Co-committed-by: Sainan <sainan@calamity.inc>
This commit is contained in:
parent
6142b8d2dc
commit
ec1f504bae
@ -284,6 +284,9 @@ export const addItem = async (
|
||||
};
|
||||
} else if (ExportResources[typeName].productCategory == "KubrowPetEggs") {
|
||||
const changes: IKubrowPetEggClient[] = [];
|
||||
if (quantity < 0) {
|
||||
throw new Error(`removal of KubrowPetEggs not handled`);
|
||||
}
|
||||
for (let i = 0; i != quantity; ++i) {
|
||||
const egg: IKubrowPetEggDatabase = {
|
||||
ItemType: "/Lotus/Types/Game/KubrowPet/Eggs/KubrowEgg",
|
||||
|
@ -89,7 +89,7 @@
|
||||
<div class="card mb-3">
|
||||
<h5 class="card-header" data-loc="inventory_addItems"></h5>
|
||||
<form class="card-body input-group" onsubmit="doAcquireMiscItems();return false;">
|
||||
<input class="form-control" id="miscitem-count" type="number" min="1" value="1" />
|
||||
<input class="form-control" id="miscitem-count" type="number" value="1" />
|
||||
<input class="form-control w-50" id="miscitem-type" list="datalist-miscitems" />
|
||||
<button class="btn btn-primary" type="submit" data-loc="general_addButton"></button>
|
||||
</form>
|
||||
@ -392,7 +392,7 @@
|
||||
<h5 class="card-header" data-loc="mods_mods"></h5>
|
||||
<div class="card-body">
|
||||
<form class="input-group mb-3" onsubmit="doAcquireMod();return false;">
|
||||
<input class="form-control" id="mod-count" type="number" min="1" value="1"/>
|
||||
<input class="form-control" id="mod-count" type="number" value="1"/>
|
||||
<input class="form-control w-50" id="mod-to-acquire" list="datalist-mods" />
|
||||
<button class="btn btn-primary" type="submit" data-loc="general_addButton"></button>
|
||||
</form>
|
||||
|
Loading…
x
Reference in New Issue
Block a user