| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -29,6 +29,8 @@ import java.util.Objects; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import java.util.concurrent.ConcurrentHashMap; | 
					 | 
					 | 
					 | 
					import java.util.concurrent.ConcurrentHashMap; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import java.util.concurrent.Delayed; | 
					 | 
					 | 
					 | 
					import java.util.concurrent.Delayed; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import java.util.concurrent.TimeUnit; | 
					 | 
					 | 
					 | 
					import java.util.concurrent.TimeUnit; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					import java.util.concurrent.atomic.AtomicBoolean; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					import java.util.concurrent.atomic.AtomicInteger; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					public class WorkOrder implements Delayed { | 
					 | 
					 | 
					 | 
					public class WorkOrder implements Delayed { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -41,7 +43,7 @@ public class WorkOrder implements Delayed { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    public int workOrderID; | 
					 | 
					 | 
					 | 
					    public int workOrderID; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    public NPC vendor; | 
					 | 
					 | 
					 | 
					    public NPC vendor; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    public volatile int slots_used; | 
					 | 
					 | 
					 | 
					    public AtomicInteger slots_used = new AtomicInteger(0); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    public int total_to_produce; | 
					 | 
					 | 
					 | 
					    public int total_to_produce; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    public int total_produced; | 
					 | 
					 | 
					 | 
					    public int total_produced; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    public boolean multiple_slot_request; | 
					 | 
					 | 
					 | 
					    public boolean multiple_slot_request; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -53,7 +55,7 @@ public class WorkOrder implements Delayed { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    public int suffixToken; | 
					 | 
					 | 
					 | 
					    public int suffixToken; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    public long rollingDuration; | 
					 | 
					 | 
					 | 
					    public long rollingDuration; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    public long completionTime; | 
					 | 
					 | 
					 | 
					    public long completionTime; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    public volatile boolean runCompleted = false; | 
					 | 
					 | 
					 | 
					    public AtomicBoolean runCompleted = new AtomicBoolean(false); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    // This collection is serialized to the vendor rolling window in ManageNPCMsg.
 | 
					 | 
					 | 
					 | 
					    // This collection is serialized to the vendor rolling window in ManageNPCMsg.
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -70,7 +72,7 @@ public class WorkOrder implements Delayed { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        this.workOrderID = jsonWorkOrder.getInt("workOrderID"); | 
					 | 
					 | 
					 | 
					        this.workOrderID = jsonWorkOrder.getInt("workOrderID"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        this.vendor = NPC.getNPC(jsonWorkOrder.getInt("vendor")); | 
					 | 
					 | 
					 | 
					        this.vendor = NPC.getNPC(jsonWorkOrder.getInt("vendor")); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        this.slots_used = jsonWorkOrder.getInt("slots_used"); | 
					 | 
					 | 
					 | 
					        this.slots_used.set(jsonWorkOrder.getInt("slots_used")); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        this.total_to_produce = jsonWorkOrder.getInt("total_to_produce"); | 
					 | 
					 | 
					 | 
					        this.total_to_produce = jsonWorkOrder.getInt("total_to_produce"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        this.total_produced = jsonWorkOrder.getInt("total_produced"); | 
					 | 
					 | 
					 | 
					        this.total_produced = jsonWorkOrder.getInt("total_produced"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        this.multiple_slot_request = jsonWorkOrder.getBoolean("multiple_slot_request"); | 
					 | 
					 | 
					 | 
					        this.multiple_slot_request = jsonWorkOrder.getBoolean("multiple_slot_request"); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -78,10 +80,9 @@ public class WorkOrder implements Delayed { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        this.item_name_override = jsonWorkOrder.getString("item_name_override"); | 
					 | 
					 | 
					 | 
					        this.item_name_override = jsonWorkOrder.getString("item_name_override"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        this.prefixToken = jsonWorkOrder.getInt("prefixToken"); | 
					 | 
					 | 
					 | 
					        this.prefixToken = jsonWorkOrder.getInt("prefixToken"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        this.suffixToken = jsonWorkOrder.getInt("suffixToken"); | 
					 | 
					 | 
					 | 
					        this.suffixToken = jsonWorkOrder.getInt("suffixToken"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        this.slots_used = jsonWorkOrder.getInt("slots_used"); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        this.rollingDuration = jsonWorkOrder.getLong("rollingDuration"); | 
					 | 
					 | 
					 | 
					        this.rollingDuration = jsonWorkOrder.getLong("rollingDuration"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        this.completionTime = jsonWorkOrder.getLong("completionTime"); | 
					 | 
					 | 
					 | 
					        this.completionTime = jsonWorkOrder.getLong("completionTime"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        this.runCompleted = jsonWorkOrder.getBoolean("runCompleted"); | 
					 | 
					 | 
					 | 
					        this.runCompleted.set(jsonWorkOrder.getBoolean("runCompleted")); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        JSONObject productionCostMap = jsonWorkOrder.getJSONObject("production_cost"); | 
					 | 
					 | 
					 | 
					        JSONObject productionCostMap = jsonWorkOrder.getJSONObject("production_cost"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |