Browse Source

Multiple item workOrder work

combat-2
MagicBot 9 months ago
parent
commit
a5bcdff216
  1. 2
      src/engine/gameManager/ForgeManager.java
  2. 2
      src/engine/loot/WorkOrder.java
  3. 2
      src/engine/net/client/handlers/ItemProductionMsgHandler.java

2
src/engine/gameManager/ForgeManager.java

@ -175,7 +175,7 @@ public enum ForgeManager implements Runnable { @@ -175,7 +175,7 @@ public enum ForgeManager implements Runnable {
// Single item rolls are msg_size of 0;
if (workOrder.slots_used > 0 && workOrder.msg_size == 0)
if (workOrder.slots_used > 0 && workOrder.multiple_slot_request == 0)
availableSlots = 1;
return availableSlots;

2
src/engine/loot/WorkOrder.java

@ -28,7 +28,7 @@ public class WorkOrder implements Delayed { @@ -28,7 +28,7 @@ public class WorkOrder implements Delayed {
public int slots_used;
public int total_to_produce;
public int total_produced;
public int msg_size;
public int multiple_slot_request;
public HashMap<mbEnums.ResourceType, Integer> production_cost = new HashMap<>();
public HashMap<mbEnums.ResourceType, Integer> production_cost_total = new HashMap<>();
public int templateID;

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

@ -87,7 +87,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { @@ -87,7 +87,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
workOrder.suffixToken = msg.sToken;
workOrder.item_name_override = msg.name;
workOrder.slots_used = 0;
workOrder.msg_size = msg.size;
workOrder.multiple_slot_request = msg.size;
// Validate vendor can roll this item

Loading…
Cancel
Save