Files
gymkhana/patches/esc_inventory_manager.patch

16 lines
699 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 4bb19343..fa8b939b 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
@@ -11,7 +11,9 @@ class_name ESCInventoryManager
## [br]
## **Returns** Whether the player has the inventory.
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)
## Get all inventory items.[br]