From dbd4c5d2461fc2e98cd41667d19eb6117a8d7df5 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Fri, 19 Apr 2024 08:59:10 -0400 Subject: [PATCH] Method added to replace collection --- src/engine/gameManager/ForgeManager.java | 1 + src/engine/gameManager/NPCManager.java | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index 0cd17868..b33cb3ca 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -423,4 +423,5 @@ public enum ForgeManager implements Runnable { return modifier; } + } diff --git a/src/engine/gameManager/NPCManager.java b/src/engine/gameManager/NPCManager.java index 54efa093..960bcc6b 100644 --- a/src/engine/gameManager/NPCManager.java +++ b/src/engine/gameManager/NPCManager.java @@ -9,6 +9,7 @@ package engine.gameManager; import engine.InterestManagement.WorldGrid; +import engine.loot.WorkOrder; import engine.math.Quaternion; import engine.math.Vector3f; import engine.math.Vector3fImmutable; @@ -516,4 +517,14 @@ public enum NPCManager { return true; } + + public static ArrayList getAllCookingForVendor(NPC npc) { + + ArrayList itemList = new ArrayList<>(); + + for (WorkOrder workOrder : ForgeManager.vendorWorkOrderLookup.get(npc)) + itemList.addAll(workOrder.cooking); + + return itemList; + } }