Add activateBeacon to function turnIntoWind().

This commit is contained in:
2025-01-04 14:49:26 +08:00
parent 06fb098b49
commit 7f3a1d00a7
+17 -12
View File
@@ -149,20 +149,20 @@ do
-- setmetatable(obj,self) -- setmetatable(obj,self)
-- self.__index = self -- self.__index = self
-- timer.scheduleFunction(function (vars)
-- local carrier = vars.context
-- carrier:InitBeacons()
-- end,{context = obj},timer.getTime()+5)
timer.scheduleFunction(function (vars) timer.scheduleFunction(function (vars)
local carrier = vars.context local carrier = vars.context
carrier:setTACAN() carrier:InitBeacons()
carrier:setICLS() end,{context = obj},timer.getTime()+5)
end,{context = obj},timer.getTime()+20)
obj:setMorse() -- timer.scheduleFunction(function (vars)
obj:setLink4() -- local carrier = vars.context
obj:setATC() -- carrier:setTACAN()
-- carrier:setICLS()
-- end,{context = obj},timer.getTime()+20)
-- obj:setMorse()
-- obj:setLink4()
-- obj:setATC()
-- obj:setTACAN() -- obj:setTACAN()
env.info('BAirboss - New Carrier: '..carrierUnitName) env.info('BAirboss - New Carrier: '..carrierUnitName)
@@ -232,7 +232,7 @@ do
--Calculate wind speed on runway in knots. If wind speed < 25 knots, try to make it 25 knots on deck. --Calculate wind speed on runway in knots. If wind speed < 25 knots, try to make it 25 knots on deck.
if windSpeed <= 20/1.944 then if windSpeed <= 20/1.944 then
carrierSpeed = 25/1.944-windSpeed carrierSpeed = 20/1.944-windSpeed
end end
-- Find available waypoint and path. -- Find available waypoint and path.
@@ -315,6 +315,11 @@ do
Controller:setTask(Mission) Controller:setTask(Mission)
end,Mission,timer.getTime()+Delay) end,Mission,timer.getTime()+Delay)
timer.scheduleFunction(function (vars)
local carrier = vars.context
carrier:InitBeacons()
end,{context = self},timer.getTime()+5)
return self return self
end end