This commit is contained in:
Frank
2020-03-14 02:03:20 +01:00
parent fd7827c264
commit e147a4c604
7 changed files with 176 additions and 105 deletions
@@ -920,11 +920,11 @@ function CONTROLLABLE:TaskBombing( Vec2, GroupAttack, WeaponExpend, AttackQty, D
groupAttack = GroupAttack and GroupAttack or false,
expend = WeaponExpend or "Auto",
attackQtyLimit = AttackQty and true or false,
attackQty = AttackQty,
attackQty = AttackQty or 1,
directionEnabled = Direction and true or false,
direction = Direction and math.rad(Direction) or nil,
direction = Direction and math.rad(Direction) or 0,
altitudeEnabled = Altitude and true or false,
altitude = Altitude,
altitude = Altitude or 2000,
weaponType = WeaponType or 1073741822,
attackType = Divebomb and "Dive" or nil,
},
+10 -8
View File
@@ -4,7 +4,7 @@
--
-- ### Author: **FlightControl**
--
-- ### Contributions:
-- ### Contributions: **funkyfranky**
--
-- ===
--
@@ -48,6 +48,10 @@ STATIC = {
}
--- Register a static object.
-- @param #STATIC self
-- @param #string StaticName Name of the static object.
-- @return #STATIC self
function STATIC:Register( StaticName )
local self = BASE:Inherit( self, POSITIONABLE:New( StaticName ) )
self.StaticName = StaticName
@@ -71,21 +75,19 @@ end
-- @param #STATIC self
-- @param #string StaticName Name of the DCS **Static** as defined within the Mission Editor.
-- @param #boolean RaiseError Raise an error if not found.
-- @return #STATIC
function STATIC:FindByName( StaticName, RaiseError )
-- @return #STATIC self or *nil*
function STATIC:FindByName( StaticName )
-- Find static in DB.
local StaticFound = _DATABASE:FindStatic( StaticName )
-- Set static name.
self.StaticName = StaticName
if StaticFound then
StaticFound:F3( { StaticName } )
return StaticFound
end
if RaiseError == nil or RaiseError == true then
error( "STATIC not found for: " .. StaticName )
end
return nil
end