mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Merge remote-tracking branch 'origin/master' into branch
# Conflicts: # Moose Development/Moose/Core/Base.lua
This commit is contained in:
commit
2b6a039368
@ -1465,4 +1465,4 @@ function BASE:I( Arguments )
|
||||
env.info( string.format( "%1s:%30s%05d(%s)", "I", self.ClassName, self.ClassID, UTILS.BasicSerialize(Arguments)) )
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@ -387,7 +387,7 @@ function CLEANUP_AIRBASE.__:CleanUpSchedule()
|
||||
local CleanUpUnit = CleanUpListData.CleanUpUnit -- Wrapper.Unit#UNIT
|
||||
local CleanUpGroupName = CleanUpListData.CleanUpGroupName
|
||||
|
||||
if CleanUpUnit:IsAlive() ~= nil then
|
||||
if CleanUpUnit and CleanUpUnit:IsAlive() ~= nil then
|
||||
|
||||
if self:IsInAirbase( CleanUpUnit:GetVec2() ) then
|
||||
|
||||
|
||||
@ -6047,7 +6047,7 @@ function WAREHOUSE:_SpawnAssetAircraft(alias, asset, request, parking, uncontrol
|
||||
|
||||
else
|
||||
|
||||
if #parking<#template.units and not airstart then
|
||||
if parking and #parking<#template.units and not airstart then
|
||||
local text=string.format("ERROR: Not enough parking! Free parking = %d < %d aircraft to be spawned.", #parking, #template.units)
|
||||
self:_DebugMessage(text)
|
||||
return nil
|
||||
|
||||
@ -1422,6 +1422,7 @@ function CTLD:New(Coalition, Prefixes, Alias)
|
||||
self:AddTransition("*", "CratesRepaired", "*") -- CTLD repair event.
|
||||
self:AddTransition("*", "CratesBuildStarted", "*") -- CTLD build event.
|
||||
self:AddTransition("*", "CratesRepairStarted", "*") -- CTLD repair event.
|
||||
self:AddTransition("*", "HelicopterLost", "*") -- CTLD lost event.
|
||||
self:AddTransition("*", "Load", "*") -- CTLD load event.
|
||||
self:AddTransition("*", "Loaded", "*") -- CTLD load event.
|
||||
self:AddTransition("*", "Save", "*") -- CTLD save event.
|
||||
@ -1831,6 +1832,24 @@ function CTLD:New(Coalition, Prefixes, Alias)
|
||||
-- @param #string To State.
|
||||
-- @param Wrapper.Group#GROUP Group Group Object.
|
||||
-- @param Wrapper.Unit#UNIT Unit Unit Object.
|
||||
|
||||
--- FSM Function OnBeforeHelicopterLost.
|
||||
-- @function [parent=#CTLD] OnBeforeHelicopterLost
|
||||
-- @param #CTLD self
|
||||
-- @param #string From State.
|
||||
-- @param #string Event Trigger.
|
||||
-- @param #string To State.
|
||||
-- @param #string Unitname The name of the unit lost.
|
||||
-- @param #table LostCargo Table of #CTLD_CARGO object which were aboard the helicopter/transportplane lost. Can be an empty table!
|
||||
|
||||
--- FSM Function OnAfterHelicopterLost.
|
||||
-- @function [parent=#CTLD] OnAfterHelicopterLost
|
||||
-- @param #CTLD self
|
||||
-- @param #string From State.
|
||||
-- @param #string Event Trigger.
|
||||
-- @param #string To State.
|
||||
-- @param #string Unitname The name of the unit lost.
|
||||
-- @param #table LostCargo Table of #CTLD_CARGO object which were aboard the helicopter/transportplane lost. Can be an empty table!
|
||||
|
||||
--- FSM Function OnAfterLoad.
|
||||
-- @function [parent=#CTLD] OnAfterLoad
|
||||
@ -1972,6 +1991,10 @@ function CTLD:_EventHandler(EventData)
|
||||
elseif event.id == EVENTS.PlayerLeaveUnit or event.id == EVENTS.UnitLost then
|
||||
-- remove from pilot table
|
||||
local unitname = event.IniUnitName or "none"
|
||||
if self.CtldUnits[unitname] then
|
||||
local lostcargo = UTILS.DeepCopy(self.Loaded_Cargo[unitname] or {})
|
||||
self:__HelicopterLost(1,unitname,lostcargo)
|
||||
end
|
||||
self.CtldUnits[unitname] = nil
|
||||
self.Loaded_Cargo[unitname] = nil
|
||||
self.MenusDone[unitname] = nil
|
||||
|
||||
@ -1279,6 +1279,8 @@ ENUMS.Storage.weapons.nurs.S_5M = "weapons.nurs.S_5M"
|
||||
ENUMS.Storage.weapons.missiles.AGM_12A = "weapons.missiles.AGM_12A"
|
||||
ENUMS.Storage.weapons.droptanks.JAYHAWK_120_Fuel_Tank = "weapons.droptanks.JAYHAWK_120_Fuel_Tank"
|
||||
ENUMS.Storage.weapons.bombs.GBU_15_V_1_B = "weapons.bombs.GBU_15_V_1_B"
|
||||
ENUMS.Storage.weapons.missiles.HYDRA_70_M151_APKWS = {4,4,8,292}
|
||||
ENUMS.Storage.weapons.missiles.HYDRA_70_M282_APKWS = {4,4,8,293}
|
||||
-- dupes with typos
|
||||
ENUMS.Storage.weapons.bombs.BAP100 = "weapons.bombs.BAP_100"
|
||||
ENUMS.Storage.weapons.bombs.BLU3B_GROUP = "weapons.bombs.BLU-3B_GROUP"
|
||||
@ -1327,7 +1329,7 @@ ENUMS.Storage.weapons.OH58.Smk_Grenade_Violet = {4,5,9,490}
|
||||
ENUMS.Storage.weapons.OH58.Smk_Grenade_White = {4,5,9,492}
|
||||
ENUMS.Storage.weapons.OH58.Smk_Grenade_Yellow = {4,5,9,491}
|
||||
-- Apache
|
||||
ENUMS.Storage.weapons.AH64D.AN_APG78 = {4,15,44,2138}
|
||||
ENUMS.Storage.weapons.AH64D.AN_APG78 = {4,15,44,2114}
|
||||
ENUMS.Storage.weapons.AH64D.Internal_Aux_FuelTank = {1,3,43,1700}
|
||||
|
||||
---
|
||||
|
||||
@ -1221,7 +1221,14 @@ end
|
||||
-- @return Core.Point#COORDINATE The COORDINATE of the GROUP.
|
||||
function GROUP:GetCoordinate()
|
||||
|
||||
local Units = self:GetUnits() or {}
|
||||
-- First try to get the 3D vector of the group. This uses
|
||||
local vec3=self:GetVec3()
|
||||
if vec3 then
|
||||
local coord=COORDINATE:NewFromVec3(vec3)
|
||||
return coord
|
||||
end
|
||||
|
||||
local Units = self:GetUnits() or {}
|
||||
|
||||
for _,_unit in pairs(Units) do
|
||||
local FirstUnit = _unit -- Wrapper.Unit#UNIT
|
||||
|
||||
@ -91,6 +91,7 @@ function SCENERY:SetProperty(PropertyName, PropertyValue)
|
||||
self.Properties[PropertyName] = PropertyValue
|
||||
return self
|
||||
end
|
||||
|
||||
--- Obtain object name.
|
||||
--@param #SCENERY self
|
||||
--@return #string Name
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user