From 748aa131e4e9ba35bbe728fa6a2acb4d0efa4cf8 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Tue, 23 Jan 2024 10:03:52 +0100 Subject: [PATCH] WAREHOUSE - trying to ensure WH for AirWing starts again when runway is repaired --- Moose Development/Moose/Functional/Warehouse.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Moose Development/Moose/Functional/Warehouse.lua b/Moose Development/Moose/Functional/Warehouse.lua index 86c1255c7..686bede21 100644 --- a/Moose Development/Moose/Functional/Warehouse.lua +++ b/Moose Development/Moose/Functional/Warehouse.lua @@ -3414,7 +3414,7 @@ end -- FSM states ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---- On after Start event. Starts the warehouse. Addes event handlers and schedules status updates of reqests and queue. +--- On after Start event. Starts the warehouse. Adds event handlers and schedules status updates of reqests and queue. -- @param #WAREHOUSE self -- @param #string From From state. -- @param #string Event Event. @@ -3595,6 +3595,7 @@ function WAREHOUSE:onafterStatus(From, Event, To) local Trepair=self:GetRunwayRepairtime() self:I(self.lid..string.format("Runway destroyed! Will be repaired in %d sec", Trepair)) if Trepair==0 then + self.runwaydestroyed = nil self:RunwayRepaired() end end @@ -5392,7 +5393,8 @@ function WAREHOUSE:onafterRunwayDestroyed(From, Event, To) self:_InfoMessage(text) self.runwaydestroyed=timer.getAbsTime() - + + return self end --- On after "RunwayRepaired" event. @@ -5407,7 +5409,8 @@ function WAREHOUSE:onafterRunwayRepaired(From, Event, To) self:_InfoMessage(text) self.runwaydestroyed=nil - + + return self end