When i read restock logic, there is
Code: Select all
<actions name="ResupplyCheck">
<set_value name="$orders_interrupt" exact="this.ship.orders"/>
<do_if value="this.ship.defaultorder.exists">
<append_to_list name="$orders_interrupt" exact="this.ship.defaultorder"/>
</do_if>
<do_all exact="$orders_interrupt.count" counter="$counter_lib_orders">
<do_if value="(($orders_interrupt.{$counter_lib_orders}.id == 'Equip') or ($orders_interrupt.{$counter_lib_orders}.id == 'Repair') or ($orders_interrupt.{$counter_lib_orders}.id == 'RestockSubordinates')) and $orders_interrupt.{$counter_lib_orders}.state != orderstate.started">
<debug_text text="'%1 (%2) is already heading to dock with a %3 order. No need to check for resupply again.'.[this.ship.knownname, this.ship, $orders_interrupt.{$counter_lib_orders}.id]" chance="$debugchance_interrupt"/>
<set_value name="$cleanup_interrupt"/>
<break/>
</do_if>
</do_all>
<remove_value name="$orders_interrupt"/>
Code: Select all
<set_value name="$cleanup_interrupt"/>