Browse Source

Time recycle update

combat-2
MagicBot 9 months ago
parent
commit
a160fe1b00
  1. 7
      src/engine/gameManager/ForgeManager.java
  2. 5
      src/engine/objects/Warehouse.java

7
src/engine/gameManager/ForgeManager.java

@ -48,18 +48,17 @@ public enum ForgeManager implements Runnable { @@ -48,18 +48,17 @@ public enum ForgeManager implements Runnable {
if (workOrder.total_produced >= workOrder.total_to_produce) {
Logger.info("Workorder has completed: " + workOrder.workOrderID);
workOrder.runCompleted = true;
workOrder.vendor.workOrders.remove(workOrder);
Logger.info("Workorder has completed: " + workOrder.workOrderID);
workOrder.vendor.workOrders.remove(workOrder);
continue;
}
// Resubmit workOrder
workOrder.rollingDuration = System.currentTimeMillis() + 10000;
workOrder.completionTime = System.currentTimeMillis() + workOrder.rollingDuration;
workOrder.total_to_produce = workOrder.total_to_produce - 1;
workOrders.add(workOrder);

5
src/engine/objects/Warehouse.java

@ -616,13 +616,8 @@ public class Warehouse { @@ -616,13 +616,8 @@ public class Warehouse {
return true;
}
public static void loadAllTransactions(Warehouse warehouse) {
warehouse.transactions = DbManager.WarehouseQueries.GET_TRANSACTIONS_FOR_WAREHOUSE(warehouse.building.getObjectUUID());
}
public static void AddTransactionToWarehouse(Warehouse warehouse, mbEnums.GameObjectType targetType, int targetUUID, mbEnums.TransactionType transactionType, mbEnums.ResourceType resource, int amount) {
if (!DbManager.WarehouseQueries.CREATE_TRANSACTION(warehouse.building.getObjectUUID(), targetType, targetUUID, transactionType, resource, amount, DateTime.now()))
return;

Loading…
Cancel
Save