diff options
Diffstat (limited to 'crates/fparkan-runtime/src/unit_patrol')
| -rw-r--r-- | crates/fparkan-runtime/src/unit_patrol/orders.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/fparkan-runtime/src/unit_patrol/orders.rs b/crates/fparkan-runtime/src/unit_patrol/orders.rs index 41f68cf7..f3ab609b 100644 --- a/crates/fparkan-runtime/src/unit_patrol/orders.rs +++ b/crates/fparkan-runtime/src/unit_patrol/orders.rs @@ -110,7 +110,9 @@ impl UnitPatrol { order.opcode() ); } - if append && (self.is_patrolling(actor) || self.is_shut_down(actor)) { + if self.is_leaving_factory(actor) + || (append && (self.is_patrolling(actor) || self.is_shut_down(actor))) + { if let Some((_, queue)) = self .script_orders .iter_mut() @@ -186,7 +188,8 @@ impl UnitPatrol { continue; }; // shortcut: Go still uses the temporary arrival tolerance. - let complete = !self.is_shut_down(actor) + let complete = !self.is_leaving_factory(actor) + && !self.is_shut_down(actor) && self .units .iter() |
