mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
CSAR and CTLD - use Frequency generation moved to UTILS
CTLD - added option to drop crates anywhere MANTIS - added state tracker to call Green/Red state change events only once UTILS - added Marianas NDBs to Frequency generation
This commit is contained in:
parent
93a8086ff6
commit
efe41a5e21
@ -1136,6 +1136,13 @@ do
|
|||||||
-- @return #MANTIS self
|
-- @return #MANTIS self
|
||||||
function MANTIS:onafterStatus(From,Event,To)
|
function MANTIS:onafterStatus(From,Event,To)
|
||||||
self:T({From, Event, To})
|
self:T({From, Event, To})
|
||||||
|
-- Display some states
|
||||||
|
if self.debug then
|
||||||
|
self:I(self.lid .. "Status Report")
|
||||||
|
for _name,_state in pairs(self.SamStateTracker) do
|
||||||
|
self:I(string.format("Site %s\tStatus %s",_name,_state))
|
||||||
|
end
|
||||||
|
end
|
||||||
local interval = self.detectinterval * -1
|
local interval = self.detectinterval * -1
|
||||||
self:__Status(interval)
|
self:__Status(interval)
|
||||||
return self
|
return self
|
||||||
|
|||||||
@ -214,6 +214,8 @@ CSAR = {
|
|||||||
-- @field #number timestamp Timestamp for approach process
|
-- @field #number timestamp Timestamp for approach process
|
||||||
|
|
||||||
--- Updated and sorted list of known NDB beacons (in kHz!) from the available maps.
|
--- Updated and sorted list of known NDB beacons (in kHz!) from the available maps.
|
||||||
|
|
||||||
|
--[[ Moved to Utils
|
||||||
-- @field #CSAR.SkipFrequencies
|
-- @field #CSAR.SkipFrequencies
|
||||||
CSAR.SkipFrequencies = {
|
CSAR.SkipFrequencies = {
|
||||||
214,274,291.5,295,297.5,
|
214,274,291.5,295,297.5,
|
||||||
@ -229,7 +231,8 @@ CSAR.SkipFrequencies = {
|
|||||||
905,907,920,935,942,950,995,
|
905,907,920,935,942,950,995,
|
||||||
1000,1025,1030,1050,1065,1116,1175,1182,1210
|
1000,1025,1030,1050,1065,1116,1175,1182,1210
|
||||||
}
|
}
|
||||||
|
--]]
|
||||||
|
|
||||||
--- All slot / Limit settings
|
--- All slot / Limit settings
|
||||||
-- @type CSAR.AircraftType
|
-- @type CSAR.AircraftType
|
||||||
-- @field #string typename Unit type name.
|
-- @field #string typename Unit type name.
|
||||||
@ -245,7 +248,7 @@ CSAR.AircraftType["Mi-24V"] = 8
|
|||||||
|
|
||||||
--- CSAR class version.
|
--- CSAR class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
CSAR.version="0.1.8r1"
|
CSAR.version="0.1.8r2"
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
-- ToDo list
|
-- ToDo list
|
||||||
@ -872,7 +875,11 @@ function CSAR:_EventHandler(EventData)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if _place:GetCoalition() == self.coalition or _place:GetCoalition() == coalition.side.NEUTRAL then
|
if _place:GetCoalition() == self.coalition or _place:GetCoalition() == coalition.side.NEUTRAL then
|
||||||
self:_RescuePilots(_unit)
|
if self.pilotmustopendoors and not self:_IsLoadingDoorOpen(_event.IniUnitName) then
|
||||||
|
self:_DisplayMessageToSAR(_unit, "Open the door to let me out!", self.messageTime, true)
|
||||||
|
else
|
||||||
|
self:_RescuePilots(_unit)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
self:T(string.format("Airfield %d, Unit %d", _place:GetCoalition(), _unit:GetCoalition()))
|
self:T(string.format("Airfield %d, Unit %d", _place:GetCoalition(), _unit:GetCoalition()))
|
||||||
end
|
end
|
||||||
@ -1113,27 +1120,27 @@ function CSAR:_IsLoadingDoorOpen( unit_name )
|
|||||||
local type_name = unit:getTypeName()
|
local type_name = unit:getTypeName()
|
||||||
|
|
||||||
if type_name == "Mi-8MT" and unit:getDrawArgumentValue(86) == 1 or unit:getDrawArgumentValue(250) == 1 then
|
if type_name == "Mi-8MT" and unit:getDrawArgumentValue(86) == 1 or unit:getDrawArgumentValue(250) == 1 then
|
||||||
self:I(unit_name .. " Cargo doors are open or cargo door not present")
|
self:T(unit_name .. " Cargo doors are open or cargo door not present")
|
||||||
ret_val = true
|
ret_val = true
|
||||||
end
|
end
|
||||||
|
|
||||||
if type_name == "Mi-24P" and unit:getDrawArgumentValue(38) == 1 or unit:getDrawArgumentValue(86) == 1 then
|
if type_name == "Mi-24P" and unit:getDrawArgumentValue(38) == 1 or unit:getDrawArgumentValue(86) == 1 then
|
||||||
self:I(unit_name .. " a side door is open")
|
self:T(unit_name .. " a side door is open")
|
||||||
ret_val = true
|
ret_val = true
|
||||||
end
|
end
|
||||||
|
|
||||||
if type_name == "UH-1H" and unit:getDrawArgumentValue(43) == 1 or unit:getDrawArgumentValue(44) == 1 then
|
if type_name == "UH-1H" and unit:getDrawArgumentValue(43) == 1 or unit:getDrawArgumentValue(44) == 1 then
|
||||||
self:I(unit_name .. " a side door is open ")
|
self:T(unit_name .. " a side door is open ")
|
||||||
ret_val = true
|
ret_val = true
|
||||||
end
|
end
|
||||||
|
|
||||||
if string.find(type_name, "SA342" ) and unit:getDrawArgumentValue(34) == 1 or unit:getDrawArgumentValue(38) == 1 then
|
if string.find(type_name, "SA342" ) and unit:getDrawArgumentValue(34) == 1 or unit:getDrawArgumentValue(38) == 1 then
|
||||||
self:I(unit_name .. " front door(s) are open")
|
self:T(unit_name .. " front door(s) are open")
|
||||||
ret_val = true
|
ret_val = true
|
||||||
end
|
end
|
||||||
|
|
||||||
if ret_val == false then
|
if ret_val == false then
|
||||||
self:I(unit_name .. " all doors are closed")
|
self:T(unit_name .. " all doors are closed")
|
||||||
end
|
end
|
||||||
return ret_val
|
return ret_val
|
||||||
|
|
||||||
@ -1346,8 +1353,12 @@ function CSAR:_ScheduledSARFlight(heliname,groupname)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if _dist < 200 and _heliUnit:InAir() == false then
|
if _dist < 200 and _heliUnit:InAir() == false then
|
||||||
|
if self.pilotmustopendoors and not self:_IsLoadingDoorOpen(heliname) then
|
||||||
|
self:_DisplayMessageToSAR(_heliUnit, "Open the door to let me out!", self.messageTime, true)
|
||||||
|
else
|
||||||
self:_RescuePilots(_heliUnit)
|
self:_RescuePilots(_heliUnit)
|
||||||
return
|
return
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--queue up
|
--queue up
|
||||||
@ -1755,11 +1766,13 @@ end
|
|||||||
-- @param #CSAR self
|
-- @param #CSAR self
|
||||||
function CSAR:_GenerateVHFrequencies()
|
function CSAR:_GenerateVHFrequencies()
|
||||||
self:T(self.lid .. " _GenerateVHFrequencies")
|
self:T(self.lid .. " _GenerateVHFrequencies")
|
||||||
local _skipFrequencies = self.SkipFrequencies
|
--local _skipFrequencies = self.SkipFrequencies
|
||||||
|
|
||||||
local FreeVHFFrequencies = {}
|
local FreeVHFFrequencies = {}
|
||||||
local UsedVHFFrequencies = {}
|
--local UsedVHFFrequencies = {}
|
||||||
|
FreeVHFFrequencies = UTILS.GenerateVHFrequencies()
|
||||||
|
|
||||||
|
--[[ moved to UTILS
|
||||||
-- first range
|
-- first range
|
||||||
local _start = 200000
|
local _start = 200000
|
||||||
while _start < 400000 do
|
while _start < 400000 do
|
||||||
@ -1819,6 +1832,7 @@ function CSAR:_GenerateVHFrequencies()
|
|||||||
|
|
||||||
_start = _start + 50000
|
_start = _start + 50000
|
||||||
end
|
end
|
||||||
|
--]]
|
||||||
self.FreeVHFFrequencies = FreeVHFFrequencies
|
self.FreeVHFFrequencies = FreeVHFFrequencies
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|||||||
@ -262,6 +262,7 @@ do
|
|||||||
--
|
--
|
||||||
-- my_ctld.useprefix = true -- (DO NOT SWITCH THIS OFF UNLESS YOU KNOW WHAT YOU ARE DOING!) Adjust **before** starting CTLD. If set to false, *all* choppers of the coalition side will be enabled for CTLD.
|
-- my_ctld.useprefix = true -- (DO NOT SWITCH THIS OFF UNLESS YOU KNOW WHAT YOU ARE DOING!) Adjust **before** starting CTLD. If set to false, *all* choppers of the coalition side will be enabled for CTLD.
|
||||||
-- my_ctld.CrateDistance = 30 -- List and Load crates in this radius only.
|
-- my_ctld.CrateDistance = 30 -- List and Load crates in this radius only.
|
||||||
|
-- my_ctld.dropcratesanywhere = false -- Option to allow crates to be dropped anywhere.
|
||||||
-- my_ctld.maximumHoverHeight = 15 -- Hover max this high to load.
|
-- my_ctld.maximumHoverHeight = 15 -- Hover max this high to load.
|
||||||
-- my_ctld.minimumHoverHeight = 4 -- Hover min this low to load.
|
-- my_ctld.minimumHoverHeight = 4 -- Hover min this low to load.
|
||||||
-- my_ctld.forcehoverload = true -- Crates (not: troops) can only be loaded while hovering.
|
-- my_ctld.forcehoverload = true -- Crates (not: troops) can only be loaded while hovering.
|
||||||
@ -516,6 +517,8 @@ CTLD.UnitTypes = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
--- Updated and sorted known NDB beacons (in kHz!) from the available maps
|
--- Updated and sorted known NDB beacons (in kHz!) from the available maps
|
||||||
|
|
||||||
|
--[[ -- Now in UTILS
|
||||||
-- @field #CTLD.SkipFrequencies
|
-- @field #CTLD.SkipFrequencies
|
||||||
CTLD.SkipFrequencies = {
|
CTLD.SkipFrequencies = {
|
||||||
214,274,291.5,295,297.5,
|
214,274,291.5,295,297.5,
|
||||||
@ -531,10 +534,11 @@ CTLD.SkipFrequencies = {
|
|||||||
905,907,920,935,942,950,995,
|
905,907,920,935,942,950,995,
|
||||||
1000,1025,1030,1050,1065,1116,1175,1182,1210
|
1000,1025,1030,1050,1065,1116,1175,1182,1210
|
||||||
}
|
}
|
||||||
|
--]]
|
||||||
|
|
||||||
--- CTLD class version.
|
--- CTLD class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
CTLD.version="0.1.3r2"
|
CTLD.version="0.1.4r1"
|
||||||
|
|
||||||
--- Instantiate a new CTLD.
|
--- Instantiate a new CTLD.
|
||||||
-- @param #CTLD self
|
-- @param #CTLD self
|
||||||
@ -643,6 +647,7 @@ function CTLD:New(Coalition, Prefixes, Alias)
|
|||||||
self.minimumHoverHeight = 4
|
self.minimumHoverHeight = 4
|
||||||
self.forcehoverload = true
|
self.forcehoverload = true
|
||||||
self.hoverautoloading = true
|
self.hoverautoloading = true
|
||||||
|
self.dropcratesanywhere = false -- #1570
|
||||||
|
|
||||||
self.smokedistance = 2000
|
self.smokedistance = 2000
|
||||||
self.movetroopstowpzone = true
|
self.movetroopstowpzone = true
|
||||||
@ -794,13 +799,15 @@ end
|
|||||||
function CTLD:_GenerateUHFrequencies()
|
function CTLD:_GenerateUHFrequencies()
|
||||||
self:T(self.lid .. " _GenerateUHFrequencies")
|
self:T(self.lid .. " _GenerateUHFrequencies")
|
||||||
self.FreeUHFFrequencies = {}
|
self.FreeUHFFrequencies = {}
|
||||||
|
self.FreeUHFFrequencies = UTILS.GenerateUHFrequencies()
|
||||||
|
--[[
|
||||||
local _start = 220000000
|
local _start = 220000000
|
||||||
|
|
||||||
while _start < 399000000 do
|
while _start < 399000000 do
|
||||||
table.insert(self.FreeUHFFrequencies, _start)
|
table.insert(self.FreeUHFFrequencies, _start)
|
||||||
_start = _start + 500000
|
_start = _start + 500000
|
||||||
end
|
end
|
||||||
|
--]]
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -809,7 +816,8 @@ end
|
|||||||
function CTLD:_GenerateFMFrequencies()
|
function CTLD:_GenerateFMFrequencies()
|
||||||
self:T(self.lid .. " _GenerateFMrequencies")
|
self:T(self.lid .. " _GenerateFMrequencies")
|
||||||
self.FreeFMFrequencies = {}
|
self.FreeFMFrequencies = {}
|
||||||
|
self.FreeFMFrequencies = UTILS.GenerateFMFrequencies()
|
||||||
|
--[[
|
||||||
for _first = 3, 7 do
|
for _first = 3, 7 do
|
||||||
for _second = 0, 5 do
|
for _second = 0, 5 do
|
||||||
for _third = 0, 9 do
|
for _third = 0, 9 do
|
||||||
@ -818,7 +826,7 @@ function CTLD:_GenerateFMFrequencies()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
--]]
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -826,6 +834,13 @@ end
|
|||||||
-- @param #CTLD self
|
-- @param #CTLD self
|
||||||
function CTLD:_GenerateVHFrequencies()
|
function CTLD:_GenerateVHFrequencies()
|
||||||
self:T(self.lid .. " _GenerateVHFrequencies")
|
self:T(self.lid .. " _GenerateVHFrequencies")
|
||||||
|
|
||||||
|
self.FreeVHFFrequencies = {}
|
||||||
|
self.UsedVHFFrequencies = {}
|
||||||
|
|
||||||
|
self.FreeVHFFrequencies = UTILS.GenerateVHFrequencies()
|
||||||
|
|
||||||
|
--[[
|
||||||
local _skipFrequencies = self.SkipFrequencies
|
local _skipFrequencies = self.SkipFrequencies
|
||||||
|
|
||||||
self.FreeVHFFrequencies = {}
|
self.FreeVHFFrequencies = {}
|
||||||
@ -882,10 +897,11 @@ function CTLD:_GenerateVHFrequencies()
|
|||||||
end
|
end
|
||||||
_start = _start + 50000
|
_start = _start + 50000
|
||||||
end
|
end
|
||||||
|
--]]
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--[[ -- unused
|
||||||
--- (Internal) Function to generate valid laser codes.
|
--- (Internal) Function to generate valid laser codes.
|
||||||
-- @param #CTLD self
|
-- @param #CTLD self
|
||||||
function CTLD:_GenerateLaserCodes()
|
function CTLD:_GenerateLaserCodes()
|
||||||
@ -926,6 +942,8 @@ function CTLD:_ContainsDigit(_number, _numberToFind)
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--]]
|
||||||
|
|
||||||
--- (Internal) Event handler function
|
--- (Internal) Event handler function
|
||||||
-- @param #CTLD self
|
-- @param #CTLD self
|
||||||
-- @param Core.Event#EVENTDATA EventData
|
-- @param Core.Event#EVENTDATA EventData
|
||||||
@ -1056,24 +1074,26 @@ function CTLD:_GetCrates(Group, Unit, Cargo, number, drop)
|
|||||||
if not drop then
|
if not drop then
|
||||||
inzone = self:IsUnitInZone(Unit,CTLD.CargoZoneType.LOAD)
|
inzone = self:IsUnitInZone(Unit,CTLD.CargoZoneType.LOAD)
|
||||||
else
|
else
|
||||||
inzone = self:IsUnitInZone(Unit,CTLD.CargoZoneType.DROP)
|
if self.dropcratesanywhere then -- #1570
|
||||||
|
inzone = true
|
||||||
|
else
|
||||||
|
inzone = self:IsUnitInZone(Unit,CTLD.CargoZoneType.DROP)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if not inzone then
|
if not inzone then
|
||||||
self:_SendMessage("You are not close enough to a logistics zone!", 10, false, Group)
|
self:_SendMessage("You are not close enough to a logistics zone!", 10, false, Group)
|
||||||
--local m = MESSAGE:New("You are not close enough to a logistics zone!",15,"CTLD"):ToGroup(Group)
|
|
||||||
if not self.debug then return self end
|
if not self.debug then return self end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- avoid crate spam
|
-- avoid crate spam
|
||||||
local capabilities = self:_GetUnitCapabilities(Unit) -- #CTLD.UnitCapabilities
|
local capabilities = self:_GetUnitCapabilities(Unit) -- #CTLD.UnitCapabilities
|
||||||
--local capabilities = self.UnitTypes[Unit:GetTypeName()] -- #CTLD.UnitCapabilities
|
|
||||||
local canloadcratesno = capabilities.cratelimit
|
local canloadcratesno = capabilities.cratelimit
|
||||||
local loaddist = self.CrateDistance or 30
|
local loaddist = self.CrateDistance or 30
|
||||||
local nearcrates, numbernearby = self:_FindCratesNearby(Group,Unit,loaddist)
|
local nearcrates, numbernearby = self:_FindCratesNearby(Group,Unit,loaddist)
|
||||||
if numbernearby >= canloadcratesno and not drop then
|
if numbernearby >= canloadcratesno and not drop then
|
||||||
self:_SendMessage("There are enough crates nearby already! Take care of those first!", 10, false, Group)
|
self:_SendMessage("There are enough crates nearby already! Take care of those first!", 10, false, Group)
|
||||||
--local m = MESSAGE:New("There are enough crates nearby already! Take care of those first!",15,"CTLD"):ToGroup(Group)
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
-- spawn crates in front of helicopter
|
-- spawn crates in front of helicopter
|
||||||
@ -1082,7 +1102,6 @@ function CTLD:_GetCrates(Group, Unit, Cargo, number, drop)
|
|||||||
local number = number or cargotype:GetCratesNeeded() --#number
|
local number = number or cargotype:GetCratesNeeded() --#number
|
||||||
local cratesneeded = cargotype:GetCratesNeeded() --#number
|
local cratesneeded = cargotype:GetCratesNeeded() --#number
|
||||||
local cratename = cargotype:GetName()
|
local cratename = cargotype:GetName()
|
||||||
--self:Tself.lid .. string.format("Crate %s requested", cratename))
|
|
||||||
local cratetemplate = "Container"-- #string
|
local cratetemplate = "Container"-- #string
|
||||||
-- get position and heading of heli
|
-- get position and heading of heli
|
||||||
local position = Unit:GetCoordinate()
|
local position = Unit:GetCoordinate()
|
||||||
@ -1130,7 +1149,6 @@ function CTLD:_GetCrates(Group, Unit, Cargo, number, drop)
|
|||||||
self:__CratesDropped(1, Group, Unit, droppedcargo)
|
self:__CratesDropped(1, Group, Unit, droppedcargo)
|
||||||
end
|
end
|
||||||
self:_SendMessage(text, 10, false, Group)
|
self:_SendMessage(text, 10, false, Group)
|
||||||
--local m = MESSAGE:New(text,15,"CTLD",true):ToGroup(Group)
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -1149,7 +1167,6 @@ function CTLD:_ListCratesNearby( _group, _unit)
|
|||||||
for _,_entry in pairs (crates) do
|
for _,_entry in pairs (crates) do
|
||||||
local entry = _entry -- #CTLD_CARGO
|
local entry = _entry -- #CTLD_CARGO
|
||||||
local name = entry:GetName() --#string
|
local name = entry:GetName() --#string
|
||||||
-- TODO Meaningful sorting/aggregation
|
|
||||||
local dropped = entry:WasDropped()
|
local dropped = entry:WasDropped()
|
||||||
if dropped then
|
if dropped then
|
||||||
text:Add(string.format("Dropped crate for %s",name))
|
text:Add(string.format("Dropped crate for %s",name))
|
||||||
@ -1158,14 +1175,12 @@ function CTLD:_ListCratesNearby( _group, _unit)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if text:GetCount() == 1 then
|
if text:GetCount() == 1 then
|
||||||
text:Add("--------- N O N E ------------")
|
text:Add(" N O N E")
|
||||||
end
|
end
|
||||||
text:Add("------------------------------------------------------------")
|
text:Add("------------------------------------------------------------")
|
||||||
self:_SendMessage(text:Text(), 30, true, _group)
|
self:_SendMessage(text:Text(), 30, true, _group)
|
||||||
--local m = MESSAGE:New(text:Text(),15,"CTLD",true):ToGroup(_group)
|
|
||||||
else
|
else
|
||||||
self:_SendMessage(string.format("No (loadable) crates within %d meters!",finddist), 10, false, _group)
|
self:_SendMessage(string.format("No (loadable) crates within %d meters!",finddist), 10, false, _group)
|
||||||
--local m = MESSAGE:New(string.format("No (loadable) crates within %d meters!",finddist),15,"CTLD",true):ToGroup(_group)
|
|
||||||
end
|
end
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
@ -1347,7 +1362,7 @@ function CTLD:_ListCargo(Group, Unit)
|
|||||||
report:Add("------------------------------------------------------------")
|
report:Add("------------------------------------------------------------")
|
||||||
report:Add(string.format("Troops: %d(%d), Crates: %d(%d)",no_troops,trooplimit,no_crates,cratelimit))
|
report:Add(string.format("Troops: %d(%d), Crates: %d(%d)",no_troops,trooplimit,no_crates,cratelimit))
|
||||||
report:Add("------------------------------------------------------------")
|
report:Add("------------------------------------------------------------")
|
||||||
report:Add("-- TROOPS --")
|
report:Add(" -- TROOPS --")
|
||||||
for _,_cargo in pairs(cargotable) do
|
for _,_cargo in pairs(cargotable) do
|
||||||
local cargo = _cargo -- #CTLD_CARGO
|
local cargo = _cargo -- #CTLD_CARGO
|
||||||
local type = cargo:GetType() -- #CTLD_CARGO.Enum
|
local type = cargo:GetType() -- #CTLD_CARGO.Enum
|
||||||
@ -1356,10 +1371,10 @@ function CTLD:_ListCargo(Group, Unit)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if report:GetCount() == 4 then
|
if report:GetCount() == 4 then
|
||||||
report:Add("--------- N O N E ------------")
|
report:Add(" N O N E")
|
||||||
end
|
end
|
||||||
report:Add("------------------------------------------------------------")
|
report:Add("------------------------------------------------------------")
|
||||||
report:Add("-- CRATES --")
|
report:Add(" -- CRATES --")
|
||||||
local cratecount = 0
|
local cratecount = 0
|
||||||
for _,_cargo in pairs(cargotable) do
|
for _,_cargo in pairs(cargotable) do
|
||||||
local cargo = _cargo -- #CTLD_CARGO
|
local cargo = _cargo -- #CTLD_CARGO
|
||||||
@ -1370,7 +1385,7 @@ function CTLD:_ListCargo(Group, Unit)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if cratecount == 0 then
|
if cratecount == 0 then
|
||||||
report:Add("--------- N O N E ------------")
|
report:Add(" N O N E")
|
||||||
end
|
end
|
||||||
report:Add("------------------------------------------------------------")
|
report:Add("------------------------------------------------------------")
|
||||||
local text = report:Text()
|
local text = report:Text()
|
||||||
@ -1498,13 +1513,16 @@ end
|
|||||||
-- @param Wrappe.Unit#UNIT Unit
|
-- @param Wrappe.Unit#UNIT Unit
|
||||||
function CTLD:_UnloadCrates(Group, Unit)
|
function CTLD:_UnloadCrates(Group, Unit)
|
||||||
self:T(self.lid .. " _UnloadCrates")
|
self:T(self.lid .. " _UnloadCrates")
|
||||||
-- check if we are in DROP zone
|
|
||||||
local inzone, zonename, zone, distance = self:IsUnitInZone(Unit,CTLD.CargoZoneType.DROP)
|
if not self.dropcratesanywhere then -- #1570
|
||||||
if not inzone then
|
-- check if we are in DROP zone
|
||||||
self:_SendMessage("You are not close enough to a drop zone!", 10, false, Group)
|
local inzone, zonename, zone, distance = self:IsUnitInZone(Unit,CTLD.CargoZoneType.DROP)
|
||||||
--local m = MESSAGE:New("You are not close enough to a drop zone!",15,"CTLD"):ToGroup(Group)
|
if not inzone then
|
||||||
if not self.debug then
|
self:_SendMessage("You are not close enough to a drop zone!", 10, false, Group)
|
||||||
return self
|
--local m = MESSAGE:New("You are not close enough to a drop zone!",15,"CTLD"):ToGroup(Group)
|
||||||
|
if not self.debug then
|
||||||
|
return self
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- check for hover unload
|
-- check for hover unload
|
||||||
@ -2058,7 +2076,7 @@ function CTLD:_ListRadioBeacons(Group, Unit)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if report:GetCount() == 1 then
|
if report:GetCount() == 1 then
|
||||||
report:Add("--------- N O N E ------------")
|
report:Add(" N O N E")
|
||||||
end
|
end
|
||||||
report:Add("------------------------------------------------------------")
|
report:Add("------------------------------------------------------------")
|
||||||
self:_SendMessage(report:Text(), 30, true, Group)
|
self:_SendMessage(report:Text(), 30, true, Group)
|
||||||
|
|||||||
@ -1631,10 +1631,10 @@ function UTILS.GenerateVHFrequencies()
|
|||||||
local _skipFrequencies = {
|
local _skipFrequencies = {
|
||||||
214,274,291.5,295,297.5,
|
214,274,291.5,295,297.5,
|
||||||
300.5,304,307,309.5,311,312,312.5,316,
|
300.5,304,307,309.5,311,312,312.5,316,
|
||||||
320,324,328,329,330,336,337,
|
320,324,328,329,330,332,336,337,
|
||||||
342,343,348,351,352,353,358,
|
342,343,348,351,352,353,358,
|
||||||
363,365,368,372.5,374,
|
363,365,368,372.5,374,
|
||||||
380,381,384,389,395,396,
|
380,381,384,385,389,395,396,
|
||||||
414,420,430,432,435,440,450,455,462,470,485,
|
414,420,430,432,435,440,450,455,462,470,485,
|
||||||
507,515,520,525,528,540,550,560,570,577,580,
|
507,515,520,525,528,540,550,560,570,577,580,
|
||||||
602,625,641,662,670,680,682,690,
|
602,625,641,662,670,680,682,690,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user