Files
gymkhana/patches/esc_inventory_manager.patch

16 lines
688 B
Diff

diff --git a/addons/escoria-core/game/core-scripts/esc/esc_inventory_manager.gd b/addons/escoria-core/game/core-scripts/esc/esc_inventory_manager.gd
index 7c550f2a..944aead7 100644
--- a/addons/escoria-core/game/core-scripts/esc/esc_inventory_manager.gd
+++ b/addons/escoria-core/game/core-scripts/esc/esc_inventory_manager.gd
@@ -16,7 +16,9 @@ class_name ESCInventoryManager
## [br]
## Returns a `bool` value. (`bool`)
func inventory_has(item: String) -> bool:
- return escoria.globals_manager.has("i/%s" % item)
+ if not escoria.globals_manager.has("i/%s" % item):
+ return false
+ return escoria.globals_manager.get_global("i/%s" % item)
## Retrieves all inventory items.[br]