From e1e72b71bde3602cf5cea8ed6a75a9cc9e73fb73 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 27 Apr 2024 07:24:57 -0400 Subject: [PATCH] Better name for context --- src/engine/db/handlers/dbWarehouseHandler.java | 2 +- src/engine/gameManager/ForgeManager.java | 6 +++--- .../net/client/handlers/ItemProductionMsgHandler.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/engine/db/handlers/dbWarehouseHandler.java b/src/engine/db/handlers/dbWarehouseHandler.java index 31fb4a10..10d391bb 100644 --- a/src/engine/db/handlers/dbWarehouseHandler.java +++ b/src/engine/db/handlers/dbWarehouseHandler.java @@ -154,7 +154,7 @@ public class dbWarehouseHandler extends dbHandlerBase { } } - public boolean UPDATE_WORKORDER(WorkOrder workOrder) { + public boolean WRITE_WORKORDER(WorkOrder workOrder) { JSONObject warehouseJSON = WorkOrder.toJson(workOrder); diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index d95d4ef7..c5e09219 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -76,7 +76,7 @@ public enum ForgeManager implements Runnable { // Update workOrder on disk - DbManager.WarehouseQueries.UPDATE_WORKORDER(workOrder); + DbManager.WarehouseQueries.WRITE_WORKORDER(workOrder); } if (workOrder.runCompleted) @@ -175,7 +175,7 @@ public enum ForgeManager implements Runnable { // PERSIST workOrder (dyn_workorders) - DbManager.WarehouseQueries.UPDATE_WORKORDER(workOrder); + DbManager.WarehouseQueries.WRITE_WORKORDER(workOrder); } catch (Exception e) { Logger.error(e); @@ -366,7 +366,7 @@ public enum ForgeManager implements Runnable { // Write updated workOrder to disk - DbManager.WarehouseQueries.UPDATE_WORKORDER(workOrder); + DbManager.WarehouseQueries.WRITE_WORKORDER(workOrder); } diff --git a/src/engine/net/client/handlers/ItemProductionMsgHandler.java b/src/engine/net/client/handlers/ItemProductionMsgHandler.java index 28e66e58..622f61e7 100644 --- a/src/engine/net/client/handlers/ItemProductionMsgHandler.java +++ b/src/engine/net/client/handlers/ItemProductionMsgHandler.java @@ -154,7 +154,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { ForgeManager.vendorWorkOrderLookup.get(vendor).remove(workOrder); DbManager.WarehouseQueries.DELETE_WORKORDER(workOrder); } else - DbManager.WarehouseQueries.UPDATE_WORKORDER(workOrder); + DbManager.WarehouseQueries.WRITE_WORKORDER(workOrder); // Persist item and add to vendor inventory @@ -433,7 +433,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { ForgeManager.vendorWorkOrderLookup.get(vendor).remove(workOrder); DbManager.WarehouseQueries.DELETE_WORKORDER(workOrder); } else - DbManager.WarehouseQueries.UPDATE_WORKORDER(workOrder); + DbManager.WarehouseQueries.WRITE_WORKORDER(workOrder); // Refresh vendor's inventory to client