From 6022d544c9a9346357c1d6ebb00895a6472749b9 Mon Sep 17 00:00:00 2001 From: Andrei Mihu Date: Wed, 3 Jul 2024 11:25:28 +0100 Subject: [PATCH 1/2] Option to keep inventory items with zero counts. --- inventory.go | 1 + 1 file changed, 1 insertion(+) diff --git a/inventory.go b/inventory.go index 9c9754a..5e4bd14 100644 --- a/inventory.go +++ b/inventory.go @@ -36,6 +36,7 @@ type InventoryConfigItem struct { StringProperties map[string]string `json:"string_properties,omitempty"` NumericProperties map[string]float64 `json:"numeric_properties,omitempty"` Disabled bool `json:"disabled,omitempty"` + KeepZero bool `json:"keep_zero,omitempty"` } // The InventorySystem provides a gameplay system which can manage a player's inventory. From d02d6ed729c0dbfcbc10be130d6d3a9e01908986 Mon Sep 17 00:00:00 2001 From: Andrei Mihu Date: Wed, 3 Jul 2024 11:44:37 +0100 Subject: [PATCH 2/2] Update schemas. --- definitions/07-Hiro-Inventory.json | 3 ++- schemas/07-Hiro-Inventory.json | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/definitions/07-Hiro-Inventory.json b/definitions/07-Hiro-Inventory.json index aa5989c..68cb33a 100644 --- a/definitions/07-Hiro-Inventory.json +++ b/definitions/07-Hiro-Inventory.json @@ -14,7 +14,8 @@ }, "numeric_properties": { "prop2": 123 - } + }, + "keep_zero": true }, "item2": { "name": "name2", diff --git a/schemas/07-Hiro-Inventory.json b/schemas/07-Hiro-Inventory.json index 83de8dc..09833de 100644 --- a/schemas/07-Hiro-Inventory.json +++ b/schemas/07-Hiro-Inventory.json @@ -30,6 +30,9 @@ }, "type": "array" }, + "keep_zero": { + "type": "boolean" + }, "max_count": { "minimum": 0, "type": "number"