mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-14 03:40:55 +00:00
Merge remote-tracking branch 'origin/Apple/Develop' into branch
This commit is contained in:
@@ -2285,6 +2285,7 @@ function SPAWN:SpawnAtAirbase( SpawnAirbase, Takeoff, TakeoffAltitude, TerminalT
|
|||||||
end
|
end
|
||||||
|
|
||||||
Takeoff = GROUP.Takeoff.Air
|
Takeoff = GROUP.Takeoff.Air
|
||||||
|
spawnonground = false
|
||||||
else
|
else
|
||||||
self:E( string.format( "WARNING: Group %s has no parking spots at %s ==> No emergency air start or uncontrolled spawning ==> No spawn!", self.SpawnTemplatePrefix, SpawnAirbase:GetName() ) )
|
self:E( string.format( "WARNING: Group %s has no parking spots at %s ==> No emergency air start or uncontrolled spawning ==> No spawn!", self.SpawnTemplatePrefix, SpawnAirbase:GetName() ) )
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@@ -5391,13 +5391,13 @@ function CTLD:_BuildCrates(Group, Unit,Engineering,MultiDrop,NotifyGroup)
|
|||||||
local distToUnit=Unit and ccoord:Get2DDistance(Unit:GetCoordinate())or 0
|
local distToUnit=Unit and ccoord:Get2DDistance(Unit:GetCoordinate())or 0
|
||||||
local isHercDrop=Crate:WasDropped(true)
|
local isHercDrop=Crate:WasDropped(true)
|
||||||
if not isHercDrop and distToUnit>baseDist then
|
if not isHercDrop and distToUnit>baseDist then
|
||||||
elseif self.UseC130LoadAndUnload and self:IsC130J(Unit) and distToUnit<15 then
|
elseif self:IsC130J(Unit) and distToUnit<15 then
|
||||||
-- self:_SendMessage("Please unload crates from the C-130 before building!",10,false,Group)
|
-- self:_SendMessage("Please unload crates from the C-130 before building!",10,false,Group)
|
||||||
-- return self
|
-- return self
|
||||||
elseif self.UseC130LoadAndUnload and self:IsHook(Unit) and distToUnit<5 then
|
elseif self:IsHook(Unit) and distToUnit<5 then
|
||||||
-- self:_SendMessage("Please unload crates from the CH-47 before building!",10,false,Group)
|
-- self:_SendMessage("Please unload crates from the CH-47 before building!",10,false,Group)
|
||||||
-- return self
|
-- return self
|
||||||
elseif self.UseC130LoadAndUnload and (Unit:GetTypeName()=="Mi-8MTV2" or Unit:GetTypeName()=="Mi-8MT") and distToUnit<8 then
|
elseif (Unit:GetTypeName()=="Mi-8MTV2" or Unit:GetTypeName()=="Mi-8MT") and distToUnit<8 then
|
||||||
else
|
else
|
||||||
--local testmarker = ccoord:MarkToAll("Crate found",true,"Build Position")
|
--local testmarker = ccoord:MarkToAll("Crate found",true,"Build Position")
|
||||||
if not buildables[name] then
|
if not buildables[name] then
|
||||||
@@ -8454,6 +8454,13 @@ end
|
|||||||
-- @return #number distance Distance to closest zone
|
-- @return #number distance Distance to closest zone
|
||||||
-- @return #number width Radius of zone or width of ship
|
-- @return #number width Radius of zone or width of ship
|
||||||
function CTLD:IsUnitInZone(Unit,Zonetype)
|
function CTLD:IsUnitInZone(Unit,Zonetype)
|
||||||
|
if not Unit then
|
||||||
|
if Zonetype == CTLD.CargoZoneType.SHIP then
|
||||||
|
return false, nil, nil, 1000000, nil
|
||||||
|
else
|
||||||
|
return false, nil, nil, 1000000
|
||||||
|
end
|
||||||
|
end
|
||||||
self:T(self.lid .. " IsUnitInZone")
|
self:T(self.lid .. " IsUnitInZone")
|
||||||
self:T(Zonetype)
|
self:T(Zonetype)
|
||||||
local unitname = Unit:GetName()
|
local unitname = Unit:GetName()
|
||||||
@@ -8476,6 +8483,13 @@ function CTLD:IsUnitInZone(Unit,Zonetype)
|
|||||||
local zonewret = nil
|
local zonewret = nil
|
||||||
local zonenameret = nil
|
local zonenameret = nil
|
||||||
local unitcoord = Unit:GetCoordinate()
|
local unitcoord = Unit:GetCoordinate()
|
||||||
|
if not unitcoord then
|
||||||
|
if Zonetype == CTLD.CargoZoneType.SHIP then
|
||||||
|
return false, nil, nil, 1000000, nil
|
||||||
|
else
|
||||||
|
return false, nil, nil, 1000000
|
||||||
|
end
|
||||||
|
end
|
||||||
local unitVec2 = unitcoord:GetVec2()
|
local unitVec2 = unitcoord:GetVec2()
|
||||||
for _,_cargozone in pairs(zonetable) do
|
for _,_cargozone in pairs(zonetable) do
|
||||||
local czone = _cargozone -- #CTLD.CargoZone
|
local czone = _cargozone -- #CTLD.CargoZone
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
You can find documentation for MOOSE in the following places:
|
You can find documentation for MOOSE in the following places:
|
||||||
|
|
||||||
- Generated documentation of all MOOSE classes:
|
- Generated documentation of all MOOSE classes:
|
||||||
- For the `master` branch: [MOOSE_DOCS]
|
- For the `master-ng` branch: [MOOSE_DOCS]
|
||||||
- For the `develop` branch: [MOOSE_DOCS_DEVELOP]
|
- For the `develop` branch: [MOOSE_DOCS_DEVELOP]
|
||||||
- Documentation:
|
- Documentation:
|
||||||
- The old Guides can be found in our [archive].
|
- The old Guides can be found in our [archive].
|
||||||
|
|||||||
Reference in New Issue
Block a user