Browse Source

Better name for context

combat-2
MagicBot 7 months ago
parent
commit
e1e72b71bd
  1. 2
      src/engine/db/handlers/dbWarehouseHandler.java
  2. 6
      src/engine/gameManager/ForgeManager.java
  3. 4
      src/engine/net/client/handlers/ItemProductionMsgHandler.java

2
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); JSONObject warehouseJSON = WorkOrder.toJson(workOrder);

6
src/engine/gameManager/ForgeManager.java

@ -76,7 +76,7 @@ public enum ForgeManager implements Runnable {
// Update workOrder on disk // Update workOrder on disk
DbManager.WarehouseQueries.UPDATE_WORKORDER(workOrder); DbManager.WarehouseQueries.WRITE_WORKORDER(workOrder);
} }
if (workOrder.runCompleted) if (workOrder.runCompleted)
@ -175,7 +175,7 @@ public enum ForgeManager implements Runnable {
// PERSIST workOrder (dyn_workorders) // PERSIST workOrder (dyn_workorders)
DbManager.WarehouseQueries.UPDATE_WORKORDER(workOrder); DbManager.WarehouseQueries.WRITE_WORKORDER(workOrder);
} catch (Exception e) { } catch (Exception e) {
Logger.error(e); Logger.error(e);
@ -366,7 +366,7 @@ public enum ForgeManager implements Runnable {
// Write updated workOrder to disk // Write updated workOrder to disk
DbManager.WarehouseQueries.UPDATE_WORKORDER(workOrder); DbManager.WarehouseQueries.WRITE_WORKORDER(workOrder);
} }

4
src/engine/net/client/handlers/ItemProductionMsgHandler.java

@ -154,7 +154,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
ForgeManager.vendorWorkOrderLookup.get(vendor).remove(workOrder); ForgeManager.vendorWorkOrderLookup.get(vendor).remove(workOrder);
DbManager.WarehouseQueries.DELETE_WORKORDER(workOrder); DbManager.WarehouseQueries.DELETE_WORKORDER(workOrder);
} else } else
DbManager.WarehouseQueries.UPDATE_WORKORDER(workOrder); DbManager.WarehouseQueries.WRITE_WORKORDER(workOrder);
// Persist item and add to vendor inventory // Persist item and add to vendor inventory
@ -433,7 +433,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
ForgeManager.vendorWorkOrderLookup.get(vendor).remove(workOrder); ForgeManager.vendorWorkOrderLookup.get(vendor).remove(workOrder);
DbManager.WarehouseQueries.DELETE_WORKORDER(workOrder); DbManager.WarehouseQueries.DELETE_WORKORDER(workOrder);
} else } else
DbManager.WarehouseQueries.UPDATE_WORKORDER(workOrder); DbManager.WarehouseQueries.WRITE_WORKORDER(workOrder);
// Refresh vendor's inventory to client // Refresh vendor's inventory to client

Loading…
Cancel
Save