mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-11 11:48:38 +00:00
Ops
This commit is contained in:
@@ -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,
|
||||
},
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user