From 2cd3d028a93ca61fef553a31a208ec9d54b651d2 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Tue, 27 Feb 2024 16:38:10 -0500 Subject: [PATCH] Parsing resource costs --- src/engine/objects/ItemTemplate.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/objects/ItemTemplate.java b/src/engine/objects/ItemTemplate.java index b06dfe20..8593bcc3 100644 --- a/src/engine/objects/ItemTemplate.java +++ b/src/engine/objects/ItemTemplate.java @@ -353,7 +353,7 @@ public class ItemTemplate { if (resource_costs.isEmpty() == false) for (Object o : resource_costs) { JSONObject resource_entry = (JSONObject) o; - Enum.ResourceType resource_type = Enum.ResourceType.valueOf((String) resource_entry.get("resource_type")); + Enum.ResourceType resource_type = Enum.ResourceType.valueOf(((String) resource_entry.get("resource_type")).toUpperCase()); int resource_value = ((Long) resource_entry.get("resource_value")).intValue(); item_resource_cost.put(resource_type, resource_value); }