Apply sign work zones before candidate routing
This commit is contained in:
+8
-1
@@ -82,7 +82,11 @@ class LegacyJobStates:
|
||||
if m.state == m.idle:
|
||||
continue
|
||||
if m.state != m.done:
|
||||
m.run()
|
||||
self.active_machine = m
|
||||
try:
|
||||
m.run()
|
||||
finally:
|
||||
self.active_machine = None
|
||||
return
|
||||
# if we went through them all
|
||||
for m in machines:
|
||||
@@ -256,6 +260,7 @@ class LegacyJobStates:
|
||||
|
||||
def __init__(self, global_state):
|
||||
self.g = global_state
|
||||
self.active_machine = None
|
||||
|
||||
self.init_machines()
|
||||
self.state = self.idle
|
||||
@@ -281,6 +286,7 @@ class JobStates(LegacyJobStates):
|
||||
self.eat_food_states = eat_food.EatFoodStates(global_state)
|
||||
self.check_threats_states = check_threats.CheckThreatsStates(
|
||||
global_state)
|
||||
self.active_machine = None
|
||||
self.state = self.idle
|
||||
|
||||
def farm_wood(self):
|
||||
@@ -356,4 +362,5 @@ class JobStates(LegacyJobStates):
|
||||
self.check_threats_states.external_safety = False
|
||||
self.gather_crop_states.active_section_anchor = None
|
||||
self.gather_crop_states.completed_crops = 0
|
||||
self.active_machine = None
|
||||
self.state = self.idle
|
||||
|
||||
Reference in New Issue
Block a user