diff --git a/DCS/DCSAirbase.doclua b/DCS/DCSAirbase.doclua new file mode 100644 index 000000000..85ed697df --- /dev/null +++ b/DCS/DCSAirbase.doclua @@ -0,0 +1,54 @@ +------------------------------------------------------------------------------- +-- @module DCSAirbase + + +--- Represents airbases: airdromes, helipads and ships with flying decks or landing pads. +-- @type Airbase +-- @extends DCSCoalitionObject#CoalitionObject +-- @field #Airbase.ID ID Identifier of an airbase. It assigned to an airbase by the Mission Editor automatically. This identifier is used in AI tasks to refer an airbase that exists (spawned and not dead) or not. +-- @field #Airbase.Category Category enum contains identifiers of airbase categories. +-- @field #Airbase.Desc Desc Airbase descriptor. Airdromes are unique and their types are unique, but helipads and ships are not always unique and may have the same type. + +--- Enum contains identifiers of airbase categories. +-- @type Airbase.Category +-- @field AIRDROME +-- @field HELIPAD +-- @field SHIP + +--- Airbase descriptor. Airdromes are unique and their types are unique, but helipads and ships are not always unique and may have the same type. +-- @type Airbase.Desc +-- @extends #Desc +-- @field #Airbase.Category category Category of the airbase type. + +--- Returns airbase by its name. If no airbase found the function will return nil. +-- @function [parent=#Airbase] getByName +-- @param #string name +-- @return #Airbase + +--- Returns airbase descriptor by type name. If no descriptor is found the function will return nil. +-- @function [parent=#Airbase] getDescByName +-- @param #TypeName typeName Airbase type name. +-- @return #Airbase.Desc + +--- Returns Unit that is corresponded to the airbase. Works only for ships. +-- @function [parent=#Airbase] getUnit +-- @param self +-- @return Unit#Unit + +--- Returns identifier of the airbase. +-- @function [parent=#Airbase] getID +-- @param self +-- @return #Airbase.ID + +--- Returns the airbase's callsign - the localized string. +-- @function [parent=#Airbase] getCallsign +-- @param self +-- @return #string + +--- Returns descriptor of the airbase. +-- @function [parent=#Airbase] getDesc +-- @param self +-- @return #Airbase.Desc + + +Airbase = {} --#Airbase diff --git a/DCS/DCSCoalitionObject.doclua b/DCS/DCSCoalitionObject.doclua new file mode 100644 index 000000000..14ba57abf --- /dev/null +++ b/DCS/DCSCoalitionObject.doclua @@ -0,0 +1,17 @@ +------------------------------------------------------------------------------- +-- @module DCSCoalitionObject + +--- @type CoalitionObject +-- @extends DCSObject#Object + +--- Returns coalition of the object. +-- @function [parent=#CoalitionObject] getCoalition +-- @param self +-- @return #coalition.side + +--- Returns object country. +-- @function [parent=#CoalitionObject] getCountry +-- @param self +-- @return #country.id + +CoalitionObject = {} --#CoalitionObject diff --git a/DCS/DCSController.doclua b/DCS/DCSController.doclua new file mode 100644 index 000000000..602e97d5d --- /dev/null +++ b/DCS/DCSController.doclua @@ -0,0 +1,115 @@ +------------------------------------------------------------------------------- +-- @module DCSController + +--- Controller is an object that performs A.I.-routines. Other words controller is an instance of A.I.. Controller stores current main task, active enroute tasks and behavior options. Controller performs commands. Please, read DCS A-10C GUI Manual EN.pdf chapter "Task Planning for Unit Groups", page 91 to understand A.I. system of DCS:A-10C. +-- +-- This class has 2 types of functions: +-- +-- * Tasks +-- * Commands: Commands are instant actions those required zero time to perform. Commands may be used both for control unit/group behavior and control game mechanics. +-- @type Controller +-- @field #Controller.Detection Detection Enum contains identifiers of surface types. + +--- Enables and disables the controller. +-- Note: Now it works only for ground / naval groups! +-- @function [parent=#Controller] setOnOff +-- @param self +-- @param #boolean value Enable / Disable. + +-- Tasks + +--- Resets current task and then sets the task to the controller. Task is a table that contains task identifier and task parameters. +-- @function [parent=#Controller] setTask +-- @param self +-- @param #Task task + +--- Resets current task of the controller. +-- @function [parent=#Controller] resetTask +-- @param self + +--- Pushes the task to the front of the queue and makes the task active. Further call of function Controller.setTask() function will stop current task, clear the queue and set the new task active. If the task queue is empty the function will work like function Controller.setTask() function. +-- @function [parent=#Controller] pushTask +-- @param self +-- @param #Task task + +--- Pops current (front) task from the queue and makes active next task in the queue (if exists). If no more tasks in the queue the function works like function Controller.resetTask() function. Does nothing if the queue is empty. +-- @function [parent=#Controller] popTask +-- @param self + +--- Returns true if the controller has a task. +-- @function [parent=#Controller] hasTask +-- @param self +-- @return #boolean + +-- Commands + +--TODO: describe #Command structure +--- Sets the command to perform by controller. +-- @function [parent=#Controller] setCommand +-- @param self +-- @param #Command command Table that contains command identifier and command parameters. + + +-- Behaviours + +--- Sets the option to the controller. +-- Option is a pair of identifier and value. Behavior options are global parameters those affect controller behavior in all tasks it performs. +-- Option identifiers and values are stored in table AI.Option in subtables Air, Ground and Naval. +-- +-- OptionId = @{#AI.Option.Air.id} or @{#AI.Option.Ground.id} or @{#AI.Option.Naval.id} +-- OptionValue = AI.Option.Air.val[optionName] or AI.Option.Ground.val[optionName] or AI.Option.Naval.val[optionName] +-- +-- @function [parent=#Controller] setOption +-- @param self +-- @param #OptionId optionId Option identifier. +-- @param #OptionValue optionValue Value of the option. + + +-- Detection + +--- Enum contains identifiers of surface types. +-- @type Controller.Detection +-- @field VISUAL +-- @field OPTIC +-- @field RADAR +-- @field IRST +-- @field RWR +-- @field DLINK + +--- Detected target. +-- @type DetectedTarget +-- @field Object#Object object The target +-- @field #boolean visible The target is visible +-- @field #boolean type The target type is known +-- @field #boolean distance Distance to the target is known + + +--- Checks if the target is detected or not. If one or more detection method is specified the function will return true if the target is detected by at least one of these methods. If no detection methods are specified the function will return true if the target is detected by any method. +-- @function [parent=#Controller] isTargetDetected +-- @param self +-- @param Object#Object target Target to check +-- @param #Controller.Detection detection Controller.Detection detection1, Controller.Detection detection2, ... Controller.Detection detectionN +-- @return #boolean detected True if the target is detected. +-- @return #boolean visible Has effect only if detected is true. True if the target is visible now. +-- @return #ModelTime lastTime Has effect only if visible is false. Last time when target was seen. +-- @return #boolean type Has effect only if detected is true. True if the target type is known. +-- @return #boolean distance Has effect only if detected is true. True if the distance to the target is known. +-- @return #Vec3 lastPos Has effect only if visible is false. Last position of the target when it was seen. +-- @return #Vec3 lastVel Has effect only if visible is false. Last velocity of the target when it was seen. + + +--- Returns list of detected targets. If one or more detection method is specified the function will return targets which were detected by at least one of these methods. If no detection methods are specified the function will return targets which were detected by any method. +-- @function [parent=#Controller] getDetectedTargets +-- @param self +-- @param #Controller.Detection detection Controller.Detection detection1, Controller.Detection detection2, ... Controller.Detection detectionN +-- @return #list<#DetectedTarget> array of DetectedTarget + +--- Know a target. +-- @function [parent=#Controller] knowTarget +-- @param self +-- @param Object#Object object The target. +-- @param #boolean type Target type is known. +-- @param #boolean distance Distance to target is known. + + +Controller = {} --#Controller \ No newline at end of file diff --git a/DCS/DCSGroup.doclua b/DCS/DCSGroup.doclua new file mode 100644 index 000000000..a3d0edf5d --- /dev/null +++ b/DCS/DCSGroup.doclua @@ -0,0 +1,82 @@ +------------------------------------------------------------------------------- +-- @module DCSGroup + +--- Represents group of Units. +-- @type Group +-- @field #ID ID Identifier of a group. It is assigned to a group by Mission Editor automatically. +-- @field #Group.Category Category Enum contains identifiers of group types. + +--- Enum contains identifiers of group types. +-- @type Group.Category +-- @field AIRPLANE +-- @field HELICOPTER +-- @field GROUND +-- @field SHIP + +-- Static Functions + +--- Returns group by the name assigned to the group in Mission Editor. +-- @function [parent=#Group] getByName +-- @param #string name +-- @return #Group + +-- Member Functions + +--- returns true if the group exist or false otherwise. +-- @function [parent=#Group] isExist +-- @param #Group self +-- @return #boolean + +--- Destroys the group and all of its units. +-- @function [parent=#Group] destroy +-- @param #Group self + +--- Returns category of the group. +-- @function [parent=#Group] getCategory +-- @param #Group self +-- @return #Group.Category + +--TODO check coalition.side +--- Returns coalition of the group. +-- @function [parent=#Group] getCoalition +-- @param #Group self +-- @return #coalition.side + +--- Returns the group's name. This is the same name assigned to the group in Mission Editor. +-- @function [parent=#Group] getName +-- @param #Group self +-- @return #string + +--- Returns the group identifier. +-- @function [parent=#Group] getID +-- @param #Group self +-- @return #ID + +--- Returns the unit with number unitNumber. If the unit is not exists the function will return nil. +-- @function [parent=#Group] getUnit +-- @param #Group self +-- @param #number unitNumber +-- @return DCSUnit#Unit + +--- Returns current size of the group. If some of the units will be destroyed, As units are destroyed the size of the group will be changed. +-- @function [parent=#Group] getSize +-- @param #Group self +-- @return #number + +--- Returns initial size of the group. If some of the units will be destroyed, initial size of the group will not be changed. Initial size limits the unitNumber parameter for Group.getUnit() function. +-- @function [parent=#Group] getInitialSize +-- @param #Group self +-- @return #number + +--- Returns array of the units present in the group now. Destroyed units will not be enlisted at all. +-- @function [parent=#Group] getUnits +-- @param #Group self +-- @return #list array of Units + +--- Returns controller of the group. +-- @function [parent=#Group] getController +-- @param #Group self +-- @return Controller#Controller + +Group = {} --#Group + diff --git a/DCS/DCSObject.doclua b/DCS/DCSObject.doclua new file mode 100644 index 000000000..281e2781a --- /dev/null +++ b/DCS/DCSObject.doclua @@ -0,0 +1,73 @@ +------------------------------------------------------------------------------- +-- @module DCSObject + +--- @type Object +-- @field #Object.Category Category +-- @field #Object.Desc Desc + +--- @type Object.Category +-- @field UNIT +-- @field WEAPON +-- @field STATIC +-- @field SCENERY +-- @field BASE + +--- @type Object.Desc +-- @extends #Desc +-- @field #number life initial life level +-- @field #Box3 box bounding box of collision geometry + +--- @function [parent=#Object] isExist +-- @param #Object self +-- @return #boolean + +--- @function [parent=#Object] destroy +-- @param #Object self + +--- @function [parent=#Object] getCategory +-- @param #Object self +-- @return #Object.Category + +--- Returns type name of the Object. +-- @function [parent=#Object] getTypeName +-- @param #Object self +-- @return #string + +--- Returns object descriptor. +-- @function [parent=#Object] getDesc +-- @param #Object self +-- @return #Object.Desc + +--- Returns true if the object belongs to the category. +-- @function [parent=#Object] hasAttribute +-- @param #Object self +-- @param #AttributeName attributeName Attribute name to check. +-- @return #boolean + +--- Returns name of the object. This is the name that is assigned to the object in the Mission Editor. +-- @function [parent=#Object] getName +-- @param #Object self +-- @return #string + +--- Returns object coordinates for current time. +-- @function [parent=#Object] getPoint +-- @param #Object self +-- @return #Vec3 + +--- Returns object position for current time. +-- @function [parent=#Object] getPosition +-- @param #Object self +-- @return #Position3 + +--- Returns the unit's velocity vector. +-- @function [parent=#Object] getVelocity +-- @param #Object self +-- @return #Vec3 + +--- Returns true if the unit is in air. +-- @function [parent=#Object] inAir +-- @param #Object self +-- @return #boolean + +Object = {} --#Object + diff --git a/DCS/DCSStaticObject.doclua b/DCS/DCSStaticObject.doclua new file mode 100644 index 000000000..e8e76964f --- /dev/null +++ b/DCS/DCSStaticObject.doclua @@ -0,0 +1,34 @@ +------------------------------------------------------------------------------- +-- @module DCSStaticObject + + +------------------------------------------------------------------------------- +-- @module StaticObject +-- @extends CoalitionObject#CoalitionObject + +--- Represents static object added in the Mission Editor. +-- @type StaticObject +-- @field #StaticObject.ID ID Identifier of a StaticObject. It assigned to an StaticObject by the Mission Editor automatically. +-- @field #StaticObject.Desc Desc Descriptor of StaticObject and Unit are equal. StaticObject is just a passive variant of Unit. + +--- StaticObject descriptor. Airdromes are unique and their types are unique, but helipads and ships are not always unique and may have the same type. +-- @type StaticObject.Desc +-- @extends Unit#Unit.Desc + +--- Returns static object by its name. If no static object found nil will be returned. +-- @function [parent=#StaticObject] getByName +-- @param #string name Name of static object to find. +-- @return #StaticObject + +--- returns identifier of the static object. +-- @function [parent=#StaticObject] getID +-- @param #StaticObject self +-- @return #StaticObject.ID + +--- Returns descriptor of the StaticObject. +-- @function [parent=#StaticObject] getDesc +-- @param #StaticObject self +-- @return #StaticObject.Desc + + +StaticObject = {} --#StaticObject diff --git a/DCS/DCSTask.doclua b/DCS/DCSTask.doclua new file mode 100644 index 000000000..3d57efca1 --- /dev/null +++ b/DCS/DCSTask.doclua @@ -0,0 +1,8 @@ + +--- @type DCSTask +-- @field #string id +-- @field #DCSTask.param param + +--- @type DCSTask.param + +env.info( "DCSTask defined" ) diff --git a/DCS/DCSTime.doclua b/DCS/DCSTime.doclua new file mode 100644 index 000000000..95b1efcc1 --- /dev/null +++ b/DCS/DCSTime.doclua @@ -0,0 +1,2 @@ +-- @type ModelTime +-- @extends #number diff --git a/DCS/DCSTypes.doclua b/DCS/DCSTypes.doclua new file mode 100644 index 000000000..6be092099 --- /dev/null +++ b/DCS/DCSTypes.doclua @@ -0,0 +1,235 @@ +------------------------------------------------------------------------------- +--- @module DCSTypes + + +--- Time is given in seconds. +-- @type Time +-- @extends #number + +--- Model time is the time that drives the simulation. Model time may be stopped, accelerated and decelerated relative real time. +-- @type ModelTime +-- @extends #number + +--- Mission time is a model time plus time of the mission start. +-- @type MissionTime +-- @extends #number + + +--- Distance is given in meters. +-- @type Distance +-- @extends #number + +--- Angle is given in radians. +-- @type Angle +-- @extends #number + +--- Azimuth is an angle of rotation around world axis y counter-clockwise. +-- @type Azimuth +-- @extends #number + +--- Mass is given in kilograms. +-- @type Mass +-- @extends #number + +--- Vec3 type is a 3D-vector. +-- DCS world has 3-dimensional coordinate system. DCS ground is an infinite plain. +-- @type Vec3 +-- @field #Distance x is directed to the north +-- @field #Distance z is directed to the east +-- @field #Distance y is directed up + +--- Vec2 is a 2D-vector for the ground plane as a reference plane. +-- @type Vec2 +-- @field #Distance x Vec2.x = Vec3.x +-- @field #Distance y Vec2.y = Vec3.z + +--- Position is a composite structure. It consists of both coordinate vector and orientation matrix. Position3 (also known as "Pos3" for short) is a table that has following format: +-- @type Position3 +-- @field #Vec3 p +-- @field #Vec3 x +-- @field #Vec3 y +-- @field #Vec3 z + +--- 3-dimensional box. +-- @type Box3 +-- @field #Vec3 min +-- @field #Vec3 max + +--- Each object belongs to a type. Object type is a named couple of properties those independent of mission and common for all units of the same type. Name of unit type is a string. Samples of unit type: "Su-27", "KAMAZ" and "M2 Bradley". +-- @type TypeName +-- @extends #string + + +--- @type AI +-- @field #AI.Skill Skill +-- @field #AI.Task Task +-- @field #AI.Option Option + +--- @type AI.Skill +-- @field AVERAGE +-- @field GOOD +-- @field HIGH +-- @field EXCELLENT +-- @field PLAYER +-- @field CLIENT + +--- @type AI.Task +-- @field #AI.Task.WeaponExpend WeaponExpend +-- @field #AI.Task.OrbitPattern OrbitPattern +-- @field #AI.Task.Designation Designation +-- @field #AI.Task.WaypointType WaypointType +-- @field #AI.Task.TurnMethod TurnMethod +-- @field #AI.Task.AltitudeType AltitudeType +-- @field #AI.Task.VehicleFormation VehicleFormation + +--- @type AI.Task.WeaponExpend +-- @field ONE +-- @field TWO +-- @field FOUR +-- @field QUARTER +-- @field HALF +-- @field ALL + +--- @type AI.Task.OrbitPattern +-- @field CIRCLE +-- @field RACE_TRACK + +--- @type AI.Task.Designation +-- @field NO +-- @field AUTO +-- @field WP +-- @field IR_POINTER +-- @field LASER + +--- @type AI.Task.WaypointType +-- @field TAKEOFF +-- @field TAKEOFF_PARKING +-- @field TURNING_POINT +-- @field LAND + +--- @type AI.Task.TurnMethod +-- @field FLY_OVER_POINT +-- @field FIN_POINT + +--- @type AI.Task.AltitudeType +-- @field BARO +-- @field RADIO + +--- @type AI.Task.VehicleFormation +-- @field OFF_ROAD +-- @field ON_ROAD +-- @field RANK +-- @field CONE +-- @field DIAMOND +-- @field VEE +-- @field ECHELON_LEFT +-- @field ECHELON_RIGHT + +--- @type AI.Option +-- @field #AI.Option.Air Air +-- @field #AI.Option.Ground Ground +-- @field #AI.Option.Naval Naval + +--- @type AI.Option.Air +-- @field #AI.Option.Air.id id +-- @field #AI.Option.Air.val val + +--- @type AI.Option.Ground +-- @field #AI.Option.Ground.id id +-- @field #AI.Option.Ground.val val + +--- @type AI.Option.Naval +-- @field #AI.Option.Naval.id id +-- @field #AI.Option.Naval.val val + +--TODO: work on formation +--- @type AI.Option.Air.id +-- @field NO_OPTION +-- @field ROE +-- @field REACTION_ON_THREAT +-- @field RADAR_USING +-- @field FLARE_USING +-- @field FORMATION +-- @field RTB_ON_BINGO +-- @field SILENCE + +--- @type AI.Option.Air.val +-- @field #AI.Option.Air.val.ROE ROE +-- @field #AI.Option.Air.val.REACTION_ON_THREAT REACTION_ON_THREAT +-- @field #AI.Option.Air.val.RADAR_USING RADAR_USING +-- @field #AI.Option.Air.val.FLARE_USING FLARE_USING + +--- @type AI.Option.Air.val.ROE +-- @field WEAPON_FREE +-- @field OPEN_FIRE_WEAPON_FREE +-- @field OPEN_FIRE +-- @field RETURN_FIRE +-- @field WEAPON_HOLD + +--- @type AI.Option.Air.val.REACTION_ON_THREAT +-- @field NO_REACTION +-- @field PASSIVE_DEFENCE +-- @field EVADE_FIRE +-- @field BYPASS_AND_ESCAPE +-- @field ALLOW_ABORT_MISSION + +--- @type AI.Option.Air.val.RADAR_USING +-- @field NEVER +-- @field FOR_ATTACK_ONLY +-- @field FOR_SEARCH_IF_REQUIRED +-- @field FOR_CONTINUOUS_SEARCH + +--- @type AI.Option.Air.val.FLARE_USING +-- @field NEVER +-- @field AGAINST_FIRED_MISSILE +-- @field WHEN_FLYING_IN_SAM_WEZ +-- @field WHEN_FLYING_NEAR_ENEMIES + +--- @type AI.Option.Ground.id +-- @field NO_OPTION +-- @field ROE @{#AI.Option.Ground.val.ROE} +-- @field DISPERSE_ON_ATTACK true or false +-- @field ALARM_STATE @{#AI.Option.Ground.val.ALARM_STATE} + +--- @type AI.Option.Ground.val +-- @field #AI.Option.Ground.val.ROE ROE +-- @field #AI.Option.Ground.val.ALARM_STATE ALARM_STATE + +--- @type AI.Option.Ground.val.ROE +-- @field OPEN_FIRE +-- @field RETURN_FIRE +-- @field WEAPON_HOLD + +--- @type AI.Option.Ground.val.ALARM_STATE +-- @field AUTO +-- @field GREEN +-- @field RED + +--- @type AI.Option.Naval.id +-- @field NO_OPTION +-- @field ROE + +--- @type AI.Option.Naval.val +-- @field #AI.Option.Naval.val.ROE ROE + +--- @type AI.Option.Naval.val.ROE +-- @field OPEN_FIRE +-- @field RETURN_FIRE +-- @field WEAPON_HOLD + +AI = {} --#AI + + +--- @type Desc +-- @field #TypeName typeName type name +-- @field #string displayName localized display name +-- @field #table attributes object type attributes + +--- A distance type +-- @type Distance + +--- An angle type +-- @type Angle + +env.info( 'AI types created' ) + diff --git a/DCS/DCSUnit.doclua b/DCS/DCSUnit.doclua new file mode 100644 index 000000000..d94e301d7 --- /dev/null +++ b/DCS/DCSUnit.doclua @@ -0,0 +1,241 @@ +------------------------------------------------------------------------------- +-- @module DCSUnit + +--- @type Unit +-- @extends DCSCoalitionObject#CoalitionObject +-- @field ID Identifier of an unit. It assigned to an unit by the Mission Editor automatically. +-- @field #Unit.Category Category +-- @field #Unit.RefuelingSystem RefuelingSystem +-- @field #Unit.SensorType SensorType +-- @field #Unit.OpticType OpticType +-- @field #Unit.RadarType RadarType +-- @field #Unit.Desc Desc +-- @field #Unit.DescAircraft DescAircraft +-- @field #Unit.DescAirplane DescAirplane +-- @field #Unit.DescHelicopter DescHelicopter +-- @field #Unit.DescVehicle DescVehicle +-- @field #Unit.DescShip DescShip +-- @field #Unit.AmmoItem AmmoItem +-- @field #list<#Unit.AmmoItem> Ammo +-- @field #Unit.Sensor Sensor +-- @field #Unit.Optic Optic +-- @field #Unit.Radar Radar +-- @field #Unit.IRST IRST + + +--- Enum that stores unit categories. +-- @type Unit.Category +-- @field AIRPLANE +-- @field HELICOPTER +-- @field GROUND_UNIT +-- @field SHIP +-- @field STRUCTURE + +--- Enum that stores aircraft refueling system types. +-- @type Unit.RefuelingSystem +-- @field BOOM_AND_RECEPTACLE +-- @field PROBE_AND_DROGUE + +--- Enum that stores sensor types. +-- @type Unit.SensorType +-- @field OPTIC +-- @field RADAR +-- @field IRST +-- @field RWR + +--- Enum that stores types of optic sensors. +-- @type Unit.OpticType +-- @field TV TV-sensor +-- @field LLTV Low-level TV-sensor +-- @field IR Infra-Red optic sensor + +--- Enum that stores radar types. +-- @type Unit.RadarType +-- @field AS air search radar +-- @field SS surface/land search radar + + +--- A unit descriptor. +-- @type Unit.Desc +-- @extends Object#Object.Desc +-- @field #Unit.Category category Unit Category +-- @field #Mass massEmpty mass of empty unit +-- @field #number speedMax istance / Time, --maximal velocity + +--- An aircraft descriptor. +-- @type Unit.DescAircraft +-- @extends Unit#Unit.Desc +-- @field #Mass fuelMassMax maximal inner fuel mass +-- @field #Distance range Operational range +-- @field #Distance Hmax Ceiling +-- @field #number VyMax #Distance / #Time, --maximal climb rate +-- @field #number NyMin minimal safe acceleration +-- @field #number NyMax maximal safe acceleration +-- @field #Unit.RefuelingSystem tankerType refueling system type + +--- An airplane descriptor. +-- @type Unit.DescAirplane +-- @extends Unit#Unit.DescAircraft +-- @field #number speedMax0 Distance / Time maximal TAS at ground level +-- @field #number speedMax10K Distance / Time maximal TAS at altitude of 10 km + +--- A helicopter descriptor. +-- @type Unit.DescHelicopter +-- @extends Unit#Unit.DescAircraft +-- @field #Distance HmaxStat static ceiling + +--- A vehicle descriptor. +-- @type Unit.DescVehicle +-- @extends Unit#Unit.Desc +-- @field #Angle maxSlopeAngle maximal slope angle +-- @field #boolean riverCrossing can the vehicle cross a rivers + +--- A ship descriptor. +-- @type Unit.DescShip +-- @extends #Unit.Desc + +--- ammunition item: "type-count" pair. +-- @type Unit.AmmoItem +-- @field #Weapon.Desc desc ammunition descriptor +-- @field #number count ammunition count + +--- A unit sensor. +-- @type Unit.Sensor +-- @field #TypeName typeName +-- @field #Unit.SensorType type + +--- An optic sensor. +-- @type Unit.Optic +-- @extends Unit#Unit.Sensor +-- @field #Unit.OpticType opticType + +--- A radar. +-- @type Unit.Radar +-- @extends Unit#Unit.Sensor +-- @field #Distance detectionDistanceRBM detection distance for RCS=1m^2 in real-beam mapping mode, nil if radar doesn't support surface/land search +-- @field #Distance detectionDistanceHRM detection distance for RCS=1m^2 in high-resolution mapping mode, nil if radar has no HRM +-- @field #Unit.Radar.detectionDistanceAir detectionDistanceAir detection distance for RCS=1m^2 airborne target, nil if radar doesn't support air search + +--- @type Unit.Radar.detectionDistanceAir +-- @field #Unit.Radar.detectionDistanceAir.upperHemisphere upperHemisphere +-- @field #Unit.Radar.detectionDistanceAir.lowerHemisphere lowerHemisphere + +--- @type Unit.Radar.detectionDistanceAir.upperHemisphere +-- @field #Distance headOn +-- @field #Distance tailOn + +--- @type Unit.Radar.detectionDistanceAir.lowerHemisphere +-- @field #Distance headOn +-- @field #Distance tailOn + +--- An IRST. +-- @type Unit#Unit.IRST +-- @extends Unit.Sensor +-- @field #Distance detectionDistanceIdle detection of tail-on target with heat signature = 1 in upper hemisphere, engines are in idle +-- @field #Distance detectionDistanceMaximal ..., engines are in maximal mode +-- @field #Distance detectionDistanceAfterburner ..., engines are in afterburner mode + +--- An RWR. +-- @type Unit.RWR +-- @extends Unit#Unit.Sensor + +--- table that stores all unit sensors. +-- TODO @type Sensors +-- + + +--- Returns unit object by the name assigned to the unit in Mission Editor. If there is unit with such name or the unit is destroyed the function will return nil. The function provides access to non-activated units too. +-- @function [parent=#Unit] getByName +-- @param #string name +-- @return #Unit + +--- Returns if the unit is activated. +-- @function [parent=#Unit] isActive +-- @param #Unit self +-- @return #boolean + +--- Returns name of the player that control the unit or nil if the unit is controlled by A.I. +-- @function [parent=#Unit] getPlayerName +-- @param #Unit self +-- @return #string + +--- returns the unit's unique identifier. +-- @function [parent=#Unit] getID +-- @param #Unit self +-- @return #Unit.ID + + +--- Returns the unit's number in the group. The number is the same number the unit has in ME. It may not be changed during the mission. If any unit in the group is destroyed, the numbers of another units will not be changed. +-- @function [parent=#Unit] getNumber +-- @param #Unit self +-- @return #number + +--- Returns controller of the unit if it exist and nil otherwise +-- @function [parent=#Unit] getController +-- @param #Unit self +-- @return #Controller + +--- Returns the unit's group if it exist and nil otherwise +-- @function [parent=#Unit] getGroup +-- @param #Unit self +-- @return DCSGroup#Group + +--- Returns the unit's callsign - the localized string. +-- @function [parent=#Unit] getCallsign +-- @param #Unit self +-- @return #string + +--- Returns the unit's health. Dead units has health <= 1.0 +-- @function [parent=#Unit] getLife +-- @param #Unit self +-- @return #number + +--- returns the unit's initial health. +-- @function [parent=#Unit] getLife0 +-- @param #Unit self +-- @return #number + +--- Returns relative amount of fuel (from 0.0 to 1.0) the unit has in its internal tanks. If there are additional fuel tanks the value may be greater than 1.0. +-- @function [parent=#Unit] getFuel +-- @param #Unit self +-- @return #number + +--- Returns the unit ammunition. +-- @function [parent=#Unit] getAmmo +-- @param #Unit self +-- @return #Unit.Ammo + +--- Returns the unit sensors. +-- @function [parent=#Unit] getSensors +-- @param #Unit self +-- @return #Unit.Sensors + +--- Returns true if the unit has specified types of sensors. This function is more preferable than Unit.getSensors() if you don't want to get information about all the unit's sensors, and just want to check if the unit has specified types of sensors. +-- @function [parent=#Unit] hasSensors +-- @param #Unit self +-- @param #Unit.SensorType sensorType (= nil) Sensor type. +-- @param ... Additional parameters. +-- @return #boolean +-- @usage +-- If sensorType is Unit.SensorType.OPTIC, additional parameters are optic sensor types. Following example checks if the unit has LLTV or IR optics: +-- unit:hasSensors(Unit.SensorType.OPTIC, Unit.OpticType.LLTV, Unit.OpticType.IR) +-- If sensorType is Unit.SensorType.RADAR, additional parameters are radar types. Following example checks if the unit has air search radars: +-- unit:hasSensors(Unit.SensorType.RADAR, Unit.RadarType.AS) +-- If no additional parameters are specified the function returns true if the unit has at least one sensor of specified type. +-- If sensor type is not specified the function returns true if the unit has at least one sensor of any type. +-- + +--- returns two values: +-- First value indicates if at least one of the unit's radar(s) is on. +-- Second value is the object of the radar's interest. Not nil only if at least one radar of the unit is tracking a target. +-- @function [parent=#Unit] getRadar +-- @param #Unit self +-- @return #boolean, Object#Object + +--- Returns unit descriptor. Descriptor type depends on unit category. +-- @function [parent=#Unit] getDesc +-- @param #Unit self +-- @return #Unit.Desc + + +Unit = {} --#Unit diff --git a/DCS/DCSenv.doclua b/DCS/DCSenv.doclua new file mode 100644 index 000000000..c6fe98776 --- /dev/null +++ b/DCS/DCSenv.doclua @@ -0,0 +1,27 @@ +------------------------------------------------------------------------------- +-- @module env + +--- @type env + +--- Add message to simulator log with caption "INFO". Message box is optional. +-- @function [parent=#env] info +-- @field #string message message string to add to log. +-- @field #boolean showMessageBox If the parameter is true Message Box will appear. Optional. + +--- Add message to simulator log with caption "WARNING". Message box is optional. +-- @function [parent=#env] warning +-- @field #string message message string to add to log. +-- @field #boolean showMessageBox If the parameter is true Message Box will appear. Optional. + +--- Add message to simulator log with caption "ERROR". Message box is optional. +-- @function [parent=#env] error +-- @field #string message message string to add to log. +-- @field #boolean showMessageBox If the parameter is true Message Box will appear. Optional. + +--- Enables/disables appearance of message box each time lua error occurs. +-- @function [parent=#env] setErrorMessageBoxEnabled +-- @field #boolean on if true message box appearance is enabled. + + + +env = {} --#env diff --git a/DCS/DCSland.doclua b/DCS/DCSland.doclua new file mode 100644 index 000000000..3ee695bdf --- /dev/null +++ b/DCS/DCSland.doclua @@ -0,0 +1,20 @@ +------------------------------------------------------------------------------- +-- @module land + +--- @type land +-- @field #land.SurfaceType SurfaceType + + +--- @type land.SurfaceType +-- @field LAND +-- @field SHALLOW_WATER +-- @field WATER +-- @field ROAD +-- @field RUNWAY + +--- Returns altitude MSL of the point. +-- @function [parent=#land] getHeight +-- @param #Vec2 point point on the ground. +-- @return DCSTypes#Distance + +land = {} --#land \ No newline at end of file diff --git a/DCS/DCStimer.doclua b/DCS/DCStimer.doclua new file mode 100644 index 000000000..2d0f4a16c --- /dev/null +++ b/DCS/DCStimer.doclua @@ -0,0 +1,45 @@ +------------------------------------------------------------------------------- +-- @module DCStimer + +--- @type timer + + +--- Returns model time in seconds. +-- @function [parent=#timer] getTime +-- @return #Time + +--- Returns mission time in seconds. +-- @function [parent=#timer] getAbsTime +-- @return #Time + +--- Returns mission start time in seconds. +-- @function [parent=#timer] getTime0 +-- @return #Time + +--- Schedules function to call at desired model time. +-- Time function FunctionToCall(any argument, Time time) +-- +-- ... +-- +-- return ... +-- +-- end +-- +-- Must return model time of next call or nil. Note that the DCS scheduler calls the function in protected mode and any Lua errors in the called function will be trapped and not reported. If the function triggers a Lua error then it will be terminated and not scheduled to run again. +-- @function [parent=#timer] scheduleFunction +-- @param #FunctionToCall functionToCall Lua-function to call. Must have prototype of FunctionToCall. +-- @param functionArgument Function argument of any type to pass to functionToCall. +-- @param #Time time Model time of the function call. +-- @return functionId + +--- Re-schedules function to call at another model time. +-- @function [parent=#timer] setFunctionTime +-- @param functionId Lua-function to call. Must have prototype of FunctionToCall. +-- @param #Time time Model time of the function call. + + +--- Removes the function from schedule. +-- @function [parent=#timer] removeFunction +-- @param functionId Function identifier to remove from schedule + +timer = {} --#timer diff --git a/Embedded/Moose_Create_Embedded.bat b/Embedded/Moose_Create_Embedded.bat index 0d28173c2..a47b82f5b 100644 --- a/Embedded/Moose_Create_Embedded.bat +++ b/Embedded/Moose_Create_Embedded.bat @@ -27,5 +27,6 @@ copy /b ..\Moose\Trace.lua ^ + ..\Moose\Spawn.lua ^ + ..\Moose\Movement.lua ^ + ..\Moose\Sead.lua ^ + + ..\Moose\Escort.lua ^ Moose_Embedded.lua /y \ No newline at end of file diff --git a/Embedded/Moose_Embedded.lua b/Embedded/Moose_Embedded.lua index 73d4157cb..0993bef6d 100644 --- a/Embedded/Moose_Embedded.lua +++ b/Embedded/Moose_Embedded.lua @@ -709,7 +709,7 @@ routines.tostringBR = function(az, dist, alt, metric) dist = routines.utils.round(routines.utils.metersToNM(dist), 2) end - local s = string.format('%03d°', az) .. ' for ' .. dist + local s = string.format('%03d', az) .. ' for ' .. dist if alt then if metric then @@ -2857,7 +2857,7 @@ end env.info(( 'Init: Scripts Loaded v1.1' )) --- BASE The base class for all the classes defined within MOOSE. --- @module BASE +-- @module Base -- @author Flightcontrol Include.File( "Routines" ) @@ -2880,6 +2880,9 @@ _TraceClass = { --CARGO_SLINGLOAD = true, --CARGO_ZONE = true, --CLEANUP = true, + --MENU_CLIENT = true, + --MENU_CLIENT_COMMAND = true, + --ESCORT = true, } --- The BASE Class @@ -3104,13 +3107,14 @@ function BASE:T( Arguments ) end local LineCurrent = DebugInfoCurrent.currentline - local LineFrom = DebugInfoFrom.currentline - + local LineFrom = 0 + if DebugInfoFrom then + LineFrom = DebugInfoFrom.currentline + end env.info( string.format( "%6d\(%6d\)/%1s:%20s%05d.%s\(%s\)" , LineCurrent, LineFrom, "T", self.ClassName, self.ClassID, Function, routines.utils.oneLineSerialize( Arguments ) ) ) end end - -- Log an exception function BASE:E( Arguments ) @@ -3127,14 +3131,18 @@ function BASE:E( Arguments ) env.info( string.format( "%6d\(%6d\)/%1s:%20s%05d.%s\(%s\)" , LineCurrent, LineFrom, "E", self.ClassName, self.ClassID, Function, routines.utils.oneLineSerialize( Arguments ) ) ) end + + + --- Encapsulation of DCS World Menu system in a set of MENU classes. --- @module MENU +-- @module Menu Include.File( "Routines" ) Include.File( "Base" ) --- The MENU class --- @type +-- @type MENU +-- @extends Base#BASE MENU = { ClassName = "MENU", MenuPath = nil, @@ -3155,7 +3163,8 @@ function MENU:New( MenuText, MenuParentPath ) end --- The COMMANDMENU class --- @type +-- @type COMMANDMENU +-- @extends Menu#MENU COMMANDMENU = { ClassName = "COMMANDMENU", CommandMenuFunction = nil, @@ -3180,7 +3189,8 @@ function COMMANDMENU:New( MenuText, ParentMenu, CommandMenuFunction, CommandMenu end --- The SUBMENU class --- @type +-- @type SUBMENU +-- @extends Menu#MENU SUBMENU = { ClassName = "SUBMENU" } @@ -3199,54 +3209,128 @@ function SUBMENU:New( MenuText, ParentMenu ) return Child end ---- The MENU_SUB_GROUP class --- @type -MENU_SUB_GROUP = { - ClassName = "MENU_SUB_GROUP" +-- This local variable is used to cache the menus registered under clients. +-- Menus don't dissapear when clients are destroyed and restarted. +-- So every menu for a client created must be tracked so that program logic accidentally does not create +-- the same menus twice during initialization logic. +-- These menu classes are handling this logic with this variable. +local _MENUCLIENTS = {} + +--- The MENU_CLIENT class +-- @type MENU_CLIENT +-- @extends Menu#MENU +MENU_CLIENT = { + ClassName = "MENU_CLIENT" } -function MENU_SUB_GROUP:New( GroupID, MenuText, ParentMenu ) +--- Creates a new menu item for a group +-- @param self +-- @param Client#CLIENT MenuClient The Client owning the menu. +-- @param #string MenuText The text for the menu. +-- @param #table ParentMenu The parent menu. +-- @return #MENU_CLIENT self +function MENU_CLIENT:New( MenuClient, MenuText, ParentMenu ) -- Arrange meta tables - local MenuParentPath = nil + local MenuParentPath = {} if ParentMenu ~= nil then - MenuParentPath = ParentMenu.MenuPath + MenuParentPath = ParentMenu.MenuPath end local self = BASE:Inherit( self, MENU:New( MenuText, MenuParentPath ) ) - self.MenuPath = missionCommands.addSubMenuForGroup( GroupID, MenuText, MenuParentPath ) + self.MenuClient = MenuClient + self.MenuClientGroupID = MenuClient:GetClientGroupID() + self.MenuParentPath = MenuParentPath + self.MenuText = MenuText + + if not _MENUCLIENTS[self.MenuClientGroupID] then + _MENUCLIENTS[self.MenuClientGroupID] = {} + end + + local MenuPath = _MENUCLIENTS[self.MenuClientGroupID] + + self:T( { MenuClient:GetClientGroupName(), MenuPath[table.concat(MenuParentPath)], MenuParentPath, MenuText } ) + + if not MenuPath[table.concat(MenuParentPath) .. "/" .. MenuText] then + self.MenuPath = missionCommands.addSubMenuForGroup( self.MenuClient:GetClientGroupID(), MenuText, MenuParentPath ) + MenuPath[table.concat(MenuParentPath) .. "/" .. MenuText] = self.MenuPath + else + self.MenuPath = MenuPath[table.concat(MenuParentPath) .. "/" .. MenuText] + end + return self end ---- The MENU_COMMAND_GROUP class --- @type -MENU_COMMAND_GROUP = { - ClassName = "MENU_COMMAND_GROUP" + +--- The MENU_CLIENT_COMMAND class +-- @type MENU_CLIENT_COMMAND +-- @extends Menu#MENU +MENU_CLIENT_COMMAND = { + ClassName = "MENU_CLIENT_COMMAND" } -function MENU_COMMAND_GROUP:New( GroupID, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument ) +--- Creates a new radio command item for a group +-- @param self +-- @param Client#CLIENT MenuClient The Client owning the menu. +-- @param MenuText The text for the menu. +-- @param ParentMenu The parent menu. +-- @param CommandMenuFunction A function that is called when the menu key is pressed. +-- @param CommandMenuArgument An argument for the function. +-- @return Menu#MENU_CLIENT_COMMAND self +function MENU_CLIENT_COMMAND:New( MenuClient, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument ) -- Arrange meta tables - local MenuParentPath = nil + local MenuParentPath = {} if ParentMenu ~= nil then MenuParentPath = ParentMenu.MenuPath end local self = BASE:Inherit( self, MENU:New( MenuText, MenuParentPath ) ) + + self.MenuClient = MenuClient + self.MenuClientGroupID = MenuClient:GetClientGroupID() + self.MenuParentPath = MenuParentPath + self.MenuText = MenuText + + if not _MENUCLIENTS[self.MenuClientGroupID] then + _MENUCLIENTS[self.MenuClientGroupID] = {} + end + + local MenuPath = _MENUCLIENTS[self.MenuClientGroupID] + + self:T( { MenuClient:GetClientGroupName(), MenuPath[table.concat(MenuParentPath)], MenuParentPath, MenuText, CommandMenuFunction, CommandMenuArgument } ) + + if not MenuPath[table.concat(MenuParentPath) .. "/" .. MenuText] then + self.MenuPath = missionCommands.addCommandForGroup( self.MenuClient:GetClientGroupID(), MenuText, MenuParentPath, CommandMenuFunction, CommandMenuArgument ) + MenuPath[table.concat(MenuParentPath) .. "/" .. MenuText] = self.MenuPath + else + self.MenuPath = MenuPath[table.concat(MenuParentPath) .. "/" .. MenuText] + end - self.MenuPath = missionCommands.addCommandForGroup( GroupID, MenuText, MenuParentPath, CommandMenuFunction, CommandMenuArgument ) self.CommandMenuFunction = CommandMenuFunction self.CommandMenuArgument = CommandMenuArgument return self end + +function MENU_CLIENT_COMMAND:Remove() + + if not _MENUCLIENTS[self.MenuClientGroupID] then + _MENUCLIENTS[self.MenuClientGroupID] = {} + end + + local MenuPath = _MENUCLIENTS[self.MenuClientGroupID] + + if MenuPath[table.concat(self.MenuParentPath) .. "/" .. self.MenuText] then + MenuPath[table.concat(self.MenuParentPath) .. "/" .. self.MenuText] = nil + end + missionCommands.removeItemForGroup( self.MenuClient:GetClientGroupID(), self.MenuPath ) + return nil +end --- A GROUP class abstraction of a DCSGroup class. -- The GROUP class will take an abstraction of the DCSGroup class, providing more methods that can be done with a GROUP. --- --- --- @module GROUP --- @extends BASE#BASE +-- @module Group Include.File( "Routines" ) Include.File( "Base" ) @@ -3255,6 +3339,7 @@ Include.File( "Unit" ) --- The GROUP class -- @type GROUP +-- @extends Base#BASE -- @field #Group DCSGroup The DCS group class. -- @field #string GroupName The name of the group. -- @field #number GroupID the ID of the group. @@ -3278,12 +3363,16 @@ GROUPS = {} -- @return #GROUP self function GROUP:New( DCSGroup ) local self = BASE:Inherit( self, BASE:New() ) - self:T( DCSGroup:getName() ) + self:F( DCSGroup ) self.DCSGroup = DCSGroup - self.GroupName = DCSGroup:getName() - self.GroupID = DCSGroup:getID() - self.Controller = DCSGroup:getController() + if self.DCSGroup and self.DCSGroup:isExist() then + self.GroupName = DCSGroup:getName() + self.GroupID = DCSGroup:getID() + self.Controller = DCSGroup:getController() + else + self:E( { "DCSGroup is nil or does not exist, cannot initialize GROUP!", self.DCSGroup } ) + end return self end @@ -3295,7 +3384,7 @@ end -- @return #GROUP self function GROUP:NewFromName( GroupName ) local self = BASE:Inherit( self, BASE:New() ) - self:T( GroupName ) + self:F( GroupName ) self.DCSGroup = Group.getByName( GroupName ) if self.DCSGroup then @@ -3313,7 +3402,7 @@ end -- @return #GROUP self function GROUP:NewFromDCSUnit( DCSUnit ) local self = BASE:Inherit( self, BASE:New() ) - self:T( DCSUnit ) + self:F( DCSUnit ) self.DCSGroup = DCSUnit:getGroup() if self.DCSGroup then @@ -3329,7 +3418,7 @@ end -- @param self -- @return #Group The DCSGroup. function GROUP:GetDCSGroup() - self:T( { self.GroupName } ) + self:F( { self.GroupName } ) self.DCSGroup = Group.getByName( self.GroupName ) return self.DCSGroup end @@ -3341,7 +3430,7 @@ end -- @param #number UnitNumber The unit index to be returned from the GROUP. -- @return #Unit The DCS Unit. function GROUP:GetDCSUnit( UnitNumber ) - self:T( { self.GroupName, UnitNumber } ) + self:F( { self.GroupName, UnitNumber } ) return self.DCSGroup:getUnit( UnitNumber ) end @@ -3349,36 +3438,55 @@ end --- Activates a GROUP. -- @param self function GROUP:Activate() - self:T( { self.GroupName } ) + self:F( { self.GroupName } ) trigger.action.activateGroup( self:GetDCSGroup() ) return self:GetDCSGroup() end +--- Gets the ID of the GROUP. +-- @param self +-- @return #number The ID of the GROUP. +function GROUP:GetID() + self:F( self.GroupName ) + + return self.GroupID +end + --- Gets the name of the GROUP. -- @param self -- @return #string The name of the GROUP. function GROUP:GetName() - self:T( self.GroupName ) + self:F( self.GroupName ) return self.GroupName end --- Gets the current Point of the GROUP in VEC2 format. -- @return #Vec2 Current x and Y position of the group. -function GROUP:GetPoint() - self:T( self.GroupName ) +function GROUP:GetPointVec2() + self:F( self.GroupName ) - local GroupPoint = self:GetUnit(1):GetPoint() + local GroupPoint = self:GetUnit(1):GetPointVec2() self:T( GroupPoint ) return GroupPoint end +--- Gets the current Point of the GROUP in VEC3 format. +-- @return #Vec3 Current Vec3 position of the group. +function GROUP:GetPositionVec3() + self:F( self.GroupName ) + + local GroupPoint = self:GetUnit(1):GetPositionVec3() + self:T( GroupPoint ) + return GroupPoint +end + --- Destroy a GROUP -- Note that this destroy method also raises a destroy event at run-time. -- So all event listeners will catch the destroy event of this GROUP. -- @param self function GROUP:Destroy() - self:T( self.GroupName ) + self:F( self.GroupName ) for Index, UnitData in pairs( self.DCSGroup:getUnits() ) do self:CreateEventCrash( timer.getTime(), UnitData ) @@ -3394,7 +3502,7 @@ end -- @param #number UnitNumber The number of the Unit to be returned. -- @return #Unit The DCS Unit. function GROUP:GetUnit( UnitNumber ) - self:T( { self.GroupName, UnitNumber } ) + self:F( { self.GroupName, UnitNumber } ) return UNIT:New( self.DCSGroup:getUnit( UnitNumber ) ) end @@ -3403,7 +3511,7 @@ end -- @param self -- @return #boolean Air category evaluation result. function GROUP:IsAir() -self:T() + self:F() local IsAirResult = self.DCSGroup:getCategory() == Group.Category.AIRPLANE or self.DCSGroup:getCategory() == Group.Category.HELICOPTER @@ -3416,7 +3524,7 @@ end -- @param self -- @return #boolean Alive result. function GROUP:IsAlive() -self:T() + self:F() local IsAliveResult = self.DCSGroup and self.DCSGroup:isExist() @@ -3429,7 +3537,7 @@ end -- @param self -- @return #boolean All units on the ground result. function GROUP:AllOnGround() -self:T() + self:F() local AllOnGroundResult = true @@ -3448,7 +3556,7 @@ end -- @param self -- @return #number Maximum velocity found. function GROUP:GetMaxVelocity() - self:T() + self:F() local MaxVelocity = 0 @@ -3471,7 +3579,7 @@ end -- @param self -- @return #number Minimum height found. function GROUP:GetMinHeight() - self:T() + self:F() end @@ -3481,11 +3589,44 @@ end -- @param self -- @return #number Maximum height found. function GROUP:GetMaxHeight() -self:T() + self:F() end +--- Hold position at the current position of the first unit of the group. +-- @param self +-- @param #number Duration The maximum duration in seconds to hold the position. +-- @return #GROUP self +function GROUP:TaskHoldPosition( Duration ) +trace.f( self.ClassName, { self.GroupName, Duration } ) + + local Controller = self:_GetController() + +-- pattern = enum AI.Task.OribtPattern, +-- point = Vec2, +-- point2 = Vec2, +-- speed = Distance, +-- altitude = Distance + + local GroupPoint = self:GetPointVec2() + --id = 'Orbit', params = { pattern = AI.Task.OrbitPattern.RACE_TRACK } }, stopCondition = { duration = 600 } } + Controller:pushTask( { id = 'ControlledTask', + params = { task = { id = 'Orbit', + params = { pattern = AI.Task.OrbitPattern.CIRCLE, + point = GroupPoint, + speed = 0, + altitude = 30 + } + }, + stopCondition = { duration = Duration + } + } + } + ) + return self +end + --- Land the group at a Vec2Point. -- @param self -- @param #Vec2 Point The point where to land. @@ -3505,6 +3646,137 @@ trace.f( self.ClassName, { self.GroupName, Point, Duration } ) return self end +--- Attack the Unit. +-- @param self +-- @param #UNIT The unit. +-- @return #GROUP self +function GROUP:AttackUnit( AttackUnit ) + self:F( { self.GroupName, AttackUnit } ) + + local Controller = self:_GetController() + +-- AttackUnit = { +-- id = 'AttackUnit', +-- params = { +-- unitId = Unit.ID, +-- weaponType = number, +-- expend = enum AI.Task.WeaponExpend +-- attackQty = number, +-- direction = Azimuth, +-- attackQtyLimit = boolean, +-- groupAttack = boolean, +-- } +-- } + Controller:setOption( AI.Option.Air.id.ROE, AI.Option.Air.val.ROE.OPEN_FIRE ) + Controller:setOption( AI.Option.Air.id.REACTION_ON_THREAT, AI.Option.Air.val.REACTION_ON_THREAT.EVADE_FIRE ) + + Controller:pushTask( { id = 'AttackUnit', + params = { unitId = AttackUnit:GetID(), + expend = AI.Task.WeaponExpend.TWO, + groupAttack = true, + } + } + ) + return self +end + +--- Holding weapons. +-- @param self +-- @return #GROUP self +function GROUP:OptionROEHoldFire() + self:F( { self.GroupName } ) + + local Controller = self:_GetController() + + Controller:setOption( AI.Option.Air.id.ROE, AI.Option.Air.val.ROE.WEAPON_HOLD ) + return self +end + +--- Return fire. +-- @param self +-- @return #GROUP self +function GROUP:OptionROEReturnFire() + self:F( { self.GroupName } ) + + local Controller = self:_GetController() + + Controller:setOption( AI.Option.Air.id.ROE, AI.Option.Air.val.ROE.RETURN_FIRE ) + return self +end + +--- Openfire. +-- @param self +-- @return #GROUP self +function GROUP:OptionROEOpenFire() + self:F( { self.GroupName } ) + + local Controller = self:_GetController() + + Controller:setOption( AI.Option.Air.id.ROE, AI.Option.Air.val.ROE.OPEN_FIRE ) + return self +end + +--- Weapon free. +-- @param self +-- @return #GROUP self +function GROUP:OptionROEWeaponFree() + self:F( { self.GroupName } ) + + local Controller = self:_GetController() + + Controller:setOption( AI.Option.Air.id.ROE, AI.Option.Air.val.ROE.WEAPON_FREE ) + return self +end + +--- No evasion on enemy threats. +-- @param self +-- @return #GROUP self +function GROUP:OptionEvasionNoReaction() + self:F( { self.GroupName } ) + + local Controller = self:_GetController() + + Controller:setOption( AI.Option.Air.id.REACTION_ON_THREAT, AI.Option.Air.val.REACTION_ON_THREAT.NO_REACTION ) + return self +end + +--- Evasion passive defense. +-- @param self +-- @return #GROUP self +function GROUP:OptionROTPassiveDefense() + self:F( { self.GroupName } ) + + local Controller = self:_GetController() + + Controller:setOption( AI.Option.Air.id.REACTION_ON_THREAT, AI.Option.Air.val.REACTION_ON_THREAT.PASSIVE_DEFENSE ) + return self +end + +--- Evade fire. +-- @param self +-- @return #GROUP self +function GROUP:OptionROTEvadeFire() + self:F( { self.GroupName } ) + + local Controller = self:_GetController() + + Controller:setOption( AI.Option.Air.id.REACTION_ON_THREAT, AI.Option.Air.val.REACTION_ON_THREAT.EVADE_FIRE ) + return self +end + +--- Vertical manoeuvres. +-- @param self +-- @return #GROUP self +function GROUP:OptionROTVertical() + self:F( { self.GroupName } ) + + local Controller = self:_GetController() + + Controller:setOption( AI.Option.Air.id.REACTION_ON_THREAT, AI.Option.Air.val.REACTION_ON_THREAT.BYPASS_AND_ESCAPE ) + return self +end + + --- Move the group to a Vec2 Point, wait for a defined duration and embark a group. -- @param self -- @param #Vec2 Point The point where to wait. @@ -3561,7 +3833,7 @@ end -- @param #table GoPoints A table of Route Points. -- @return #GROUP self function GROUP:Route( GoPoints ) -self:T( GoPoints ) + self:F( GoPoints ) local Points = routines.utils.deepCopy( GoPoints ) local MissionTask = { id = 'Mission', params = { route = { points = Points, }, }, } @@ -3583,9 +3855,9 @@ end -- @param #number Speed The speed. -- @param BASE#FORMATION Formation The formation string. function GROUP:RouteToZone( Zone, Randomize, Speed, Formation ) - self:T( Zone ) + self:F( Zone ) - local GroupPoint = self:GetPoint() + local GroupPoint = self:GetPointVec2() local PointFrom = {} PointFrom.x = GroupPoint.x @@ -3601,7 +3873,7 @@ function GROUP:RouteToZone( Zone, Randomize, Speed, Formation ) if Randomize then ZonePoint = Zone:GetRandomPoint() else - ZonePoint = Zone:GetPoint() + ZonePoint = Zone:GetPointVec2() end PointTo.x = ZonePoint.x @@ -3636,7 +3908,7 @@ end -- @param #boolean Randomize Randomization of the route, when true. -- @param #number Radius When randomization is on, the randomization is within the radius. function GROUP:CopyRoute( Begin, End, Randomize, Radius ) -self:T( { Begin, End } ) + self:F( { Begin, End } ) local Points = {} @@ -3684,7 +3956,21 @@ function GROUP:_GetController() return self.DCSGroup:getController() end ---- UNIT Classes + +function GROUP:GetDetectedTargets() + + return self:_GetController():getDetectedTargets() + +end + +function GROUP:IsTargetDetected( DCSObject ) + + local TargetIsDetected, TargetIsVisible, TargetLastTime, TargetKnowType, TargetKnowDistance, TargetLastPos, TargetLastVelocity + = self:_GetController():isTargetDetected( DCSObject ) + + return TargetIsDetected, TargetIsVisible, TargetLastTime, TargetKnowType, TargetKnowDistance, TargetLastPos, TargetLastVelocity + +end--- UNIT Classes -- @module UNIT Include.File( "Routines" ) @@ -3692,14 +3978,22 @@ Include.File( "Base" ) Include.File( "Message" ) --- The UNIT class --- @type +-- @type UNIT +-- @Extends Base#BASE UNIT = { ClassName="UNIT", + CategoryName = { + [Unit.Category.AIRPLANE] = "Airplane", + [Unit.Category.HELICOPTER] = "Helicoper", + [Unit.Category.GROUND_UNIT] = "Ground Unit", + [Unit.Category.SHIP] = "Ship", + [Unit.Category.STRUCTURE] = "Structure", + } } function UNIT:New( DCSUnit ) local self = BASE:Inherit( self, BASE:New() ) - self:T( DCSUnit:getName() ) + self:F( DCSUnit:getName() ) self.DCSUnit = DCSUnit self.UnitName = DCSUnit:getName() @@ -3709,39 +4003,39 @@ function UNIT:New( DCSUnit ) end function UNIT:IsAlive() - self:T( self.UnitName ) + self:F( self.UnitName ) return ( self.DCSUnit and self.DCSUnit:isExist() ) end function UNIT:GetDCSUnit() - self:T( self.DCSUnit ) + self:F( self.DCSUnit ) return self.DCSUnit end function UNIT:GetID() - self:T( self.UnitID ) + self:F( self.UnitID ) return self.UnitID end function UNIT:GetName() - self:T( self.UnitName ) + self:F( self.UnitName ) return self.UnitName end function UNIT:GetTypeName() - self:T( self.UnitName ) + self:F( self.UnitName ) return self.DCSUnit:getTypeName() end function UNIT:GetPrefix() - self:T( self.UnitName ) + self:F( self.UnitName ) local UnitPrefix = string.match( self.UnitName, ".*#" ):sub( 1, -2 ) self:T( UnitPrefix ) @@ -3751,14 +4045,14 @@ end function UNIT:GetCallSign() - self:T( self.UnitName ) + self:F( self.UnitName ) return self.DCSUnit:getCallsign() end -function UNIT:GetPoint() - self:T( self.UnitName ) +function UNIT:GetPointVec2() + self:F( self.UnitName ) local UnitPos = self.DCSUnit:getPosition().p @@ -3772,7 +4066,7 @@ end function UNIT:GetPositionVec3() - self:T( self.UnitName ) + self:F( self.UnitName ) local UnitPos = self.DCSUnit:getPosition().p @@ -3781,7 +4075,7 @@ function UNIT:GetPositionVec3() end function UNIT:OtherUnitInRadius( AwaitUnit, Radius ) - self:T( { self.UnitName, AwaitUnit.UnitName, Radius } ) + self:F( { self.UnitName, AwaitUnit.UnitName, Radius } ) local UnitPos = self:GetPositionVec3() local AwaitUnitPos = AwaitUnit:GetPositionVec3() @@ -3798,15 +4092,20 @@ function UNIT:OtherUnitInRadius( AwaitUnit, Radius ) return false end +function UNIT:GetCategoryName() + return self.CategoryName[ self.DCSUnit:getDesc().category ] +end + --- ZONE Classes --- @module ZONE +-- @module Zone Include.File( "Routines" ) Include.File( "Base" ) Include.File( "Message" ) --- The ZONE class --- @type +-- @type ZONE +-- @Extends Base#BASE ZONE = { ClassName="ZONE", } @@ -3829,8 +4128,8 @@ trace.f( self.ClassName, ZoneName ) return self end -function ZONE:GetPoint() - self:T( self.ZoneName ) +function ZONE:GetPointVec2() + self:F( self.ZoneName ) local Zone = trigger.misc.getZone( self.ZoneName ) local Point = { x = Zone.point.x, y = Zone.point.z } @@ -3868,7 +4167,8 @@ end --- Administers the Initial Sets of the Mission Templates as defined within the Mission Editor. -- Administers the Spawning of new Groups within the DCSRTE and administers these new Groups within the DATABASE object(s). --- @module DATABASE +-- @module Database +-- @author FlightControl Include.File( "Routines" ) Include.File( "Base" ) @@ -4026,7 +4326,7 @@ end --- Set a status to a Group within the Database, this to check crossing events for example. function DATABASE:SetStatusGroup( GroupName, Status ) - self:T( Status ) + self:F( Status ) self.Groups[GroupName].Status = Status end @@ -4034,7 +4334,7 @@ end --- Get a status to a Group within the Database, this to check crossing events for example. function DATABASE:GetStatusGroup( GroupName ) - self:T( Status ) + self:F( Status ) if self.Groups[GroupName] then return self.Groups[GroupName].Status @@ -4187,7 +4487,7 @@ end --- Follows new players entering Clients within the DCSRTE. function DATABASE:_FollowPlayers() - self:T( "_FollowPlayers" ) + self:F( "_FollowPlayers" ) local ClientUnit = 0 local CoalitionsData = { AlivePlayersRed = coalition.getPlayers(coalition.side.RED), AlivePlayersBlue = coalition.getPlayers(coalition.side.BLUE) } @@ -4210,7 +4510,7 @@ end --- Add a new player entering a Unit. function DATABASE:_AddPlayerFromUnit( UnitData ) - self:T( UnitData ) + self:F( UnitData ) if UnitData:isExist() then local UnitName = UnitData:getName() @@ -4288,7 +4588,7 @@ end --- Registers Scores the players completing a Mission Task. function DATABASE:_AddMissionTaskScore( PlayerUnit, MissionName, Score ) - self:T( { PlayerUnit, MissionName, Score } ) + self:F( { PlayerUnit, MissionName, Score } ) local PlayerName = PlayerUnit:getPlayerName() @@ -4314,7 +4614,7 @@ end --- Registers Mission Scores for possible multiple players that contributed in the Mission. function DATABASE:_AddMissionScore( MissionName, Score ) - self:T( { PlayerUnit, MissionName, Score } ) + self:F( { PlayerUnit, MissionName, Score } ) for PlayerName, PlayerData in pairs( self.Players ) do @@ -4335,7 +4635,7 @@ end function DATABASE:OnHit( event ) - self:T( { event } ) + self:F( { event } ) local InitUnit = nil local InitUnitName = "" @@ -4839,7 +5139,7 @@ CARGO_ZONE = { } function CARGO_ZONE:New( CargoZoneName, CargoHostName ) local self = BASE:Inherit( self, BASE:New() ) -self:T( { CargoZoneName, CargoHostName } ) + self:F( { CargoZoneName, CargoHostName } ) self.CargoZoneName = CargoZoneName self.CargoZone = trigger.misc.getZone( CargoZoneName ) @@ -4855,7 +5155,7 @@ self:T( { CargoZoneName, CargoHostName } ) end function CARGO_ZONE:Spawn() - self:T( self.CargoHostName ) + self:F( self.CargoHostName ) if self.CargoHostSpawn then local CargoHostGroup = self.CargoHostSpawn:GetGroupFromIndex() @@ -4873,7 +5173,7 @@ function CARGO_ZONE:Spawn() end function CARGO_ZONE:GetHostUnit() - self:T( self ) + self:F( self ) if self.CargoHostName then @@ -4893,7 +5193,7 @@ function CARGO_ZONE:GetHostUnit() end function CARGO_ZONE:ReportCargosToClient( Client, CargoType ) -self:T() + self:F() local SignalUnit = self:GetHostUnit() @@ -4922,7 +5222,7 @@ self:T() end function CARGO_ZONE:Signal() -self:T() + self:F() local Signalled = false @@ -4976,7 +5276,7 @@ self:T() end function CARGO_ZONE:WhiteSmoke() -self:T() + self:F() self.SignalType = CARGO_ZONE.SIGNAL.TYPE.SMOKE self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.WHITE @@ -4985,7 +5285,7 @@ self:T() end function CARGO_ZONE:BlueSmoke() -self:T() + self:F() self.SignalType = CARGO_ZONE.SIGNAL.TYPE.SMOKE self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.BLUE @@ -4994,7 +5294,7 @@ self:T() end function CARGO_ZONE:RedSmoke() -self:T() + self:F() self.SignalType = CARGO_ZONE.SIGNAL.TYPE.SMOKE self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.RED @@ -5003,7 +5303,7 @@ self:T() end function CARGO_ZONE:OrangeSmoke() -self:T() + self:F() self.SignalType = CARGO_ZONE.SIGNAL.TYPE.SMOKE self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.ORANGE @@ -5012,7 +5312,7 @@ self:T() end function CARGO_ZONE:GreenSmoke() -self:T() + self:F() self.SignalType = CARGO_ZONE.SIGNAL.TYPE.SMOKE self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.GREEN @@ -5022,7 +5322,7 @@ end function CARGO_ZONE:WhiteFlare() -self:T() + self:F() self.SignalType = CARGO_ZONE.SIGNAL.TYPE.FLARE self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.WHITE @@ -5031,7 +5331,7 @@ self:T() end function CARGO_ZONE:RedFlare() -self:T() + self:F() self.SignalType = CARGO_ZONE.SIGNAL.TYPE.FLARE self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.RED @@ -5040,7 +5340,7 @@ self:T() end function CARGO_ZONE:GreenFlare() -self:T() + self:F() self.SignalType = CARGO_ZONE.SIGNAL.TYPE.FLARE self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.GREEN @@ -5049,7 +5349,7 @@ self:T() end function CARGO_ZONE:YellowFlare() -self:T() + self:F() self.SignalType = CARGO_ZONE.SIGNAL.TYPE.FLARE self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.YELLOW @@ -5059,7 +5359,7 @@ end function CARGO_ZONE:GetCargoHostUnit() - self:T( self ) + self:F( self ) if self.CargoHostSpawn then local CargoHostGroup = self.CargoHostSpawn:GetGroupFromIndex(1) @@ -5075,7 +5375,7 @@ function CARGO_ZONE:GetCargoHostUnit() end function CARGO_ZONE:GetCargoZoneName() -self:T() + self:F() return self.CargoZoneName end @@ -5093,7 +5393,7 @@ CARGO = { --- Add Cargo to the mission... Cargo functionality needs to be reworked a bit, so this is still under construction. I need to make a CARGO Class... function CARGO:New( CargoType, CargoName, CargoWeight ) local self = BASE:Inherit( self, BASE:New() ) -self:T( { CargoType, CargoName, CargoWeight } ) + self:F( { CargoType, CargoName, CargoWeight } ) self.CargoType = CargoType @@ -5106,14 +5406,14 @@ self:T( { CargoType, CargoName, CargoWeight } ) end function CARGO:Spawn( Client ) - self:T() + self:F() return self end function CARGO:IsNear( Client, LandingZone ) -self:T() + self:F() local Near = true @@ -5123,7 +5423,7 @@ end function CARGO:IsLoadingToClient() -self:T() + self:F() if self:IsStatusLoading() then return self.CargoClient @@ -5135,7 +5435,7 @@ end function CARGO:IsLoadedInClient() -self:T() + self:F() if self:IsStatusLoaded() then return self.CargoClient @@ -5147,7 +5447,7 @@ end function CARGO:UnLoad( Client, TargetZoneName ) -self:T() + self:F() self:StatusUnLoaded() @@ -5155,7 +5455,7 @@ self:T() end function CARGO:OnBoard( Client, LandingZone ) -self:T() + self:F() local Valid = true @@ -5166,7 +5466,7 @@ self:T() end function CARGO:OnBoarded( Client, LandingZone ) -self:T() + self:F() local OnBoarded = true @@ -5174,7 +5474,7 @@ self:T() end function CARGO:Load( Client ) -self:T() + self:F() self:StatusLoaded( Client ) @@ -5182,18 +5482,18 @@ self:T() end function CARGO:IsLandingRequired() -self:T() + self:F() return true end function CARGO:IsSlingLoad() -self:T() + self:F() return false end function CARGO:StatusNone() -self:T() + self:F() self.CargoClient = nil self.CargoStatus = CARGO.STATUS.NONE @@ -5202,7 +5502,7 @@ self:T() end function CARGO:StatusLoading( Client ) -self:T() + self:F() self.CargoClient = Client self.CargoStatus = CARGO.STATUS.LOADING @@ -5212,7 +5512,7 @@ self:T() end function CARGO:StatusLoaded( Client ) -self:T() + self:F() self.CargoClient = Client self.CargoStatus = CARGO.STATUS.LOADED @@ -5222,7 +5522,7 @@ self:T() end function CARGO:StatusUnLoaded() -self:T() + self:F() self.CargoClient = nil self.CargoStatus = CARGO.STATUS.UNLOADED @@ -5232,25 +5532,25 @@ end function CARGO:IsStatusNone() -self:T() + self:F() return self.CargoStatus == CARGO.STATUS.NONE end function CARGO:IsStatusLoading() -self:T() + self:F() return self.CargoStatus == CARGO.STATUS.LOADING end function CARGO:IsStatusLoaded() -self:T() + self:F() return self.CargoStatus == CARGO.STATUS.LOADED end function CARGO:IsStatusUnLoaded() -self:T() + self:F() return self.CargoStatus == CARGO.STATUS.UNLOADED end @@ -5262,7 +5562,7 @@ CARGO_GROUP = { function CARGO_GROUP:New( CargoType, CargoName, CargoWeight, CargoGroupTemplate, CargoZone ) local self = BASE:Inherit( self, CARGO:New( CargoType, CargoName, CargoWeight ) ) - self:T( { CargoType, CargoName, CargoWeight, CargoGroupTemplate, CargoZone } ) + self:F( { CargoType, CargoName, CargoWeight, CargoGroupTemplate, CargoZone } ) self.CargoSpawn = SPAWN:NewWithAlias( CargoGroupTemplate, CargoName ) self.CargoZone = CargoZone @@ -5274,7 +5574,7 @@ function CARGO_GROUP:New( CargoType, CargoName, CargoWeight, CargoGroupTemplate, end function CARGO_GROUP:Spawn( Client ) - self:T( { Client } ) + self:F( { Client } ) local SpawnCargo = true @@ -5287,7 +5587,7 @@ function CARGO_GROUP:Spawn( Client ) elseif self:IsStatusLoading() then local Client = self:IsLoadingToClient() - if Client and Client:ClientGroup() then + if Client and Client:GetDCSGroup() then SpawnCargo = false else local CargoGroup = Group.getByName( self.CargoName ) @@ -5301,7 +5601,7 @@ function CARGO_GROUP:Spawn( Client ) local ClientLoaded = self:IsLoadedInClient() -- Now test if another Client is alive (not this one), and it has the CARGO, then this cargo does not need to be initialized and spawned. if ClientLoaded and ClientLoaded ~= Client then - local ClientGroup = Client:ClientGroup() + local ClientGroup = Client:GetDCSGroup() if ClientLoaded:GetClientGroupDCSUnit() and ClientLoaded:GetClientGroupDCSUnit():isExist() then SpawnCargo = false else @@ -5335,7 +5635,7 @@ function CARGO_GROUP:Spawn( Client ) end function CARGO_GROUP:IsNear( Client, LandingZone ) -self:T() + self:F() local Near = false @@ -5352,7 +5652,7 @@ end function CARGO_GROUP:OnBoard( Client, LandingZone, OnBoardSide ) -self:T() + self:F() local Valid = true @@ -5431,7 +5731,7 @@ end function CARGO_GROUP:OnBoarded( Client, LandingZone ) -self:T() + self:F() local OnBoarded = false @@ -5447,7 +5747,7 @@ end function CARGO_GROUP:UnLoad( Client, TargetZoneName ) -self:T() + self:F() self:T( 'self.CargoName = ' .. self.CargoName ) @@ -5470,8 +5770,7 @@ CARGO_PACKAGE = { function CARGO_PACKAGE:New( CargoType, CargoName, CargoWeight, CargoClient ) local self = BASE:Inherit( self, CARGO:New( CargoType, CargoName, CargoWeight ) ) - - self:T( { CargoType, CargoName, CargoWeight, CargoClient } ) + self:F( { CargoType, CargoName, CargoWeight, CargoClient } ) self.CargoClient = CargoClient @@ -5483,11 +5782,11 @@ end function CARGO_PACKAGE:Spawn( Client ) - self:T( { self, Client } ) + self:F( { self, Client } ) -- this needs to be checked thoroughly - local CargoClientGroup = self.CargoClient:ClientGroup() + local CargoClientGroup = self.CargoClient:GetDCSGroup() if not CargoClientGroup then if not self.CargoClientSpawn then self.CargoClientSpawn = SPAWN:New( self.CargoClient:GetClientGroupName() ):Limit( 1, 1 ) @@ -5502,7 +5801,7 @@ function CARGO_PACKAGE:Spawn( Client ) elseif self:IsStatusLoading() or self:IsStatusLoaded() then local CargoClientLoaded = self:IsLoadedInClient() - if CargoClientLoaded and CargoClientLoaded:ClientGroup() then + if CargoClientLoaded and CargoClientLoaded:GetDCSGroup() then SpawnCargo = false end @@ -5523,11 +5822,11 @@ end function CARGO_PACKAGE:IsNear( Client, LandingZone ) -self:T() + self:F() local Near = false - if self.CargoClient and self.CargoClient:ClientGroup() then + if self.CargoClient and self.CargoClient:GetDCSGroup() then self:T( self.CargoClient.ClientName ) self:T( 'Client Exists.' ) @@ -5542,7 +5841,7 @@ end function CARGO_PACKAGE:OnBoard( Client, LandingZone, OnBoardSide ) -self:T() + self:F() local Valid = true @@ -5553,8 +5852,8 @@ self:T() local CarrierPosOnBoard = ClientUnit:getPoint() local CarrierPosMoveAway = ClientUnit:getPoint() - local CargoHostGroup = self.CargoClient:ClientGroup() - local CargoHostName = self.CargoClient:ClientGroup():getName() + local CargoHostGroup = self.CargoClient:GetDCSGroup() + local CargoHostName = self.CargoClient:GetDCSGroup():getName() local CargoHostUnits = CargoHostGroup:getUnits() local CargoPos = CargoHostUnits[1]:getPoint() @@ -5633,11 +5932,11 @@ end function CARGO_PACKAGE:OnBoarded( Client, LandingZone ) -self:T() + self:F() local OnBoarded = false - if self.CargoClient and self.CargoClient:ClientGroup() then + if self.CargoClient and self.CargoClient:GetDCSGroup() then if routines.IsUnitInRadius( self.CargoClient:GetClientGroupDCSUnit(), self.CargoClient:ClientPosition(), 10 ) then -- Switch Cargo from self.CargoClient to Client ... Each cargo can have only one client. So assigning the new client for the cargo is enough. @@ -5653,12 +5952,12 @@ end function CARGO_PACKAGE:UnLoad( Client, TargetZoneName ) -self:T() + self:F() self:T( 'self.CargoName = ' .. self.CargoName ) --self:T( 'self.CargoHostName = ' .. self.CargoHostName ) - --self.CargoSpawn:FromCarrier( Client:ClientGroup(), TargetZoneName, self.CargoHostName ) + --self.CargoSpawn:FromCarrier( Client:GetDCSGroup(), TargetZoneName, self.CargoHostName ) self:StatusUnLoaded() return Cargo @@ -5672,8 +5971,7 @@ CARGO_SLINGLOAD = { function CARGO_SLINGLOAD:New( CargoType, CargoName, CargoWeight, CargoZone, CargoHostName, CargoCountryID ) local self = BASE:Inherit( self, CARGO:New( CargoType, CargoName, CargoWeight ) ) - - self:T( { CargoType, CargoName, CargoWeight, CargoZone, CargoHostName, CargoCountryID } ) + self:F( { CargoType, CargoName, CargoWeight, CargoZone, CargoHostName, CargoCountryID } ) self.CargoHostName = CargoHostName @@ -5694,19 +5992,19 @@ end function CARGO_SLINGLOAD:IsLandingRequired() -self:T() + self:F() return false end function CARGO_SLINGLOAD:IsSlingLoad() -self:T() + self:F() return true end function CARGO_SLINGLOAD:Spawn( Client ) - self:T( { self, Client } ) + self:F( { self, Client } ) local Zone = trigger.misc.getZone( self.CargoZone ) @@ -5756,7 +6054,7 @@ end function CARGO_SLINGLOAD:IsNear( Client, LandingZone ) -self:T() + self:F() local Near = false @@ -5765,7 +6063,7 @@ end function CARGO_SLINGLOAD:IsInLandingZone( Client, LandingZone ) -self:T() + self:F() local Near = false @@ -5781,7 +6079,7 @@ end function CARGO_SLINGLOAD:OnBoard( Client, LandingZone, OnBoardSide ) -self:T() + self:F() local Valid = true @@ -5791,7 +6089,7 @@ end function CARGO_SLINGLOAD:OnBoarded( Client, LandingZone ) -self:T() + self:F() local OnBoarded = false @@ -5807,7 +6105,7 @@ end function CARGO_SLINGLOAD:UnLoad( Client, TargetZoneName ) -self:T() + self:F() self:T( 'self.CargoName = ' .. self.CargoName ) self:T( 'self.CargoGroupName = ' .. self.CargoGroupName ) @@ -5817,7 +6115,8 @@ self:T() return Cargo end --- CLIENT Classes --- @module CLIENT +-- @module Client +-- @author FlightControl Include.File( "Routines" ) Include.File( "Base" ) @@ -5829,6 +6128,7 @@ Include.File( "Message" ) --- The CLIENT class -- @type CLIENT +-- @extends Base#BASE CLIENT = { ONBOARDSIDE = { NONE = 0, @@ -5864,7 +6164,7 @@ CLIENT = { -- Mission:AddClient( CLIENT:New( 'RU MI-8MTV2*RAMP-Deploy Troops 4' ):Transport() ) function CLIENT:New( ClientName, ClientBriefing ) local self = BASE:Inherit( self, BASE:New() ) - self:T() + self:F( ClientName, ClientBriefing ) self.ClientName = ClientName self:AddBriefing( ClientBriefing ) @@ -5876,14 +6176,14 @@ end --- Resets a CLIENT. -- @param string ClientName Name of the Group as defined within the Mission Editor. The Group must have a Unit with the type Client. function CLIENT:Reset( ClientName ) -self:T() + self:F() self._Menus = {} end ---- ClientGroup returns the Group of a Client. +--- Return the DCSGroup of a Client. -- This function is modified to deal with a couple of bugs in DCS 1.5.3 --- @return Group -function CLIENT:ClientGroup() +-- @return Group#Group +function CLIENT:GetDCSGroup() --self:T() -- local ClientData = Group.getByName( self.ClientName ) @@ -5920,7 +6220,7 @@ function CLIENT:ClientGroup() self:T( { tonumber(UnitData:getID()), ClientUnitData.unitId } ) if tonumber(UnitData:getID()) == ClientUnitData.unitId then local ClientGroupTemplate = _Database.Groups[self.ClientName].Template - self.ClientGroupID = ClientGroupTemplate.groupId + self.ClientID = ClientGroupTemplate.groupId self.ClientGroupUnit = UnitData self:T( self.ClientName .. " : group found in bug 1.5 resolvement logic!" ) return ClientGroup @@ -5953,78 +6253,67 @@ end function CLIENT:GetClientGroupID() -self:T() - ClientGroup = self:ClientGroup() - - if ClientGroup then - if ClientGroup:isExist() then - return ClientGroup:getID() - else - return self.ClientGroupID - end - end - - return nil + + if not self.ClientGroupID then + local ClientGroup = self:GetDCSGroup() + if ClientGroup and ClientGroup:isExist() then + self.ClientGroupID = ClientGroup:getID() + else + self.ClientGroupID = self.ClientID + end + end + + self:T( self.ClientGroupID ) + return self.ClientGroupID end function CLIENT:GetClientGroupName() -self:T() - ClientGroup = self:ClientGroup() - - if ClientGroup then - if ClientGroup:isExist() then - self:T( ClientGroup:getName() ) - return ClientGroup:getName() - else - self:T( self.ClientName ) - return self.ClientName - end - end - - return nil + if not self.ClientGroupName then + local ClientGroup = self:GetDCSGroup() + if ClientGroup and ClientGroup:isExist() then + self.ClientGroupName = ClientGroup:getName() + else + self.ClientGroupName = self.ClientName + end + end + + self:T( self.ClientGroupName ) + return self.ClientGroupName end --- Returns the Unit of the @{CLIENT}. -- @return Unit function CLIENT:GetClientGroupUnit() -self:T() + self:F() - local ClientGroup = self:ClientGroup() + local ClientGroup = self:GetDCSGroup() - if ClientGroup then - if ClientGroup:isExist() then - return UNIT:New( ClientGroup:getUnit(1) ) - else - return UNIT:New( self.ClientGroupUnit ) - end + if ClientGroup and ClientGroup:isExist() then + return UNIT:New( ClientGroup:getUnit(1) ) + else + return UNIT:New( self.ClientGroupUnit ) end - - return nil end --- Returns the DCSUnit of the @{CLIENT}. -- @return DCSUnit function CLIENT:GetClientGroupDCSUnit() -self:T() + self:F() - local ClientGroup = self:ClientGroup() - - if ClientGroup then - if ClientGroup:isExist() then - return ClientGroup:getUnits()[1] - else - return self.ClientGroupUnit - end - end - - return nil + local ClientGroup = self:GetDCSGroup() + + if ClientGroup and ClientGroup:isExist() then + return ClientGroup:getUnit(1) + else + return self.ClientGroupUnit + end end function CLIENT:GetUnit() - self:T() + self:F() return UNIT:New( self:GetClientGroupDCSUnit() ) end @@ -6049,7 +6338,7 @@ end --- Transport defines that the Client is a Transport. -- @return CLIENT function CLIENT:Transport() -self:T() + self:F() self.ClientTransport = true return self @@ -6059,7 +6348,7 @@ end -- @param string ClientBriefing is the text defining the Mission briefing. -- @return CLIENT function CLIENT:AddBriefing( ClientBriefing ) -self:T() + self:F() self.ClientBriefing = ClientBriefing return self end @@ -6067,14 +6356,14 @@ end --- IsTransport returns if a Client is a transport. -- @return bool function CLIENT:IsTransport() -self:T() + self:F() return self.ClientTransport end --- ShowCargo shows the @{CARGO} within the CLIENT to the Player. -- The @{CARGO} is shown throught the MESSAGE system of DCS World. function CLIENT:ShowCargo() -self:T() + self:F() local CargoMsg = "" @@ -6105,13 +6394,13 @@ end -- @param string MessageCategory is the category of the message (the title). -- @param number MessageInterval is the interval in seconds between the display of the Message when the CLIENT is in the air. function CLIENT:Message( Message, MessageDuration, MessageId, MessageCategory, MessageInterval ) -self:T() + self:F() if not self.MenuMessages then if self:GetClientGroupID() then - self.MenuMessages = MENU_SUB_GROUP:New( self:GetClientGroupID(), 'Messages' ) - self.MenuRouteMessageOn = MENU_COMMAND_GROUP:New( self:GetClientGroupID(), 'Messages On', self.MenuMessages, CLIENT.SwitchMessages, { self, true } ) - self.MenuRouteMessageOff = MENU_COMMAND_GROUP:New( self:GetClientGroupID(),'Messages Off', self.MenuMessages, CLIENT.SwitchMessages, { self, false } ) + self.MenuMessages = MENU_CLIENT:New( self, 'Messages' ) + self.MenuRouteMessageOn = MENU_CLIENT_COMMAND:New( self, 'Messages On', self.MenuMessages, CLIENT.SwitchMessages, { self, true } ) + self.MenuRouteMessageOff = MENU_CLIENT_COMMAND:New( self,'Messages Off', self.MenuMessages, CLIENT.SwitchMessages, { self, false } ) end end @@ -6168,11 +6457,12 @@ MESSAGE = { --- Creates a new MESSAGE object. Note that these MESSAGE objects are not yet displayed on the display panel. You must use the functions @{ToClient} or @{ToCoalition} or @{ToAll} to send these Messages to the respective recipients. --- @param string MessageText is the text of the Message. --- @param string MessageCategory is a string expressing the Category of the Message. Messages are grouped on the display panel per Category to improve readability. --- @param number MessageDuration is a number in seconds of how long the MESSAGE should be shown on the display panel. --- @param string MessageID is a string expressing the ID of the Message. --- @return MESSAGE +-- @param self +-- @param #string MessageText is the text of the Message. +-- @param #string MessageCategory is a string expressing the Category of the Message. Messages are grouped on the display panel per Category to improve readability. +-- @param #number MessageDuration is a number in seconds of how long the MESSAGE should be shown on the display panel. +-- @param #string MessageID is a string expressing the ID of the Message. +-- @return #MESSAGE -- @usage -- -- Create a series of new Messages. -- -- MessageAll is meant to be sent to all players, for 25 seconds, and is classified as "Score". @@ -6185,7 +6475,7 @@ MESSAGE = { -- MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25, "Score" ) function MESSAGE:New( MessageText, MessageCategory, MessageDuration, MessageID ) local self = BASE:Inherit( self, BASE:New() ) - self:T( { MessageText, MessageCategory, MessageDuration, MessageID } ) + self:F( { MessageText, MessageCategory, MessageDuration, MessageID } ) -- When no messagecategory is given, we don't show it as a title... if MessageCategory and MessageCategory ~= "" then @@ -6225,7 +6515,7 @@ end -- MessageClient1:ToClient( ClientGroup ) -- MessageClient2:ToClient( ClientGroup ) function MESSAGE:ToClient( Client ) - self:T( Client ) + self:F( Client ) if Client and Client:GetClientGroupID() then @@ -6248,7 +6538,7 @@ end -- MessageBLUE = MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ) -- MessageBLUE:ToBlue() function MESSAGE:ToBlue() - self:T() + self:F() self:ToCoalition( coalition.side.BLUE ) @@ -6266,7 +6556,7 @@ end -- MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ) -- MessageRED:ToRed() function MESSAGE:ToRed( ) - self:T() + self:F() self:ToCoalition( coalition.side.RED ) @@ -6285,7 +6575,7 @@ end -- MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ) -- MessageRED:ToCoalition( coalition.side.RED ) function MESSAGE:ToCoalition( CoalitionSide ) - self:T( CoalitionSide ) + self:F( CoalitionSide ) if CoalitionSide then trace.i(self.ClassName, self.MessageCategory .. self.MessageText:gsub("\n$",""):gsub("\n$","") .. " / " .. self.MessageDuration ) @@ -6306,7 +6596,7 @@ end -- MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25, "Win" ) -- MessageAll:ToAll() function MESSAGE:ToAll() - self:T() + self:F() self:ToCoalition( coalition.side.RED ) self:ToCoalition( coalition.side.BLUE ) @@ -6325,7 +6615,7 @@ MESSAGEQUEUE = { function MESSAGEQUEUE:New( RefreshInterval ) local self = BASE:Inherit( self, BASE:New() ) - self:T( { RefreshInterval } ) + self:F( { RefreshInterval } ) self.RefreshInterval = RefreshInterval @@ -6418,7 +6708,7 @@ STAGE = { function STAGE:New() local self = BASE:Inherit( self, BASE:New() ) - self:T() + self:F() return self end @@ -6450,14 +6740,14 @@ STAGEBRIEF = { function STAGEBRIEF:New() local self = BASE:Inherit( self, STAGE:New() ) - self:T() + self:F() self.StageType = 'CLIENT' return self end function STAGEBRIEF:Execute( Mission, Client, Task ) local Valid = BASE:Inherited(self):Execute( Mission, Client, Task ) - self:T() + self:F() Mission:ShowBriefing( Client ) self.StageBriefingTime = timer.getTime() return Valid @@ -6487,13 +6777,13 @@ STAGESTART = { function STAGESTART:New() local self = BASE:Inherit( self, STAGE:New() ) - self:T() + self:F() self.StageType = 'CLIENT' return self end function STAGESTART:Execute( Mission, Client, Task ) -self:T() + self:F() local Valid = BASE:Inherited(self):Execute( Mission, Client, Task ) if Task.TaskBriefing then Client:Message( Task.TaskBriefing, 30, Mission.Name .. "/Stage", "Mission Command: Tasking" ) @@ -6505,7 +6795,7 @@ self:T() end function STAGESTART:Validate( Mission, Client, Task ) -self:T() + self:F() local Valid = STAGE:Validate( Mission, Client, Task ) if timer.getTime() - self.StageStartTime <= self.StageStartDuration then @@ -6525,13 +6815,13 @@ STAGE_CARGO_LOAD = { function STAGE_CARGO_LOAD:New() local self = BASE:Inherit( self, STAGE:New() ) - self:T() + self:F() self.StageType = 'CLIENT' return self end function STAGE_CARGO_LOAD:Execute( Mission, Client, Task ) -self:T() + self:F() local Valid = BASE:Inherited(self):Execute( Mission, Client, Task ) for LoadCargoID, LoadCargo in pairs( Task.Cargos.LoadCargos ) do @@ -6546,7 +6836,7 @@ self:T() end function STAGE_CARGO_LOAD:Validate( Mission, Client, Task ) -self:T() + self:F() local Valid = STAGE:Validate( Mission, Client, Task ) return 1 @@ -6559,13 +6849,13 @@ STAGE_CARGO_INIT = { function STAGE_CARGO_INIT:New() local self = BASE:Inherit( self, STAGE:New() ) - self:T() + self:F() self.StageType = 'CLIENT' return self end function STAGE_CARGO_INIT:Execute( Mission, Client, Task ) -self:T() + self:F() local Valid = BASE:Inherited(self):Execute( Mission, Client, Task ) for InitLandingZoneID, InitLandingZone in pairs( Task.LandingZones.LandingZones ) do @@ -6585,7 +6875,7 @@ end function STAGE_CARGO_INIT:Validate( Mission, Client, Task ) -self:T() + self:F() local Valid = STAGE:Validate( Mission, Client, Task ) return 1 @@ -6602,7 +6892,7 @@ STAGEROUTE = { function STAGEROUTE:New() local self = BASE:Inherit( self, STAGE:New() ) - self:T() + self:F() self.StageType = 'CLIENT' self.MessageSwitch = true return self @@ -6610,7 +6900,7 @@ end function STAGEROUTE:Execute( Mission, Client, Task ) -self:T() + self:F() local Valid = BASE:Inherited(self):Execute( Mission, Client, Task ) local RouteMessage = "Fly to " @@ -6628,7 +6918,7 @@ self:T() end function STAGEROUTE:Validate( Mission, Client, Task ) -self:T() + self:F() local Valid = STAGE:Validate( Mission, Client, Task ) -- check if the Client is in the landing zone @@ -6663,13 +6953,13 @@ STAGELANDING = { function STAGELANDING:New() local self = BASE:Inherit( self, STAGE:New() ) - self:T() + self:F() self.StageType = 'CLIENT' return self end function STAGELANDING:Execute( Mission, Client, Task ) -self:T() + self:F() Client:Message( "We have arrived at the landing zone.", self.MSG.TIME, Mission.Name .. "/StageArrived", "Co-Pilot: Arrived", 10 ) @@ -6721,7 +7011,7 @@ self:T() end function STAGELANDING:Validate( Mission, Client, Task ) -self:T() + self:F() Task.CurrentLandingZoneName = routines.IsUnitInZones( Client:GetClientGroupDCSUnit(), Task.LandingZones.LandingZoneNames ) if Task.CurrentLandingZoneName then @@ -6765,13 +7055,13 @@ STAGELANDED = { function STAGELANDED:New() local self = BASE:Inherit( self, STAGE:New() ) - self:T() + self:F() self.StageType = 'CLIENT' return self end function STAGELANDED:Execute( Mission, Client, Task ) -self:T() + self:F() if Task.IsLandingRequired then Client:Message( 'We have landed within the landing zone. Use the radio menu (F10) to ' .. Task.TEXT[1] .. ' the ' .. Task.CargoType .. '.', @@ -6787,7 +7077,7 @@ end function STAGELANDED:Validate( Mission, Client, Task ) -self:T() + self:F() if not routines.IsUnitInZones( Client:GetClientGroupDCSUnit(), Task.CurrentLandingZoneName ) then self:T( "Client is not anymore in the landing zone, go back to stage Route, and remove cargo menus." ) @@ -6820,20 +7110,20 @@ STAGEUNLOAD = { function STAGEUNLOAD:New() local self = BASE:Inherit( self, STAGE:New() ) - self:T() + self:F() self.StageType = 'CLIENT' return self end function STAGEUNLOAD:Execute( Mission, Client, Task ) -self:T() + self:F() Client:Message( 'The ' .. Task.CargoType .. ' are being ' .. Task.TEXT[2] .. ' within the landing zone. Wait until the helicopter is ' .. Task.TEXT[3] .. '.', self.MSG.TIME, Mission.Name .. "/StageUnLoad", "Co-Pilot: Unload" ) Task:RemoveCargoMenus( Client ) end function STAGEUNLOAD:Executing( Mission, Client, Task ) -self:T() + self:F() env.info( 'STAGEUNLOAD:Executing() Task.Cargo.CargoName = ' .. Task.Cargo.CargoName ) local TargetZoneName @@ -6853,7 +7143,7 @@ self:T() end function STAGEUNLOAD:Validate( Mission, Client, Task ) -self:T() + self:F() env.info( 'STAGEUNLOAD:Validate()' ) if routines.IsUnitInZones( Client:GetClientGroupDCSUnit(), Task.CurrentLandingZoneName ) then @@ -6892,13 +7182,13 @@ STAGELOAD = { function STAGELOAD:New() local self = BASE:Inherit( self, STAGE:New() ) - self:T() + self:F() self.StageType = 'CLIENT' return self end function STAGELOAD:Execute( Mission, Client, Task ) -self:T() + self:F() if not Task.IsSlingLoad then Client:Message( 'The ' .. Task.CargoType .. ' are being ' .. Task.TEXT[2] .. ' within the landing zone. Wait until the helicopter is ' .. Task.TEXT[3] .. '.', @@ -6913,7 +7203,7 @@ self:T() end function STAGELOAD:Executing( Mission, Client, Task ) -self:T() + self:F() -- If the Cargo is ready to be loaded, load it into the Client. @@ -6965,7 +7255,7 @@ self:T() end function STAGELOAD:Validate( Mission, Client, Task ) -self:T() + self:F() self:T( "Task.CurrentLandingZoneName = " .. Task.CurrentLandingZoneName ) @@ -7024,18 +7314,18 @@ STAGEDONE = { function STAGEDONE:New() local self = BASE:Inherit( self, STAGE:New() ) - self:T() + self:F() self.StageType = 'AI' return self end function STAGEDONE:Execute( Mission, Client, Task ) -self:T() + self:F() end function STAGEDONE:Validate( Mission, Client, Task ) -self:T() + self:F() Task:Done() @@ -7050,20 +7340,20 @@ STAGEARRIVE = { function STAGEARRIVE:New() local self = BASE:Inherit( self, STAGE:New() ) - self:T() + self:F() self.StageType = 'CLIENT' return self end function STAGEARRIVE:Execute( Mission, Client, Task ) -self:T() + self:F() Client:Message( 'We have arrived at ' .. Task.CurrentLandingZoneName .. ".", self.MSG.TIME, Mission.Name .. "/Stage", "Co-Pilot: Arrived" ) end function STAGEARRIVE:Validate( Mission, Client, Task ) -self:T() + self:F() Task.CurrentLandingZoneID = routines.IsUnitInZones( Client:GetClientGroupDCSUnit(), Task.LandingZones ) if ( Task.CurrentLandingZoneID ) then @@ -7084,7 +7374,7 @@ STAGEGROUPSDESTROYED = { function STAGEGROUPSDESTROYED:New() local self = BASE:Inherit( self, STAGE:New() ) - self:T() + self:F() self.StageType = 'AI' return self end @@ -7096,7 +7386,7 @@ end --end function STAGEGROUPSDESTROYED:Validate( Mission, Client, Task ) -self:T() + self:F() if Task.MissionTask:IsGoalReached() then return 1 @@ -7106,7 +7396,7 @@ self:T() end function STAGEGROUPSDESTROYED:Execute( Mission, Client, Task ) -self:T() + self:F() self:T( { Task.ClassName, Task.Destroyed } ) --env.info( 'Event Table Task = ' .. tostring(Task) ) @@ -7188,7 +7478,8 @@ Include.File( "Client" ) Include.File( "Stage" ) --- The TASK class --- @type +-- @type TASK +-- @extends Base#BASE TASK = { -- Defines the different signal types with a Task. @@ -7705,7 +7996,7 @@ DESTROYBASETASK = { -- @return DESTROYBASETASK function DESTROYBASETASK:New( DestroyGroupType, DestroyUnitType, DestroyGroupPrefixes, DestroyPercentage ) local self = BASE:Inherit( self, TASK:New() ) - self:T() + self:F() self.Name = 'Destroy' self.Destroyed = 0 @@ -7727,7 +8018,7 @@ end --- Handle the S_EVENT_DEAD events to validate the destruction of units for the task monitoring. -- @param event Event structure of DCS world. function DESTROYBASETASK:EventDead( event ) - self:T( { 'EventDead', event } ) + self:F( { 'EventDead', event } ) if event.initiator and Object.getCategory(event.initiator) == Object.Category.UNIT then local DestroyUnit = event.initiator @@ -7758,7 +8049,7 @@ end -- @param DestroyGroup Group structure describing the group to be evaluated. -- @param DestroyUnit Unit structure describing the Unit to be evaluated. function DESTROYBASETASK:ReportGoalProgress( DestroyGroup, DestroyUnit ) -self:T() + self:F() return 0 end @@ -7942,7 +8233,7 @@ PICKUPTASK = { -- @param number OnBoardSide Reflects from which side the cargo Group will be on-boarded on the Carrier. function PICKUPTASK:New( CargoType, OnBoardSide ) local self = BASE:Inherit( self, TASK:New() ) - self:T() + self:F() -- self holds the inherited instance of the PICKUPTASK Class to the BASE class. @@ -7964,7 +8255,7 @@ function PICKUPTASK:New( CargoType, OnBoardSide ) end function PICKUPTASK:FromZone( LandingZone ) -self:T() + self:F() self.LandingZones.LandingZoneNames[LandingZone.CargoZoneName] = LandingZone.CargoZoneName self.LandingZones.LandingZones[LandingZone.CargoZoneName] = LandingZone @@ -7973,7 +8264,7 @@ self:T() end function PICKUPTASK:InitCargo( InitCargos ) -self:T( { InitCargos } ) + self:F( { InitCargos } ) if type( InitCargos ) == "table" then self.Cargos.InitCargos = InitCargos @@ -7985,7 +8276,7 @@ self:T( { InitCargos } ) end function PICKUPTASK:LoadCargo( LoadCargos ) -self:T( { LoadCargos } ) + self:F( { LoadCargos } ) if type( LoadCargos ) == "table" then self.Cargos.LoadCargos = LoadCargos @@ -7997,7 +8288,7 @@ self:T( { LoadCargos } ) end function PICKUPTASK:AddCargoMenus( Client, Cargos, TransportRadius ) -self:T() + self:F() for CargoID, Cargo in pairs( Cargos ) do @@ -8044,7 +8335,7 @@ self:T() end function PICKUPTASK:RemoveCargoMenus( Client ) -self:T() + self:F() for MenuID, MenuData in pairs( Client._Menus ) do for SubMenuID, SubMenuData in pairs( MenuData.PickupSubMenus ) do @@ -8071,7 +8362,7 @@ end function PICKUPTASK:HasFailed( ClientDead ) -self:T() + self:F() local TaskHasFailed = self.TaskFailed return TaskHasFailed @@ -8097,7 +8388,7 @@ DEPLOYTASK = { -- @return #DEPLOYTASK The created DeployTask function DEPLOYTASK:New( CargoType ) local self = BASE:Inherit( self, TASK:New() ) - self:T() + self:F() local Valid = true @@ -8114,7 +8405,7 @@ function DEPLOYTASK:New( CargoType ) end function DEPLOYTASK:ToZone( LandingZone ) -self:T() + self:F() self.LandingZones.LandingZoneNames[LandingZone.CargoZoneName] = LandingZone.CargoZoneName self.LandingZones.LandingZones[LandingZone.CargoZoneName] = LandingZone @@ -8124,7 +8415,7 @@ end function DEPLOYTASK:InitCargo( InitCargos ) -self:T( { InitCargos } ) + self:F( { InitCargos } ) if type( InitCargos ) == "table" then self.Cargos.InitCargos = InitCargos @@ -8137,7 +8428,7 @@ end function DEPLOYTASK:LoadCargo( LoadCargos ) -self:T( { LoadCargos } ) + self:F( { LoadCargos } ) if type( LoadCargos ) == "table" then self.Cargos.LoadCargos = LoadCargos @@ -8152,7 +8443,7 @@ end --- When the cargo is unloaded, it will move to the target zone name. -- @param string TargetZoneName Name of the Zone to where the Cargo should move after unloading. function DEPLOYTASK:SetCargoTargetZoneName( TargetZoneName ) -self:T() + self:F() local Valid = true @@ -8167,7 +8458,7 @@ self:T() end function DEPLOYTASK:AddCargoMenus( Client, Cargos, TransportRadius ) -self:T() + self:F() local ClientGroupID = Client:GetClientGroupID() @@ -8214,7 +8505,7 @@ self:T() end function DEPLOYTASK:RemoveCargoMenus( Client ) -self:T() + self:F() local ClientGroupID = Client:GetClientGroupID() trace.i( self.ClassName, ClientGroupID ) @@ -8342,7 +8633,7 @@ MISSION = { function MISSION:Meta() local self = BASE:Inherit( self, BASE:New() ) - self:T() + self:F() return self end @@ -8388,13 +8679,13 @@ end --- Returns if a Mission has completed. -- @return bool function MISSION:IsCompleted() - self:T() + self:F() return self.MissionStatus == "ACCOMPLISHED" end --- Set a Mission to completed. function MISSION:Completed() - self:T() + self:F() self.MissionStatus = "ACCOMPLISHED" self:StatusToClients() end @@ -8402,13 +8693,13 @@ end --- Returns if a Mission is ongoing. -- treturn bool function MISSION:IsOngoing() - self:T() + self:F() return self.MissionStatus == "ONGOING" end --- Set a Mission to ongoing. function MISSION:Ongoing() - self:T() + self:F() self.MissionStatus = "ONGOING" --self:StatusToClients() end @@ -8416,13 +8707,13 @@ end --- Returns if a Mission is pending. -- treturn bool function MISSION:IsPending() - self:T() + self:F() return self.MissionStatus == "PENDING" end --- Set a Mission to pending. function MISSION:Pending() - self:T() + self:F() self.MissionStatus = "PENDING" self:StatusToClients() end @@ -8430,20 +8721,20 @@ end --- Returns if a Mission has failed. -- treturn bool function MISSION:IsFailed() - self:T() + self:F() return self.MissionStatus == "FAILED" end --- Set a Mission to failed. function MISSION:Failed() - self:T() + self:F() self.MissionStatus = "FAILED" self:StatusToClients() end --- Send the status of the MISSION to all Clients. function MISSION:StatusToClients() - self:T() + self:F() if self.MissionReportFlash then for ClientID, Client in pairs( self._Clients ) do Client:Message( self.MissionCoalition .. ' "' .. self.Name .. '": ' .. self.MissionStatus .. '! ( ' .. self.MissionPriority .. ' mission ) ', 10, self.Name .. '/Status', "Mission Command: Mission Status") @@ -8453,7 +8744,7 @@ end --- Handles the reporting. After certain time intervals, a MISSION report MESSAGE will be shown to All Players. function MISSION:ReportTrigger() - self:T() + self:F() if self.MissionReportShow == true then self.MissionReportShow = false @@ -8479,11 +8770,11 @@ end --- Report the status of all MISSIONs to all active Clients. function MISSION:ReportToAll() - self:T() + self:F() local AlivePlayers = '' for ClientID, Client in pairs( self._Clients ) do - if Client:ClientGroup() then + if Client:GetDCSGroup() then if Client:GetClientGroupDCSUnit() then if Client:GetClientGroupDCSUnit():getLife() > 0.0 then if AlivePlayers == '' then @@ -8541,7 +8832,7 @@ end -- local Mission = MISSIONSCHEDULER.AddMission( 'NATO Transport Troops', 'Operational', 'Transport 3 groups of air defense engineers from our barracks "Gold" and "Titan" to each patriot battery control center to activate our air defenses.', 'NATO' ) -- Mission:AddGoalFunction( DeployPatriotTroopsGoal ) function MISSION:AddGoalFunction( GoalFunction ) - self:T() + self:F() self.GoalFunction = GoalFunction end @@ -8549,7 +8840,7 @@ end -- @param CLIENT Client to show briefing to. -- @return CLIENT function MISSION:ShowBriefing( Client ) - self:T( { Client.ClientName } ) + self:F( { Client.ClientName } ) if not Client.ClientBriefingShown then Client.ClientBriefingShown = true @@ -8574,7 +8865,7 @@ end -- Mission:AddClient( CLIENT:New( 'US UH-1H*HOT-Deploy Troops 2', 'Transport 3 groups of air defense engineers from our barracks "Gold" and "Titan" to each patriot battery control center to activate our air defenses.' ):Transport() ) -- Mission:AddClient( CLIENT:New( 'US UH-1H*RAMP-Deploy Troops 4', 'Transport 3 groups of air defense engineers from our barracks "Gold" and "Titan" to each patriot battery control center to activate our air defenses.' ):Transport() ) function MISSION:AddClient( Client ) - self:T( { Client } ) + self:F( { Client } ) local Valid = true @@ -8593,7 +8884,7 @@ end -- -- Seach for Client "Bomber" within the Mission. -- local BomberClient = Mission:FindClient( "Bomber" ) function MISSION:FindClient( ClientName ) - self:T( { self._Clients[ClientName] } ) + self:F( { self._Clients[ClientName] } ) return self._Clients[ClientName] end @@ -8624,7 +8915,7 @@ end -- Mission:AddTask( DeployTask, 2 ) function MISSION:AddTask( Task, TaskNumber ) - self:T() + self:F() self._Tasks[TaskNumber] = Task self._Tasks[TaskNumber]:EnableEvents() @@ -8641,7 +8932,7 @@ function MISSION:AddTask( Task, TaskNumber ) -- Task2 = Mission:GetTask( 2 ) function MISSION:GetTask( TaskNumber ) - self:T() + self:F() local Valid = true @@ -8665,7 +8956,7 @@ end -- Tasks = Mission:GetTasks() -- env.info( "Task 2 Completion = " .. Tasks[2]:GetGoalPercentage() .. "%" ) function MISSION:GetTasks() - self:T() + self:F() return self._Tasks end @@ -8716,7 +9007,7 @@ trace.scheduled("MISSIONSCHEDULER","Scheduler") trace.i( "MISSIONSCHEDULER", "Client: " .. Client.ClientName ) - if Client:ClientGroup() then + if Client:GetDCSGroup() then -- There is at least one Client that is alive... So the Mission status is set to Ongoing. ClientsAlive = true @@ -9037,7 +9328,7 @@ CLEANUP = { -- CleanUpTbilisi = CLEANUP:New( 'CLEAN Tbilisi', 150 ) -- CleanUpKutaisi = CLEANUP:New( 'CLEAN Kutaisi', 600 ) function CLEANUP:New( ZoneNames, TimeInterval ) local self = BASE:Inherit( self, BASE:New() ) - self:T( { ZoneNames, TimeInterval } ) + self:F( { ZoneNames, TimeInterval } ) if type( ZoneNames ) == 'table' then self.ZoneNames = ZoneNames @@ -9066,7 +9357,7 @@ end --- Destroys a group from the simulator, but checks first if it is still existing! -- @see CLEANUP function CLEANUP:_DestroyGroup( GroupObject, CleanUpGroupName ) - self:T( { GroupObject, CleanUpGroupName } ) + self:F( { GroupObject, CleanUpGroupName } ) if GroupObject then -- and GroupObject:isExist() then --MESSAGE:New( "Destroy Group " .. CleanUpGroupName, CleanUpGroupName, 1, CleanUpGroupName ):ToAll() @@ -9078,7 +9369,7 @@ end --- Destroys a unit from the simulator, but checks first if it is still existing! -- @see CLEANUP function CLEANUP:_DestroyUnit( CleanUpUnit, CleanUpUnitName ) - self:T( { CleanUpUnit, CleanUpUnitName } ) + self:F( { CleanUpUnit, CleanUpUnitName } ) if CleanUpUnit then --MESSAGE:New( "Destroy " .. CleanUpUnitName, CleanUpUnitName, 1, CleanUpUnitName ):ToAll() @@ -9105,7 +9396,7 @@ end --- Destroys a missile from the simulator, but checks first if it is still existing! -- @see CLEANUP function CLEANUP:_DestroyMissile( MissileObject ) - self:T( { MissileObject } ) + self:F( { MissileObject } ) if MissileObject and MissileObject:isExist() then MissileObject:destroy() @@ -9116,7 +9407,7 @@ end --- Detects if an SA site was shot with an anti radiation missile. In this case, take evasive actions based on the skill level set within the ME. -- @see CLEANUP function CLEANUP:_EventCrash( event ) - self:T( { event } ) + self:F( { event } ) --MESSAGE:New( "Crash ", "Crash", 10, "Crash" ):ToAll() -- self:T("before getGroup") @@ -9146,7 +9437,7 @@ end --- Detects if an SA site was shot with an anti radiation missile. In this case, take evasive actions based on the skill level set within the ME. -- @see CLEANUP function CLEANUP:_EventShot( event ) - self:T( { event } ) + self:F( { event } ) local _grp = Unit.getGroup(event.initiator)-- Identify the group that fired local _groupname = _grp:getName() -- return the name of the group @@ -9170,7 +9461,7 @@ end --- Detects if the Unit has an S_EVENT_HIT within the given ZoneNames. If this is the case, destroy the unit. function CLEANUP:_EventHitCleanUp( event ) - self:T( { event } ) + self:F( { event } ) local CleanUpUnit = event.initiator -- the Unit if CleanUpUnit and CleanUpUnit:isExist() and Object.getCategory(CleanUpUnit) == Object.Category.UNIT then @@ -9204,7 +9495,7 @@ function CLEANUP:_EventHitCleanUp( event ) end function CLEANUP:_AddForCleanUp( CleanUpUnit, CleanUpUnitName ) - self:T( { CleanUpUnit, CleanUpUnitName } ) + self:F( { CleanUpUnit, CleanUpUnitName } ) self.CleanUpList[CleanUpUnitName] = {} self.CleanUpList[CleanUpUnitName].CleanUpUnit = CleanUpUnit @@ -9253,7 +9544,7 @@ CleanUpSurfaceTypeText = { --- At the defined time interval, CleanUp the Groups within the CleanUpList. function CLEANUP:_Scheduler() - self:T( "CleanUp Scheduler" ) + self:F( "CleanUp Scheduler" ) for CleanUpUnitName, UnitData in pairs( self.CleanUpList ) do @@ -9388,7 +9679,7 @@ end -- This models AI that has succesfully returned to their airbase, to restart their combat activities. -- Check the @{#SPAWN.CleanUp} for further info. -- --- @module SPAWN +-- @module Spawn -- @author FlightControl Include.File( "Routines" ) @@ -9399,6 +9690,7 @@ Include.File( "Zone" ) --- SPAWN Class -- @type SPAWN +-- @extends Base#BASE -- @field ClassName SPAWN = { ClassName = "SPAWN", @@ -9416,7 +9708,7 @@ SPAWN = { -- @usage local Plane = SPAWN:New( "Plane" ) -- Creates a new local variable that can initiate new planes with the name "Plane#ddd" using the template "Plane" as defined within the ME. function SPAWN:New( SpawnTemplatePrefix ) local self = BASE:Inherit( self, BASE:New() ) - self:T( { SpawnTemplatePrefix } ) + self:F( { SpawnTemplatePrefix } ) local TemplateGroup = Group.getByName( SpawnTemplatePrefix ) if TemplateGroup then @@ -9458,7 +9750,7 @@ end -- @usage local PlaneWithAlias = SPAWN:NewWithAlias( "Plane", "Bomber" ) -- Creates a new local variable that can instantiate new planes with the name "Bomber#ddd" using the template "Plane" as defined within the ME. function SPAWN:NewWithAlias( SpawnTemplatePrefix, SpawnAliasPrefix ) local self = BASE:Inherit( self, BASE:New() ) - self:T( { SpawnTemplatePrefix, SpawnAliasPrefix } ) + self:F( { SpawnTemplatePrefix, SpawnAliasPrefix } ) local TemplateGroup = Group.getByName( SpawnTemplatePrefix ) if TemplateGroup then @@ -9507,7 +9799,7 @@ end -- -- There will be maximum 24 groups spawned during the whole mission lifetime. -- Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Limit( 2, 24 ) function SPAWN:Limit( SpawnMaxUnitsAlive, SpawnMaxGroups ) - self:T( { self.SpawnTemplatePrefix, SpawnMaxUnitsAlive, SpawnMaxGroups } ) + self:F( { self.SpawnTemplatePrefix, SpawnMaxUnitsAlive, SpawnMaxGroups } ) self.SpawnMaxUnitsAlive = SpawnMaxUnitsAlive -- The maximum amount of groups that can be alive of SpawnTemplatePrefix at the same time. self.SpawnMaxGroups = SpawnMaxGroups -- The maximum amount of groups that can be spawned. @@ -9535,7 +9827,7 @@ end -- -- The randomization of waypoint 2 and 3 will take place within a radius of 2000 meters. -- Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):RandomizeRoute( 2, 2, 2000 ) function SPAWN:RandomizeRoute( SpawnStartPoint, SpawnEndPoint, SpawnRadius ) - self:T( { self.SpawnTemplatePrefix, SpawnStartPoint, SpawnEndPoint, SpawnRadius } ) + self:F( { self.SpawnTemplatePrefix, SpawnStartPoint, SpawnEndPoint, SpawnRadius } ) self.SpawnRandomizeRoute = true self.SpawnRandomizeRouteStartPoint = SpawnStartPoint @@ -9570,7 +9862,7 @@ end -- Spawn_US_Platoon_Middle = SPAWN:New( 'US Tank Platoon Middle' ):Limit( 12, 150 ):Schedule( 200, 0.4 ):RandomizeTemplate( Spawn_US_Platoon ):RandomizeRoute( 3, 3, 2000 ) -- Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):Limit( 12, 150 ):Schedule( 200, 0.4 ):RandomizeTemplate( Spawn_US_Platoon ):RandomizeRoute( 3, 3, 2000 ) function SPAWN:RandomizeTemplate( SpawnTemplatePrefixTable ) - self:T( { self.SpawnTemplatePrefix, SpawnTemplatePrefixTable } ) + self:F( { self.SpawnTemplatePrefix, SpawnTemplatePrefixTable } ) self.SpawnTemplatePrefixTable = SpawnTemplatePrefixTable self.SpawnRandomizeTemplate = true @@ -9598,7 +9890,7 @@ end -- -- Re-SPAWN the Group(s) after each landing and Engine Shut-Down automatically. -- SpawnRU_SU34 = SPAWN:New( 'TF1 RU Su-34 Krymsk@AI - Attack Ships' ):Schedule( 2, 3, 1800, 0.4 ):SpawnUncontrolled():RandomizeRoute( 1, 1, 3000 ):RepeatOnEngineShutDown() function SPAWN:Repeat() - self:T( { self.SpawnTemplatePrefix } ) + self:F( { self.SpawnTemplatePrefix } ) self.SpawnRepeat = true self.RepeatOnEngineShutDown = false @@ -9617,7 +9909,7 @@ end -- @see Repeat function SPAWN:RepeatOnLanding() - self:T( { self.SpawnTemplatePrefix } ) + self:F( { self.SpawnTemplatePrefix } ) self:Repeat() self.RepeatOnEngineShutDown = false @@ -9629,7 +9921,7 @@ end --- Same as the @{#SPAWN.Repeat) method, but now the Group will respawn after its engines have shut down. -- @return SPAWN function SPAWN:RepeatOnEngineShutDown() - self:T( { self.SpawnTemplatePrefix } ) + self:F( { self.SpawnTemplatePrefix } ) self:Repeat() self.RepeatOnEngineShutDown = true @@ -9646,7 +9938,7 @@ end -- @return #SPAWN self -- @usage Spawn_Helicopter:CleanUp( 20 ) -- CleanUp the spawning of the helicopters every 20 seconds when they become inactive. function SPAWN:CleanUp( SpawnCleanUpInterval ) - self:T( { self.SpawnTemplatePrefix, SpawnCleanUpInterval } ) + self:F( { self.SpawnTemplatePrefix, SpawnCleanUpInterval } ) self.SpawnCleanUpInterval = SpawnCleanUpInterval self.SpawnCleanUpTimeStamps = {} @@ -9669,7 +9961,7 @@ end -- -- Define an array of Groups. -- Spawn_BE_Ground = SPAWN:New( 'BE Ground' ):Limit( 2, 24 ):Visible( 90, "Diamond", 10, 100, 50 ) function SPAWN:Array( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY ) - self:T( { self.SpawnTemplatePrefix, SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY } ) + self:F( { self.SpawnTemplatePrefix, SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY } ) self.SpawnVisible = true -- When the first Spawn executes, all the Groups need to be made visible before start. @@ -9717,7 +10009,7 @@ end -- @param self -- @return GROUP#GROUP The group that was spawned. You can use this group for further actions. function SPAWN:Spawn() - self:T( { self.SpawnTemplatePrefix, self.SpawnIndex } ) + self:F( { self.SpawnTemplatePrefix, self.SpawnIndex } ) return self:SpawnWithIndex( self.SpawnIndex + 1 ) end @@ -9728,7 +10020,7 @@ end -- @param #string SpawnIndex The index of the group to be spawned. -- @return GROUP#GROUP The group that was spawned. You can use this group for further actions. function SPAWN:ReSpawn( SpawnIndex ) - self:T( { self.SpawnTemplatePrefix, SpawnIndex } ) + self:F( { self.SpawnTemplatePrefix, SpawnIndex } ) if not SpawnIndex then SpawnIndex = 1 @@ -9746,7 +10038,7 @@ end -- Uses @{DATABASE} global object defined in MOOSE. -- @return GROUP#GROUP The group that was spawned. You can use this group for further actions. function SPAWN:SpawnWithIndex( SpawnIndex ) - self:T( { self.SpawnTemplatePrefix, SpawnIndex, self.SpawnMaxGroups } ) + self:F( { self.SpawnTemplatePrefix, SpawnIndex, self.SpawnMaxGroups } ) if self:_GetSpawnIndex( SpawnIndex ) then @@ -9786,7 +10078,7 @@ end -- -- Between these two values, a random amount of seconds will be choosen for each new spawn of the helicopters. -- Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 ) function SPAWN:SpawnScheduled( SpawnTime, SpawnTimeVariation ) - self:T( { SpawnTime, SpawnTimeVariation } ) + self:F( { SpawnTime, SpawnTimeVariation } ) self.SpawnCurrentTimer = 0 -- The internal timer counter to trigger a scheduled spawning of SpawnTemplatePrefix. self.SpawnSetTimer = 0 -- The internal timer value when a scheduled spawning of SpawnTemplatePrefix occurs. @@ -9810,7 +10102,7 @@ end --- Will start the spawning scheduler. -- Note: This function is called automatically when @{#SPAWN.Scheduled} is called. function SPAWN:SpawnScheduleStart() - self:T( { self.SpawnTemplatePrefix } ) + self:F( { self.SpawnTemplatePrefix } ) --local ClientUnit = #AlivePlayerUnits() @@ -9827,7 +10119,7 @@ end --- Will stop the scheduled spawning scheduler. function SPAWN:SpawnScheduleStop() - self:T( { self.SpawnTemplatePrefix } ) + self:F( { self.SpawnTemplatePrefix } ) self.SpawnIsScheduled = false end @@ -9843,7 +10135,7 @@ end -- @return GROUP#GROUP that was spawned. -- @return #nil Nothing was spawned. function SPAWN:SpawnFromUnit( HostUnit, OuterRadius, InnerRadius, SpawnIndex ) - self:T( { self.SpawnTemplatePrefix, HostUnit, OuterRadius, InnerRadius, SpawnIndex } ) + self:F( { self.SpawnTemplatePrefix, HostUnit, OuterRadius, InnerRadius, SpawnIndex } ) if HostUnit and HostUnit:IsAlive() then -- and HostUnit:getUnit(1):inAir() == false then @@ -9858,7 +10150,7 @@ function SPAWN:SpawnFromUnit( HostUnit, OuterRadius, InnerRadius, SpawnIndex ) if SpawnTemplate then - local UnitPoint = HostUnit:GetPoint() + local UnitPoint = HostUnit:GetPointVec2() --for PointID, Point in pairs( SpawnTemplate.route.points ) do --Point.x = UnitPoint.x --Point.y = UnitPoint.y @@ -9918,7 +10210,7 @@ end -- @return GROUP#GROUP that was spawned. -- @return #nil when nothing was spawned. function SPAWN:SpawnInZone( Zone, SpawnIndex ) - self:T( { self.SpawnTemplatePrefix, Zone, SpawnIndex } ) + self:F( { self.SpawnTemplatePrefix, Zone, SpawnIndex } ) if Zone then @@ -9933,7 +10225,7 @@ function SPAWN:SpawnInZone( Zone, SpawnIndex ) if SpawnTemplate then - local ZonePoint = Zone:GetPoint() + local ZonePoint = Zone:GetPointVec2() SpawnTemplate.route.points = nil SpawnTemplate.route.points = {} @@ -9972,7 +10264,7 @@ end -- This will be similar to the uncontrolled flag setting in the ME. -- @return #SPAWN self function SPAWN:UnControlled() - self:T( { self.SpawnTemplatePrefix } ) + self:F( { self.SpawnTemplatePrefix } ) self.SpawnUnControlled = true @@ -9990,7 +10282,7 @@ end -- @param #number SpawnIndex Is the number of the Group that is to be spawned. -- @return string SpawnGroupName function SPAWN:SpawnGroupName( SpawnIndex ) - self:T( { self.SpawnTemplatePrefix, SpawnIndex } ) + self:F( { self.SpawnTemplatePrefix, SpawnIndex } ) local SpawnPrefix = self.SpawnTemplatePrefix if self.SpawnAliasPrefix then @@ -10014,7 +10306,7 @@ end -- @return GROUP#GROUP, #number The group found, the new index where the group was found. -- @return #nil, #nil When no group is found, #nil is returned. function SPAWN:GetFirstAliveGroup( SpawnCursor ) - self:T( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnCursor } ) + self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnCursor } ) for SpawnIndex = 1, self.SpawnCount do local SpawnGroup = self:GetGroupFromIndex( SpawnIndex ) @@ -10034,7 +10326,7 @@ end -- @return GROUP#GROUP, #number The group found, the new index where the group was found. -- @return #nil, #nil When no group is found, #nil is returned. function SPAWN:GetNextAliveGroup( SpawnCursor ) - self:T( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnCursor } ) + self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnCursor } ) SpawnCursor = SpawnCursor + 1 for SpawnIndex = SpawnCursor, self.SpawnCount do @@ -10050,7 +10342,7 @@ end --- Find the last alive group during runtime. function SPAWN:GetLastAliveGroup() - self:T( { self.SpawnTemplatePrefixself.SpawnAliasPrefix } ) + self:F( { self.SpawnTemplatePrefixself.SpawnAliasPrefix } ) self.SpawnIndex = self:_GetLastIndex() for SpawnIndex = self.SpawnIndex, 1, -1 do @@ -10074,7 +10366,7 @@ end -- @param #number SpawnIndex The index of the group to return. -- @return GROUP#GROUP function SPAWN:GetGroupFromIndex( SpawnIndex ) - self:T( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnIndex } ) + self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnIndex } ) if SpawnIndex then local SpawnGroup = self.SpawnGroups[SpawnIndex].Group @@ -10093,7 +10385,7 @@ end -- @return #string The prefix -- @return #nil Nothing found function SPAWN:_GetGroupIndexFromDCSUnit( DCSUnit ) - self:T( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, DCSUnit } ) + self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, DCSUnit } ) if DCSUnit and DCSUnit:getName() then local IndexString = string.match( DCSUnit:getName(), "#.*-" ):sub( 2, -2 ) @@ -10117,7 +10409,7 @@ end -- @return #string The prefix -- @return #nil Nothing found function SPAWN:_GetPrefixFromDCSUnit( DCSUnit ) - self:T( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, DCSUnit } ) + self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, DCSUnit } ) if DCSUnit and DCSUnit:getName() then local SpawnPrefix = string.match( DCSUnit:getName(), ".*#" ) @@ -10133,7 +10425,7 @@ end --- Return the group within the SpawnGroups collection with input a DCSUnit. function SPAWN:_GetGroupFromDCSUnit( DCSUnit ) - self:T( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, DCSUnit } ) + self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, DCSUnit } ) if DCSUnit then local SpawnPrefix = self:_GetPrefixFromDCSUnit( DCSUnit ) @@ -10152,8 +10444,8 @@ end --- Get the index from a given group. -- The function will search the name of the group for a #, and will return the number behind the #-mark. -function SPAWN:_GetGroupIndexFromGroup( SpawnGroup ) - self:T( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnGroup } ) +function SPAWN:GetSpawnIndexFromGroup( SpawnGroup ) + self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnGroup } ) local IndexString = string.match( SpawnGroup:GetName(), "#.*$" ):sub( 2 ) local Index = tonumber( IndexString ) @@ -10165,14 +10457,14 @@ end --- Return the last maximum index that can be used. function SPAWN:_GetLastIndex() - self:T( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix } ) + self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix } ) return self.SpawnMaxGroups end --- Initalize the SpawnGroups collection. function SPAWN:_InitializeSpawnGroups( SpawnIndex ) - self:T( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnIndex } ) + self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnIndex } ) if not self.SpawnGroups[SpawnIndex] then self.SpawnGroups[SpawnIndex] = {} @@ -10219,7 +10511,7 @@ end --- Gets the CountryID of the Group with the given SpawnPrefix function SPAWN:_GetGroupCountryID( SpawnPrefix ) - self:T( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnPrefix } ) + self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnPrefix } ) local TemplateGroup = Group.getByName( SpawnPrefix ) @@ -10234,7 +10526,7 @@ end --- Gets the Group Template from the ME environment definition. -- This method used the @{DATABASE} object, which contains ALL initial and new spawned object in MOOSE. function SPAWN:_GetTemplate( SpawnTemplatePrefix ) - self:T( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnTemplatePrefix } ) + self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnTemplatePrefix } ) local SpawnTemplate = nil @@ -10254,7 +10546,7 @@ end --- Prepares the new Group Template. function SPAWN:_Prepare( SpawnTemplatePrefix, SpawnIndex ) - self:T( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix } ) + self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix } ) local SpawnTemplate = self:_GetTemplate( SpawnTemplatePrefix ) SpawnTemplate.name = self:SpawnGroupName( SpawnIndex ) @@ -10287,7 +10579,7 @@ end -- @param #number SpawnIndex The index of the group to be spawned. -- @return #SPAWN function SPAWN:_RandomizeRoute( SpawnIndex ) - self:T( { self.SpawnTemplatePrefix, SpawnIndex, self.SpawnRandomizeRoute, self.SpawnRandomizeRouteStartPoint, self.SpawnRandomizeRouteEndPoint, self.SpawnRandomizeRouteRadius } ) + self:F( { self.SpawnTemplatePrefix, SpawnIndex, self.SpawnRandomizeRoute, self.SpawnRandomizeRouteStartPoint, self.SpawnRandomizeRouteEndPoint, self.SpawnRandomizeRouteRadius } ) if self.SpawnRandomizeRoute then local SpawnTemplate = self.SpawnGroups[SpawnIndex].SpawnTemplate @@ -10308,7 +10600,7 @@ end function SPAWN:_RandomizeTemplate( SpawnIndex ) - self:T( { self.SpawnTemplatePrefix, SpawnIndex } ) + self:F( { self.SpawnTemplatePrefix, SpawnIndex } ) if self.SpawnRandomizeTemplate then self.SpawnGroups[SpawnIndex].SpawnTemplatePrefix = self.SpawnTemplatePrefixTable[ math.random( 1, #self.SpawnTemplatePrefixTable ) ] @@ -10327,7 +10619,7 @@ function SPAWN:_RandomizeTemplate( SpawnIndex ) end function SPAWN:_TranslateRotate( SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle ) - self:T( { self.SpawnTemplatePrefix, SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle } ) + self:F( { self.SpawnTemplatePrefix, SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle } ) -- Translate local TranslatedX = SpawnX @@ -10371,7 +10663,7 @@ end --- Get the next index of the groups to be spawned. This function is complicated, as it is used at several spaces. function SPAWN:_GetSpawnIndex( SpawnIndex ) - self:T( { self.SpawnTemplatePrefix, SpawnIndex, self.SpawnMaxGroups, self.SpawnMaxUnitsAlive, self.AliveUnits, #self.SpawnTemplate.units } ) + self:F( { self.SpawnTemplatePrefix, SpawnIndex, self.SpawnMaxGroups, self.SpawnMaxUnitsAlive, self.AliveUnits, #self.SpawnTemplate.units } ) if ( self.SpawnMaxGroups == 0 ) or ( SpawnIndex <= self.SpawnMaxGroups ) then @@ -10458,7 +10750,7 @@ function SPAWN:_OnLand( event ) self.Landed = true self:T( "self.Landed = true" ) if self.Landed and self.RepeatOnLanding then - local SpawnGroupIndex = self:_GetGroupIndexFromGroup( SpawnGroup ) + local SpawnGroupIndex = self:GetSpawnIndexFromGroup( SpawnGroup ) self:T( { "Landed:", "ReSpawn:", SpawnGroup:GetName(), SpawnGroupIndex } ) self:ReSpawn( SpawnGroupIndex ) end @@ -10479,7 +10771,7 @@ function SPAWN:_OnLand( event ) if SpawnGroup then self:T( { "EngineShutDown event: " .. event.initiator:getName(), event } ) if self.Landed and self.RepeatOnEngineShutDown then - local SpawnGroupIndex = self:_GetGroupIndexFromGroup( SpawnGroup ) + local SpawnGroupIndex = self:GetSpawnIndexFromGroup( SpawnGroup ) self:T( { "EngineShutDown: ", "ReSpawn:", SpawnGroup:GetName(), SpawnGroupIndex } ) self:ReSpawn( SpawnGroupIndex ) end @@ -10490,7 +10782,7 @@ end --- This function is called automatically by the Spawning scheduler. -- It is the internal worker method SPAWNing new Groups on the defined time intervals. function SPAWN:_Scheduler() -self:T( { "_Scheduler", self.SpawnTemplatePrefix, self.SpawnAliasPrefix, self.SpawnIndex, self.SpawnMaxGroups, self.SpawnMaxUnitsAlive } ) + self:F( { "_Scheduler", self.SpawnTemplatePrefix, self.SpawnAliasPrefix, self.SpawnIndex, self.SpawnMaxGroups, self.SpawnMaxUnitsAlive } ) if self.SpawnInit or self.SpawnCurrentTimer == self.SpawnSetTimer then -- Validate if there are still groups left in the batch... @@ -10508,7 +10800,7 @@ self:T( { "_Scheduler", self.SpawnTemplatePrefix, self.SpawnAliasPrefix, self.Sp end function SPAWN:_SpawnCleanUpScheduler() - self:T( { "CleanUp Scheduler:", self.SpawnTemplatePrefix } ) + self:F( { "CleanUp Scheduler:", self.SpawnTemplatePrefix } ) local SpawnCursor local SpawnGroup, SpawnCursor = self:GetFirstAliveGroup( SpawnCursor ) @@ -10562,7 +10854,7 @@ MOVEMENT = { function MOVEMENT:New( MovePrefixes, MoveMaximum ) local self = BASE:Inherit( self, BASE:New() ) - self:T( { MovePrefixes, MoveMaximum } ) + self:F( { MovePrefixes, MoveMaximum } ) if type( MovePrefixes ) == 'table' then self.MovePrefixes = MovePrefixes @@ -10587,21 +10879,21 @@ end --- Call this function to start the MOVEMENT scheduling. function MOVEMENT:ScheduleStart() -self:T() + self:F() self.MoveFunction = routines.scheduleFunction( self._Scheduler, { self }, timer.getTime() + 1, 120 ) end --- Call this function to stop the MOVEMENT scheduling. -- @todo need to implement it ... Forgot. function MOVEMENT:ScheduleStop() -self:T() + self:F() end --- Captures the birth events when new Units were spawned. -- @todo This method should become obsolete. The new @{DATABASE} class will handle the collection administration. function MOVEMENT:OnBirth( event ) -self:T( { event } ) + self:F( { event } ) if timer.getTime0() < timer.getAbsTime() then -- dont need to add units spawned in at the start of the mission if mist is loaded in init line if event.initiator and Object.getCategory(event.initiator) == Object.Category.UNIT then @@ -10627,7 +10919,7 @@ end --- Captures the Dead or Crash events when Units crash or are destroyed. -- @todo This method should become obsolete. The new @{DATABASE} class will handle the collection administration. function MOVEMENT:OnDeadOrCrash( event ) -self:T( { event } ) + self:F( { event } ) if event.initiator and Object.getCategory(event.initiator) == Object.Category.UNIT then local MovementUnit = event.initiator @@ -10645,7 +10937,7 @@ end --- This function is called automatically by the MOVEMENT scheduler. A new function is scheduled when MoveScheduled is true. function MOVEMENT:_Scheduler() -self:T( { self.MovePrefixes, self.MoveMaximum, self.AliveUnits, self.MovementGroups } ) + self:F( { self.MovePrefixes, self.MoveMaximum, self.AliveUnits, self.MovementGroups } ) if self.AliveUnits > 0 then local MoveProbability = ( self.MoveMaximum * 100 ) / self.AliveUnits @@ -10670,7 +10962,7 @@ self:T( { self.MovePrefixes, self.MoveMaximum, self.AliveUnits, self.MovementGro end end --- Provides defensive behaviour to a set of SAM sites within a running Mission. --- @module SEAD +-- @module Sead -- @author to be searched on the forum -- @author (co) Flightcontrol (Modified and enriched with functionality) @@ -10681,7 +10973,8 @@ Include.File( "Client" ) Include.File( "Task" ) --- The SEAD class --- @type +-- @type SEAD +-- @extends Base#BASE SEAD = { ClassName = "SEAD", TargetSkill = { @@ -10704,7 +10997,7 @@ SEAD = { -- SEAD_RU_SAM_Defenses = SEAD:New( { 'RU SA-6 Kub', 'RU SA-6 Defenses', 'RU MI-26 Troops', 'RU Attack Gori' } ) function SEAD:New( SEADGroupPrefixes ) local self = BASE:Inherit( self, BASE:New() ) - self:T( SEADGroupPrefixes ) + self:F( SEADGroupPrefixes ) if type( SEADGroupPrefixes ) == 'table' then for SEADGroupPrefixID, SEADGroupPrefix in pairs( SEADGroupPrefixes ) do self.SEADGroupPrefixes[SEADGroupPrefix] = SEADGroupPrefix @@ -10721,7 +11014,7 @@ end --- Detects if an SA site was shot with an anti radiation missile. In this case, take evasive actions based on the skill level set within the ME. -- @see SEAD function SEAD:EventShot( event ) -self:T( { event } ) + self:F( { event } ) local SEADUnit = event.initiator local SEADUnitName = SEADUnit:getName() @@ -10805,3 +11098,257 @@ self:T( { event } ) end end end +--- Taking the lead of AI escorting your flight. +-- The ESCORT class allows you to interact with escoring AI on your flight and take the lead. +-- The following commands will be available: +-- +-- * Pop-up and Scan Area +-- * Re-Join Formation +-- * Hold Position in x km +-- * Report identified targets +-- * Perform tasks per identified target: Report vector to target, paint target, kill target +-- +-- @module ESCORT +-- @author FlightControl + +Include.File( "Routines" ) +Include.File( "Base" ) +Include.File( "Database" ) +Include.File( "Group" ) +Include.File( "Zone" ) + +--- ESCORT class +-- @type +-- +ESCORT = { + ClassName = "ESCORT", + EscortName = nil, -- The Escort Name + Targets = {}, -- The identified targets +} + +--- ESCORT class constructor for an AI group +-- @param self +-- @param #CLIENT EscortClient The client escorted by the EscortGroup. +-- @param #GROUP EscortGroup The group AI escorting the EscortClient. +-- @param #string EscortName Name of the escort. +-- @return #ESCORT self +function ESCORT:New( EscortClient, EscortGroup, EscortName ) + local self = BASE:Inherit( self, BASE:New() ) + self:F( { EscortClient, EscortGroup, EscortName } ) + + self.EscortClient = EscortClient + self.EscortGroup = EscortGroup + self.EscortName = EscortName + self.ReportTargets = true + + -- Escort Navigation + self.EscortMenu = MENU_CLIENT:New( self.EscortClient, "Escort" .. self.EscortName ) + self.EscortMenuHoldPosition = MENU_CLIENT_COMMAND:New( self.EscortClient, "Hold Position and Stay Low", self.EscortMenu, ESCORT._HoldPosition, { ParamSelf = self } ) + + -- Report Targets + self.EscortMenuReportNearbyTargets = MENU_CLIENT:New( self.EscortClient, "Report Targets", self.EscortMenu ) + self.EscortMenuReportNearbyTargetsOn = MENU_CLIENT_COMMAND:New( self.EscortClient, "Report Targets On", self.EscortMenuReportNearbyTargets, ESCORT._ReportNearbyTargets, { ParamSelf = self, ParamReportTargets = true } ) + self.EscortMenuReportNearbyTargetsOff = MENU_CLIENT_COMMAND:New( self.EscortClient, "Report Targets Off", self.EscortMenuReportNearbyTargets, ESCORT._ReportNearbyTargets, { ParamSelf = self, ParamReportTargets = false, } ) + + -- Attack Targets + self.EscortMenuAttackNearbyTargets = MENU_CLIENT:New( self.EscortClient, "Attack nearby targets", self.EscortMenu ) + self.EscortMenuAttackTargets = {} + self.Targets = {} + + -- Rules of Engagement + self.EscortMenuROE = MENU_CLIENT:New( self.EscortClient, "ROE", self.EscortMenu ) + self.EscortMenuROEHoldFire = MENU_CLIENT_COMMAND:New( self.EscortClient, "Hold Fire", self.EscortMenuROE, ESCORT._ROEHoldFire, { ParamSelf = self, } ) + self.EscortMenuROEReturnFire = MENU_CLIENT_COMMAND:New( self.EscortClient, "Return Fire", self.EscortMenuROE, ESCORT._ROEReturnFire, { ParamSelf = self, } ) + self.EscortMenuROEOpenFire = MENU_CLIENT_COMMAND:New( self.EscortClient, "Open Fire", self.EscortMenuROE, ESCORT._ROEOpenFire, { ParamSelf = self, } ) + self.EscortMenuROEWeaponFree = MENU_CLIENT_COMMAND:New( self.EscortClient, "Weapon Free", self.EscortMenuROE, ESCORT._ROEWeaponFree, { ParamSelf = self, } ) + + -- Reaction to Threats + self.EscortMenuEvasion = MENU_CLIENT:New( self.EscortClient, "Evasion", self.EscortMenu ) + self.EscortMenuEvasionNoReaction = MENU_CLIENT_COMMAND:New( self.EscortClient, "Fight until death", self.EscortMenuEvasion, ESCORT._EvasionNoReaction, { ParamSelf = self, } ) + self.EscortMenuEvasionPassiveDefense = MENU_CLIENT_COMMAND:New( self.EscortClient, "Use flares, chaff and jammers", self.EscortMenuEvasion, ESCORT._EvasionPassiveDefense, { ParamSelf = self, } ) + self.EscortMenuEvasionEvadeFire = MENU_CLIENT_COMMAND:New( self.EscortClient, "Evade enemy fire", self.EscortMenuEvasion, ESCORT._EvasionEvadeFire, { ParamSelf = self, } ) + self.EscortMenuOptionEvasionVertical = MENU_CLIENT_COMMAND:New( self.EscortClient, "Go below radar and evade fire", self.EscortMenuEvasion, ESCORT._OptionEvasionVertical, { ParamSelf = self, } ) + + + self.ScanForTargetsFunction = routines.scheduleFunction( self._ScanForTargets, { self }, timer.getTime() + 1, 30 ) +end + +function ESCORT._HoldPosition( MenuParam ) + + MenuParam.ParamSelf.EscortGroup:TaskHoldPosition( 300 ) + MESSAGE:New( "Holding Position at ... for 5 minutes.", MenuParam.ParamSelf.EscortName, 10, "ESCORT/TaskHoldPosition" ):ToClient( MenuParam.ParamSelf.EscortClient ) +end + +function ESCORT._ReportNearbyTargets( MenuParam ) + MenuParam.ParamSelf:T() + + MenuParam.ParamSelf.ReportTargets = MenuParam.ParamReportTargets + +end + +function ESCORT._AttackTarget( MenuParam ) + + MenuParam.ParamSelf.EscortGroup:AttackUnit( MenuParam.ParamUnit ) + MESSAGE:New( "Attacking Unit", MenuParam.ParamSelf.EscortName, 10, "ESCORT/AttackUnit" ):ToClient( MenuParam.ParamSelf.EscortClient ) +end + +function ESCORT._ROEHoldFire( MenuParam ) + + MenuParam.ParamSelf.EscortGroup:OptionROEHoldFire() + MESSAGE:New( "Holding weapons.", MenuParam.ParamSelf.EscortName, 10, "ESCORT/AttackUnit" ):ToClient( MenuParam.ParamSelf.EscortClient ) +end + +function ESCORT._ROEReturnFire( MenuParam ) + + MenuParam.ParamSelf.EscortGroup:OptionROEReturnFire() + MESSAGE:New( "Returning enemy fire.", MenuParam.ParamSelf.EscortName, 10, "ESCORT/AttackUnit" ):ToClient( MenuParam.ParamSelf.EscortClient ) +end + +function ESCORT._ROEOpenFire( MenuParam ) + + MenuParam.ParamSelf.EscortGroup:OptionROEOpenFire() + MESSAGE:New( "Open fire on ordered targets.", MenuParam.ParamSelf.EscortName, 10, "ESCORT/AttackUnit" ):ToClient( MenuParam.ParamSelf.EscortClient ) +end + +function ESCORT._ROEWeaponFree( MenuParam ) + + MenuParam.ParamSelf.EscortGroup:OptionROEWeaponFree() + MESSAGE:New( "Engaging targets.", MenuParam.ParamSelf.EscortName, 10, "ESCORT/AttackUnit" ):ToClient( MenuParam.ParamSelf.EscortClient ) +end + +function ESCORT._EvasionNoReaction( MenuParam ) + + MenuParam.ParamSelf.EscortGroup:OptionEvasionNoReaction() + MESSAGE:New( "We'll fight until death.", MenuParam.ParamSelf.EscortName, 10, "ESCORT/AttackUnit" ):ToClient( MenuParam.ParamSelf.EscortClient ) +end + +function ESCORT._EvasionPassiveDefense( MenuParam ) + + MenuParam.ParamSelf.EscortGroup:OptionROTPassiveDefense() + MESSAGE:New( "We will use flares, chaff and jammers.", MenuParam.ParamSelf.EscortName, 10, "ESCORT/AttackUnit" ):ToClient( MenuParam.ParamSelf.EscortClient ) +end + +function ESCORT._EvasionEvadeFire( MenuParam ) + + MenuParam.ParamSelf.EscortGroup:OptionROTEvadeFire() + MESSAGE:New( "We'll evade enemy fire.", MenuParam.ParamSelf.EscortName, 10, "ESCORT/AttackUnit" ):ToClient( MenuParam.ParamSelf.EscortClient ) +end + +function ESCORT._OptionEvasionVertical( MenuParam ) + + MenuParam.ParamSelf.EscortGroup:OptionROTVertical() + MESSAGE:New( "We'll perform vertical evasive manoeuvres.", MenuParam.ParamSelf.EscortName, 10, "ESCORT/AttackUnit" ):ToClient( MenuParam.ParamSelf.EscortClient ) +end + + +function ESCORT:_ScanForTargets() + self:F() + + self.Targets = {} + + if self.EscortGroup:IsAlive() then + local EscortTargets = self.EscortGroup:GetDetectedTargets() + + local EscortTargetMessages = "" + for EscortTargetID, EscortTarget in pairs( EscortTargets ) do + local EscortObject = EscortTarget.object + self:T( EscortObject ) + if EscortObject and EscortObject:isExist() and EscortObject.id_ < 50000000 then + + local EscortTargetMessage = "" + + local EscortTargetUnit = UNIT:New( EscortObject ) + + local EscortTargetCategoryName = EscortTargetUnit:GetCategoryName() + local EscortTargetCategoryType = EscortTargetUnit:GetTypeName() + + + -- local EscortTargetIsDetected, + -- EscortTargetIsVisible, + -- EscortTargetLastTime, + -- EscortTargetKnowType, + -- EscortTargetKnowDistance, + -- EscortTargetLastPos, + -- EscortTargetLastVelocity + -- = self.EscortGroup:IsTargetDetected( EscortObject ) + -- + -- self:T( { EscortTargetIsDetected, + -- EscortTargetIsVisible, + -- EscortTargetLastTime, + -- EscortTargetKnowType, + -- EscortTargetKnowDistance, + -- EscortTargetLastPos, + -- EscortTargetLastVelocity } ) + + if EscortTarget.distance then + local EscortTargetUnitPositionVec3 = EscortTargetUnit:GetPositionVec3() + local EscortPositionVec3 = self.EscortGroup:GetPositionVec3() + local Distance = routines.utils.get3DDist( EscortTargetUnitPositionVec3, EscortPositionVec3 ) / 1000 + self:T( { self.EscortGroup:GetName(), EscortTargetUnit:GetName(), Distance, EscortTarget.visible } ) + + if Distance <= 8 then + + if EscortTarget.type then + EscortTargetMessage = EscortTargetMessage .. " - " .. EscortTargetCategoryName .. " (" .. EscortTargetCategoryType .. ") at " + else + EscortTargetMessage = EscortTargetMessage .. " - Unknown target at " + end + + EscortTargetMessage = EscortTargetMessage .. string.format( "%.2f", Distance ) .. " km" + + if EscortTarget.visible then + EscortTargetMessage = EscortTargetMessage .. ", visual" + end + + local TargetIndex = Distance*1000 + self.Targets[TargetIndex] = {} + self.Targets[TargetIndex].AttackMessage = EscortTargetMessage + self.Targets[TargetIndex].AttackUnit = EscortTargetUnit + end + end + + if EscortTargetMessage ~= "" then + EscortTargetMessages = EscortTargetMessages .. EscortTargetMessage .. "\n" + end + end + end + + if EscortTargetMessages ~= "" and self.ReportTargets == true then + self.EscortClient:Message( EscortTargetMessages:gsub("\n$",""), 20, "/ESCORT.DetectedTargets", self.EscortName .. " reporting detected targets within 8 km range:", 0 ) + end + + self:T() + + self:T( { "Sorting Targets Table:", self.Targets } ) + table.sort( self.Targets ) + self:T( { "Sorted Targets Table:", self.Targets } ) + + for MenuIndex = 1, #self.EscortMenuAttackTargets do + self:T( { "Remove Menu:", self.EscortMenuAttackTargets[MenuIndex] } ) + self.EscortMenuAttackTargets[MenuIndex] = self.EscortMenuAttackTargets[MenuIndex]:Remove() + end + + local MenuIndex = 1 + for TargetID, TargetData in pairs( self.Targets ) do + self:T( { "Adding menu:", TargetID, "for Unit", self.Targets[TargetID].AttackUnit } ) + if MenuIndex <= 10 then + self.EscortMenuAttackTargets[MenuIndex] = + MENU_CLIENT_COMMAND:New( self.EscortClient, + self.Targets[TargetID].AttackMessage, + self.EscortMenuAttackNearbyTargets, + ESCORT._AttackTarget, + { ParamSelf = self, + ParamUnit = self.Targets[TargetID].AttackUnit + } + ) + self:T( { "New Menu:", self.EscortMenuAttackTargets[TargetID] } ) + MenuIndex = MenuIndex + 1 + else + break + end + end + + else + routines.removeFunction( self.ScanForTargetsFunction ) + end +end diff --git a/Loaders/MOOSE-Template.miz b/Loaders/MOOSE-Template.miz new file mode 100644 index 000000000..108e949f1 Binary files /dev/null and b/Loaders/MOOSE-Template.miz differ diff --git a/Moose/Base.lua b/Moose/Base.lua index 3fab73c90..268156f5c 100644 --- a/Moose/Base.lua +++ b/Moose/Base.lua @@ -1,11 +1,12 @@ --- BASE The base class for all the classes defined within MOOSE. --- @module BASE +-- @module Base -- @author Flightcontrol Include.File( "Routines" ) -_TraceOn = true -_TraceClass = { +local _TraceOn = true +local _TraceLevel = 1 +local _TraceClass = { --DATABASE = true, --SEAD = true, --DESTROYBASETASK = true, @@ -15,13 +16,16 @@ _TraceClass = { --ZONE = true, --GROUP = true, --UNIT = true, - --CLIENT = true, + --CLIENT = true, --CARGO = true, --CARGO_GROUP = true, --CARGO_PACKAGE = true, --CARGO_SLINGLOAD = true, --CARGO_ZONE = true, --CLEANUP = true, + --MENU_CLIENT = true, + --MENU_CLIENT_COMMAND = true, + --ESCORT = true, } --- The BASE Class @@ -48,7 +52,6 @@ FORMATION = { -- @return #BASE -- @usage -- function TASK:New() --- trace.f(self.ClassName) -- -- local self = BASE:Inherit( self, BASE:New() ) -- @@ -97,8 +100,31 @@ function BASE:Inherited( Child ) return Parent end +--- Get the ClassName + ClassID of the class instance. +-- The ClassName + ClassID is formatted as '%s#%09d'. +-- @param #BASE self +-- @return #string The ClassName + ClassID of the class instance. +function BASE:GetClassNameAndID() + return string.format( '%s#%09d', self:GetClassName(), self:GetClassID() ) +end + +--- Get the ClassName of the class instance. +-- @param #BASE self +-- @return #string The ClassName of the class instance. +function BASE:GetClassName() + return self.ClassName +end + +--- Get the ClassID of the class instance. +-- @param #BASE self +-- @return #string The ClassID of the class instance. +function BASE:GetClassID() + return self.ClassID +end + + function BASE:AddEvent( Event, EventFunction ) -trace.f( self.ClassName, Event ) + self:F( Event ) self.Events[#self.Events+1] = {} self.Events[#self.Events].Event = Event @@ -110,22 +136,20 @@ end function BASE:EnableEvents() -trace.f( self.ClassName ) + self:F( #self.Events ) - trace.i( self.ClassName, #self.Events ) for EventID, Event in pairs( self.Events ) do Event.Self = self Event.EventEnabled = true end - --env.info( 'EnableEvent Table Task = ' .. tostring(self) ) self.Events.Handler = world.addEventHandler( self ) return self end function BASE:DisableEvents() -trace.f( self.ClassName ) - + self:F() + world.removeEventHandler( self ) for EventID, Event in pairs( self.Events ) do Event.Self = nil @@ -136,7 +160,7 @@ trace.f( self.ClassName ) end -BaseEventCodes = { +local BaseEventCodes = { "S_EVENT_SHOT", "S_EVENT_HIT", "S_EVENT_TAKEOFF", @@ -176,7 +200,7 @@ BaseEventCodes = { function BASE:CreateEventBirth( EventTime, Initiator, IniUnitName, place, subplace ) -trace.f( self.ClassName, { EventTime, Initiator, IniUnitName, place, subplace } ) + self:F( { EventTime, Initiator, IniUnitName, place, subplace } ) local Event = { id = world.event.S_EVENT_BIRTH, @@ -191,7 +215,7 @@ trace.f( self.ClassName, { EventTime, Initiator, IniUnitName, place, subplace } end function BASE:CreateEventCrash( EventTime, Initiator ) -trace.f( self.ClassName, { EventTime, Initiator } ) + self:F( { EventTime, Initiator } ) local Event = { id = world.event.S_EVENT_CRASH, @@ -203,7 +227,6 @@ trace.f( self.ClassName, { EventTime, Initiator } ) end function BASE:onEvent(event) ---trace.f(self.ClassName, event ) --env.info( 'onEvent Table self = ' .. tostring(self) ) if self then @@ -220,7 +243,7 @@ function BASE:onEvent(event) if event.target and event.target:isExist() then event.TgtUnitName = event.target:getName() end - trace.i( self.ClassName, { BaseEventCodes[event.id], event } ) + self:T( { BaseEventCodes[event.id], event } ) EventObject.EventFunction( self, event ) end end @@ -233,6 +256,45 @@ end -- Trace section -- Log a trace (only shown when trace is on) +-- TODO: Make trace function using variable parameters. + +function BASE:F( Arguments ) + + if _TraceOn and _TraceClass[self.ClassName] then + + local DebugInfoCurrent = debug.getinfo( 2, "nl" ) + local DebugInfoFrom = debug.getinfo( 3, "l" ) + + local Function = "function" + if DebugInfoCurrent.name then + Function = DebugInfoCurrent.name + end + + local LineCurrent = DebugInfoCurrent.currentline + local LineFrom = 0 + if DebugInfoFrom then + LineFrom = DebugInfoFrom.currentline + end + env.info( string.format( "%6d\(%6d\)/%1s:%20s%05d.%s\(%s\)" , LineCurrent, LineFrom, "F", self.ClassName, self.ClassID, Function, routines.utils.oneLineSerialize( Arguments ) ) ) + end +end + +function BASE:F2( Arguments ) + + if _TraceLevel >= 2 then + self:F( Arguments ) + end + +end + +function BASE:F3( Arguments ) + + if _TraceLevel >= 3 then + self:F( Arguments ) + end + +end + function BASE:T( Arguments ) if _TraceOn and _TraceClass[self.ClassName] then @@ -246,12 +308,31 @@ function BASE:T( Arguments ) end local LineCurrent = DebugInfoCurrent.currentline - local LineFrom = DebugInfoFrom.currentline - - env.info( string.format( "%6d\(%6d\)/%1s:%20s%05d.%s\(%s\)" , LineCurrent, LineFrom, "T", self.ClassName, self.ClassID, Function, routines.utils.oneLineSerialize( Arguments ) ) ) + local LineFrom = 0 + if DebugInfoFrom then + LineFrom = DebugInfoFrom.currentline + end + env.info( string.format( "%6d\(%6d\)/%1s:%20s%05d.%s" , LineCurrent, LineFrom, "T", self.ClassName, self.ClassID, routines.utils.oneLineSerialize( Arguments ) ) ) end end +function BASE:T2( Arguments ) + + if _TraceLevel >= 2 then + self:T( Arguments ) + end + +end + +function BASE:T3( Arguments ) + + if _TraceLevel >= 3 then + self:T( Arguments ) + end + +end + + -- Log an exception function BASE:E( Arguments ) @@ -269,3 +350,6 @@ function BASE:E( Arguments ) env.info( string.format( "%6d\(%6d\)/%1s:%20s%05d.%s\(%s\)" , LineCurrent, LineFrom, "E", self.ClassName, self.ClassID, Function, routines.utils.oneLineSerialize( Arguments ) ) ) end + + + diff --git a/Moose/Cargo.lua b/Moose/Cargo.lua index c243f17ad..3d843e7a8 100644 --- a/Moose/Cargo.lua +++ b/Moose/Cargo.lua @@ -32,7 +32,7 @@ CARGO_ZONE = { } function CARGO_ZONE:New( CargoZoneName, CargoHostName ) local self = BASE:Inherit( self, BASE:New() ) -self:T( { CargoZoneName, CargoHostName } ) + self:F( { CargoZoneName, CargoHostName } ) self.CargoZoneName = CargoZoneName self.CargoZone = trigger.misc.getZone( CargoZoneName ) @@ -48,7 +48,7 @@ self:T( { CargoZoneName, CargoHostName } ) end function CARGO_ZONE:Spawn() - self:T( self.CargoHostName ) + self:F( self.CargoHostName ) if self.CargoHostSpawn then local CargoHostGroup = self.CargoHostSpawn:GetGroupFromIndex() @@ -66,7 +66,7 @@ function CARGO_ZONE:Spawn() end function CARGO_ZONE:GetHostUnit() - self:T( self ) + self:F( self ) if self.CargoHostName then @@ -86,7 +86,7 @@ function CARGO_ZONE:GetHostUnit() end function CARGO_ZONE:ReportCargosToClient( Client, CargoType ) -self:T() + self:F() local SignalUnit = self:GetHostUnit() @@ -115,7 +115,7 @@ self:T() end function CARGO_ZONE:Signal() -self:T() + self:F() local Signalled = false @@ -169,7 +169,7 @@ self:T() end function CARGO_ZONE:WhiteSmoke() -self:T() + self:F() self.SignalType = CARGO_ZONE.SIGNAL.TYPE.SMOKE self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.WHITE @@ -178,7 +178,7 @@ self:T() end function CARGO_ZONE:BlueSmoke() -self:T() + self:F() self.SignalType = CARGO_ZONE.SIGNAL.TYPE.SMOKE self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.BLUE @@ -187,7 +187,7 @@ self:T() end function CARGO_ZONE:RedSmoke() -self:T() + self:F() self.SignalType = CARGO_ZONE.SIGNAL.TYPE.SMOKE self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.RED @@ -196,7 +196,7 @@ self:T() end function CARGO_ZONE:OrangeSmoke() -self:T() + self:F() self.SignalType = CARGO_ZONE.SIGNAL.TYPE.SMOKE self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.ORANGE @@ -205,7 +205,7 @@ self:T() end function CARGO_ZONE:GreenSmoke() -self:T() + self:F() self.SignalType = CARGO_ZONE.SIGNAL.TYPE.SMOKE self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.GREEN @@ -215,7 +215,7 @@ end function CARGO_ZONE:WhiteFlare() -self:T() + self:F() self.SignalType = CARGO_ZONE.SIGNAL.TYPE.FLARE self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.WHITE @@ -224,7 +224,7 @@ self:T() end function CARGO_ZONE:RedFlare() -self:T() + self:F() self.SignalType = CARGO_ZONE.SIGNAL.TYPE.FLARE self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.RED @@ -233,7 +233,7 @@ self:T() end function CARGO_ZONE:GreenFlare() -self:T() + self:F() self.SignalType = CARGO_ZONE.SIGNAL.TYPE.FLARE self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.GREEN @@ -242,7 +242,7 @@ self:T() end function CARGO_ZONE:YellowFlare() -self:T() + self:F() self.SignalType = CARGO_ZONE.SIGNAL.TYPE.FLARE self.SignalColor = CARGO_ZONE.SIGNAL.COLOR.YELLOW @@ -252,7 +252,7 @@ end function CARGO_ZONE:GetCargoHostUnit() - self:T( self ) + self:F( self ) if self.CargoHostSpawn then local CargoHostGroup = self.CargoHostSpawn:GetGroupFromIndex(1) @@ -268,7 +268,7 @@ function CARGO_ZONE:GetCargoHostUnit() end function CARGO_ZONE:GetCargoZoneName() -self:T() + self:F() return self.CargoZoneName end @@ -286,7 +286,7 @@ CARGO = { --- Add Cargo to the mission... Cargo functionality needs to be reworked a bit, so this is still under construction. I need to make a CARGO Class... function CARGO:New( CargoType, CargoName, CargoWeight ) local self = BASE:Inherit( self, BASE:New() ) -self:T( { CargoType, CargoName, CargoWeight } ) + self:F( { CargoType, CargoName, CargoWeight } ) self.CargoType = CargoType @@ -299,14 +299,14 @@ self:T( { CargoType, CargoName, CargoWeight } ) end function CARGO:Spawn( Client ) - self:T() + self:F() return self end function CARGO:IsNear( Client, LandingZone ) -self:T() + self:F() local Near = true @@ -316,7 +316,7 @@ end function CARGO:IsLoadingToClient() -self:T() + self:F() if self:IsStatusLoading() then return self.CargoClient @@ -328,7 +328,7 @@ end function CARGO:IsLoadedInClient() -self:T() + self:F() if self:IsStatusLoaded() then return self.CargoClient @@ -340,7 +340,7 @@ end function CARGO:UnLoad( Client, TargetZoneName ) -self:T() + self:F() self:StatusUnLoaded() @@ -348,7 +348,7 @@ self:T() end function CARGO:OnBoard( Client, LandingZone ) -self:T() + self:F() local Valid = true @@ -359,7 +359,7 @@ self:T() end function CARGO:OnBoarded( Client, LandingZone ) -self:T() + self:F() local OnBoarded = true @@ -367,7 +367,7 @@ self:T() end function CARGO:Load( Client ) -self:T() + self:F() self:StatusLoaded( Client ) @@ -375,18 +375,18 @@ self:T() end function CARGO:IsLandingRequired() -self:T() + self:F() return true end function CARGO:IsSlingLoad() -self:T() + self:F() return false end function CARGO:StatusNone() -self:T() + self:F() self.CargoClient = nil self.CargoStatus = CARGO.STATUS.NONE @@ -395,7 +395,7 @@ self:T() end function CARGO:StatusLoading( Client ) -self:T() + self:F() self.CargoClient = Client self.CargoStatus = CARGO.STATUS.LOADING @@ -405,7 +405,7 @@ self:T() end function CARGO:StatusLoaded( Client ) -self:T() + self:F() self.CargoClient = Client self.CargoStatus = CARGO.STATUS.LOADED @@ -415,7 +415,7 @@ self:T() end function CARGO:StatusUnLoaded() -self:T() + self:F() self.CargoClient = nil self.CargoStatus = CARGO.STATUS.UNLOADED @@ -425,25 +425,25 @@ end function CARGO:IsStatusNone() -self:T() + self:F() return self.CargoStatus == CARGO.STATUS.NONE end function CARGO:IsStatusLoading() -self:T() + self:F() return self.CargoStatus == CARGO.STATUS.LOADING end function CARGO:IsStatusLoaded() -self:T() + self:F() return self.CargoStatus == CARGO.STATUS.LOADED end function CARGO:IsStatusUnLoaded() -self:T() + self:F() return self.CargoStatus == CARGO.STATUS.UNLOADED end @@ -455,7 +455,7 @@ CARGO_GROUP = { function CARGO_GROUP:New( CargoType, CargoName, CargoWeight, CargoGroupTemplate, CargoZone ) local self = BASE:Inherit( self, CARGO:New( CargoType, CargoName, CargoWeight ) ) - self:T( { CargoType, CargoName, CargoWeight, CargoGroupTemplate, CargoZone } ) + self:F( { CargoType, CargoName, CargoWeight, CargoGroupTemplate, CargoZone } ) self.CargoSpawn = SPAWN:NewWithAlias( CargoGroupTemplate, CargoName ) self.CargoZone = CargoZone @@ -467,7 +467,7 @@ function CARGO_GROUP:New( CargoType, CargoName, CargoWeight, CargoGroupTemplate, end function CARGO_GROUP:Spawn( Client ) - self:T( { Client } ) + self:F( { Client } ) local SpawnCargo = true @@ -480,7 +480,7 @@ function CARGO_GROUP:Spawn( Client ) elseif self:IsStatusLoading() then local Client = self:IsLoadingToClient() - if Client and Client:ClientGroup() then + if Client and Client:GetDCSGroup() then SpawnCargo = false else local CargoGroup = Group.getByName( self.CargoName ) @@ -494,7 +494,7 @@ function CARGO_GROUP:Spawn( Client ) local ClientLoaded = self:IsLoadedInClient() -- Now test if another Client is alive (not this one), and it has the CARGO, then this cargo does not need to be initialized and spawned. if ClientLoaded and ClientLoaded ~= Client then - local ClientGroup = Client:ClientGroup() + local ClientGroup = Client:GetDCSGroup() if ClientLoaded:GetClientGroupDCSUnit() and ClientLoaded:GetClientGroupDCSUnit():isExist() then SpawnCargo = false else @@ -528,7 +528,7 @@ function CARGO_GROUP:Spawn( Client ) end function CARGO_GROUP:IsNear( Client, LandingZone ) -self:T() + self:F() local Near = false @@ -545,7 +545,7 @@ end function CARGO_GROUP:OnBoard( Client, LandingZone, OnBoardSide ) -self:T() + self:F() local Valid = true @@ -624,7 +624,7 @@ end function CARGO_GROUP:OnBoarded( Client, LandingZone ) -self:T() + self:F() local OnBoarded = false @@ -640,7 +640,7 @@ end function CARGO_GROUP:UnLoad( Client, TargetZoneName ) -self:T() + self:F() self:T( 'self.CargoName = ' .. self.CargoName ) @@ -663,8 +663,7 @@ CARGO_PACKAGE = { function CARGO_PACKAGE:New( CargoType, CargoName, CargoWeight, CargoClient ) local self = BASE:Inherit( self, CARGO:New( CargoType, CargoName, CargoWeight ) ) - - self:T( { CargoType, CargoName, CargoWeight, CargoClient } ) + self:F( { CargoType, CargoName, CargoWeight, CargoClient } ) self.CargoClient = CargoClient @@ -676,11 +675,11 @@ end function CARGO_PACKAGE:Spawn( Client ) - self:T( { self, Client } ) + self:F( { self, Client } ) -- this needs to be checked thoroughly - local CargoClientGroup = self.CargoClient:ClientGroup() + local CargoClientGroup = self.CargoClient:GetDCSGroup() if not CargoClientGroup then if not self.CargoClientSpawn then self.CargoClientSpawn = SPAWN:New( self.CargoClient:GetClientGroupName() ):Limit( 1, 1 ) @@ -695,7 +694,7 @@ function CARGO_PACKAGE:Spawn( Client ) elseif self:IsStatusLoading() or self:IsStatusLoaded() then local CargoClientLoaded = self:IsLoadedInClient() - if CargoClientLoaded and CargoClientLoaded:ClientGroup() then + if CargoClientLoaded and CargoClientLoaded:GetDCSGroup() then SpawnCargo = false end @@ -716,11 +715,11 @@ end function CARGO_PACKAGE:IsNear( Client, LandingZone ) -self:T() + self:F() local Near = false - if self.CargoClient and self.CargoClient:ClientGroup() then + if self.CargoClient and self.CargoClient:GetDCSGroup() then self:T( self.CargoClient.ClientName ) self:T( 'Client Exists.' ) @@ -735,7 +734,7 @@ end function CARGO_PACKAGE:OnBoard( Client, LandingZone, OnBoardSide ) -self:T() + self:F() local Valid = true @@ -746,8 +745,8 @@ self:T() local CarrierPosOnBoard = ClientUnit:getPoint() local CarrierPosMoveAway = ClientUnit:getPoint() - local CargoHostGroup = self.CargoClient:ClientGroup() - local CargoHostName = self.CargoClient:ClientGroup():getName() + local CargoHostGroup = self.CargoClient:GetDCSGroup() + local CargoHostName = self.CargoClient:GetDCSGroup():getName() local CargoHostUnits = CargoHostGroup:getUnits() local CargoPos = CargoHostUnits[1]:getPoint() @@ -826,11 +825,11 @@ end function CARGO_PACKAGE:OnBoarded( Client, LandingZone ) -self:T() + self:F() local OnBoarded = false - if self.CargoClient and self.CargoClient:ClientGroup() then + if self.CargoClient and self.CargoClient:GetDCSGroup() then if routines.IsUnitInRadius( self.CargoClient:GetClientGroupDCSUnit(), self.CargoClient:ClientPosition(), 10 ) then -- Switch Cargo from self.CargoClient to Client ... Each cargo can have only one client. So assigning the new client for the cargo is enough. @@ -846,12 +845,12 @@ end function CARGO_PACKAGE:UnLoad( Client, TargetZoneName ) -self:T() + self:F() self:T( 'self.CargoName = ' .. self.CargoName ) --self:T( 'self.CargoHostName = ' .. self.CargoHostName ) - --self.CargoSpawn:FromCarrier( Client:ClientGroup(), TargetZoneName, self.CargoHostName ) + --self.CargoSpawn:FromCarrier( Client:GetDCSGroup(), TargetZoneName, self.CargoHostName ) self:StatusUnLoaded() return Cargo @@ -865,8 +864,7 @@ CARGO_SLINGLOAD = { function CARGO_SLINGLOAD:New( CargoType, CargoName, CargoWeight, CargoZone, CargoHostName, CargoCountryID ) local self = BASE:Inherit( self, CARGO:New( CargoType, CargoName, CargoWeight ) ) - - self:T( { CargoType, CargoName, CargoWeight, CargoZone, CargoHostName, CargoCountryID } ) + self:F( { CargoType, CargoName, CargoWeight, CargoZone, CargoHostName, CargoCountryID } ) self.CargoHostName = CargoHostName @@ -887,19 +885,19 @@ end function CARGO_SLINGLOAD:IsLandingRequired() -self:T() + self:F() return false end function CARGO_SLINGLOAD:IsSlingLoad() -self:T() + self:F() return true end function CARGO_SLINGLOAD:Spawn( Client ) - self:T( { self, Client } ) + self:F( { self, Client } ) local Zone = trigger.misc.getZone( self.CargoZone ) @@ -949,7 +947,7 @@ end function CARGO_SLINGLOAD:IsNear( Client, LandingZone ) -self:T() + self:F() local Near = false @@ -958,7 +956,7 @@ end function CARGO_SLINGLOAD:IsInLandingZone( Client, LandingZone ) -self:T() + self:F() local Near = false @@ -974,7 +972,7 @@ end function CARGO_SLINGLOAD:OnBoard( Client, LandingZone, OnBoardSide ) -self:T() + self:F() local Valid = true @@ -984,7 +982,7 @@ end function CARGO_SLINGLOAD:OnBoarded( Client, LandingZone ) -self:T() + self:F() local OnBoarded = false @@ -1000,7 +998,7 @@ end function CARGO_SLINGLOAD:UnLoad( Client, TargetZoneName ) -self:T() + self:F() self:T( 'self.CargoName = ' .. self.CargoName ) self:T( 'self.CargoGroupName = ' .. self.CargoGroupName ) diff --git a/Moose/CleanUp.lua b/Moose/CleanUp.lua index 41d8e1485..a08858e60 100644 --- a/Moose/CleanUp.lua +++ b/Moose/CleanUp.lua @@ -28,7 +28,7 @@ CLEANUP = { -- CleanUpTbilisi = CLEANUP:New( 'CLEAN Tbilisi', 150 ) -- CleanUpKutaisi = CLEANUP:New( 'CLEAN Kutaisi', 600 ) function CLEANUP:New( ZoneNames, TimeInterval ) local self = BASE:Inherit( self, BASE:New() ) - self:T( { ZoneNames, TimeInterval } ) + self:F( { ZoneNames, TimeInterval } ) if type( ZoneNames ) == 'table' then self.ZoneNames = ZoneNames @@ -57,7 +57,7 @@ end --- Destroys a group from the simulator, but checks first if it is still existing! -- @see CLEANUP function CLEANUP:_DestroyGroup( GroupObject, CleanUpGroupName ) - self:T( { GroupObject, CleanUpGroupName } ) + self:F( { GroupObject, CleanUpGroupName } ) if GroupObject then -- and GroupObject:isExist() then --MESSAGE:New( "Destroy Group " .. CleanUpGroupName, CleanUpGroupName, 1, CleanUpGroupName ):ToAll() @@ -69,7 +69,7 @@ end --- Destroys a unit from the simulator, but checks first if it is still existing! -- @see CLEANUP function CLEANUP:_DestroyUnit( CleanUpUnit, CleanUpUnitName ) - self:T( { CleanUpUnit, CleanUpUnitName } ) + self:F( { CleanUpUnit, CleanUpUnitName } ) if CleanUpUnit then --MESSAGE:New( "Destroy " .. CleanUpUnitName, CleanUpUnitName, 1, CleanUpUnitName ):ToAll() @@ -96,7 +96,7 @@ end --- Destroys a missile from the simulator, but checks first if it is still existing! -- @see CLEANUP function CLEANUP:_DestroyMissile( MissileObject ) - self:T( { MissileObject } ) + self:F( { MissileObject } ) if MissileObject and MissileObject:isExist() then MissileObject:destroy() @@ -107,7 +107,7 @@ end --- Detects if an SA site was shot with an anti radiation missile. In this case, take evasive actions based on the skill level set within the ME. -- @see CLEANUP function CLEANUP:_EventCrash( event ) - self:T( { event } ) + self:F( { event } ) --MESSAGE:New( "Crash ", "Crash", 10, "Crash" ):ToAll() -- self:T("before getGroup") @@ -137,7 +137,7 @@ end --- Detects if an SA site was shot with an anti radiation missile. In this case, take evasive actions based on the skill level set within the ME. -- @see CLEANUP function CLEANUP:_EventShot( event ) - self:T( { event } ) + self:F( { event } ) local _grp = Unit.getGroup(event.initiator)-- Identify the group that fired local _groupname = _grp:getName() -- return the name of the group @@ -161,7 +161,7 @@ end --- Detects if the Unit has an S_EVENT_HIT within the given ZoneNames. If this is the case, destroy the unit. function CLEANUP:_EventHitCleanUp( event ) - self:T( { event } ) + self:F( { event } ) local CleanUpUnit = event.initiator -- the Unit if CleanUpUnit and CleanUpUnit:isExist() and Object.getCategory(CleanUpUnit) == Object.Category.UNIT then @@ -195,7 +195,7 @@ function CLEANUP:_EventHitCleanUp( event ) end function CLEANUP:_AddForCleanUp( CleanUpUnit, CleanUpUnitName ) - self:T( { CleanUpUnit, CleanUpUnitName } ) + self:F( { CleanUpUnit, CleanUpUnitName } ) self.CleanUpList[CleanUpUnitName] = {} self.CleanUpList[CleanUpUnitName].CleanUpUnit = CleanUpUnit @@ -244,7 +244,7 @@ CleanUpSurfaceTypeText = { --- At the defined time interval, CleanUp the Groups within the CleanUpList. function CLEANUP:_Scheduler() - self:T( "CleanUp Scheduler" ) + self:F( "CleanUp Scheduler" ) for CleanUpUnitName, UnitData in pairs( self.CleanUpList ) do diff --git a/Moose/Client.lua b/Moose/Client.lua index e5438f541..d91618860 100644 --- a/Moose/Client.lua +++ b/Moose/Client.lua @@ -1,5 +1,6 @@ --- CLIENT Classes --- @module CLIENT +-- @module Client +-- @author FlightControl Include.File( "Routines" ) Include.File( "Base" ) @@ -11,6 +12,7 @@ Include.File( "Message" ) --- The CLIENT class -- @type CLIENT +-- @extends Base#BASE CLIENT = { ONBOARDSIDE = { NONE = 0, @@ -32,9 +34,10 @@ CLIENT = { --- Use this method to register new Clients within the MOF. --- @param string ClientName Name of the Group as defined within the Mission Editor. The Group must have a Unit with the type Client. --- @param string ClientBriefing Text that describes the briefing of the mission when a Player logs into the Client. --- @return CLIENT +-- @param #CLIENT self +-- @param #string ClientName Name of the Group as defined within the Mission Editor. The Group must have a Unit with the type Client. +-- @param #string ClientBriefing Text that describes the briefing of the mission when a Player logs into the Client. +-- @return #CLIENT -- @usage -- -- Create new Clients. -- local Mission = MISSIONSCHEDULER.AddMission( 'Russia Transport Troops SA-6', 'Operational', 'Transport troops from the control center to one of the SA-6 SAM sites to activate their operation.', 'Russia' ) @@ -46,7 +49,7 @@ CLIENT = { -- Mission:AddClient( CLIENT:New( 'RU MI-8MTV2*RAMP-Deploy Troops 4' ):Transport() ) function CLIENT:New( ClientName, ClientBriefing ) local self = BASE:Inherit( self, BASE:New() ) - self:T() + self:F( ClientName, ClientBriefing ) self.ClientName = ClientName self:AddBriefing( ClientBriefing ) @@ -58,15 +61,63 @@ end --- Resets a CLIENT. -- @param string ClientName Name of the Group as defined within the Mission Editor. The Group must have a Unit with the type Client. function CLIENT:Reset( ClientName ) -self:T() + self:F() self._Menus = {} end ---- ClientGroup returns the Group of a Client. +--- Checks for a client alive event and calls a function on a continuous basis. +-- @param #CLIENT self +-- @param #function CallBack Function. +function CLIENT:Alive( CallBack ) + self:F() + + self.ClientAlive2 = false + self.ClientCallBack = CallBack + self.AliveCheckFunction = routines.scheduleFunction( self._AliveCheckCallBack, { self }, timer.getTime() + 1, 5 ) + + return self +end + +--- Checks if client is alive and returns true or false. +-- @param #CLIENT self +-- @param #boolean Returns true if client is alive. +function CLIENT:IsAlive() + self:F( self.ClientName ) + + local ClientDCSGroup = self:GetDCSGroup() + + if ClientDCSGroup then + self:T("true") + return true + end + + self:T( "false" ) + return false +end + + +--- @param #CLIENT self +function CLIENT:_AliveCheckCallBack() + self:F( { self.ClientName, self.ClientAlive2 } ) + + if self:IsAlive() then + if self.ClientAlive2 == false then + self:T("Calling Callback function") + self.ClientCallBack( self ) + self.ClientAlive2 = true + end + else + if self.ClientAlive2 == true then + self.ClientAlive2 = false + end + end +end + +--- Return the DCSGroup of a Client. -- This function is modified to deal with a couple of bugs in DCS 1.5.3 --- @return Group -function CLIENT:ClientGroup() ---self:T() +-- @return DCSGroup#Group +function CLIENT:GetDCSGroup() + self:F3() -- local ClientData = Group.getByName( self.ClientName ) -- if ClientData and ClientData:isExist() then @@ -78,33 +129,33 @@ function CLIENT:ClientGroup() local CoalitionsData = { AlivePlayersRed = coalition.getPlayers( coalition.side.RED ), AlivePlayersBlue = coalition.getPlayers( coalition.side.BLUE ) } for CoalitionId, CoalitionData in pairs( CoalitionsData ) do - --self:T( { "CoalitionData:", CoalitionData } ) + self:T3( { "CoalitionData:", CoalitionData } ) for UnitId, UnitData in pairs( CoalitionData ) do - --self:T( { "UnitData:", UnitData } ) + self:T3( { "UnitData:", UnitData } ) if UnitData and UnitData:isExist() then local ClientGroup = Group.getByName( self.ClientName ) if ClientGroup then - self:T( "ClientGroup = " .. self.ClientName ) + self:T3( "ClientGroup = " .. self.ClientName ) if ClientGroup:isExist() then if ClientGroup:getID() == UnitData:getGroup():getID() then - self:T( "Normal logic" ) - self:T( self.ClientName .. " : group found!" ) + self:T3( "Normal logic" ) + self:T3( self.ClientName .. " : group found!" ) return ClientGroup end else -- Now we need to resolve the bugs in DCS 1.5 ... -- Consult the database for the units of the Client Group. (ClientGroup:getUnits() returns nil) - self:T( "Bug 1.5 logic" ) + self:T3( "Bug 1.5 logic" ) local ClientUnits = _Database.Groups[self.ClientName].Units - self:T( { ClientUnits[1].name, env.getValueDictByKey(ClientUnits[1].name) } ) + self:T3( { ClientUnits[1].name, env.getValueDictByKey(ClientUnits[1].name) } ) for ClientUnitID, ClientUnitData in pairs( ClientUnits ) do - self:T( { tonumber(UnitData:getID()), ClientUnitData.unitId } ) + self:T3( { tonumber(UnitData:getID()), ClientUnitData.unitId } ) if tonumber(UnitData:getID()) == ClientUnitData.unitId then local ClientGroupTemplate = _Database.Groups[self.ClientName].Template - self.ClientGroupID = ClientGroupTemplate.groupId + self.ClientID = ClientGroupTemplate.groupId self.ClientGroupUnit = UnitData - self:T( self.ClientName .. " : group found in bug 1.5 resolvement logic!" ) + self:T3( self.ClientName .. " : group found in bug 1.5 resolvement logic!" ) return ClientGroup end end @@ -119,10 +170,10 @@ function CLIENT:ClientGroup() -- For non player clients local ClientGroup = Group.getByName( self.ClientName ) if ClientGroup then - self:T( "ClientGroup = " .. self.ClientName ) + self:T3( "ClientGroup = " .. self.ClientName ) if ClientGroup:isExist() then - self:T( "Normal logic" ) - self:T( self.ClientName .. " : group found!" ) + self:T3( "Normal logic" ) + self:T3( self.ClientName .. " : group found!" ) return ClientGroup end end @@ -135,87 +186,97 @@ end function CLIENT:GetClientGroupID() -self:T() - ClientGroup = self:ClientGroup() - - if ClientGroup then - if ClientGroup:isExist() then - return ClientGroup:getID() - else - return self.ClientGroupID - end - end - - return nil + + if not self.ClientGroupID then + local ClientGroup = self:GetDCSGroup() + if ClientGroup and ClientGroup:isExist() then + self.ClientGroupID = ClientGroup:getID() + else + self.ClientGroupID = self.ClientID + end + end + + self:T( self.ClientGroupID ) + return self.ClientGroupID end function CLIENT:GetClientGroupName() -self:T() - ClientGroup = self:ClientGroup() - - if ClientGroup then - if ClientGroup:isExist() then - self:T( ClientGroup:getName() ) - return ClientGroup:getName() - else - self:T( self.ClientName ) - return self.ClientName - end - end - - return nil + if not self.ClientGroupName then + local ClientGroup = self:GetDCSGroup() + if ClientGroup and ClientGroup:isExist() then + self.ClientGroupName = ClientGroup:getName() + else + self.ClientGroupName = self.ClientName + end + end + + self:T( self.ClientGroupName ) + return self.ClientGroupName end --- Returns the Unit of the @{CLIENT}. --- @return Unit +-- @return Unit#UNIT function CLIENT:GetClientGroupUnit() -self:T() + self:F() - local ClientGroup = self:ClientGroup() + local ClientGroup = self:GetDCSGroup() - if ClientGroup then - if ClientGroup:isExist() then - return UNIT:New( ClientGroup:getUnit(1) ) - else - return UNIT:New( self.ClientGroupUnit ) - end + if ClientGroup and ClientGroup:isExist() then + return UNIT:New( ClientGroup:getUnit(1) ) + else + return UNIT:New( self.ClientGroupUnit ) end - - return nil end --- Returns the DCSUnit of the @{CLIENT}. -- @return DCSUnit function CLIENT:GetClientGroupDCSUnit() -self:T() + self:F2() - local ClientGroup = self:ClientGroup() - - if ClientGroup then - if ClientGroup:isExist() then - return ClientGroup:getUnits()[1] - else - return self.ClientGroupUnit - end - end - - return nil + local ClientGroup = self:GetDCSGroup() + + if ClientGroup and ClientGroup:isExist() then + return ClientGroup:getUnit(1) + else + return self.ClientGroupUnit + end end function CLIENT:GetUnit() - self:T() + self:F() return UNIT:New( self:GetClientGroupDCSUnit() ) end +--- Returns the Point of the @{CLIENT}. +-- @return DCSTypes#Vec2 +function CLIENT:GetPointVec2() + self:F() + + ClientGroupUnit = self:GetClientGroupDCSUnit() + + if ClientGroupUnit then + if ClientGroupUnit:isExist() then + local PointVec3 = ClientGroupUnit:getPoint() --DCSTypes#Vec3 + local PointVec2 = {} --DCSTypes#Vec2 + PointVec2.x = PointVec3.x + PointVec2.y = PointVec3.z + self:T( { PointVec2 } ) + return PointVec2 + end + end + + return nil +end + --- Returns the Position of the @{CLIENT}. --- @return Position +-- @return DCSTypes#Position function CLIENT:ClientPosition() ---self:T() + self:F() ClientGroupUnit = self:GetClientGroupDCSUnit() @@ -228,10 +289,28 @@ function CLIENT:ClientPosition() return nil end +--- Returns the altitude of the @{CLIENT}. +-- @return DCSTypes#Distance +function CLIENT:GetAltitude() + self:F() + + ClientGroupUnit = self:GetClientGroupDCSUnit() + + if ClientGroupUnit then + if ClientGroupUnit:isExist() then + local PointVec3 = ClientGroupUnit:getPoint() --DCSTypes#Vec3 + return PointVec3.y + end + end + + return nil +end + + --- Transport defines that the Client is a Transport. -- @return CLIENT function CLIENT:Transport() -self:T() + self:F() self.ClientTransport = true return self @@ -241,7 +320,7 @@ end -- @param string ClientBriefing is the text defining the Mission briefing. -- @return CLIENT function CLIENT:AddBriefing( ClientBriefing ) -self:T() + self:F() self.ClientBriefing = ClientBriefing return self end @@ -249,14 +328,14 @@ end --- IsTransport returns if a Client is a transport. -- @return bool function CLIENT:IsTransport() -self:T() + self:F() return self.ClientTransport end --- ShowCargo shows the @{CARGO} within the CLIENT to the Player. -- The @{CARGO} is shown throught the MESSAGE system of DCS World. function CLIENT:ShowCargo() -self:T() + self:F() local CargoMsg = "" @@ -287,13 +366,13 @@ end -- @param string MessageCategory is the category of the message (the title). -- @param number MessageInterval is the interval in seconds between the display of the Message when the CLIENT is in the air. function CLIENT:Message( Message, MessageDuration, MessageId, MessageCategory, MessageInterval ) -self:T() + self:F() if not self.MenuMessages then if self:GetClientGroupID() then - self.MenuMessages = MENU_SUB_GROUP:New( self:GetClientGroupID(), 'Messages' ) - self.MenuRouteMessageOn = MENU_COMMAND_GROUP:New( self:GetClientGroupID(), 'Messages On', self.MenuMessages, CLIENT.SwitchMessages, { self, true } ) - self.MenuRouteMessageOff = MENU_COMMAND_GROUP:New( self:GetClientGroupID(),'Messages Off', self.MenuMessages, CLIENT.SwitchMessages, { self, false } ) + self.MenuMessages = MENU_CLIENT:New( self, 'Messages' ) + self.MenuRouteMessageOn = MENU_CLIENT_COMMAND:New( self, 'Messages On', self.MenuMessages, CLIENT.SwitchMessages, { self, true } ) + self.MenuRouteMessageOff = MENU_CLIENT_COMMAND:New( self,'Messages Off', self.MenuMessages, CLIENT.SwitchMessages, { self, false } ) end end diff --git a/Moose/Database.lua b/Moose/Database.lua index d20f79f23..46923d2ba 100644 --- a/Moose/Database.lua +++ b/Moose/Database.lua @@ -1,6 +1,7 @@ --- Administers the Initial Sets of the Mission Templates as defined within the Mission Editor. -- Administers the Spawning of new Groups within the DCSRTE and administers these new Groups within the DATABASE object(s). --- @module DATABASE +-- @module Database +-- @author FlightControl Include.File( "Routines" ) Include.File( "Base" ) @@ -158,7 +159,7 @@ end --- Set a status to a Group within the Database, this to check crossing events for example. function DATABASE:SetStatusGroup( GroupName, Status ) - self:T( Status ) + self:F( Status ) self.Groups[GroupName].Status = Status end @@ -166,7 +167,7 @@ end --- Get a status to a Group within the Database, this to check crossing events for example. function DATABASE:GetStatusGroup( GroupName ) - self:T( Status ) + self:F( Status ) if self.Groups[GroupName] then return self.Groups[GroupName].Status @@ -319,7 +320,7 @@ end --- Follows new players entering Clients within the DCSRTE. function DATABASE:_FollowPlayers() - self:T( "_FollowPlayers" ) + self:F( "_FollowPlayers" ) local ClientUnit = 0 local CoalitionsData = { AlivePlayersRed = coalition.getPlayers(coalition.side.RED), AlivePlayersBlue = coalition.getPlayers(coalition.side.BLUE) } @@ -342,7 +343,7 @@ end --- Add a new player entering a Unit. function DATABASE:_AddPlayerFromUnit( UnitData ) - self:T( UnitData ) + self:F( UnitData ) if UnitData:isExist() then local UnitName = UnitData:getName() @@ -420,7 +421,7 @@ end --- Registers Scores the players completing a Mission Task. function DATABASE:_AddMissionTaskScore( PlayerUnit, MissionName, Score ) - self:T( { PlayerUnit, MissionName, Score } ) + self:F( { PlayerUnit, MissionName, Score } ) local PlayerName = PlayerUnit:getPlayerName() @@ -446,7 +447,7 @@ end --- Registers Mission Scores for possible multiple players that contributed in the Mission. function DATABASE:_AddMissionScore( MissionName, Score ) - self:T( { PlayerUnit, MissionName, Score } ) + self:F( { PlayerUnit, MissionName, Score } ) for PlayerName, PlayerData in pairs( self.Players ) do @@ -467,7 +468,7 @@ end function DATABASE:OnHit( event ) - self:T( { event } ) + self:F( { event } ) local InitUnit = nil local InitUnitName = "" diff --git a/Moose/DeployTask.lua b/Moose/DeployTask.lua index 39c148a01..4bd0cf65c 100644 --- a/Moose/DeployTask.lua +++ b/Moose/DeployTask.lua @@ -18,7 +18,7 @@ DEPLOYTASK = { -- @return #DEPLOYTASK The created DeployTask function DEPLOYTASK:New( CargoType ) local self = BASE:Inherit( self, TASK:New() ) - self:T() + self:F() local Valid = true @@ -35,7 +35,7 @@ function DEPLOYTASK:New( CargoType ) end function DEPLOYTASK:ToZone( LandingZone ) -self:T() + self:F() self.LandingZones.LandingZoneNames[LandingZone.CargoZoneName] = LandingZone.CargoZoneName self.LandingZones.LandingZones[LandingZone.CargoZoneName] = LandingZone @@ -45,7 +45,7 @@ end function DEPLOYTASK:InitCargo( InitCargos ) -self:T( { InitCargos } ) + self:F( { InitCargos } ) if type( InitCargos ) == "table" then self.Cargos.InitCargos = InitCargos @@ -58,7 +58,7 @@ end function DEPLOYTASK:LoadCargo( LoadCargos ) -self:T( { LoadCargos } ) + self:F( { LoadCargos } ) if type( LoadCargos ) == "table" then self.Cargos.LoadCargos = LoadCargos @@ -73,7 +73,7 @@ end --- When the cargo is unloaded, it will move to the target zone name. -- @param string TargetZoneName Name of the Zone to where the Cargo should move after unloading. function DEPLOYTASK:SetCargoTargetZoneName( TargetZoneName ) -self:T() + self:F() local Valid = true @@ -88,15 +88,15 @@ self:T() end function DEPLOYTASK:AddCargoMenus( Client, Cargos, TransportRadius ) -self:T() + self:F() local ClientGroupID = Client:GetClientGroupID() - trace.i( self.ClassName, ClientGroupID ) + self:T( ClientGroupID ) for CargoID, Cargo in pairs( Cargos ) do - trace.i( self.ClassName, { Cargo.ClassName, Cargo.CargoName, Cargo.CargoType, Cargo.CargoWeight } ) + self:T( { Cargo.ClassName, Cargo.CargoName, Cargo.CargoType, Cargo.CargoWeight } ) if Cargo:IsStatusLoaded() and Client == Cargo:IsLoadedInClient() then @@ -110,7 +110,7 @@ self:T() self.TEXT[1] .. " " .. Cargo.CargoType, nil ) - trace.i( self.ClassName, 'Added DeployMenu ' .. self.TEXT[1] ) + self:T( 'Added DeployMenu ' .. self.TEXT[1] ) end if Client._Menus[Cargo.CargoType].DeploySubMenus == nil then @@ -118,7 +118,7 @@ self:T() end if Client._Menus[Cargo.CargoType].DeployMenu == nil then - trace.i( self.ClassName, 'deploymenu is nil' ) + self:T( 'deploymenu is nil' ) end Client._Menus[Cargo.CargoType].DeploySubMenus[ #Client._Menus[Cargo.CargoType].DeploySubMenus + 1 ] = missionCommands.addCommandForGroup( @@ -128,29 +128,29 @@ self:T() self.MenuAction, { ReferenceTask = self, CargoTask = Cargo } ) - trace.i( self.ClassName, 'Added DeploySubMenu ' .. Cargo.CargoType .. ":" .. Cargo.CargoName .. " ( " .. Cargo.CargoWeight .. "kg )" ) + self:T( 'Added DeploySubMenu ' .. Cargo.CargoType .. ":" .. Cargo.CargoName .. " ( " .. Cargo.CargoWeight .. "kg )" ) end end end function DEPLOYTASK:RemoveCargoMenus( Client ) -self:T() + self:F() local ClientGroupID = Client:GetClientGroupID() - trace.i( self.ClassName, ClientGroupID ) + self:T( ClientGroupID ) for MenuID, MenuData in pairs( Client._Menus ) do if MenuData.DeploySubMenus ~= nil then for SubMenuID, SubMenuData in pairs( MenuData.DeploySubMenus ) do missionCommands.removeItemForGroup( ClientGroupID, SubMenuData ) - trace.i( self.ClassName, "Removed DeploySubMenu " ) + self:T( "Removed DeploySubMenu " ) SubMenuData = nil end end if MenuData.DeployMenu then missionCommands.removeItemForGroup( ClientGroupID, MenuData.DeployMenu ) - trace.i( self.ClassName, "Removed DeployMenu " ) + self:T( "Removed DeployMenu " ) MenuData.DeployMenu = nil end end diff --git a/Moose/DestroyBaseTask.lua b/Moose/DestroyBaseTask.lua index adcb14603..6d73b0036 100644 --- a/Moose/DestroyBaseTask.lua +++ b/Moose/DestroyBaseTask.lua @@ -23,7 +23,7 @@ DESTROYBASETASK = { -- @return DESTROYBASETASK function DESTROYBASETASK:New( DestroyGroupType, DestroyUnitType, DestroyGroupPrefixes, DestroyPercentage ) local self = BASE:Inherit( self, TASK:New() ) - self:T() + self:F() self.Name = 'Destroy' self.Destroyed = 0 @@ -45,7 +45,7 @@ end --- Handle the S_EVENT_DEAD events to validate the destruction of units for the task monitoring. -- @param event Event structure of DCS world. function DESTROYBASETASK:EventDead( event ) - self:T( { 'EventDead', event } ) + self:F( { 'EventDead', event } ) if event.initiator and Object.getCategory(event.initiator) == Object.Category.UNIT then local DestroyUnit = event.initiator @@ -76,7 +76,7 @@ end -- @param DestroyGroup Group structure describing the group to be evaluated. -- @param DestroyUnit Unit structure describing the Unit to be evaluated. function DESTROYBASETASK:ReportGoalProgress( DestroyGroup, DestroyUnit ) -self:T() + self:F() return 0 end diff --git a/Moose/DestroyGroupsTask.lua b/Moose/DestroyGroupsTask.lua index 61541d71b..44ab501ff 100644 --- a/Moose/DestroyGroupsTask.lua +++ b/Moose/DestroyGroupsTask.lua @@ -17,27 +17,25 @@ DESTROYGROUPSTASK = { -- @param ?number DestroyPercentage defines the %-tage that needs to be destroyed to achieve mission success. eg. If in the Group there are 10 units, then a value of 75 would require 8 units to be destroyed from the Group to complete the @{TASK}. ---@return DESTROYGROUPSTASK function DESTROYGROUPSTASK:New( DestroyGroupType, DestroyUnitType, DestroyGroupNames, DestroyPercentage ) -trace.f(self.ClassName) - - -- Inheritance - local Child = BASE:Inherit( self, DESTROYBASETASK:New( DestroyGroupType, DestroyUnitType, DestroyGroupNames, DestroyPercentage ) ) - - Child.Name = 'Destroy Groups' - Child.GoalVerb = "Destroy " .. DestroyGroupType + local self = BASE:Inherit( self, DESTROYBASETASK:New( DestroyGroupType, DestroyUnitType, DestroyGroupNames, DestroyPercentage ) ) + self:F() + + self.Name = 'Destroy Groups' + self.GoalVerb = "Destroy " .. DestroyGroupType - Child.AddEvent( Child, world.event.S_EVENT_DEAD, Child.EventDead ) - Child.AddEvent( Child, world.event.S_EVENT_CRASH, Child.EventDead ) + self:AddEvent( world.event.S_EVENT_DEAD, self.EventDead ) + self:AddEvent( world.event.S_EVENT_CRASH, self.EventDead ) --Child.AddEvent( Child, world.event.S_EVENT_PILOT_DEAD, Child.EventDead ) - return Child + return self end --- Report Goal Progress. -- @param Group DestroyGroup Group structure describing the group to be evaluated. -- @param Unit DestroyUnit Unit structure describing the Unit to be evaluated. function DESTROYGROUPSTASK:ReportGoalProgress( DestroyGroup, DestroyUnit ) -trace.f(self.ClassName) - trace.i( self.ClassName, DestroyGroup:getSize() ) + self:F( { DestroyGroup, DestroyUnit } ) + self:T( DestroyGroup:getSize() ) local DestroyCount = 0 if DestroyGroup then diff --git a/Moose/DestroyRadarsTask.lua b/Moose/DestroyRadarsTask.lua index 113230531..be28006d8 100644 --- a/Moose/DestroyRadarsTask.lua +++ b/Moose/DestroyRadarsTask.lua @@ -14,29 +14,26 @@ DESTROYRADARSTASK = { -- @param table{string,...} DestroyGroupNames Table of string containing the group names of which the radars are be destroyed. -- @return DESTROYRADARSTASK function DESTROYRADARSTASK:New( DestroyGroupNames ) -trace.f(self.ClassName) - - -- Inheritance - local Child = BASE:Inherit( self, DESTROYGROUPSTASK:New( 'radar installations', 'radars', DestroyGroupNames ) ) - - Child.Name = 'Destroy Radars' + local self = BASE:Inherit( self, DESTROYGROUPSTASK:New( 'radar installations', 'radars', DestroyGroupNames ) ) + self:F() + self.Name = 'Destroy Radars' - Child.AddEvent( Child, world.event.S_EVENT_DEAD, Child.EventDead ) + self:AddEvent( world.event.S_EVENT_DEAD, self.EventDead ) - return Child + return self end --- Report Goal Progress. -- @param Group DestroyGroup Group structure describing the group to be evaluated. -- @param Unit DestroyUnit Unit structure describing the Unit to be evaluated. function DESTROYRADARSTASK:ReportGoalProgress( DestroyGroup, DestroyUnit ) -trace.f(self.ClassName) + self:F( { DestroyGroup, DestroyUnit } ) local DestroyCount = 0 if DestroyUnit and DestroyUnit:hasSensors( Unit.SensorType.RADAR, Unit.RadarType.AS ) then if DestroyUnit and DestroyUnit:getLife() <= 1.0 then - trace.i( self.ClassName, 'Destroyed a radar' ) + self:T( 'Destroyed a radar' ) DestroyCount = 1 end end diff --git a/Moose/DestroyUnitTypesTask.lua b/Moose/DestroyUnitTypesTask.lua index 3dee60e2b..17e5af1bf 100644 --- a/Moose/DestroyUnitTypesTask.lua +++ b/Moose/DestroyUnitTypesTask.lua @@ -17,33 +17,28 @@ DESTROYUNITTYPESTASK = { -- @param string DestroyUnitTypes Table of string containing the type names of the units to achieve mission success. -- @return DESTROYUNITTYPESTASK function DESTROYUNITTYPESTASK:New( DestroyGroupType, DestroyUnitType, DestroyGroupNames, DestroyUnitTypes ) -trace.f(self.ClassName) - - -- Inheritance - local Child = BASE:Inherit( self, DESTROYBASETASK:New( DestroyGroupType, DestroyUnitType, DestroyGroupNames ) ) - + local self = BASE:Inherit( self, DESTROYBASETASK:New( DestroyGroupType, DestroyUnitType, DestroyGroupNames ) ) + self:F( { DestroyGroupType, DestroyUnitType, DestroyGroupNames, DestroyUnitTypes } ) + if type(DestroyUnitTypes) == 'table' then - Child.DestroyUnitTypes = DestroyUnitTypes + self.DestroyUnitTypes = DestroyUnitTypes else - Child.DestroyUnitTypes = { DestroyUnitTypes } + self.DestroyUnitTypes = { DestroyUnitTypes } end - Child.Name = 'Destroy Unit Types' - Child.GoalVerb = "Destroy " .. DestroyGroupType + self.Name = 'Destroy Unit Types' + self.GoalVerb = "Destroy " .. DestroyGroupType - --env.info( 'New Types Child = ' .. tostring(Child) ) - --env.info( 'New Types self = ' .. tostring(self) ) + self:AddEvent( world.event.S_EVENT_DEAD, self.EventDead ) - Child.AddEvent( Child, world.event.S_EVENT_DEAD, Child.EventDead ) - - return Child + return self end --- Report Goal Progress. -- @param Group DestroyGroup Group structure describing the group to be evaluated. -- @param Unit DestroyUnit Unit structure describing the Unit to be evaluated. function DESTROYUNITTYPESTASK:ReportGoalProgress( DestroyGroup, DestroyUnit ) -trace.f(self.ClassName) + self:F( { DestroyGroup, DestroyUnit } ) local DestroyCount = 0 for UnitTypeID, UnitType in pairs( self.DestroyUnitTypes ) do diff --git a/Moose/Escort.lua b/Moose/Escort.lua new file mode 100644 index 000000000..71c76ea3b --- /dev/null +++ b/Moose/Escort.lua @@ -0,0 +1,602 @@ +--- Taking the lead of AI escorting your flight. +-- The ESCORT class allows you to interact with escoring AI on your flight and take the lead. +-- The following commands will be available: +-- +-- * Pop-up and Scan Area +-- * Re-Join Formation +-- * Hold Position in x km +-- * Report identified targets +-- * Perform tasks per identified target: Report vector to target, paint target, kill target +-- +-- @module Escort +-- @author FlightControl + +Include.File( "Routines" ) +Include.File( "Base" ) +Include.File( "Database" ) +Include.File( "Group" ) +Include.File( "Zone" ) + +--- ESCORT class +-- @type ESCORT +-- @extends Base#BASE +-- @field Client#CLIENT EscortClient +-- @field Group#GROUP EscortGroup +-- @field #string EscortName +-- @field #number FollowScheduler The id of the _FollowScheduler function. +-- @field #boolean ReportTargets If true, nearby targets are reported. +-- @Field DCSTypes#AI.Option.Air.val.ROE OptionROE Which ROE is set to the EscortGroup. +-- @field DCSTypes#AI.Option.Air.val.REACTION_ON_THREAT OptionReactionOnThreat Which REACTION_ON_THREAT is set to the EscortGroup. +ESCORT = { + ClassName = "ESCORT", + EscortName = nil, -- The Escort Name + EscortClient = nil, + EscortGroup = nil, + Targets = {}, -- The identified targets + FollowScheduler = nil, + ReportTargets = true, + OptionROE = AI.Option.Air.val.ROE.OPEN_FIRE, + OptionReactionOnThreat = AI.Option.Air.val.REACTION_ON_THREAT.ALLOW_ABORT_MISSION +} + +--- MENUPARAM type +-- @type MENUPARAM +-- @field #ESCORT ParamSelf +-- @field #Distance ParamDistance + +--- ESCORT class constructor for an AI group +-- @param self +-- @param Client#CLIENT EscortClient The client escorted by the EscortGroup. +-- @param Group#GROUP EscortGroup The group AI escorting the EscortClient. +-- @param #string EscortName Name of the escort. +-- @return #ESCORT self +function ESCORT:New( EscortClient, EscortGroup, EscortName ) + local self = BASE:Inherit( self, BASE:New() ) + self:F( { EscortClient, EscortGroup, EscortName } ) + + self.EscortClient = EscortClient -- Client#CLIENT + self.EscortGroup = EscortGroup -- Group#GROUP + self.EscortName = EscortName + + self.EscortMenu = MENU_CLIENT:New( self.EscortClient, "Escort" .. self.EscortName ) + + -- Escort Navigation + self.EscortMenuReportNavigation = MENU_CLIENT:New( self.EscortClient, "Navigation", self.EscortMenu ) + self.EscortMenuHoldPosition = MENU_CLIENT_COMMAND:New( self.EscortClient, "Hold Position and Stay Low", self.EscortMenuReportNavigation, ESCORT._HoldPosition, { ParamSelf = self } ) + self.EscortMenuJoinUpAndHoldPosition = MENU_CLIENT_COMMAND:New( self.EscortClient, "Join-Up and Hold Position NearBy", self.EscortMenuReportNavigation, ESCORT._HoldPositionNearBy, { ParamSelf = self } ) + self.EscortMenuJoinUpAndFollow50Meters = MENU_CLIENT_COMMAND:New( self.EscortClient, "Join-Up and Follow at 100", self.EscortMenuReportNavigation, ESCORT._JoinUpAndFollow, { ParamSelf = self, ParamDistance = 100 } ) + self.EscortMenuJoinUpAndFollow100Meters = MENU_CLIENT_COMMAND:New( self.EscortClient, "Join-Up and Follow at 200", self.EscortMenuReportNavigation, ESCORT._JoinUpAndFollow, { ParamSelf = self, ParamDistance = 200 } ) + self.EscortMenuJoinUpAndFollow150Meters = MENU_CLIENT_COMMAND:New( self.EscortClient, "Join-Up and Follow at 400", self.EscortMenuReportNavigation, ESCORT._JoinUpAndFollow, { ParamSelf = self, ParamDistance = 400 } ) + self.EscortMenuJoinUpAndFollow200Meters = MENU_CLIENT_COMMAND:New( self.EscortClient, "Join-Up and Follow at 800", self.EscortMenuReportNavigation, ESCORT._JoinUpAndFollow, { ParamSelf = self, ParamDistance = 800 } ) + + -- Report Targets + self.EscortMenuReportNearbyTargets = MENU_CLIENT:New( self.EscortClient, "Report targets", self.EscortMenu ) + self.EscortMenuReportNearbyTargetsOn = MENU_CLIENT_COMMAND:New( self.EscortClient, "Report targets on", self.EscortMenuReportNearbyTargets, ESCORT._ReportNearbyTargets, { ParamSelf = self, ParamReportTargets = true } ) + self.EscortMenuReportNearbyTargetsOff = MENU_CLIENT_COMMAND:New( self.EscortClient, "Report targets off", self.EscortMenuReportNearbyTargets, ESCORT._ReportNearbyTargets, { ParamSelf = self, ParamReportTargets = false, } ) + + -- Scanning Targets + self.EscortMenuScanForTargets = MENU_CLIENT:New( self.EscortClient, "Scan targets", self.EscortMenu ) + self.EscortMenuReportNearbyTargetsOn = MENU_CLIENT_COMMAND:New( self.EscortClient, "Scan targets 30 seconds", self.EscortMenuScanForTargets, ESCORT._ScanTargets30Seconds, { ParamSelf = self, ParamScanDuration = 30 } ) + self.EscortMenuReportNearbyTargetsOn = MENU_CLIENT_COMMAND:New( self.EscortClient, "Scan targets 60 seconds", self.EscortMenuScanForTargets, ESCORT._ScanTargets60Seconds, { ParamSelf = self, ParamScanDuration = 30 } ) + + -- Attack Targets + self.EscortMenuAttackNearbyTargets = MENU_CLIENT:New( self.EscortClient, "Attack nearby targets", self.EscortMenu ) + self.EscortMenuAttackTargets = {} + self.Targets = {} + + -- Rules of Engagement + self.EscortMenuROE = MENU_CLIENT:New( self.EscortClient, "ROE", self.EscortMenu ) + self.EscortMenuROEHoldFire = MENU_CLIENT_COMMAND:New( self.EscortClient, "Hold Fire", self.EscortMenuROE, ESCORT._ROEHoldFire, { ParamSelf = self, } ) + self.EscortMenuROEReturnFire = MENU_CLIENT_COMMAND:New( self.EscortClient, "Return Fire", self.EscortMenuROE, ESCORT._ROEReturnFire, { ParamSelf = self, } ) + self.EscortMenuROEOpenFire = MENU_CLIENT_COMMAND:New( self.EscortClient, "Open Fire", self.EscortMenuROE, ESCORT._ROEOpenFire, { ParamSelf = self, } ) + self.EscortMenuROEWeaponFree = MENU_CLIENT_COMMAND:New( self.EscortClient, "Weapon Free", self.EscortMenuROE, ESCORT._ROEWeaponFree, { ParamSelf = self, } ) + + -- Reaction to Threats + self.EscortMenuEvasion = MENU_CLIENT:New( self.EscortClient, "Evasion", self.EscortMenu ) + self.EscortMenuEvasionNoReaction = MENU_CLIENT_COMMAND:New( self.EscortClient, "Fight until death", self.EscortMenuEvasion, ESCORT._OptionROTNoReaction, { ParamSelf = self, } ) + self.EscortMenuEvasionPassiveDefense = MENU_CLIENT_COMMAND:New( self.EscortClient, "Use flares, chaff and jammers", self.EscortMenuEvasion, ESCORT._OptionROTPassiveDefense, { ParamSelf = self, } ) + self.EscortMenuEvasionEvadeFire = MENU_CLIENT_COMMAND:New( self.EscortClient, "Evade enemy fire", self.EscortMenuEvasion, ESCORT._OptionROTEvadeFire, { ParamSelf = self, } ) + self.EscortMenuOptionEvasionVertical = MENU_CLIENT_COMMAND:New( self.EscortClient, "Go below radar and evade fire", self.EscortMenuEvasion, ESCORT._OptionROTVertical, { ParamSelf = self, } ) + + -- Cancel current Task + self.EscortMenuResumeMission = MENU_CLIENT:New( self.EscortClient, "Resume Mission", self.EscortMenu ) + self.EscortMenuResumeWayPoints = {} + local TaskPoints = self:RegisterRoute() + for WayPointID, WayPoint in pairs( TaskPoints ) do + self.EscortMenuResumeWayPoints[WayPointID] = MENU_CLIENT_COMMAND:New( self.EscortClient, "Resume from waypoint " .. WayPointID, self.EscortMenuResumeMission, ESCORT._ResumeMission, { ParamSelf = self, ParamWayPoint = WayPointID } ) + end + + -- Initialize the EscortGroup + + self.EscortGroup:OptionROTVertical() + self.EscortGroup:OptionROEOpenFire() + + self.EscortGroup:PushTask( EscortGroup:TaskRoute( TaskPoints ) ) + + self.ReportTargetsScheduler = routines.scheduleFunction( self._ReportTargetsScheduler, { self }, timer.getTime() + 1, 30 ) +end + + +--- @param #MENUPARAM MenuParam +function ESCORT._HoldPosition( MenuParam ) + + local self = MenuParam.ParamSelf + local EscortGroup = self.EscortGroup + local EscortClient = self.EscortClient + + routines.removeFunction( self.FollowScheduler ) + + EscortGroup:PushTask( EscortGroup:TaskHoldPosition( 300 ) ) + MESSAGE:New( "Holding Position at ... for 5 minutes.", MenuParam.ParamSelf.EscortName, 10, "ESCORT/TaskHoldPosition" ):ToClient( EscortClient ) +end + +--- @param #MENUPARAM MenuParam +function ESCORT._HoldPositionNearBy( MenuParam ) + + local self = MenuParam.ParamSelf + local EscortGroup = self.EscortGroup + local EscortClient = self.EscortClient + + --MenuParam.ParamSelf.EscortGroup:TaskOrbitCircleAtVec2( MenuParam.ParamSelf.EscortClient:GetPointVec2(), 300, 30, 0 ) + + routines.removeFunction( self.FollowScheduler ) + + local PointFrom = {} + local GroupPoint = EscortGroup:GetPointVec2() + PointFrom = {} + PointFrom.x = GroupPoint.x + PointFrom.y = GroupPoint.y + PointFrom.speed = 250 + PointFrom.type = AI.Task.WaypointType.TURNING_POINT + PointFrom.alt = EscortClient:GetAltitude() + PointFrom.alt_type = AI.Task.AltitudeType.BARO + + local ClientPoint = MenuParam.ParamSelf.EscortClient:GetPointVec2() + local PointTo = {} + PointTo.x = ClientPoint.x + PointTo.y = ClientPoint.y + PointTo.speed = 250 + PointTo.type = AI.Task.WaypointType.TURNING_POINT + PointTo.alt = EscortClient:GetAltitude() + PointTo.alt_type = AI.Task.AltitudeType.BARO + PointTo.task = EscortGroup:TaskOrbitCircleAtVec2( EscortClient:GetPointVec2(), 300, 30, 0 ) + + local Points = { PointFrom, PointTo } + + EscortGroup:PushTask( EscortGroup:TaskRoute( Points ) ) + MESSAGE:New( "Rejoining to your location. Please hold at your location.", MenuParam.ParamSelf.EscortName, 10, "ESCORT/HoldPositionNearBy" ):ToClient( EscortClient ) +end + +--- @param #MENUPARAM MenuParam +function ESCORT._JoinUpAndFollow( MenuParam ) + + local self = MenuParam.ParamSelf + local EscortGroup = self.EscortGroup + local EscortClient = self.EscortClient + + local Distance = MenuParam.ParamDistance + + if self.FollowScheduler then + routines.removeFunction( self.FollowScheduler ) + end + + self.CT1 = 0 + self.GT1 = 0 + self.FollowScheduler = routines.scheduleFunction( self._FollowScheduler, { self, Distance }, timer.getTime() + 1, 1 ) + EscortGroup:MessageToClient( "Rejoining and Following at " .. Distance .. "!", 30, EscortClient ) +end + + +function ESCORT._ReportNearbyTargets( MenuParam ) + + local self = MenuParam.ParamSelf + local EscortGroup = self.EscortGroup + local EscortClient = self.EscortClient + + self.ReportTargets = MenuParam.ParamReportTargets + + if self.ReportTargets then + if not self.ReportTargetsScheduler then + self.ReportTargetsScheduler = routines.scheduleFunction( self._ReportTargetsScheduler, { self }, timer.getTime() + 1, 30 ) + end + else + routines.removeFunction( self.ReportTargetsScheduler ) + self.ReportTargetsScheduler = nil + end +end + +--- @param #MENUPARAM MenuParam +function ESCORT._ScanTargets30Seconds( MenuParam ) + MenuParam.ParamSelf:T() + + local self = MenuParam.ParamSelf + local EscortGroup = self.EscortGroup + local EscortClient = self.EscortClient + + routines.removeFunction( self.FollowScheduler ) + + EscortGroup:PushTask( + EscortGroup:TaskControlled( + EscortGroup:TaskOrbitCircle( 200, 20 ), + EscortGroup:TaskCondition( nil, nil, nil, nil, 30, nil ) + ) + ) + MESSAGE:New( "Scanning targets for 30 seconds.", MenuParam.ParamSelf.EscortName, 10, "ESCORT/ScanTargets30Seconds" ):ToClient( EscortClient ) +end + +--- @param #MENUPARAM MenuParam +function ESCORT._ScanTargets60Seconds( MenuParam ) + MenuParam.ParamSelf:T() + + local self = MenuParam.ParamSelf + local EscortGroup = self.EscortGroup + local EscortClient = self.EscortClient + + routines.removeFunction( self.FollowScheduler ) + + EscortGroup:PushTask( + EscortGroup:TaskControlled( + EscortGroup:TaskOrbitCircle( 200, 20 ), + EscortGroup:TaskCondition( nil, nil, nil, nil, 60, nil ) + ) + ) + MESSAGE:New( "Scanning targets for 60 seconds.", MenuParam.ParamSelf.EscortName, 10, "ESCORT/ScanTargets60Seconds" ):ToClient( EscortClient ) +end + +--- @param #MENUPARAM MenuParam +function ESCORT._AttackTarget( MenuParam ) + + local self = MenuParam.ParamSelf + local EscortGroup = self.EscortGroup + local EscortClient = self.EscortClient + local AttackUnit = MenuParam.ParamUnit + + routines.removeFunction( self.FollowScheduler ) + self.FollowScheduler = nil + + EscortGroup:OptionROEOpenFire() + EscortGroup:OptionROTVertical() + EscortGroup:PushTask( EscortGroup:TaskAttackUnit( AttackUnit ) ) + MESSAGE:New( "Attacking Unit", MenuParam.ParamSelf.EscortName, 10, "ESCORT/AttackTarget" ):ToClient( EscortClient ) +end + +--- @param #MENUPARAM MenuParam +function ESCORT._ROEHoldFire( MenuParam ) + + local self = MenuParam.ParamSelf + local EscortGroup = self.EscortGroup + local EscortClient = self.EscortClient + + EscortGroup:OptionROEHoldFire() + MESSAGE:New( "Holding weapons.", MenuParam.ParamSelf.EscortName, 10, "ESCORT/ROEHoldFire" ):ToClient( EscortClient ) +end + +--- @param #MENUPARAM MenuParam +function ESCORT._ROEReturnFire( MenuParam ) + + local self = MenuParam.ParamSelf + local EscortGroup = self.EscortGroup + local EscortClient = self.EscortClient + + EscortGroup:OptionROEReturnFire() + MESSAGE:New( "Returning enemy fire.", MenuParam.ParamSelf.EscortName, 10, "ESCORT/ROEReturnFire" ):ToClient( EscortClient ) +end + +--- @param #MENUPARAM MenuParam +function ESCORT._ROEOpenFire( MenuParam ) + + local self = MenuParam.ParamSelf + local EscortGroup = self.EscortGroup + local EscortClient = self.EscortClient + + EscortGroup:OptionROEOpenFire() + MESSAGE:New( "Open fire on ordered targets.", MenuParam.ParamSelf.EscortName, 10, "ESCORT/ROEOpenFire" ):ToClient( EscortClient ) +end + +--- @param #MENUPARAM MenuParam +function ESCORT._ROEWeaponFree( MenuParam ) + + local self = MenuParam.ParamSelf + local EscortGroup = self.EscortGroup + local EscortClient = self.EscortClient + + EscortGroup:OptionROEWeaponFree() + MESSAGE:New( "Engaging targets.", MenuParam.ParamSelf.EscortName, 10, "ESCORT/ROEWeaponFree" ):ToClient( EscortClient ) +end + +--- @param #MENUPARAM MenuParam +function ESCORT._OptionROTNoReaction( MenuParam ) + + local self = MenuParam.ParamSelf + local EscortGroup = self.EscortGroup + local EscortClient = self.EscortClient + + EscortGroup:OptionEvasionNoReaction() + MESSAGE:New( "We'll fight until death.", MenuParam.ParamSelf.EscortName, 10, "ESCORT/OptionEvasionNoReaction" ):ToClient( EscortClient ) +end + +--- @param #MENUPARAM MenuParam +function ESCORT._OptionROTPassiveDefense( MenuParam ) + + local self = MenuParam.ParamSelf + local EscortGroup = self.EscortGroup + local EscortClient = self.EscortClient + + EscortGroup:OptionROTPassiveDefense() + MESSAGE:New( "We will use flares, chaff and jammers.", MenuParam.ParamSelf.EscortName, 10, "ESCORT/OptionROTPassiveDefense" ):ToClient( EscortClient ) +end + +--- @param #MENUPARAM MenuParam +function ESCORT._OptionROTEvadeFire( MenuParam ) + + local self = MenuParam.ParamSelf + local EscortGroup = self.EscortGroup + local EscortClient = self.EscortClient + + EscortGroup:OptionROTEvadeFire() + MESSAGE:New( "We'll evade enemy fire.", MenuParam.ParamSelf.EscortName, 10, "ESCORT/OptionROTEvadeFire" ):ToClient( EscortClient ) +end + +--- @param #MENUPARAM MenuParam +function ESCORT._OptionROTVertical( MenuParam ) + + local self = MenuParam.ParamSelf + local EscortGroup = self.EscortGroup + local EscortClient = self.EscortClient + + EscortGroup:OptionROTVertical() + MESSAGE:New( "We'll perform vertical evasive manoeuvres.", MenuParam.ParamSelf.EscortName, 10, "ESCORT/OptionROTVertical" ):ToClient( EscortClient ) +end + +--- @param #MENUPARAM MenuParam +function ESCORT._ResumeMission( MenuParam ) + + local self = MenuParam.ParamSelf + local EscortGroup = self.EscortGroup + local EscortClient = self.EscortClient + + local WayPoint = MenuParam.ParamWayPoint + + routines.removeFunction( self.FollowScheduler ) + self.FollowScheduler = nil + + local WayPoints = EscortGroup:GetTaskRoute() + self:T( WayPoint, WayPoints ) + + for WayPointIgnore = 1, WayPoint do + table.remove( WayPoints, 1 ) + end + + EscortGroup:PopCurrentTask() + EscortGroup:PushTask( EscortGroup:TaskRoute( WayPoints ) ) + MESSAGE:New( "Resuming mission.", MenuParam.ParamSelf.EscortName, 10, "ESCORT/ResumeMission" ):ToClient( EscortClient ) +end + +function ESCORT:RegisterRoute() + + local EscortGroup = self.EscortGroup -- Group#GROUP + + local TaskPoints = EscortGroup:GetTaskRoute() + self:T( TaskPoints ) + + for TaskPointID, TaskPoint in pairs( TaskPoints ) do + self:T( TaskPointID ) + TaskPoint.task.params.tasks[#TaskPoint.task.params.tasks+1] = EscortGroup:TaskRegisterWayPoint( TaskPointID ) + self:T( TaskPoint.task.params.tasks[#TaskPoint.task.params.tasks] ) + end + + self:T( TaskPoints ) + + return TaskPoints +end + +--- @param Escort#ESCORT self +function ESCORT:_FollowScheduler( FollowDistance ) + self:F( { FollowDistance }) + + if self.EscortGroup:IsAlive() and self.EscortClient:IsAlive() then + + local ClientUnit = self.EscortClient:GetClientGroupUnit() + local GroupUnit = self.EscortGroup:GetUnit( 1 ) + + if self.CT1 == 0 and self.GT1 == 0 then + self.CV1 = ClientUnit:GetPositionVec3() + self.CT1 = timer.getTime() + self.GV1 = GroupUnit:GetPositionVec3() + self.GT1 = timer.getTime() + else + local CT1 = self.CT1 + local CT2 = timer.getTime() + local CV1 = self.CV1 + local CV2 = ClientUnit:GetPositionVec3() + self.CT1 = CT2 + self.CV1 = CV2 + + local CD = ( ( CV2.x - CV1.x )^2 + ( CV2.y - CV1.y )^2 + ( CV2.z - CV1.z )^2 ) ^ 0.5 + local CT = CT2 - CT1 + + local CS = ( 3600 / CT ) * ( CD / 1000 ) + + self:T2( { "Client:", CS, CD, CT, CV2, CV1, CT2, CT1 } ) + + local GT1 = self.GT1 + local GT2 = timer.getTime() + local GV1 = self.GV1 + local GV2 = GroupUnit:GetPositionVec3() + self.GT1 = GT2 + self.GV1 = GV2 + + local GD = ( ( GV2.x - GV1.x )^2 + ( GV2.y - GV1.y )^2 + ( GV2.z - GV1.z )^2 ) ^ 0.5 + local GT = GT2 - GT1 + + local GS = ( 3600 / GT ) * ( GD / 1000 ) + + self:T2( { "Group:", GS, GD, GT, GV2, GV1, GT2, GT1 } ) + + -- Calculate the group direction vector + local GV = { x = GV2.x - CV2.x, y = GV2.y - CV2.y, z = GV2.z - CV2.z } + + -- Calculate GH2, GH2 with the same height as CV2. + local GH2 = { x = GV2.x, y = CV2.y, z = GV2.z } + + -- Calculate the angle of GV to the orthonormal plane + local alpha = math.atan2( GV.z, GV.x ) + + -- Now we calculate the intersecting vector between the circle around CV2 with radius FollowDistance and GH2. + -- From the GeoGebra model: CVI = (x(CV2) + FollowDistance cos(alpha), y(GH2) + FollowDistance sin(alpha), z(CV2)) + local CVI = { x = CV2.x + FollowDistance * math.cos(alpha), + y = GH2.y, + z = CV2.z + FollowDistance * math.sin(alpha), + } + + -- Calculate the direction vector DV of the escort group. We use CVI as the base and CV2 as the direction. + local DV = { x = CV2.x - CVI.x, y = CV2.y - CVI.y, z = CV2.z - CVI.z } + + -- We now calculate the unary direction vector DVu, so that we can multiply DVu with the speed, which is expressed in meters / s. + -- We need to calculate this vector to predict the point the escort group needs to fly to according its speed. + -- The distance of the destination point should be far enough not to have the aircraft starting to swipe left to right... + local DVu = { x = DV.x / FollowDistance, y = DV.y / FollowDistance, z = DV.z / FollowDistance } + + -- Now we can calculate the group destination vector GDV. + local GDV = { x = DVu.x * CS * 2 + CVI.x, y = CVI.y, z = DVu.z * CS * 2 + CVI.z } + self:T2( { "CV2:", CV2 } ) + self:T2( { "CVI:", CVI } ) + self:T2( { "GDV:", GDV } ) + + -- Measure distance between client and group + local CatchUpDistance = ( ( GDV.x - GV2.x )^2 + ( GDV.y - GV2.y )^2 + ( GDV.z - GV2.z )^2 ) ^ 0.5 + + -- The calculation of the Speed would simulate that the group would take 30 seconds to overcome + -- the requested Distance). + local Time = 30 + local CatchUpSpeed = ( CatchUpDistance - ( CS * 2 ) ) / Time + + local Speed = CS + CatchUpSpeed + if Speed < 0 then + Speed = 0 + end + + self:T( { "Client Speed, Escort Speed, Speed, FlyDistance, Time:", CS, GS, Speed, Distance, Time } ) + + -- Now route the escort to the desired point with the desired speed. + self.EscortGroup:TaskRouteToVec3( GDV, Speed / 3.6 ) -- DCS models speed in Mps (Miles per second) + end + else + routines.removeFunction( self.FollowScheduler ) + end + +end + + +function ESCORT:_ReportTargetsScheduler() + self:F() + + self.Targets = {} + + if self.EscortGroup:IsAlive() then + local EscortTargets = self.EscortGroup:GetDetectedTargets() + + local EscortTargetMessages = "" + for EscortTargetID, EscortTarget in pairs( EscortTargets ) do + local EscortObject = EscortTarget.object + self:T( EscortObject ) + if EscortObject and EscortObject:isExist() and EscortObject.id_ < 50000000 then + + local EscortTargetMessage = "" + + local EscortTargetUnit = UNIT:New( EscortObject ) + + local EscortTargetCategoryName = EscortTargetUnit:GetCategoryName() + local EscortTargetCategoryType = EscortTargetUnit:GetTypeName() + + + -- local EscortTargetIsDetected, + -- EscortTargetIsVisible, + -- EscortTargetLastTime, + -- EscortTargetKnowType, + -- EscortTargetKnowDistance, + -- EscortTargetLastPos, + -- EscortTargetLastVelocity + -- = self.EscortGroup:IsTargetDetected( EscortObject ) + -- + -- self:T( { EscortTargetIsDetected, + -- EscortTargetIsVisible, + -- EscortTargetLastTime, + -- EscortTargetKnowType, + -- EscortTargetKnowDistance, + -- EscortTargetLastPos, + -- EscortTargetLastVelocity } ) + + if EscortTarget.distance then + local EscortTargetUnitPositionVec3 = EscortTargetUnit:GetPositionVec3() + local EscortPositionVec3 = self.EscortGroup:GetPositionVec3() + local Distance = routines.utils.get3DDist( EscortTargetUnitPositionVec3, EscortPositionVec3 ) / 1000 + self:T( { self.EscortGroup:GetName(), EscortTargetUnit:GetName(), Distance, EscortTarget.visible } ) + + if Distance <= 8 then + + if EscortTarget.type then + EscortTargetMessage = EscortTargetMessage .. " - " .. EscortTargetCategoryName .. " (" .. EscortTargetCategoryType .. ") at " + else + EscortTargetMessage = EscortTargetMessage .. " - Unknown target at " + end + + EscortTargetMessage = EscortTargetMessage .. string.format( "%.2f", Distance ) .. " km" + + if EscortTarget.visible then + EscortTargetMessage = EscortTargetMessage .. ", visual" + end + + local TargetIndex = Distance*1000 + self.Targets[TargetIndex] = {} + self.Targets[TargetIndex].AttackMessage = EscortTargetMessage + self.Targets[TargetIndex].AttackUnit = EscortTargetUnit + end + end + + if EscortTargetMessage ~= "" then + EscortTargetMessages = EscortTargetMessages .. EscortTargetMessage .. "\n" + end + end + end + + if EscortTargetMessages ~= "" and self.ReportTargets == true then + self.EscortClient:Message( EscortTargetMessages:gsub("\n$",""), 20, "/ESCORT.DetectedTargets", self.EscortName .. " reporting detected targets within 8 km range:", 0 ) + end + + self:T() + + self:T( { "Sorting Targets Table:", self.Targets } ) + table.sort( self.Targets ) + self:T( { "Sorted Targets Table:", self.Targets } ) + + for MenuIndex = 1, #self.EscortMenuAttackTargets do + self:T( { "Remove Menu:", self.EscortMenuAttackTargets[MenuIndex] } ) + self.EscortMenuAttackTargets[MenuIndex] = self.EscortMenuAttackTargets[MenuIndex]:Remove() + end + + local MenuIndex = 1 + for TargetID, TargetData in pairs( self.Targets ) do + self:T( { "Adding menu:", TargetID, "for Unit", self.Targets[TargetID].AttackUnit } ) + if MenuIndex <= 10 then + self.EscortMenuAttackTargets[MenuIndex] = + MENU_CLIENT_COMMAND:New( self.EscortClient, + self.Targets[TargetID].AttackMessage, + self.EscortMenuAttackNearbyTargets, + ESCORT._AttackTarget, + { ParamSelf = self, + ParamUnit = self.Targets[TargetID].AttackUnit + } + ) + self:T( { "New Menu:", self.EscortMenuAttackTargets[TargetID] } ) + MenuIndex = MenuIndex + 1 + else + break + end + end + + else + routines.removeFunction( self.ReportTargetsScheduler ) + self.ReportTargetsScheduler = nil + end +end diff --git a/Moose/GoHomeTask.lua b/Moose/GoHomeTask.lua index 7bb3da7ad..4f302f5a1 100644 --- a/Moose/GoHomeTask.lua +++ b/Moose/GoHomeTask.lua @@ -13,26 +13,23 @@ GOHOMETASK = { -- @param table{string,...}|string LandingZones Table of Landing Zone names where Home(s) are located. -- @return GOHOMETASK function GOHOMETASK:New( LandingZones ) -trace.f(self.ClassName) - - -- Child holds the inherited instance of the PICKUPTASK Class to the BASE class. - local Child = BASE:Inherit( self, TASK:New() ) - + local self = BASE:Inherit( self, TASK:New() ) + self:F( { LandingZones } ) local Valid = true Valid = routines.ValidateZone( LandingZones, "LandingZones", Valid ) if Valid then - Child.Name = 'Fly Home' - Child.TaskBriefing = "Task: Fly back to your home base. Your co-pilot will provide you with the directions (required flight angle in degrees) and the distance (in km) to your home base." + self.Name = 'Fly Home' + self.TaskBriefing = "Task: Fly back to your home base. Your co-pilot will provide you with the directions (required flight angle in degrees) and the distance (in km) to your home base." if type( LandingZones ) == "table" then - Child.LandingZones = LandingZones + self.LandingZones = LandingZones else - Child.LandingZones = { LandingZones } + self.LandingZones = { LandingZones } end - Child.Stages = { STAGEBRIEF:New(), STAGESTART:New(), STAGEROUTE:New(), STAGEARRIVE:New(), STAGEDONE:New() } - Child.SetStage( Child, 1 ) + self.Stages = { STAGEBRIEF:New(), STAGESTART:New(), STAGEROUTE:New(), STAGEARRIVE:New(), STAGEDONE:New() } + self.SetStage( self, 1 ) end - return Child + return self end diff --git a/Moose/Group.lua b/Moose/Group.lua index 1103b13be..98399764c 100644 --- a/Moose/Group.lua +++ b/Moose/Group.lua @@ -1,9 +1,6 @@ --- A GROUP class abstraction of a DCSGroup class. -- The GROUP class will take an abstraction of the DCSGroup class, providing more methods that can be done with a GROUP. --- --- --- @module GROUP --- @extends BASE#BASE +-- @module Group Include.File( "Routines" ) Include.File( "Base" ) @@ -12,7 +9,8 @@ Include.File( "Unit" ) --- The GROUP class -- @type GROUP --- @field #Group DCSGroup The DCS group class. +-- @extends Base#BASE +-- @field DCSGroup#Group DCSGroup The DCS group class. -- @field #string GroupName The name of the group. -- @field #number GroupID the ID of the group. -- @field #table Controller The controller of the group. @@ -21,26 +19,34 @@ GROUP = { GroupName = "", GroupID = 0, Controller = nil, + DCSGroup = nil, } --- A DCSGroup --- @type Group +-- @type DCSGroup -- @field id_ The ID of the group in DCS -GROUPS = {} +--- The GROUPS structure contains references to all the created GROUP instances. +local GROUPS = {} --- Create a new GROUP from a DCSGroup -- @param self --- @param #Group DCSGroup The DCS Group +-- @param DCSGroup#Group DCSGroup The DCS Group -- @return #GROUP self function GROUP:New( DCSGroup ) local self = BASE:Inherit( self, BASE:New() ) - self:T( DCSGroup:getName() ) + self:F( DCSGroup ) self.DCSGroup = DCSGroup - self.GroupName = DCSGroup:getName() - self.GroupID = DCSGroup:getID() - self.Controller = DCSGroup:getController() + if self.DCSGroup and self.DCSGroup:isExist() then + self.GroupName = DCSGroup:getName() + self.GroupID = DCSGroup:getID() + self.Controller = DCSGroup:getController() + else + self:E( { "DCSGroup is nil or does not exist, cannot initialize GROUP!", self.DCSGroup } ) + end + + GROUPS[self.GroupID] = self return self end @@ -52,7 +58,7 @@ end -- @return #GROUP self function GROUP:NewFromName( GroupName ) local self = BASE:Inherit( self, BASE:New() ) - self:T( GroupName ) + self:F( GroupName ) self.DCSGroup = Group.getByName( GroupName ) if self.DCSGroup then @@ -61,6 +67,8 @@ function GROUP:NewFromName( GroupName ) self.Controller = self.DCSGroup:getController() end + GROUPS[self.GroupID] = self + return self end @@ -70,7 +78,7 @@ end -- @return #GROUP self function GROUP:NewFromDCSUnit( DCSUnit ) local self = BASE:Inherit( self, BASE:New() ) - self:T( DCSUnit ) + self:F( DCSUnit ) self.DCSGroup = DCSUnit:getGroup() if self.DCSGroup then @@ -79,6 +87,8 @@ function GROUP:NewFromDCSUnit( DCSUnit ) self.Controller = self.DCSGroup:getController() end + GROUPS[self.GroupID] = self + return self end @@ -86,7 +96,7 @@ end -- @param self -- @return #Group The DCSGroup. function GROUP:GetDCSGroup() - self:T( { self.GroupName } ) + self:F( { self.GroupName } ) self.DCSGroup = Group.getByName( self.GroupName ) return self.DCSGroup end @@ -98,7 +108,7 @@ end -- @param #number UnitNumber The unit index to be returned from the GROUP. -- @return #Unit The DCS Unit. function GROUP:GetDCSUnit( UnitNumber ) - self:T( { self.GroupName, UnitNumber } ) + self:F( { self.GroupName, UnitNumber } ) return self.DCSGroup:getUnit( UnitNumber ) end @@ -106,36 +116,85 @@ end --- Activates a GROUP. -- @param self function GROUP:Activate() - self:T( { self.GroupName } ) + self:F( { self.GroupName } ) trigger.action.activateGroup( self:GetDCSGroup() ) return self:GetDCSGroup() end +--- Gets the ID of the GROUP. +-- @param self +-- @return #number The ID of the GROUP. +function GROUP:GetID() + self:F( self.GroupName ) + + return self.GroupID +end + --- Gets the name of the GROUP. -- @param self -- @return #string The name of the GROUP. function GROUP:GetName() - self:T( self.GroupName ) + self:F( self.GroupName ) return self.GroupName end ---- Gets the current Point of the GROUP in VEC2 format. --- @return #Vec2 Current x and Y position of the group. -function GROUP:GetPoint() - self:T( self.GroupName ) +--- Gets the type name of the group. +-- @param #GROUP self +-- @return #string The type name of the group. +function GROUP:GetTypeName() + self:F( self.GroupName ) + + return self.DCSGroup:getUnit(1):getTypeName() +end + +--- Gets the callsign of the fist unit of the group. +-- @param #GROUP self +-- @return #string The callsign of the first unit of the group. +function GROUP:GetCallsign() + self:F( self.GroupName ) + + return self.DCSGroup:getUnit(1):getCallsign() +end + + + +--- Gets the current Point of the GROUP in VEC3 format. +-- @return #Vec3 Current x,y and z position of the group. +function GROUP:GetPointVec2() + self:F( self.GroupName ) - local GroupPoint = self:GetUnit(1):GetPoint() + local GroupPoint = self:GetUnit(1):GetPointVec2() self:T( GroupPoint ) return GroupPoint end +--- Gets the current Point of the GROUP in VEC2 format. +-- @return #Vec2 Current x and y position of the group in the 2D plane. +function GROUP:GetPointVec2() + self:F( self.GroupName ) + + local GroupPoint = self:GetUnit(1):GetPointVec2() + self:T( GroupPoint ) + return GroupPoint +end + +--- Gets the current Point of the GROUP in VEC3 format. +-- @return #Vec3 Current Vec3 position of the group. +function GROUP:GetPositionVec3() + self:F( self.GroupName ) + + local GroupPoint = self:GetUnit(1):GetPositionVec3() + self:T( GroupPoint ) + return GroupPoint +end + --- Destroy a GROUP -- Note that this destroy method also raises a destroy event at run-time. -- So all event listeners will catch the destroy event of this GROUP. -- @param self function GROUP:Destroy() - self:T( self.GroupName ) + self:F( self.GroupName ) for Index, UnitData in pairs( self.DCSGroup:getUnits() ) do self:CreateEventCrash( timer.getTime(), UnitData ) @@ -147,11 +206,11 @@ end --- Gets the DCS Unit. --- @param self +-- @param #GROUP self -- @param #number UnitNumber The number of the Unit to be returned. --- @return #Unit The DCS Unit. +-- @return Unit#UNIT The DCS Unit. function GROUP:GetUnit( UnitNumber ) - self:T( { self.GroupName, UnitNumber } ) + self:F( { self.GroupName, UnitNumber } ) return UNIT:New( self.DCSGroup:getUnit( UnitNumber ) ) end @@ -160,7 +219,7 @@ end -- @param self -- @return #boolean Air category evaluation result. function GROUP:IsAir() -self:T() + self:F() local IsAirResult = self.DCSGroup:getCategory() == Group.Category.AIRPLANE or self.DCSGroup:getCategory() == Group.Category.HELICOPTER @@ -173,7 +232,7 @@ end -- @param self -- @return #boolean Alive result. function GROUP:IsAlive() -self:T() + self:F() local IsAliveResult = self.DCSGroup and self.DCSGroup:isExist() @@ -186,7 +245,7 @@ end -- @param self -- @return #boolean All units on the ground result. function GROUP:AllOnGround() -self:T() + self:F() local AllOnGroundResult = true @@ -202,10 +261,10 @@ end --- Returns the current maximum velocity of the group. -- Each unit within the group gets evaluated, and the maximum velocity (= the unit which is going the fastest) is returned. --- @param self +-- @param #GROUP self -- @return #number Maximum velocity found. function GROUP:GetMaxVelocity() - self:T() + self:F() local MaxVelocity = 0 @@ -228,7 +287,7 @@ end -- @param self -- @return #number Minimum height found. function GROUP:GetMinHeight() - self:T() + self:F() end @@ -238,87 +297,341 @@ end -- @param self -- @return #number Maximum height found. function GROUP:GetMaxHeight() -self:T() + self:F() end +-- Tasks + +--- Popping current Task from the group. +-- @param #GROUP self +-- @return Group#GROUP self +function GROUP:PopCurrentTask() + self:F() + + local Controller = self:_GetController() + + Controller:popTask() + + return self +end + + +--- Pushing Task on the queue from the group. +-- @param #GROUP self +-- @return Group#GROUP self +function GROUP:PushTask( DCSTask ) + self:F() + + local Controller = self:_GetController() + + Controller:pushTask( DCSTask ) + + return self +end + +--- Return a condition section for a controlled task +-- @param #GROUP self +-- @param #Time time +-- @param #string userFlag +-- @param #boolean userFlagValue +-- @param #string condition +-- @param #Time duration +-- @param #number lastWayPoint +-- return #DCSTask +function GROUP:TaskCondition( time, userFlag, userFlagValue, condition, duration, lastWayPoint ) + self:F( { time, userFlag, userFlagValue, condition, duration, lastWayPoint } ) + + local DCSStopCondition = {} + DCSStopCondition.time = time + DCSStopCondition.userFlag = userFlag + DCSStopCondition.userFlagValue = userFlagValue + DCSStopCondition.condition = condition + DCSStopCondition.duration = duration + DCSStopCondition.lastWayPoint = lastWayPoint + + self:T( { DCSStopCondition } ) + return DCSStopCondition +end + +--- Return a Controlled Task taking a Task and a TaskCondition +-- @param #GROUP self +-- @param #DCSTask DCSTask +-- @param #DCSStopCondition DCSStopCondition +-- @return #DCSTask +function GROUP:TaskControlled( DCSTask, DCSStopCondition ) + self:F( { DCSTask, DCSStopCondition } ) + + local DCSTaskControlled + + DCSTaskControlled = { + id = 'ControlledTask', + params = { + task = DCSTask, + stopCondition = DCSStopCondition, + } + } + + self:T( { DCSTaskControlled } ) + return DCSTaskControlled +end + +--- Orbit at a specified position at a specified alititude during a specified duration with a specified speed. +-- @param #GROUP self +-- @param #Vec2 Point The point to hold the position. +-- @param #number Altitude The altitude to hold the position. +-- @param #number Speed The speed flying when holding the position. +-- @return #GROUP self +function GROUP:TaskOrbitCircleAtVec2( Point, Altitude, Speed ) + self:F( { self.GroupName, Point, Altitude, Speed } ) + +-- pattern = enum AI.Task.OribtPattern, +-- point = Vec2, +-- point2 = Vec2, +-- speed = Distance, +-- altitude = Distance + + local LandHeight = land.getHeight( Point ) + + self:T( { LandHeight } ) + + local DCSTask = { id = 'Orbit', + params = { pattern = AI.Task.OrbitPattern.CIRCLE, + point = Point, + speed = Speed, + altitude = Altitude + LandHeight + } + } + + +-- local AITask = { id = 'ControlledTask', +-- params = { task = { id = 'Orbit', +-- params = { pattern = AI.Task.OrbitPattern.CIRCLE, +-- point = Point, +-- speed = Speed, +-- altitude = Altitude + LandHeight +-- } +-- }, +-- stopCondition = { duration = Duration +-- } +-- } +-- } +-- ) + + return DCSTask +end + +--- Orbit at the current position of the first unit of the group at a specified alititude +-- @param #GROUP self +-- @param #number Altitude The altitude to hold the position. +-- @param #number Speed The speed flying when holding the position. +-- @return #GROUP self +function GROUP:TaskOrbitCircle( Altitude, Speed ) + self:F( { self.GroupName, Altitude, Speed } ) + + local GroupPoint = self:GetPointVec2() + + return self:TaskOrbitCircleAtVec2( GroupPoint, Altitude, Speed ) +end + + + +--- Hold position at the current position of the first unit of the group. +-- @param #GROUP self +-- @param #number Duration The maximum duration in seconds to hold the position. +-- @return #GROUP self +function GROUP:TaskHoldPosition() + self:F( { self.GroupName } ) + + return self:TaskOrbitCircle( 30, 10 ) +end + --- Land the group at a Vec2Point. --- @param self +-- @param #GROUP self -- @param #Vec2 Point The point where to land. -- @param #number Duration The duration in seconds to stay on the ground. -- @return #GROUP self -function GROUP:Land( Point, Duration ) -trace.f( self.ClassName, { self.GroupName, Point, Duration } ) +function GROUP:TaskLandAtVec2( Point, Duration ) + self:F( { self.GroupName, Point, Duration } ) - local Controller = self:_GetController() - + local DCSTask + if Duration and Duration > 0 then - Controller:pushTask( { id = 'Land', params = { point = Point, durationFlag = true, duration = Duration } } ) + DCSTask = { id = 'Land', params = { point = Point, durationFlag = true, duration = Duration } } else - Controller:pushTask( { id = 'Land', params = { point = Point, durationFlag = false } } ) + DCSTask = { id = 'Land', params = { point = Point, durationFlag = false } } end - return self + self:T( DCSTask ) + return DCSTask end +--- Land the group at a @{Zone#ZONE). +-- @param #GROUP self +-- @param Zone#ZONE Zone The zone where to land. +-- @param #number Duration The duration in seconds to stay on the ground. +-- @return #GROUP self +function GROUP:TaskLandAtZone( Zone, Duration ) + self:F( { self.GroupName, Zone, Duration } ) + + local Point = Zone:GetPointVec2() + + local DCSTask = self:TaskLandAtVec2( Point, Duration ) + + self:T( DCSTask ) + return DCSTask +end + + +--- Attack the Unit. +-- @param #GROUP self +-- @param Unit#UNIT The unit. +-- @return #DCSTask The DCS task structure. +function GROUP:TaskAttackUnit( AttackUnit ) + self:F( { self.GroupName, AttackUnit } ) + +-- AttackUnit = { +-- id = 'AttackUnit', +-- params = { +-- unitId = Unit.ID, +-- weaponType = number, +-- expend = enum AI.Task.WeaponExpend +-- attackQty = number, +-- direction = Azimuth, +-- attackQtyLimit = boolean, +-- groupAttack = boolean, +-- } +-- } + + local DCSTask + DCSTask = { id = 'AttackUnit', + params = { unitId = AttackUnit:GetID(), + expend = AI.Task.WeaponExpend.TWO, + groupAttack = true, + } + } + + self:T( { DCSTask } ) + return self +end + + + --- Move the group to a Vec2 Point, wait for a defined duration and embark a group. --- @param self +-- @param #GROUP self -- @param #Vec2 Point The point where to wait. -- @param #number Duration The duration in seconds to wait. --- @param EmbarkingGroup The group to be embarked. --- @return #GROUP self -function GROUP:Embarking( Point, Duration, EmbarkingGroup ) -trace.f( self.ClassName, { self.GroupName, Point, Duration, EmbarkingGroup.DCSGroup } ) +-- @param #GROUP EmbarkingGroup The group to be embarked. +-- @return #DCSTask The DCS task structure +function GROUP:TaskEmbarkingAtVec2( Point, Duration, EmbarkingGroup ) + self:F( { self.GroupName, Point, Duration, EmbarkingGroup.DCSGroup } ) - local Controller = self:_GetController() + local DCSTask + DCSTask = { id = 'Embarking', + params = { x = Point.x, + y = Point.y, + duration = Duration, + groupsForEmbarking = { EmbarkingGroup.GroupID }, + durationFlag = true, + distributionFlag = false, + distribution = {}, + } + } - trace.i( self.ClassName, EmbarkingGroup.GroupID ) - trace.i( self.ClassName, EmbarkingGroup.DCSGroup:getID() ) - trace.i( self.ClassName, EmbarkingGroup.DCSGroup.id ) - - Controller:pushTask( { id = 'Embarking', - params = { x = Point.x, - y = Point.y, - duration = Duration, - groupsForEmbarking = { EmbarkingGroup.GroupID }, - durationFlag = true, - distributionFlag = false, - distribution = {}, - } - } - ) - - return self + self:T( { DCSTask } ) + return DCSTask end --- Move to a defined Vec2 Point, and embark to a group when arrived within a defined Radius. --- @param self +-- @param #GROUP self -- @param #Vec2 Point The point where to wait. -- @param #number Radius The radius of the embarking zone around the Point. --- @return #GROUP self -function GROUP:EmbarkToTransport( Point, Radius ) -trace.f( self.ClassName, { self.GroupName, Point, Radius } ) +-- @return #DCSTask The DCS task structure. +function GROUP:TaskEmbarkToTransportAtVec2( Point, Radius ) + self:F( { self.GroupName, Point, Radius } ) - local Controller = self:_GetController() - - Controller:pushTask( { id = 'EmbarkToTransport', - params = { x = Point.x, - y = Point.y, - zoneRadius = Radius, - } - } - ) + local DCSTask --#DCSTask + DCSTask = { id = 'EmbarkToTransport', + params = { x = Point.x, + y = Point.y, + zoneRadius = Radius, + } + } - return self + self:T( { DCSTask } ) + return DCSTask end +--- Return a Misson task from a mission template. +-- @param #GROUP self +-- @param #table TaskMission A table containing the mission task. +-- @return #DCSTask +function GROUP:TaskMission( TaskMission ) + self:F( Points ) + + local DCSTask + DCSTask = { id = 'Mission', params = { TaskMission, }, } + + self:T( { DCSTask } ) + return DCSTask +end + +--- Return a Misson task to follow a given route defined by Points. +-- @param #GROUP self +-- @param #table Points A table of route points. +-- @return #DCSTask +function GROUP:TaskRoute( Points ) + self:F( Points ) + + local DCSTask + DCSTask = { id = 'Mission', params = { route = { points = Points, }, }, } + + self:T( { DCSTask } ) + return DCSTask +end + +--- Make the group to fly to a given point and hover. +-- @param #GROUP self +-- @param #Vec3 Point The destination point. +-- @param #number Speed The speed to travel. +-- @return #GROUP self +function GROUP:TaskRouteToVec3( Point, Speed ) + self:F( { Point, Speed } ) + + local GroupPoint = self:GetUnit( 1 ):GetPositionVec3() + + local PointFrom = {} + PointFrom.x = GroupPoint.x + PointFrom.y = GroupPoint.z + PointFrom.alt = GroupPoint.y + PointFrom.type = "Turning Point" + + local PointTo = {} + PointTo.x = Point.x + PointTo.y = Point.z + PointTo.alt = Point.y + PointTo.type = "Turning Point" + PointTo.speed = Speed + PointTo.speed_locked = true + + local Points = { PointFrom, PointTo } + + self:T( Points ) + + self:Route( Points ) + + return self +end + + + --- Make the group to follow a given route. --- @param self +-- @param #GROUP self -- @param #table GoPoints A table of Route Points. -- @return #GROUP self function GROUP:Route( GoPoints ) -self:T( GoPoints ) + self:F( GoPoints ) local Points = routines.utils.deepCopy( GoPoints ) local MissionTask = { id = 'Mission', params = { route = { points = Points, }, }, } @@ -330,19 +643,46 @@ self:T( GoPoints ) return self end +function GROUP:TaskRegisterWayPoint( WayPoint ) + + local DCSTask + + DCSTask = { id = "WrappedAction", + enabled = true, + auto = false, + number = 1, + params = + { + action = + { + id = "Script", + params = + { + command = "local MissionGroup = GROUP.FindGroup( ... ) " .. + "env.info( MissionGroup:GetName() ) " .. + "MissionGroup:RegisterWayPoint ( " .. WayPoint .. " )", + }, -- end of ["params"] + }, -- end of ["action"] + }, -- end of ["params"] + } + self:T( DCSTask ) + + return DCSTask +end + --- Route the group to a given zone. -- The group final destination point can be randomized. -- A speed can be given in km/h. -- A given formation can be given. --- @param self --- @param ZONE#ZONE Zone The zone where to route to. +-- @param #GROUP self +-- @param Zone#ZONE Zone The zone where to route to. -- @param #boolean Randomize Defines whether to target point gets randomized within the Zone. -- @param #number Speed The speed. --- @param BASE#FORMATION Formation The formation string. -function GROUP:RouteToZone( Zone, Randomize, Speed, Formation ) - self:T( Zone ) +-- @param Base#FORMATION Formation The formation string. +function GROUP:TaskRouteToZone( Zone, Randomize, Speed, Formation ) + self:F( Zone ) - local GroupPoint = self:GetPoint() + local GroupPoint = self:GetPointVec2() local PointFrom = {} PointFrom.x = GroupPoint.x @@ -358,7 +698,7 @@ function GROUP:RouteToZone( Zone, Randomize, Speed, Formation ) if Randomize then ZonePoint = Zone:GetRandomPoint() else - ZonePoint = Zone:GetPoint() + ZonePoint = Zone:GetPointVec2() end PointTo.x = ZonePoint.x @@ -386,14 +726,32 @@ function GROUP:RouteToZone( Zone, Randomize, Speed, Formation ) return self end ---- Return the route of a group. --- @param self +--- Return the mission template of the group. +-- @param #GROUP self +-- @return #table The MissionTemplate +function GROUP:GetTaskMission() + self:F( self.GroupName ) + + return _Database.Groups[self.GroupName].Template +end + +--- Return the mission route of the group. +-- @param #GROUP self +-- @return #table The mission route defined by points. +function GROUP:GetTaskRoute() + self:F( self.GroupName ) + + return _Database.Groups[self.GroupName].Template.route.points +end + +--- Return the route of a group by using the @{Database#DATABASE} class. +-- @param #GROUP self -- @param #number Begin The route point from where the copy will start. The base route point is 0. -- @param #number End The route point where the copy will end. The End point is the last point - the End point. The last point has base 0. -- @param #boolean Randomize Randomization of the route, when true. -- @param #number Radius When randomization is on, the randomization is within the radius. function GROUP:CopyRoute( Begin, End, Randomize, Radius ) -self:T( { Begin, End } ) + self:F( { Begin, End } ) local Points = {} @@ -436,8 +794,205 @@ self:T( { Begin, End } ) end --- Get the controller for the GROUP. +-- @function _GetController +-- @param #GROUP self +-- @return Controller#Controller function GROUP:_GetController() return self.DCSGroup:getController() end + +function GROUP:GetDetectedTargets() + + return self:_GetController():getDetectedTargets() + +end + +function GROUP:IsTargetDetected( DCSObject ) + + local TargetIsDetected, TargetIsVisible, TargetLastTime, TargetKnowType, TargetKnowDistance, TargetLastPos, TargetLastVelocity + = self:_GetController():isTargetDetected( DCSObject ) + + return TargetIsDetected, TargetIsVisible, TargetLastTime, TargetKnowType, TargetKnowDistance, TargetLastPos, TargetLastVelocity + +end + +-- Options + +--- Holding weapons. +-- @param #GROUP self +-- @return #GROUP self +function GROUP:OptionROEHoldFire() + self:F( { self.GroupName } ) + + local Controller = self:_GetController() + + Controller:setOption( AI.Option.Air.id.ROE, AI.Option.Air.val.ROE.WEAPON_HOLD ) + return self +end + +--- Return fire. +-- @param #GROUP self +-- @return #GROUP self +function GROUP:OptionROEReturnFire() + self:F( { self.GroupName } ) + + local Controller = self:_GetController() + + Controller:setOption( AI.Option.Air.id.ROE, AI.Option.Air.val.ROE.RETURN_FIRE ) + return self +end + +--- Openfire. +-- @param #GROUP self +-- @return #GROUP self +function GROUP:OptionROEOpenFire() + self:F( { self.GroupName } ) + + local Controller = self:_GetController() + + Controller:setOption( AI.Option.Air.id.ROE, AI.Option.Air.val.ROE.OPEN_FIRE ) + return self +end + +--- Weapon free. +-- @param #GROUP self +-- @return #GROUP self +function GROUP:OptionROEWeaponFree() + self:F( { self.GroupName } ) + + local Controller = self:_GetController() + + Controller:setOption( AI.Option.Air.id.ROE, AI.Option.Air.val.ROE.WEAPON_FREE ) + return self +end + +--- No evasion on enemy threats. +-- @param #GROUP self +-- @return #GROUP self +function GROUP:OptionEvasionNoReaction() + self:F( { self.GroupName } ) + + local Controller = self:_GetController() + + Controller:setOption( AI.Option.Air.id.REACTION_ON_THREAT, AI.Option.Air.val.REACTION_ON_THREAT.NO_REACTION ) + return self +end + +--- Evasion passive defense. +-- @param #GROUP self +-- @return #GROUP self +function GROUP:OptionROTPassiveDefense() + self:F( { self.GroupName } ) + + local Controller = self:_GetController() + + Controller:setOption( AI.Option.Air.id.REACTION_ON_THREAT, AI.Option.Air.val.REACTION_ON_THREAT.PASSIVE_DEFENSE ) + return self +end + +--- Evade fire. +-- @param #GROUP self +-- @return #GROUP self +function GROUP:OptionROTEvadeFire() + self:F( { self.GroupName } ) + + local Controller = self:_GetController() + + Controller:setOption( AI.Option.Air.id.REACTION_ON_THREAT, AI.Option.Air.val.REACTION_ON_THREAT.EVADE_FIRE ) + return self +end + +--- Vertical manoeuvres. +-- @param #GROUP self +-- @return #GROUP self +function GROUP:OptionROTVertical() + self:F( { self.GroupName } ) + + local Controller = self:_GetController() + + Controller:setOption( AI.Option.Air.id.REACTION_ON_THREAT, AI.Option.Air.val.REACTION_ON_THREAT.BYPASS_AND_ESCAPE ) + return self +end + +-- Message APIs + +--- Returns a message for a coalition or a client. +-- @param #GROUP self +-- @param #string Message The message text +-- @param #Duration Duration The duration of the message. +-- @return Message#MESSAGE +function GROUP:Message( Message, Duration ) + self:F( { Message, Duration } ) + + return MESSAGE:New( Message, self:GetCallsign() .. "(" .. self:GetTypeName() .. ")", Duration, self:GetClassNameAndID() ) +end + +--- Send a message to all coalitions. +-- The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message. +-- @param #GROUP self +-- @param #string Message The message text +-- @param #Duration Duration The duration of the message. +function GROUP:MessageToAll( Message, Duration ) + self:F( { Message, Duration } ) + + self:Message( Message, Duration ):ToAll() +end + +--- Send a message to the red coalition. +-- The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message. +-- @param #GROUP self +-- @param #string Message The message text +-- @param #Duration Duration The duration of the message. +function GROUP:MessageToRed( Message, Duration ) + self:F( { Message, Duration } ) + + self:Message( Message, Duration ):ToRed() +end + +--- Send a message to the blue coalition. +-- The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message. +-- @param #GROUP self +-- @param #string Message The message text +-- @param #Duration Duration The duration of the message. +function GROUP:MessageToBlue( Message, Duration ) + self:F( { Message, Duration } ) + + self:Message( Message, Duration ):ToBlue() +end + +--- Send a message to a client. +-- The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message. +-- @param #GROUP self +-- @param #string Message The message text +-- @param #Duration Duration The duration of the message. +-- @param Client#CLIENT Client The client object receiving the message. +function GROUP:MessageToClient( Message, Duration, Client ) + self:F( { Message, Duration } ) + + self:Message( Message, Duration ):ToClient( Client ) +end + +function GROUP:RegisterWayPoint( WayPoint ) + + self:Message( "Moving over wayPoint " .. WayPoint, 20 ):ToAll() + self.WayPoint = WayPoint +end + + + + +--- Find the created GROUP using the DCSGroup ID. If a GROUP was created with the DCSGroupID, the the GROUP instance will be returned. +-- Otherwise nil will be returned. +-- @param DCSGroup#Group Group +-- @return #GROUP +function GROUP.FindGroup( DCSGroup ) + + local self = GROUPS[DCSGroup:getID()] -- Group#GROUP + self:T( self:GetClassNameAndID() ) + return self + +end + + diff --git a/Moose/Menu.lua b/Moose/Menu.lua index a8d980568..3d4320d6a 100644 --- a/Moose/Menu.lua +++ b/Moose/Menu.lua @@ -1,11 +1,12 @@ --- Encapsulation of DCS World Menu system in a set of MENU classes. --- @module MENU +-- @module Menu Include.File( "Routines" ) Include.File( "Base" ) --- The MENU class --- @type +-- @type MENU +-- @extends Base#BASE MENU = { ClassName = "MENU", MenuPath = nil, @@ -26,7 +27,8 @@ function MENU:New( MenuText, MenuParentPath ) end --- The COMMANDMENU class --- @type +-- @type COMMANDMENU +-- @extends Menu#MENU COMMANDMENU = { ClassName = "COMMANDMENU", CommandMenuFunction = nil, @@ -51,7 +53,8 @@ function COMMANDMENU:New( MenuText, ParentMenu, CommandMenuFunction, CommandMenu end --- The SUBMENU class --- @type +-- @type SUBMENU +-- @extends Menu#MENU SUBMENU = { ClassName = "SUBMENU" } @@ -70,45 +73,123 @@ function SUBMENU:New( MenuText, ParentMenu ) return Child end ---- The MENU_SUB_GROUP class --- @type -MENU_SUB_GROUP = { - ClassName = "MENU_SUB_GROUP" +-- This local variable is used to cache the menus registered under clients. +-- Menus don't dissapear when clients are destroyed and restarted. +-- So every menu for a client created must be tracked so that program logic accidentally does not create +-- the same menus twice during initialization logic. +-- These menu classes are handling this logic with this variable. +local _MENUCLIENTS = {} + +--- The MENU_CLIENT class +-- @type MENU_CLIENT +-- @extends Menu#MENU +MENU_CLIENT = { + ClassName = "MENU_CLIENT" } -function MENU_SUB_GROUP:New( GroupID, MenuText, ParentMenu ) +--- Creates a new menu item for a group +-- @param self +-- @param Client#CLIENT MenuClient The Client owning the menu. +-- @param #string MenuText The text for the menu. +-- @param #table ParentMenu The parent menu. +-- @return #MENU_CLIENT self +function MENU_CLIENT:New( MenuClient, MenuText, ParentMenu ) -- Arrange meta tables - local MenuParentPath = nil + local MenuParentPath = {} if ParentMenu ~= nil then - MenuParentPath = ParentMenu.MenuPath + MenuParentPath = ParentMenu.MenuPath end local self = BASE:Inherit( self, MENU:New( MenuText, MenuParentPath ) ) + self:F( { MenuClient, MenuText, ParentMenu } ) + + self.MenuClient = MenuClient + self.MenuClientGroupID = MenuClient:GetClientGroupID() + self.MenuParentPath = MenuParentPath + self.MenuText = MenuText + + if not _MENUCLIENTS[self.MenuClientGroupID] then + _MENUCLIENTS[self.MenuClientGroupID] = {} + end + + local MenuPath = _MENUCLIENTS[self.MenuClientGroupID] + + self:T( { MenuClient:GetClientGroupName(), MenuPath[table.concat(MenuParentPath)], MenuParentPath, MenuText } ) + + if not MenuPath[table.concat(MenuParentPath) .. "/" .. MenuText] then + self.MenuPath = missionCommands.addSubMenuForGroup( self.MenuClient:GetClientGroupID(), MenuText, MenuParentPath ) + MenuPath[table.concat(MenuParentPath) .. "/" .. MenuText] = self.MenuPath + else + self.MenuPath = MenuPath[table.concat(MenuParentPath) .. "/" .. MenuText] + end - self.MenuPath = missionCommands.addSubMenuForGroup( GroupID, MenuText, MenuParentPath ) return self end ---- The MENU_COMMAND_GROUP class --- @type -MENU_COMMAND_GROUP = { - ClassName = "MENU_COMMAND_GROUP" + +--- The MENU_CLIENT_COMMAND class +-- @type MENU_CLIENT_COMMAND +-- @extends Menu#MENU +MENU_CLIENT_COMMAND = { + ClassName = "MENU_CLIENT_COMMAND" } -function MENU_COMMAND_GROUP:New( GroupID, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument ) +--- Creates a new radio command item for a group +-- @param self +-- @param Client#CLIENT MenuClient The Client owning the menu. +-- @param MenuText The text for the menu. +-- @param ParentMenu The parent menu. +-- @param CommandMenuFunction A function that is called when the menu key is pressed. +-- @param CommandMenuArgument An argument for the function. +-- @return Menu#MENU_CLIENT_COMMAND self +function MENU_CLIENT_COMMAND:New( MenuClient, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument ) -- Arrange meta tables - local MenuParentPath = nil + local MenuParentPath = {} if ParentMenu ~= nil then MenuParentPath = ParentMenu.MenuPath end local self = BASE:Inherit( self, MENU:New( MenuText, MenuParentPath ) ) + + self.MenuClient = MenuClient + self.MenuClientGroupID = MenuClient:GetClientGroupID() + self.MenuParentPath = MenuParentPath + self.MenuText = MenuText + + if not _MENUCLIENTS[self.MenuClientGroupID] then + _MENUCLIENTS[self.MenuClientGroupID] = {} + end + + local MenuPath = _MENUCLIENTS[self.MenuClientGroupID] + + self:T( { MenuClient:GetClientGroupName(), MenuPath[table.concat(MenuParentPath)], MenuParentPath, MenuText, CommandMenuFunction, CommandMenuArgument } ) + + if not MenuPath[table.concat(MenuParentPath) .. "/" .. MenuText] then + self.MenuPath = missionCommands.addCommandForGroup( self.MenuClient:GetClientGroupID(), MenuText, MenuParentPath, CommandMenuFunction, CommandMenuArgument ) + MenuPath[table.concat(MenuParentPath) .. "/" .. MenuText] = self.MenuPath + else + self.MenuPath = MenuPath[table.concat(MenuParentPath) .. "/" .. MenuText] + end - self.MenuPath = missionCommands.addCommandForGroup( GroupID, MenuText, MenuParentPath, CommandMenuFunction, CommandMenuArgument ) self.CommandMenuFunction = CommandMenuFunction self.CommandMenuArgument = CommandMenuArgument return self end + +function MENU_CLIENT_COMMAND:Remove() + + if not _MENUCLIENTS[self.MenuClientGroupID] then + _MENUCLIENTS[self.MenuClientGroupID] = {} + end + + local MenuPath = _MENUCLIENTS[self.MenuClientGroupID] + + if MenuPath[table.concat(self.MenuParentPath) .. "/" .. self.MenuText] then + MenuPath[table.concat(self.MenuParentPath) .. "/" .. self.MenuText] = nil + end + missionCommands.removeItemForGroup( self.MenuClient:GetClientGroupID(), self.MenuPath ) + return nil +end diff --git a/Moose/Message.lua b/Moose/Message.lua index d17c07053..556ae6484 100644 --- a/Moose/Message.lua +++ b/Moose/Message.lua @@ -6,13 +6,12 @@ -- Messages are sent to Clients with MESSAGE:@{ToClient}(). -- Messages are sent to Coalitions with MESSAGE:@{ToCoalition}(). -- Messages are sent to All Players with MESSAGE:@{ToAll}(). --- @module MESSAGE +-- @module Message -Include.File( "Trace" ) Include.File( "Base" ) --- The MESSAGE class --- @type +-- @type MESSAGE MESSAGE = { ClassName = "MESSAGE", MessageCategory = 0, @@ -21,11 +20,12 @@ MESSAGE = { --- Creates a new MESSAGE object. Note that these MESSAGE objects are not yet displayed on the display panel. You must use the functions @{ToClient} or @{ToCoalition} or @{ToAll} to send these Messages to the respective recipients. --- @param string MessageText is the text of the Message. --- @param string MessageCategory is a string expressing the Category of the Message. Messages are grouped on the display panel per Category to improve readability. --- @param number MessageDuration is a number in seconds of how long the MESSAGE should be shown on the display panel. --- @param string MessageID is a string expressing the ID of the Message. --- @return MESSAGE +-- @param self +-- @param #string MessageText is the text of the Message. +-- @param #string MessageCategory is a string expressing the Category of the Message. Messages are grouped on the display panel per Category to improve readability. +-- @param #number MessageDuration is a number in seconds of how long the MESSAGE should be shown on the display panel. +-- @param #string MessageID is a string expressing the ID of the Message. +-- @return #MESSAGE -- @usage -- -- Create a series of new Messages. -- -- MessageAll is meant to be sent to all players, for 25 seconds, and is classified as "Score". @@ -38,7 +38,7 @@ MESSAGE = { -- MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25, "Score" ) function MESSAGE:New( MessageText, MessageCategory, MessageDuration, MessageID ) local self = BASE:Inherit( self, BASE:New() ) - self:T( { MessageText, MessageCategory, MessageDuration, MessageID } ) + self:F( { MessageText, MessageCategory, MessageDuration, MessageID } ) -- When no messagecategory is given, we don't show it as a title... if MessageCategory and MessageCategory ~= "" then @@ -60,8 +60,9 @@ function MESSAGE:New( MessageText, MessageCategory, MessageDuration, MessageID ) end --- Sends a MESSAGE to a Client Group. Note that the Group needs to be defined within the ME with the skillset "Client" or "Player". --- @param CLIENT Client is the Group of the Client. --- @return MESSAGE +-- @param #MESSAGE self +-- @param Client#CLIENT Client is the Group of the Client. +-- @return #MESSAGE -- @usage -- -- Send the 2 messages created with the @{New} method to the Client Group. -- -- Note that the Message of MessageClient2 is overwriting the Message of MessageClient1. @@ -78,20 +79,21 @@ end -- MessageClient1:ToClient( ClientGroup ) -- MessageClient2:ToClient( ClientGroup ) function MESSAGE:ToClient( Client ) - self:T( Client ) + self:F( Client ) if Client and Client:GetClientGroupID() then local ClientGroupID = Client:GetClientGroupID() - trace.i( self.ClassName, self.MessageCategory .. self.MessageText:gsub("\n$",""):gsub("\n$","") .. " / " .. self.MessageDuration ) + self:T( self.MessageCategory .. self.MessageText:gsub("\n$",""):gsub("\n$","") .. " / " .. self.MessageDuration ) trigger.action.outTextForGroup( ClientGroupID, self.MessageCategory .. self.MessageText:gsub("\n$",""):gsub("\n$",""), self.MessageDuration ) end return self end ---- Sends a MESSAGE to the Blue coalition. --- @return MESSAGE +--- Sends a MESSAGE to the Blue coalition. +-- @param #MESSAGE self +-- @return #MESSAGE -- @usage -- -- Send a message created with the @{New} method to the BLUE coalition. -- MessageBLUE = MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToBlue() @@ -101,7 +103,7 @@ end -- MessageBLUE = MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ) -- MessageBLUE:ToBlue() function MESSAGE:ToBlue() - self:T() + self:F() self:ToCoalition( coalition.side.BLUE ) @@ -109,7 +111,8 @@ function MESSAGE:ToBlue() end --- Sends a MESSAGE to the Red Coalition. --- @return MESSAGE +-- @param #MESSAGE self +-- @return #MESSAGE -- @usage -- -- Send a message created with the @{New} method to the RED coalition. -- MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToRed() @@ -119,7 +122,7 @@ end -- MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ) -- MessageRED:ToRed() function MESSAGE:ToRed( ) - self:T() + self:F() self:ToCoalition( coalition.side.RED ) @@ -127,8 +130,9 @@ function MESSAGE:ToRed( ) end --- Sends a MESSAGE to a Coalition. +-- @param #MESSAGE self -- @param CoalitionSide needs to be filled out by the defined structure of the standard scripting engine @{coalition.side}. --- @return MESSAGE +-- @return #MESSAGE -- @usage -- -- Send a message created with the @{New} method to the RED coalition. -- MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToCoalition( coalition.side.RED ) @@ -138,10 +142,10 @@ end -- MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ) -- MessageRED:ToCoalition( coalition.side.RED ) function MESSAGE:ToCoalition( CoalitionSide ) - self:T( CoalitionSide ) + self:F( CoalitionSide ) if CoalitionSide then - trace.i(self.ClassName, self.MessageCategory .. self.MessageText:gsub("\n$",""):gsub("\n$","") .. " / " .. self.MessageDuration ) + self:T( self.MessageCategory .. self.MessageText:gsub("\n$",""):gsub("\n$","") .. " / " .. self.MessageDuration ) trigger.action.outTextForCoalition( CoalitionSide, self.MessageCategory .. self.MessageText:gsub("\n$",""):gsub("\n$",""), self.MessageDuration ) end @@ -149,7 +153,8 @@ function MESSAGE:ToCoalition( CoalitionSide ) end --- Sends a MESSAGE to all players. --- @return MESSAGE +-- @param #MESSAGE self +-- @return #MESSAGE -- @usage -- -- Send a message created to all players. -- MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25, "Win" ):ToAll() @@ -159,7 +164,7 @@ end -- MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25, "Win" ) -- MessageAll:ToAll() function MESSAGE:ToAll() - self:T() + self:F() self:ToCoalition( coalition.side.RED ) self:ToCoalition( coalition.side.BLUE ) @@ -178,7 +183,7 @@ MESSAGEQUEUE = { function MESSAGEQUEUE:New( RefreshInterval ) local self = BASE:Inherit( self, BASE:New() ) - self:T( { RefreshInterval } ) + self:F( { RefreshInterval } ) self.RefreshInterval = RefreshInterval diff --git a/Moose/Mission.lua b/Moose/Mission.lua index 273b7755b..1c8f713ca 100644 --- a/Moose/Mission.lua +++ b/Moose/Mission.lua @@ -33,7 +33,7 @@ MISSION = { function MISSION:Meta() local self = BASE:Inherit( self, BASE:New() ) - self:T() + self:F() return self end @@ -79,13 +79,13 @@ end --- Returns if a Mission has completed. -- @return bool function MISSION:IsCompleted() - self:T() + self:F() return self.MissionStatus == "ACCOMPLISHED" end --- Set a Mission to completed. function MISSION:Completed() - self:T() + self:F() self.MissionStatus = "ACCOMPLISHED" self:StatusToClients() end @@ -93,13 +93,13 @@ end --- Returns if a Mission is ongoing. -- treturn bool function MISSION:IsOngoing() - self:T() + self:F() return self.MissionStatus == "ONGOING" end --- Set a Mission to ongoing. function MISSION:Ongoing() - self:T() + self:F() self.MissionStatus = "ONGOING" --self:StatusToClients() end @@ -107,13 +107,13 @@ end --- Returns if a Mission is pending. -- treturn bool function MISSION:IsPending() - self:T() + self:F() return self.MissionStatus == "PENDING" end --- Set a Mission to pending. function MISSION:Pending() - self:T() + self:F() self.MissionStatus = "PENDING" self:StatusToClients() end @@ -121,20 +121,20 @@ end --- Returns if a Mission has failed. -- treturn bool function MISSION:IsFailed() - self:T() + self:F() return self.MissionStatus == "FAILED" end --- Set a Mission to failed. function MISSION:Failed() - self:T() + self:F() self.MissionStatus = "FAILED" self:StatusToClients() end --- Send the status of the MISSION to all Clients. function MISSION:StatusToClients() - self:T() + self:F() if self.MissionReportFlash then for ClientID, Client in pairs( self._Clients ) do Client:Message( self.MissionCoalition .. ' "' .. self.Name .. '": ' .. self.MissionStatus .. '! ( ' .. self.MissionPriority .. ' mission ) ', 10, self.Name .. '/Status', "Mission Command: Mission Status") @@ -144,37 +144,32 @@ end --- Handles the reporting. After certain time intervals, a MISSION report MESSAGE will be shown to All Players. function MISSION:ReportTrigger() - self:T() + self:F() if self.MissionReportShow == true then self.MissionReportShow = false -trace.r( "MISSION", "1", { true } ) return true else if self.MissionReportFlash == true then if timer.getTime() >= self.MissionReportTrigger then self.MissionReportTrigger = timer.getTime() + self.MissionTimeInterval -trace.r( "MISSION", "2", { true } ) return true else -trace.r( "MISSION", "3", { false } ) return false end else -trace.r( "MISSION", "4", { false } ) return false end end -trace.e() end --- Report the status of all MISSIONs to all active Clients. function MISSION:ReportToAll() - self:T() + self:F() local AlivePlayers = '' for ClientID, Client in pairs( self._Clients ) do - if Client:ClientGroup() then + if Client:GetDCSGroup() then if Client:GetClientGroupDCSUnit() then if Client:GetClientGroupDCSUnit():getLife() > 0.0 then if AlivePlayers == '' then @@ -232,7 +227,7 @@ end -- local Mission = MISSIONSCHEDULER.AddMission( 'NATO Transport Troops', 'Operational', 'Transport 3 groups of air defense engineers from our barracks "Gold" and "Titan" to each patriot battery control center to activate our air defenses.', 'NATO' ) -- Mission:AddGoalFunction( DeployPatriotTroopsGoal ) function MISSION:AddGoalFunction( GoalFunction ) - self:T() + self:F() self.GoalFunction = GoalFunction end @@ -240,7 +235,7 @@ end -- @param CLIENT Client to show briefing to. -- @return CLIENT function MISSION:ShowBriefing( Client ) - self:T( { Client.ClientName } ) + self:F( { Client.ClientName } ) if not Client.ClientBriefingShown then Client.ClientBriefingShown = true @@ -265,7 +260,7 @@ end -- Mission:AddClient( CLIENT:New( 'US UH-1H*HOT-Deploy Troops 2', 'Transport 3 groups of air defense engineers from our barracks "Gold" and "Titan" to each patriot battery control center to activate our air defenses.' ):Transport() ) -- Mission:AddClient( CLIENT:New( 'US UH-1H*RAMP-Deploy Troops 4', 'Transport 3 groups of air defense engineers from our barracks "Gold" and "Titan" to each patriot battery control center to activate our air defenses.' ):Transport() ) function MISSION:AddClient( Client ) - self:T( { Client } ) + self:F( { Client } ) local Valid = true @@ -273,7 +268,6 @@ function MISSION:AddClient( Client ) self._Clients[Client.ClientName] = Client end -trace.r( self.ClassName, "" ) return Client end @@ -284,7 +278,7 @@ end -- -- Seach for Client "Bomber" within the Mission. -- local BomberClient = Mission:FindClient( "Bomber" ) function MISSION:FindClient( ClientName ) - self:T( { self._Clients[ClientName] } ) + self:F( { self._Clients[ClientName] } ) return self._Clients[ClientName] end @@ -315,7 +309,7 @@ end -- Mission:AddTask( DeployTask, 2 ) function MISSION:AddTask( Task, TaskNumber ) - self:T() + self:F() self._Tasks[TaskNumber] = Task self._Tasks[TaskNumber]:EnableEvents() @@ -332,7 +326,7 @@ function MISSION:AddTask( Task, TaskNumber ) -- Task2 = Mission:GetTask( 2 ) function MISSION:GetTask( TaskNumber ) - self:T() + self:F() local Valid = true @@ -356,7 +350,7 @@ end -- Tasks = Mission:GetTasks() -- env.info( "Task 2 Completion = " .. Tasks[2]:GetGoalPercentage() .. "%" ) function MISSION:GetTasks() - self:T() + self:F() return self._Tasks end @@ -391,13 +385,10 @@ MISSIONSCHEDULER = { --- This is the main MISSIONSCHEDULER Scheduler function. It is considered internal and is automatically created when the Mission.lua file is included. function MISSIONSCHEDULER.Scheduler() -trace.scheduled("MISSIONSCHEDULER","Scheduler") -- loop through the missions in the TransportTasks for MissionName, Mission in pairs( MISSIONSCHEDULER.Missions ) do - trace.i( "MISSIONSCHEDULER", MissionName ) - if not Mission:IsCompleted() then -- This flag will monitor if for this mission, there are clients alive. If this flag is still false at the end of the loop, the mission status will be set to Pending (if not Failed or Completed). @@ -405,9 +396,7 @@ trace.scheduled("MISSIONSCHEDULER","Scheduler") for ClientID, Client in pairs( Mission._Clients ) do - trace.i( "MISSIONSCHEDULER", "Client: " .. Client.ClientName ) - - if Client:ClientGroup() then + if Client:GetDCSGroup() then -- There is at least one Client that is alive... So the Mission status is set to Ongoing. ClientsAlive = true @@ -470,7 +459,6 @@ trace.scheduled("MISSIONSCHEDULER","Scheduler") end if Task:IsDone() then - trace.i( "MISSIONSCHEDULER", "Task " .. Task.Name .. " is Done." ) --env.info( 'Scheduler: Mission '.. Mission.Name .. ' Task ' .. Task.Name .. ' Stage ' .. Task.Stage.Name .. ' done. TaskComplete = ' .. string.format ( "%s", TaskComplete and "true" or "false" ) ) TaskComplete = true -- when a task is not yet completed, a mission cannot be completed @@ -546,29 +534,22 @@ trace.scheduled("MISSIONSCHEDULER","Scheduler") if Mission:ReportTrigger() then Mission:ReportToAll() end - end - -trace.e() end --- Start the MISSIONSCHEDULER. function MISSIONSCHEDULER.Start() -trace.f("MISSIONSCHEDULER") if MISSIONSCHEDULER ~= nil then MISSIONSCHEDULER.SchedulerId = routines.scheduleFunction( MISSIONSCHEDULER.Scheduler, { }, 0, 2 ) end -trace.e() end --- Stop the MISSIONSCHEDULER. function MISSIONSCHEDULER.Stop() -trace.f("MISSIONSCHEDULER") if MISSIONSCHEDULER.SchedulerId then routines.removeFunction(MISSIONSCHEDULER.SchedulerId) MISSIONSCHEDULER.SchedulerId = nil end -trace.e() end --- This is the main MISSION declaration method. Each Mission is like the master or a Mission orchestration between, Clients, Tasks, Stages etc. @@ -582,13 +563,11 @@ end -- 'Russia' ) -- MISSIONSCHEDULER:AddMission( Mission ) function MISSIONSCHEDULER.AddMission( Mission ) -trace.f("MISSIONSCHEDULER") MISSIONSCHEDULER.Missions[Mission.Name] = Mission MISSIONSCHEDULER.MissionCount = MISSIONSCHEDULER.MissionCount + 1 -- Add an overall AI Client for the AI tasks... This AI Client will facilitate the Events in the background for each Task. --MissionAdd:AddClient( CLIENT:New( 'AI' ) ) -trace.r( "MISSIONSCHEDULER", "" ) return Mission end @@ -605,10 +584,8 @@ end -- -- Now remove the Mission. -- MISSIONSCHEDULER:RemoveMission( 'Russia Transport Troops SA-6' ) function MISSIONSCHEDULER.RemoveMission( MissionName ) -trace.f("MISSIONSCHEDULER") MISSIONSCHEDULER.Missions[MissionName] = nil MISSIONSCHEDULER.MissionCount = MISSIONSCHEDULER.MissionCount - 1 -trace.e() end --- Find a MISSION within the MISSIONSCHEDULER. @@ -625,24 +602,19 @@ end -- -- Now find the Mission. -- MissionFind = MISSIONSCHEDULER:FindMission( 'Russia Transport Troops SA-6' ) function MISSIONSCHEDULER.FindMission( MissionName ) -trace.f("MISSIONSCHEDULER") -trace.r( "MISSIONSCHEDULER", "" ) return MISSIONSCHEDULER.Missions[MissionName] end -- Internal function used by the MISSIONSCHEDULER menu. function MISSIONSCHEDULER.ReportMissionsShow( ) -trace.menu("MISSIONSCHEDULER","ReportMissionsShow") for MissionName, Mission in pairs( MISSIONSCHEDULER.Missions ) do Mission.MissionReportShow = true Mission.MissionReportFlash = false end -trace.e() end -- Internal function used by the MISSIONSCHEDULER menu. function MISSIONSCHEDULER.ReportMissionsFlash( TimeInterval ) -trace.menu("MISSIONSCHEDULER","ReportMissionsFlash") local Count = 0 for MissionName, Mission in pairs( MISSIONSCHEDULER.Missions ) do Mission.MissionReportShow = false @@ -652,49 +624,40 @@ trace.menu("MISSIONSCHEDULER","ReportMissionsFlash") env.info( "TimeInterval = " .. Mission.MissionTimeInterval ) Count = Count + 1 end -trace.e() end -- Internal function used by the MISSIONSCHEDULER menu. function MISSIONSCHEDULER.ReportMissionsHide( Prm ) -trace.menu("MISSIONSCHEDULER","ReportMissionsHide") for MissionName, Mission in pairs( MISSIONSCHEDULER.Missions ) do Mission.MissionReportShow = false Mission.MissionReportFlash = false end -trace.e() end --- Enables a MENU option in the communications menu under F10 to control the status of the active missions. -- This function should be called only once when starting the MISSIONSCHEDULER. function MISSIONSCHEDULER.ReportMenu() -trace.f("MISSIONSCHEDULER") local ReportMenu = SUBMENU:New( 'Status' ) local ReportMenuShow = COMMANDMENU:New( 'Show Report Missions', ReportMenu, MISSIONSCHEDULER.ReportMissionsShow, 0 ) local ReportMenuFlash = COMMANDMENU:New('Flash Report Missions', ReportMenu, MISSIONSCHEDULER.ReportMissionsFlash, 120 ) local ReportMenuHide = COMMANDMENU:New( 'Hide Report Missions', ReportMenu, MISSIONSCHEDULER.ReportMissionsHide, 0 ) -trace.e() end --- Show the remaining mission time. function MISSIONSCHEDULER:TimeShow() -trace.f("MISSIONSCHEDULER") self.TimeIntervalCount = self.TimeIntervalCount + 1 if self.TimeIntervalCount >= self.TimeTriggerShow then local TimeMsg = string.format("%00d", ( self.TimeSeconds / 60 ) - ( timer.getTime() / 60 )) .. ' minutes left until mission reload.' MESSAGE:New( TimeMsg, "Mission time", self.TimeShow, '/TimeMsg' ):ToAll() self.TimeIntervalCount = 0 end -trace.e() end function MISSIONSCHEDULER:Time( TimeSeconds, TimeIntervalShow, TimeShow ) -trace.f("MISSIONSCHEDULER") self.TimeIntervalCount = 0 self.TimeSeconds = TimeSeconds self.TimeIntervalShow = TimeIntervalShow self.TimeShow = TimeShow -trace.e() end diff --git a/Moose/Movement.lua b/Moose/Movement.lua index e13b590cd..727b4f36e 100644 --- a/Moose/Movement.lua +++ b/Moose/Movement.lua @@ -23,7 +23,7 @@ MOVEMENT = { function MOVEMENT:New( MovePrefixes, MoveMaximum ) local self = BASE:Inherit( self, BASE:New() ) - self:T( { MovePrefixes, MoveMaximum } ) + self:F( { MovePrefixes, MoveMaximum } ) if type( MovePrefixes ) == 'table' then self.MovePrefixes = MovePrefixes @@ -35,34 +35,34 @@ function MOVEMENT:New( MovePrefixes, MoveMaximum ) self.AliveUnits = 0 -- Contains the counter how many units are currently alive self.MoveUnits = {} -- Reflects if the Moving for this MovePrefixes is going to be scheduled or not. - self.AddEvent( self, world.event.S_EVENT_BIRTH, self.OnBirth ) - self.AddEvent( self, world.event.S_EVENT_DEAD, self.OnDeadOrCrash ) - self.AddEvent( self, world.event.S_EVENT_CRASH, self.OnDeadOrCrash ) + self:AddEvent( world.event.S_EVENT_BIRTH, self.OnBirth ) + self:AddEvent( world.event.S_EVENT_DEAD, self.OnDeadOrCrash ) + self:AddEvent( world.event.S_EVENT_CRASH, self.OnDeadOrCrash ) - self.EnableEvents( self ) + self:EnableEvents() - self.ScheduleStart( self ) + self:ScheduleStart() return self end --- Call this function to start the MOVEMENT scheduling. function MOVEMENT:ScheduleStart() -self:T() + self:F() self.MoveFunction = routines.scheduleFunction( self._Scheduler, { self }, timer.getTime() + 1, 120 ) end --- Call this function to stop the MOVEMENT scheduling. -- @todo need to implement it ... Forgot. function MOVEMENT:ScheduleStop() -self:T() + self:F() end --- Captures the birth events when new Units were spawned. -- @todo This method should become obsolete. The new @{DATABASE} class will handle the collection administration. function MOVEMENT:OnBirth( event ) -self:T( { event } ) + self:F( { event } ) if timer.getTime0() < timer.getAbsTime() then -- dont need to add units spawned in at the start of the mission if mist is loaded in init line if event.initiator and Object.getCategory(event.initiator) == Object.Category.UNIT then @@ -88,7 +88,7 @@ end --- Captures the Dead or Crash events when Units crash or are destroyed. -- @todo This method should become obsolete. The new @{DATABASE} class will handle the collection administration. function MOVEMENT:OnDeadOrCrash( event ) -self:T( { event } ) + self:F( { event } ) if event.initiator and Object.getCategory(event.initiator) == Object.Category.UNIT then local MovementUnit = event.initiator @@ -106,7 +106,7 @@ end --- This function is called automatically by the MOVEMENT scheduler. A new function is scheduled when MoveScheduled is true. function MOVEMENT:_Scheduler() -self:T( { self.MovePrefixes, self.MoveMaximum, self.AliveUnits, self.MovementGroups } ) + self:F( { self.MovePrefixes, self.MoveMaximum, self.AliveUnits, self.MovementGroups } ) if self.AliveUnits > 0 then local MoveProbability = ( self.MoveMaximum * 100 ) / self.AliveUnits diff --git a/Moose/NoTask.lua b/Moose/NoTask.lua index 0e46fbf5b..016ba955e 100644 --- a/Moose/NoTask.lua +++ b/Moose/NoTask.lua @@ -11,19 +11,17 @@ NOTASK = { --- Creates a new NOTASK. function NOTASK:New() -trace.f(self.ClassName) - - -- Child holds the inherited instance of the PICKUPTASK Class to the BASE class. - local Child = BASE:Inherit( self, TASK:New() ) - + local self = BASE:Inherit( self, TASK:New() ) + self:F() + local Valid = true if Valid then - Child.Name = 'Nothing' - Child.TaskBriefing = "Task: Execute your mission." - Child.Stages = { STAGEBRIEF:New(), STAGESTART:New(), STAGEDONE:New() } - Child.SetStage( Child, 1 ) + self.Name = 'Nothing' + self.TaskBriefing = "Task: Execute your mission." + self.Stages = { STAGEBRIEF:New(), STAGESTART:New(), STAGEDONE:New() } + self.SetStage( self, 1 ) end - return Child + return self end diff --git a/Moose/PickupTask.lua b/Moose/PickupTask.lua index 7cca54e5b..f93a634f6 100644 --- a/Moose/PickupTask.lua +++ b/Moose/PickupTask.lua @@ -19,7 +19,7 @@ PICKUPTASK = { -- @param number OnBoardSide Reflects from which side the cargo Group will be on-boarded on the Carrier. function PICKUPTASK:New( CargoType, OnBoardSide ) local self = BASE:Inherit( self, TASK:New() ) - self:T() + self:F() -- self holds the inherited instance of the PICKUPTASK Class to the BASE class. @@ -41,7 +41,7 @@ function PICKUPTASK:New( CargoType, OnBoardSide ) end function PICKUPTASK:FromZone( LandingZone ) -self:T() + self:F() self.LandingZones.LandingZoneNames[LandingZone.CargoZoneName] = LandingZone.CargoZoneName self.LandingZones.LandingZones[LandingZone.CargoZoneName] = LandingZone @@ -50,7 +50,7 @@ self:T() end function PICKUPTASK:InitCargo( InitCargos ) -self:T( { InitCargos } ) + self:F( { InitCargos } ) if type( InitCargos ) == "table" then self.Cargos.InitCargos = InitCargos @@ -62,7 +62,7 @@ self:T( { InitCargos } ) end function PICKUPTASK:LoadCargo( LoadCargos ) -self:T( { LoadCargos } ) + self:F( { LoadCargos } ) if type( LoadCargos ) == "table" then self.Cargos.LoadCargos = LoadCargos @@ -74,7 +74,7 @@ self:T( { LoadCargos } ) end function PICKUPTASK:AddCargoMenus( Client, Cargos, TransportRadius ) -self:T() + self:F() for CargoID, Cargo in pairs( Cargos ) do @@ -121,7 +121,7 @@ self:T() end function PICKUPTASK:RemoveCargoMenus( Client ) -self:T() + self:F() for MenuID, MenuData in pairs( Client._Menus ) do for SubMenuID, SubMenuData in pairs( MenuData.PickupSubMenus ) do @@ -148,7 +148,7 @@ end function PICKUPTASK:HasFailed( ClientDead ) -self:T() + self:F() local TaskHasFailed = self.TaskFailed return TaskHasFailed diff --git a/Moose/RouteTask.lua b/Moose/RouteTask.lua index ab1bacd17..0c39ef425 100644 --- a/Moose/RouteTask.lua +++ b/Moose/RouteTask.lua @@ -13,31 +13,29 @@ ROUTETASK = { -- @param string TaskBriefing (optional) Defines a text describing the briefing of the task. -- @return ROUTETASK function ROUTETASK:New( LandingZones, TaskBriefing ) -trace.f(self.ClassName, { LandingZones, TaskBriefing } ) - - -- Child holds the inherited instance of the PICKUPTASK Class to the BASE class. - local Child = BASE:Inherit( self, TASK:New() ) + local self = BASE:Inherit( self, TASK:New() ) + self:F( { LandingZones, TaskBriefing } ) local Valid = true Valid = routines.ValidateZone( LandingZones, "LandingZones", Valid ) if Valid then - Child.Name = 'Route To Zone' + self.Name = 'Route To Zone' if TaskBriefing then - Child.TaskBriefing = TaskBriefing .. " Your co-pilot will provide you with the directions (required flight angle in degrees) and the distance (in km) to the target objective." + self.TaskBriefing = TaskBriefing .. " Your co-pilot will provide you with the directions (required flight angle in degrees) and the distance (in km) to the target objective." else - Child.TaskBriefing = "Task: Fly to specified zone(s). Your co-pilot will provide you with the directions (required flight angle in degrees) and the distance (in km) to the target objective." + self.TaskBriefing = "Task: Fly to specified zone(s). Your co-pilot will provide you with the directions (required flight angle in degrees) and the distance (in km) to the target objective." end if type( LandingZones ) == "table" then - Child.LandingZones = LandingZones + self.LandingZones = LandingZones else - Child.LandingZones = { LandingZones } + self.LandingZones = { LandingZones } end - Child.Stages = { STAGEBRIEF:New(), STAGESTART:New(), STAGEROUTE:New(), STAGEARRIVE:New(), STAGEDONE:New() } - Child.SetStage( Child, 1 ) + self.Stages = { STAGEBRIEF:New(), STAGESTART:New(), STAGEROUTE:New(), STAGEARRIVE:New(), STAGEDONE:New() } + self.SetStage( self, 1 ) end - return Child + return self end diff --git a/Moose/Routines.lua b/Moose/Routines.lua index c591ef9c4..f6be076c0 100644 --- a/Moose/Routines.lua +++ b/Moose/Routines.lua @@ -2,7 +2,7 @@ -- @module routines -- @author Flightcontrol -Include.File( "Trace" ) +--Include.File( "Trace" ) --Include.File( "Message" ) @@ -422,7 +422,7 @@ routines.tostringBR = function(az, dist, alt, metric) dist = routines.utils.round(routines.utils.metersToNM(dist), 2) end - local s = string.format('%03d°', az) .. ' for ' .. dist + local s = string.format('%03d', az) .. ' for ' .. dist if alt then if metric then @@ -1455,7 +1455,7 @@ end function routines.IsPartOfGroupInZones( CargoGroup, LandingZones ) -trace.f() +--trace.f() local CurrentZoneID = nil @@ -1471,14 +1471,14 @@ trace.f() end end -trace.r( "", "", { CurrentZoneID } ) +--trace.r( "", "", { CurrentZoneID } ) return CurrentZoneID end function routines.IsUnitInZones( TransportUnit, LandingZones ) -trace.f("", "routines.IsUnitInZones" ) +--trace.f("", "routines.IsUnitInZones" ) local TransportZoneResult = nil local TransportZonePos = nil @@ -1506,19 +1506,19 @@ trace.f("", "routines.IsUnitInZones" ) end end if TransportZoneResult then - trace.i( "routines", "TransportZone:" .. TransportZoneResult ) + --trace.i( "routines", "TransportZone:" .. TransportZoneResult ) else - trace.i( "routines", "TransportZone:nil logic" ) + --trace.i( "routines", "TransportZone:nil logic" ) end return TransportZoneResult else - trace.i( "routines", "TransportZone:nil hard" ) + --trace.i( "routines", "TransportZone:nil hard" ) return nil end end function routines.IsStaticInZones( TransportStatic, LandingZones ) -trace.f() +--trace.f() local TransportZoneResult = nil local TransportZonePos = nil @@ -1545,13 +1545,13 @@ trace.f() end end -trace.r( "", "", { TransportZoneResult } ) +--trace.r( "", "", { TransportZoneResult } ) return TransportZoneResult end function routines.IsUnitInRadius( CargoUnit, ReferencePosition, Radius ) -trace.f() +--trace.f() local Valid = true @@ -1568,7 +1568,7 @@ trace.f() end function routines.IsPartOfGroupInRadius( CargoGroup, ReferencePosition, Radius ) -trace.f() +--trace.f() local Valid = true @@ -1594,7 +1594,7 @@ end function routines.ValidateString( Variable, VariableName, Valid ) -trace.f() +--trace.f() if type( Variable ) == "string" then if Variable == "" then @@ -1606,12 +1606,12 @@ trace.f() Valid = false end -trace.r( "", "", { Valid } ) +--trace.r( "", "", { Valid } ) return Valid end function routines.ValidateNumber( Variable, VariableName, Valid ) -trace.f() +--trace.f() if type( Variable ) == "number" then else @@ -1619,25 +1619,25 @@ trace.f() Valid = false end -trace.r( "", "", { Valid } ) +--trace.r( "", "", { Valid } ) return Valid end function routines.ValidateGroup( Variable, VariableName, Valid ) -trace.f() +--trace.f() if Variable == nil then error( "routines.ValidateGroup: error: " .. VariableName .. " is a nil value!" ) Valid = false end -trace.r( "", "", { Valid } ) +--trace.r( "", "", { Valid } ) return Valid end function routines.ValidateZone( LandingZones, VariableName, Valid ) -trace.f() +--trace.f() if LandingZones == nil then error( "routines.ValidateGroup: error: " .. VariableName .. " is a nil value!" ) @@ -1659,12 +1659,12 @@ trace.f() end end -trace.r( "", "", { Valid } ) +--trace.r( "", "", { Valid } ) return Valid end function routines.ValidateEnumeration( Variable, VariableName, Enum, Valid ) -trace.f() +--trace.f() local ValidVariable = false @@ -1681,7 +1681,7 @@ trace.f() Valid = false end -trace.r( "", "", { Valid } ) +--trace.r( "", "", { Valid } ) return Valid end @@ -1859,7 +1859,7 @@ routines.ground.patrol = function(gpData, pType, form, speed) end function routines.GetUnitHeight( CheckUnit ) -trace.f( "routines" ) +--trace.f( "routines" ) local UnitPoint = CheckUnit:getPoint() local UnitPosition = { x = UnitPoint.x, y = UnitPoint.z } @@ -1869,7 +1869,7 @@ trace.f( "routines" ) --env.info(( 'CarrierHeight: LandHeight = ' .. LandHeight .. ' CarrierHeight = ' .. CarrierHeight )) - trace.f( "routines", "Unit Height = " .. UnitHeight - LandHeight ) + --trace.f( "routines", "Unit Height = " .. UnitHeight - LandHeight ) return UnitHeight - LandHeight @@ -1886,7 +1886,7 @@ Su34Menus = 0 function Su34AttackCarlVinson(groupName) -trace.menu("", "Su34AttackCarlVinson") +--trace.menu("", "Su34AttackCarlVinson") local groupSu34 = Group.getByName( groupName ) local controllerSu34 = groupSu34.getController(groupSu34) local groupCarlVinson = Group.getByName("US Carl Vinson #001") @@ -1900,7 +1900,7 @@ trace.menu("", "Su34AttackCarlVinson") end function Su34AttackWest(groupName) -trace.f("","Su34AttackWest") +--trace.f("","Su34AttackWest") local groupSu34 = Group.getByName( groupName ) local controllerSu34 = groupSu34.getController(groupSu34) local groupShipWest1 = Group.getByName("US Ship West #001") @@ -1918,7 +1918,7 @@ trace.f("","Su34AttackWest") end function Su34AttackNorth(groupName) -trace.menu("","Su34AttackNorth") +--trace.menu("","Su34AttackNorth") local groupSu34 = Group.getByName( groupName ) local controllerSu34 = groupSu34.getController(groupSu34) local groupShipNorth1 = Group.getByName("US Ship North #001") @@ -1940,7 +1940,7 @@ trace.menu("","Su34AttackNorth") end function Su34Orbit(groupName) -trace.menu("","Su34Orbit") +--trace.menu("","Su34Orbit") local groupSu34 = Group.getByName( groupName ) local controllerSu34 = groupSu34:getController() controllerSu34.setOption( controllerSu34, AI.Option.Air.id.ROE, AI.Option.Air.val.ROE.WEAPON_HOLD ) @@ -1951,7 +1951,7 @@ trace.menu("","Su34Orbit") end function Su34TakeOff(groupName) -trace.menu("","Su34TakeOff") +--trace.menu("","Su34TakeOff") local groupSu34 = Group.getByName( groupName ) local controllerSu34 = groupSu34:getController() controllerSu34.setOption( controllerSu34, AI.Option.Air.id.ROE, AI.Option.Air.val.ROE.WEAPON_HOLD ) @@ -1961,7 +1961,7 @@ trace.menu("","Su34TakeOff") end function Su34Hold(groupName) -trace.menu("","Su34Hold") +--trace.menu("","Su34Hold") local groupSu34 = Group.getByName( groupName ) local controllerSu34 = groupSu34:getController() controllerSu34.setOption( controllerSu34, AI.Option.Air.id.ROE, AI.Option.Air.val.ROE.WEAPON_HOLD ) @@ -1971,19 +1971,19 @@ trace.menu("","Su34Hold") end function Su34RTB(groupName) -trace.menu("","Su34RTB") +--trace.menu("","Su34RTB") Su34Status.status[groupName] = 6 MessageToRed( string.format('%s: ',groupName) .. 'Return to Krasnodar. ', 10, 'RedStatus' .. groupName ) end function Su34Destroyed(groupName) -trace.menu("","Su34Destroyed") +--trace.menu("","Su34Destroyed") Su34Status.status[groupName] = 7 MessageToRed( string.format('%s: ',groupName) .. 'Destroyed. ', 30, 'RedStatus' .. groupName ) end function GroupAlive( groupName ) -trace.menu("","GroupAlive") +--trace.menu("","GroupAlive") local groupTest = Group.getByName( groupName ) local groupExists = false @@ -1992,17 +1992,17 @@ trace.menu("","GroupAlive") groupExists = groupTest:isExist() end - trace.r( "", "", { groupExists } ) + --trace.r( "", "", { groupExists } ) return groupExists end function Su34IsDead() -trace.f() +--trace.f() end function Su34OverviewStatus() -trace.menu("","Su34OverviewStatus") +--trace.menu("","Su34OverviewStatus") local msg = "" local currentStatus = 0 local Exists = false @@ -2053,25 +2053,25 @@ end function UpdateBoardMsg() -trace.f() +--trace.f() Su34OverviewStatus() MessageToRed( boardMsgRed.statusMsg, 15, 'RedStatus' ) end function MusicReset( flg ) -trace.f() +--trace.f() trigger.action.setUserFlag(95,flg) end function PlaneActivate(groupNameFormat, flg) -trace.f() +--trace.f() local groupName = groupNameFormat .. string.format("#%03d", trigger.misc.getUserFlag(flg)) --trigger.action.outText(groupName,10) trigger.action.activateGroup(Group.getByName(groupName)) end function Su34Menu(groupName) -trace.f() +--trace.f() --env.info(( 'Su34Menu(' .. groupName .. ')' )) local groupSu34 = Group.getByName( groupName ) @@ -2144,7 +2144,7 @@ end --- Obsolete function, but kept to rework in framework. function ChooseInfantry ( TeleportPrefixTable, TeleportMax ) -trace.f("Spawn") +--trace.f("Spawn") --env.info(( 'ChooseInfantry: ' )) TeleportPrefixTableCount = #TeleportPrefixTable @@ -2229,7 +2229,7 @@ end SpawnedInfantry = 0 function LandCarrier ( CarrierGroup, LandingZonePrefix ) -trace.f() +--trace.f() --env.info(( 'LandCarrier: ' )) --env.info(( 'LandCarrier: CarrierGroup = ' .. CarrierGroup:getName() )) --env.info(( 'LandCarrier: LandingZone = ' .. LandingZonePrefix )) @@ -2248,7 +2248,7 @@ end EscortCount = 0 function EscortCarrier ( CarrierGroup, EscortPrefix, EscortLastWayPoint, EscortEngagementDistanceMax, EscortTargetTypes ) -trace.f() +--trace.f() --env.info(( 'EscortCarrier: ' )) --env.info(( 'EscortCarrier: CarrierGroup = ' .. CarrierGroup:getName() )) --env.info(( 'EscortCarrier: EscortPrefix = ' .. EscortPrefix )) @@ -2314,7 +2314,7 @@ trace.f() end function SendMessageToCarrier( CarrierGroup, CarrierMessage ) -trace.f() +--trace.f() if CarrierGroup ~= nil then MessageToGroup( CarrierGroup, CarrierMessage, 30, 'Carrier/' .. CarrierGroup:getName() ) @@ -2323,7 +2323,7 @@ trace.f() end function MessageToGroup( MsgGroup, MsgText, MsgTime, MsgName ) -trace.f() +--trace.f() if type(MsgGroup) == 'string' then --env.info( 'MessageToGroup: Converted MsgGroup string "' .. MsgGroup .. '" into a Group structure.' ) @@ -2342,7 +2342,7 @@ trace.f() end function MessageToUnit( UnitName, MsgText, MsgTime, MsgName ) -trace.f() +--trace.f() if UnitName ~= nil then local MsgTable = {} @@ -2355,25 +2355,25 @@ trace.f() end function MessageToAll( MsgText, MsgTime, MsgName ) -trace.f() +--trace.f() MESSAGE:New( MsgText, "Message", MsgTime, MsgName ):ToCoalition( coalition.side.RED ):ToCoalition( coalition.side.BLUE ) end function MessageToRed( MsgText, MsgTime, MsgName ) -trace.f() +--trace.f() MESSAGE:New( MsgText, "To Red Coalition", MsgTime, MsgName ):ToCoalition( coalition.side.RED ) end function MessageToBlue( MsgText, MsgTime, MsgName ) -trace.f() +--trace.f() MESSAGE:New( MsgText, "To Blue Coalition", MsgTime, MsgName ):ToCoalition( coalition.side.RED ) end function getCarrierHeight( CarrierGroup ) -trace.f() +--trace.f() if CarrierGroup ~= nil then if table.getn(CarrierGroup:getUnits()) == 1 then @@ -2398,7 +2398,7 @@ trace.f() end function GetUnitHeight( CheckUnit ) -trace.f() +--trace.f() local UnitPoint = CheckUnit:getPoint() local UnitPosition = { x = CurrentPoint.x, y = CurrentPoint.z } @@ -2420,7 +2420,7 @@ _MusicTable.FileCnt = 0 function MusicRegister( SndRef, SndFile, SndTime ) -trace.f() +--trace.f() env.info(( 'MusicRegister: SndRef = ' .. SndRef )) env.info(( 'MusicRegister: SndFile = ' .. SndFile )) @@ -2441,7 +2441,7 @@ trace.f() end function MusicToPlayer( SndRef, PlayerName, SndContinue ) -trace.f() +--trace.f() --env.info(( 'MusicToPlayer: SndRef = ' .. SndRef )) @@ -2464,7 +2464,7 @@ trace.f() end function MusicToGroup( SndRef, SndGroup, SndContinue ) -trace.f() +--trace.f() --env.info(( 'MusicToGroup: SndRef = ' .. SndRef )) @@ -2507,7 +2507,7 @@ trace.f() end function MusicCanStart(PlayerName) -trace.f() +--trace.f() --env.info(( 'MusicCanStart:' )) @@ -2549,7 +2549,7 @@ trace.f() end function MusicScheduler() -trace.scheduled("", "MusicScheduler") +--trace.scheduled("", "MusicScheduler") --env.info(( 'MusicScheduler:' )) if _MusicTable['Queue'] ~= nil and _MusicTable.FileCnt > 0 then diff --git a/Moose/Sead.lua b/Moose/Sead.lua index 8c22a1df6..78d8f0d37 100644 --- a/Moose/Sead.lua +++ b/Moose/Sead.lua @@ -1,5 +1,5 @@ --- Provides defensive behaviour to a set of SAM sites within a running Mission. --- @module SEAD +-- @module Sead -- @author to be searched on the forum -- @author (co) Flightcontrol (Modified and enriched with functionality) @@ -10,7 +10,8 @@ Include.File( "Client" ) Include.File( "Task" ) --- The SEAD class --- @type +-- @type SEAD +-- @extends Base#BASE SEAD = { ClassName = "SEAD", TargetSkill = { @@ -33,7 +34,7 @@ SEAD = { -- SEAD_RU_SAM_Defenses = SEAD:New( { 'RU SA-6 Kub', 'RU SA-6 Defenses', 'RU MI-26 Troops', 'RU Attack Gori' } ) function SEAD:New( SEADGroupPrefixes ) local self = BASE:Inherit( self, BASE:New() ) - self:T( SEADGroupPrefixes ) + self:F( SEADGroupPrefixes ) if type( SEADGroupPrefixes ) == 'table' then for SEADGroupPrefixID, SEADGroupPrefix in pairs( SEADGroupPrefixes ) do self.SEADGroupPrefixes[SEADGroupPrefix] = SEADGroupPrefix @@ -41,8 +42,8 @@ function SEAD:New( SEADGroupPrefixes ) else self.SEADGroupNames[SEADGroupPrefixes] = SEADGroupPrefixes end - self.AddEvent( self, world.event.S_EVENT_SHOT, self.EventShot ) - self.EnableEvents( self ) + self:AddEvent( world.event.S_EVENT_SHOT, self.EventShot ) + self:EnableEvents() return self end @@ -50,7 +51,7 @@ end --- Detects if an SA site was shot with an anti radiation missile. In this case, take evasive actions based on the skill level set within the ME. -- @see SEAD function SEAD:EventShot( event ) -self:T( { event } ) + self:F( { event } ) local SEADUnit = event.initiator local SEADUnitName = SEADUnit:getName() diff --git a/Moose/Spawn.lua b/Moose/Spawn.lua index 00d4b0d74..920975962 100644 --- a/Moose/Spawn.lua +++ b/Moose/Spawn.lua @@ -67,7 +67,7 @@ -- This models AI that has succesfully returned to their airbase, to restart their combat activities. -- Check the @{#SPAWN.CleanUp} for further info. -- --- @module SPAWN +-- @module Spawn -- @author FlightControl Include.File( "Routines" ) @@ -78,6 +78,7 @@ Include.File( "Zone" ) --- SPAWN Class -- @type SPAWN +-- @extends Base#BASE -- @field ClassName SPAWN = { ClassName = "SPAWN", @@ -95,7 +96,7 @@ SPAWN = { -- @usage local Plane = SPAWN:New( "Plane" ) -- Creates a new local variable that can initiate new planes with the name "Plane#ddd" using the template "Plane" as defined within the ME. function SPAWN:New( SpawnTemplatePrefix ) local self = BASE:Inherit( self, BASE:New() ) - self:T( { SpawnTemplatePrefix } ) + self:F( { SpawnTemplatePrefix } ) local TemplateGroup = Group.getByName( SpawnTemplatePrefix ) if TemplateGroup then @@ -117,11 +118,11 @@ function SPAWN:New( SpawnTemplatePrefix ) error( "SPAWN:New: There is no group declared in the mission editor with SpawnTemplatePrefix = '" .. SpawnTemplatePrefix .. "'" ) end - self.AddEvent( self, world.event.S_EVENT_BIRTH, self._OnBirth ) - self.AddEvent( self, world.event.S_EVENT_DEAD, self._OnDeadOrCrash ) - self.AddEvent( self, world.event.S_EVENT_CRASH, self._OnDeadOrCrash ) + self:AddEvent( world.event.S_EVENT_BIRTH, self._OnBirth ) + self:AddEvent( world.event.S_EVENT_DEAD, self._OnDeadOrCrash ) + self:AddEvent( world.event.S_EVENT_CRASH, self._OnDeadOrCrash ) - self.EnableEvents( self ) + self:EnableEvents() return self end @@ -137,7 +138,7 @@ end -- @usage local PlaneWithAlias = SPAWN:NewWithAlias( "Plane", "Bomber" ) -- Creates a new local variable that can instantiate new planes with the name "Bomber#ddd" using the template "Plane" as defined within the ME. function SPAWN:NewWithAlias( SpawnTemplatePrefix, SpawnAliasPrefix ) local self = BASE:Inherit( self, BASE:New() ) - self:T( { SpawnTemplatePrefix, SpawnAliasPrefix } ) + self:F( { SpawnTemplatePrefix, SpawnAliasPrefix } ) local TemplateGroup = Group.getByName( SpawnTemplatePrefix ) if TemplateGroup then @@ -160,11 +161,11 @@ function SPAWN:NewWithAlias( SpawnTemplatePrefix, SpawnAliasPrefix ) error( "SPAWN:New: There is no group declared in the mission editor with SpawnTemplatePrefix = '" .. SpawnTemplatePrefix .. "'" ) end - self.AddEvent( self, world.event.S_EVENT_BIRTH, self._OnBirth ) - self.AddEvent( self, world.event.S_EVENT_DEAD, self._OnDeadOrCrash ) - self.AddEvent( self, world.event.S_EVENT_CRASH, self._OnDeadOrCrash ) + self:AddEvent( world.event.S_EVENT_BIRTH, self._OnBirth ) + self:AddEvent( world.event.S_EVENT_DEAD, self._OnDeadOrCrash ) + self:AddEvent( world.event.S_EVENT_CRASH, self._OnDeadOrCrash ) - self.EnableEvents( self ) + self:EnableEvents() return self end @@ -186,7 +187,7 @@ end -- -- There will be maximum 24 groups spawned during the whole mission lifetime. -- Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Limit( 2, 24 ) function SPAWN:Limit( SpawnMaxUnitsAlive, SpawnMaxGroups ) - self:T( { self.SpawnTemplatePrefix, SpawnMaxUnitsAlive, SpawnMaxGroups } ) + self:F( { self.SpawnTemplatePrefix, SpawnMaxUnitsAlive, SpawnMaxGroups } ) self.SpawnMaxUnitsAlive = SpawnMaxUnitsAlive -- The maximum amount of groups that can be alive of SpawnTemplatePrefix at the same time. self.SpawnMaxGroups = SpawnMaxGroups -- The maximum amount of groups that can be spawned. @@ -214,7 +215,7 @@ end -- -- The randomization of waypoint 2 and 3 will take place within a radius of 2000 meters. -- Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):RandomizeRoute( 2, 2, 2000 ) function SPAWN:RandomizeRoute( SpawnStartPoint, SpawnEndPoint, SpawnRadius ) - self:T( { self.SpawnTemplatePrefix, SpawnStartPoint, SpawnEndPoint, SpawnRadius } ) + self:F( { self.SpawnTemplatePrefix, SpawnStartPoint, SpawnEndPoint, SpawnRadius } ) self.SpawnRandomizeRoute = true self.SpawnRandomizeRouteStartPoint = SpawnStartPoint @@ -249,7 +250,7 @@ end -- Spawn_US_Platoon_Middle = SPAWN:New( 'US Tank Platoon Middle' ):Limit( 12, 150 ):Schedule( 200, 0.4 ):RandomizeTemplate( Spawn_US_Platoon ):RandomizeRoute( 3, 3, 2000 ) -- Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):Limit( 12, 150 ):Schedule( 200, 0.4 ):RandomizeTemplate( Spawn_US_Platoon ):RandomizeRoute( 3, 3, 2000 ) function SPAWN:RandomizeTemplate( SpawnTemplatePrefixTable ) - self:T( { self.SpawnTemplatePrefix, SpawnTemplatePrefixTable } ) + self:F( { self.SpawnTemplatePrefix, SpawnTemplatePrefixTable } ) self.SpawnTemplatePrefixTable = SpawnTemplatePrefixTable self.SpawnRandomizeTemplate = true @@ -277,7 +278,7 @@ end -- -- Re-SPAWN the Group(s) after each landing and Engine Shut-Down automatically. -- SpawnRU_SU34 = SPAWN:New( 'TF1 RU Su-34 Krymsk@AI - Attack Ships' ):Schedule( 2, 3, 1800, 0.4 ):SpawnUncontrolled():RandomizeRoute( 1, 1, 3000 ):RepeatOnEngineShutDown() function SPAWN:Repeat() - self:T( { self.SpawnTemplatePrefix } ) + self:F( { self.SpawnTemplatePrefix } ) self.SpawnRepeat = true self.RepeatOnEngineShutDown = false @@ -296,7 +297,7 @@ end -- @see Repeat function SPAWN:RepeatOnLanding() - self:T( { self.SpawnTemplatePrefix } ) + self:F( { self.SpawnTemplatePrefix } ) self:Repeat() self.RepeatOnEngineShutDown = false @@ -308,7 +309,7 @@ end --- Same as the @{#SPAWN.Repeat) method, but now the Group will respawn after its engines have shut down. -- @return SPAWN function SPAWN:RepeatOnEngineShutDown() - self:T( { self.SpawnTemplatePrefix } ) + self:F( { self.SpawnTemplatePrefix } ) self:Repeat() self.RepeatOnEngineShutDown = true @@ -325,7 +326,7 @@ end -- @return #SPAWN self -- @usage Spawn_Helicopter:CleanUp( 20 ) -- CleanUp the spawning of the helicopters every 20 seconds when they become inactive. function SPAWN:CleanUp( SpawnCleanUpInterval ) - self:T( { self.SpawnTemplatePrefix, SpawnCleanUpInterval } ) + self:F( { self.SpawnTemplatePrefix, SpawnCleanUpInterval } ) self.SpawnCleanUpInterval = SpawnCleanUpInterval self.SpawnCleanUpTimeStamps = {} @@ -348,7 +349,7 @@ end -- -- Define an array of Groups. -- Spawn_BE_Ground = SPAWN:New( 'BE Ground' ):Limit( 2, 24 ):Visible( 90, "Diamond", 10, 100, 50 ) function SPAWN:Array( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY ) - self:T( { self.SpawnTemplatePrefix, SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY } ) + self:F( { self.SpawnTemplatePrefix, SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY } ) self.SpawnVisible = true -- When the first Spawn executes, all the Groups need to be made visible before start. @@ -396,7 +397,7 @@ end -- @param self -- @return GROUP#GROUP The group that was spawned. You can use this group for further actions. function SPAWN:Spawn() - self:T( { self.SpawnTemplatePrefix, self.SpawnIndex } ) + self:F( { self.SpawnTemplatePrefix, self.SpawnIndex } ) return self:SpawnWithIndex( self.SpawnIndex + 1 ) end @@ -407,7 +408,7 @@ end -- @param #string SpawnIndex The index of the group to be spawned. -- @return GROUP#GROUP The group that was spawned. You can use this group for further actions. function SPAWN:ReSpawn( SpawnIndex ) - self:T( { self.SpawnTemplatePrefix, SpawnIndex } ) + self:F( { self.SpawnTemplatePrefix, SpawnIndex } ) if not SpawnIndex then SpawnIndex = 1 @@ -425,7 +426,7 @@ end -- Uses @{DATABASE} global object defined in MOOSE. -- @return GROUP#GROUP The group that was spawned. You can use this group for further actions. function SPAWN:SpawnWithIndex( SpawnIndex ) - self:T( { self.SpawnTemplatePrefix, SpawnIndex, self.SpawnMaxGroups } ) + self:F( { self.SpawnTemplatePrefix, SpawnIndex, self.SpawnMaxGroups } ) if self:_GetSpawnIndex( SpawnIndex ) then @@ -465,7 +466,7 @@ end -- -- Between these two values, a random amount of seconds will be choosen for each new spawn of the helicopters. -- Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 ) function SPAWN:SpawnScheduled( SpawnTime, SpawnTimeVariation ) - self:T( { SpawnTime, SpawnTimeVariation } ) + self:F( { SpawnTime, SpawnTimeVariation } ) self.SpawnCurrentTimer = 0 -- The internal timer counter to trigger a scheduled spawning of SpawnTemplatePrefix. self.SpawnSetTimer = 0 -- The internal timer value when a scheduled spawning of SpawnTemplatePrefix occurs. @@ -489,7 +490,7 @@ end --- Will start the spawning scheduler. -- Note: This function is called automatically when @{#SPAWN.Scheduled} is called. function SPAWN:SpawnScheduleStart() - self:T( { self.SpawnTemplatePrefix } ) + self:F( { self.SpawnTemplatePrefix } ) --local ClientUnit = #AlivePlayerUnits() @@ -506,7 +507,7 @@ end --- Will stop the scheduled spawning scheduler. function SPAWN:SpawnScheduleStop() - self:T( { self.SpawnTemplatePrefix } ) + self:F( { self.SpawnTemplatePrefix } ) self.SpawnIsScheduled = false end @@ -515,14 +516,14 @@ end -- Note that each point in the route assigned to the spawning group is reset to the point of the spawn. -- You can use the returned group to further define the route to be followed. -- @param self --- @param #UNIT HostUnit The air or ground unit dropping or unloading the group. +-- @param Unit#UNIT HostUnit The air or ground unit dropping or unloading the group. -- @param #number OuterRadius The outer radius in meters where the new group will be spawned. -- @param #number InnerRadius The inner radius in meters where the new group will NOT be spawned. -- @param #number SpawnIndex (Optional) The index which group to spawn within the given zone. --- @return GROUP#GROUP that was spawned. +-- @return Group#GROUP that was spawned. -- @return #nil Nothing was spawned. function SPAWN:SpawnFromUnit( HostUnit, OuterRadius, InnerRadius, SpawnIndex ) - self:T( { self.SpawnTemplatePrefix, HostUnit, OuterRadius, InnerRadius, SpawnIndex } ) + self:F( { self.SpawnTemplatePrefix, HostUnit, OuterRadius, InnerRadius, SpawnIndex } ) if HostUnit and HostUnit:IsAlive() then -- and HostUnit:getUnit(1):inAir() == false then @@ -537,7 +538,7 @@ function SPAWN:SpawnFromUnit( HostUnit, OuterRadius, InnerRadius, SpawnIndex ) if SpawnTemplate then - local UnitPoint = HostUnit:GetPoint() + local UnitPoint = HostUnit:GetPointVec2() --for PointID, Point in pairs( SpawnTemplate.route.points ) do --Point.x = UnitPoint.x --Point.y = UnitPoint.y @@ -565,14 +566,14 @@ function SPAWN:SpawnFromUnit( HostUnit, OuterRadius, InnerRadius, SpawnIndex ) SpawnTemplate.units[UnitID].x = UnitPoint.x SpawnTemplate.units[UnitID].y = UnitPoint.y else - local CirclePos = routines.getRandPointInCircle( UnitPoint, InnerRadius+1, InnerRadius ) + local CirclePos = routines.getRandPointInCircle( UnitPoint, OuterRadius, InnerRadius ) SpawnTemplate.units[UnitID].x = CirclePos.x SpawnTemplate.units[UnitID].y = CirclePos.y end self:T( 'SpawnTemplate.units['..UnitID..'].x = ' .. SpawnTemplate.units[UnitID].x .. ', SpawnTemplate.units['..UnitID..'].y = ' .. SpawnTemplate.units[UnitID].y ) end - local SpawnPos = routines.getRandPointInCircle( UnitPoint, InnerRadius+1, InnerRadius ) + local SpawnPos = routines.getRandPointInCircle( UnitPoint, OuterRadius, InnerRadius ) local Point = {} Point.type = "Turning Point" Point.x = SpawnPos.x @@ -597,7 +598,7 @@ end -- @return GROUP#GROUP that was spawned. -- @return #nil when nothing was spawned. function SPAWN:SpawnInZone( Zone, SpawnIndex ) - self:T( { self.SpawnTemplatePrefix, Zone, SpawnIndex } ) + self:F( { self.SpawnTemplatePrefix, Zone, SpawnIndex } ) if Zone then @@ -612,7 +613,7 @@ function SPAWN:SpawnInZone( Zone, SpawnIndex ) if SpawnTemplate then - local ZonePoint = Zone:GetPoint() + local ZonePoint = Zone:GetPointVec2() SpawnTemplate.route.points = nil SpawnTemplate.route.points = {} @@ -651,7 +652,7 @@ end -- This will be similar to the uncontrolled flag setting in the ME. -- @return #SPAWN self function SPAWN:UnControlled() - self:T( { self.SpawnTemplatePrefix } ) + self:F( { self.SpawnTemplatePrefix } ) self.SpawnUnControlled = true @@ -669,7 +670,7 @@ end -- @param #number SpawnIndex Is the number of the Group that is to be spawned. -- @return string SpawnGroupName function SPAWN:SpawnGroupName( SpawnIndex ) - self:T( { self.SpawnTemplatePrefix, SpawnIndex } ) + self:F( { self.SpawnTemplatePrefix, SpawnIndex } ) local SpawnPrefix = self.SpawnTemplatePrefix if self.SpawnAliasPrefix then @@ -693,7 +694,7 @@ end -- @return GROUP#GROUP, #number The group found, the new index where the group was found. -- @return #nil, #nil When no group is found, #nil is returned. function SPAWN:GetFirstAliveGroup( SpawnCursor ) - self:T( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnCursor } ) + self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnCursor } ) for SpawnIndex = 1, self.SpawnCount do local SpawnGroup = self:GetGroupFromIndex( SpawnIndex ) @@ -713,7 +714,7 @@ end -- @return GROUP#GROUP, #number The group found, the new index where the group was found. -- @return #nil, #nil When no group is found, #nil is returned. function SPAWN:GetNextAliveGroup( SpawnCursor ) - self:T( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnCursor } ) + self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnCursor } ) SpawnCursor = SpawnCursor + 1 for SpawnIndex = SpawnCursor, self.SpawnCount do @@ -729,7 +730,7 @@ end --- Find the last alive group during runtime. function SPAWN:GetLastAliveGroup() - self:T( { self.SpawnTemplatePrefixself.SpawnAliasPrefix } ) + self:F( { self.SpawnTemplatePrefixself.SpawnAliasPrefix } ) self.SpawnIndex = self:_GetLastIndex() for SpawnIndex = self.SpawnIndex, 1, -1 do @@ -753,7 +754,7 @@ end -- @param #number SpawnIndex The index of the group to return. -- @return GROUP#GROUP function SPAWN:GetGroupFromIndex( SpawnIndex ) - self:T( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnIndex } ) + self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnIndex } ) if SpawnIndex then local SpawnGroup = self.SpawnGroups[SpawnIndex].Group @@ -772,7 +773,7 @@ end -- @return #string The prefix -- @return #nil Nothing found function SPAWN:_GetGroupIndexFromDCSUnit( DCSUnit ) - self:T( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, DCSUnit } ) + self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, DCSUnit } ) if DCSUnit and DCSUnit:getName() then local IndexString = string.match( DCSUnit:getName(), "#.*-" ):sub( 2, -2 ) @@ -796,7 +797,7 @@ end -- @return #string The prefix -- @return #nil Nothing found function SPAWN:_GetPrefixFromDCSUnit( DCSUnit ) - self:T( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, DCSUnit } ) + self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, DCSUnit } ) if DCSUnit and DCSUnit:getName() then local SpawnPrefix = string.match( DCSUnit:getName(), ".*#" ) @@ -812,7 +813,7 @@ end --- Return the group within the SpawnGroups collection with input a DCSUnit. function SPAWN:_GetGroupFromDCSUnit( DCSUnit ) - self:T( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, DCSUnit } ) + self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, DCSUnit } ) if DCSUnit then local SpawnPrefix = self:_GetPrefixFromDCSUnit( DCSUnit ) @@ -832,7 +833,7 @@ end --- Get the index from a given group. -- The function will search the name of the group for a #, and will return the number behind the #-mark. function SPAWN:GetSpawnIndexFromGroup( SpawnGroup ) - self:T( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnGroup } ) + self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnGroup } ) local IndexString = string.match( SpawnGroup:GetName(), "#.*$" ):sub( 2 ) local Index = tonumber( IndexString ) @@ -844,14 +845,14 @@ end --- Return the last maximum index that can be used. function SPAWN:_GetLastIndex() - self:T( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix } ) + self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix } ) return self.SpawnMaxGroups end --- Initalize the SpawnGroups collection. function SPAWN:_InitializeSpawnGroups( SpawnIndex ) - self:T( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnIndex } ) + self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnIndex } ) if not self.SpawnGroups[SpawnIndex] then self.SpawnGroups[SpawnIndex] = {} @@ -898,7 +899,7 @@ end --- Gets the CountryID of the Group with the given SpawnPrefix function SPAWN:_GetGroupCountryID( SpawnPrefix ) - self:T( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnPrefix } ) + self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnPrefix } ) local TemplateGroup = Group.getByName( SpawnPrefix ) @@ -913,7 +914,7 @@ end --- Gets the Group Template from the ME environment definition. -- This method used the @{DATABASE} object, which contains ALL initial and new spawned object in MOOSE. function SPAWN:_GetTemplate( SpawnTemplatePrefix ) - self:T( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnTemplatePrefix } ) + self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnTemplatePrefix } ) local SpawnTemplate = nil @@ -933,7 +934,7 @@ end --- Prepares the new Group Template. function SPAWN:_Prepare( SpawnTemplatePrefix, SpawnIndex ) - self:T( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix } ) + self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix } ) local SpawnTemplate = self:_GetTemplate( SpawnTemplatePrefix ) SpawnTemplate.name = self:SpawnGroupName( SpawnIndex ) @@ -966,7 +967,7 @@ end -- @param #number SpawnIndex The index of the group to be spawned. -- @return #SPAWN function SPAWN:_RandomizeRoute( SpawnIndex ) - self:T( { self.SpawnTemplatePrefix, SpawnIndex, self.SpawnRandomizeRoute, self.SpawnRandomizeRouteStartPoint, self.SpawnRandomizeRouteEndPoint, self.SpawnRandomizeRouteRadius } ) + self:F( { self.SpawnTemplatePrefix, SpawnIndex, self.SpawnRandomizeRoute, self.SpawnRandomizeRouteStartPoint, self.SpawnRandomizeRouteEndPoint, self.SpawnRandomizeRouteRadius } ) if self.SpawnRandomizeRoute then local SpawnTemplate = self.SpawnGroups[SpawnIndex].SpawnTemplate @@ -987,7 +988,7 @@ end function SPAWN:_RandomizeTemplate( SpawnIndex ) - self:T( { self.SpawnTemplatePrefix, SpawnIndex } ) + self:F( { self.SpawnTemplatePrefix, SpawnIndex } ) if self.SpawnRandomizeTemplate then self.SpawnGroups[SpawnIndex].SpawnTemplatePrefix = self.SpawnTemplatePrefixTable[ math.random( 1, #self.SpawnTemplatePrefixTable ) ] @@ -1006,7 +1007,7 @@ function SPAWN:_RandomizeTemplate( SpawnIndex ) end function SPAWN:_TranslateRotate( SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle ) - self:T( { self.SpawnTemplatePrefix, SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle } ) + self:F( { self.SpawnTemplatePrefix, SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle } ) -- Translate local TranslatedX = SpawnX @@ -1050,7 +1051,7 @@ end --- Get the next index of the groups to be spawned. This function is complicated, as it is used at several spaces. function SPAWN:_GetSpawnIndex( SpawnIndex ) - self:T( { self.SpawnTemplatePrefix, SpawnIndex, self.SpawnMaxGroups, self.SpawnMaxUnitsAlive, self.AliveUnits, #self.SpawnTemplate.units } ) + self:F( { self.SpawnTemplatePrefix, SpawnIndex, self.SpawnMaxGroups, self.SpawnMaxUnitsAlive, self.AliveUnits, #self.SpawnTemplate.units } ) if ( self.SpawnMaxGroups == 0 ) or ( SpawnIndex <= self.SpawnMaxGroups ) then @@ -1169,7 +1170,7 @@ end --- This function is called automatically by the Spawning scheduler. -- It is the internal worker method SPAWNing new Groups on the defined time intervals. function SPAWN:_Scheduler() -self:T( { "_Scheduler", self.SpawnTemplatePrefix, self.SpawnAliasPrefix, self.SpawnIndex, self.SpawnMaxGroups, self.SpawnMaxUnitsAlive } ) + self:F( { "_Scheduler", self.SpawnTemplatePrefix, self.SpawnAliasPrefix, self.SpawnIndex, self.SpawnMaxGroups, self.SpawnMaxUnitsAlive } ) if self.SpawnInit or self.SpawnCurrentTimer == self.SpawnSetTimer then -- Validate if there are still groups left in the batch... @@ -1187,7 +1188,7 @@ self:T( { "_Scheduler", self.SpawnTemplatePrefix, self.SpawnAliasPrefix, self.Sp end function SPAWN:_SpawnCleanUpScheduler() - self:T( { "CleanUp Scheduler:", self.SpawnTemplatePrefix } ) + self:F( { "CleanUp Scheduler:", self.SpawnTemplatePrefix } ) local SpawnCursor local SpawnGroup, SpawnCursor = self:GetFirstAliveGroup( SpawnCursor ) diff --git a/Moose/Stage.lua b/Moose/Stage.lua index cfd4c00a3..11301093f 100644 --- a/Moose/Stage.lua +++ b/Moose/Stage.lua @@ -29,7 +29,7 @@ STAGE = { function STAGE:New() local self = BASE:Inherit( self, BASE:New() ) - self:T() + self:F() return self end @@ -61,14 +61,14 @@ STAGEBRIEF = { function STAGEBRIEF:New() local self = BASE:Inherit( self, STAGE:New() ) - self:T() + self:F() self.StageType = 'CLIENT' return self end function STAGEBRIEF:Execute( Mission, Client, Task ) local Valid = BASE:Inherited(self):Execute( Mission, Client, Task ) - self:T() + self:F() Mission:ShowBriefing( Client ) self.StageBriefingTime = timer.getTime() return Valid @@ -98,13 +98,13 @@ STAGESTART = { function STAGESTART:New() local self = BASE:Inherit( self, STAGE:New() ) - self:T() + self:F() self.StageType = 'CLIENT' return self end function STAGESTART:Execute( Mission, Client, Task ) -self:T() + self:F() local Valid = BASE:Inherited(self):Execute( Mission, Client, Task ) if Task.TaskBriefing then Client:Message( Task.TaskBriefing, 30, Mission.Name .. "/Stage", "Mission Command: Tasking" ) @@ -116,7 +116,7 @@ self:T() end function STAGESTART:Validate( Mission, Client, Task ) -self:T() + self:F() local Valid = STAGE:Validate( Mission, Client, Task ) if timer.getTime() - self.StageStartTime <= self.StageStartDuration then @@ -136,13 +136,13 @@ STAGE_CARGO_LOAD = { function STAGE_CARGO_LOAD:New() local self = BASE:Inherit( self, STAGE:New() ) - self:T() + self:F() self.StageType = 'CLIENT' return self end function STAGE_CARGO_LOAD:Execute( Mission, Client, Task ) -self:T() + self:F() local Valid = BASE:Inherited(self):Execute( Mission, Client, Task ) for LoadCargoID, LoadCargo in pairs( Task.Cargos.LoadCargos ) do @@ -157,7 +157,7 @@ self:T() end function STAGE_CARGO_LOAD:Validate( Mission, Client, Task ) -self:T() + self:F() local Valid = STAGE:Validate( Mission, Client, Task ) return 1 @@ -170,13 +170,13 @@ STAGE_CARGO_INIT = { function STAGE_CARGO_INIT:New() local self = BASE:Inherit( self, STAGE:New() ) - self:T() + self:F() self.StageType = 'CLIENT' return self end function STAGE_CARGO_INIT:Execute( Mission, Client, Task ) -self:T() + self:F() local Valid = BASE:Inherited(self):Execute( Mission, Client, Task ) for InitLandingZoneID, InitLandingZone in pairs( Task.LandingZones.LandingZones ) do @@ -196,7 +196,7 @@ end function STAGE_CARGO_INIT:Validate( Mission, Client, Task ) -self:T() + self:F() local Valid = STAGE:Validate( Mission, Client, Task ) return 1 @@ -213,7 +213,7 @@ STAGEROUTE = { function STAGEROUTE:New() local self = BASE:Inherit( self, STAGE:New() ) - self:T() + self:F() self.StageType = 'CLIENT' self.MessageSwitch = true return self @@ -221,7 +221,7 @@ end function STAGEROUTE:Execute( Mission, Client, Task ) -self:T() + self:F() local Valid = BASE:Inherited(self):Execute( Mission, Client, Task ) local RouteMessage = "Fly to " @@ -239,7 +239,7 @@ self:T() end function STAGEROUTE:Validate( Mission, Client, Task ) -self:T() + self:F() local Valid = STAGE:Validate( Mission, Client, Task ) -- check if the Client is in the landing zone @@ -274,13 +274,13 @@ STAGELANDING = { function STAGELANDING:New() local self = BASE:Inherit( self, STAGE:New() ) - self:T() + self:F() self.StageType = 'CLIENT' return self end function STAGELANDING:Execute( Mission, Client, Task ) -self:T() + self:F() Client:Message( "We have arrived at the landing zone.", self.MSG.TIME, Mission.Name .. "/StageArrived", "Co-Pilot: Arrived", 10 ) @@ -332,7 +332,7 @@ self:T() end function STAGELANDING:Validate( Mission, Client, Task ) -self:T() + self:F() Task.CurrentLandingZoneName = routines.IsUnitInZones( Client:GetClientGroupDCSUnit(), Task.LandingZones.LandingZoneNames ) if Task.CurrentLandingZoneName then @@ -376,13 +376,13 @@ STAGELANDED = { function STAGELANDED:New() local self = BASE:Inherit( self, STAGE:New() ) - self:T() + self:F() self.StageType = 'CLIENT' return self end function STAGELANDED:Execute( Mission, Client, Task ) -self:T() + self:F() if Task.IsLandingRequired then Client:Message( 'We have landed within the landing zone. Use the radio menu (F10) to ' .. Task.TEXT[1] .. ' the ' .. Task.CargoType .. '.', @@ -398,7 +398,7 @@ end function STAGELANDED:Validate( Mission, Client, Task ) -self:T() + self:F() if not routines.IsUnitInZones( Client:GetClientGroupDCSUnit(), Task.CurrentLandingZoneName ) then self:T( "Client is not anymore in the landing zone, go back to stage Route, and remove cargo menus." ) @@ -431,20 +431,20 @@ STAGEUNLOAD = { function STAGEUNLOAD:New() local self = BASE:Inherit( self, STAGE:New() ) - self:T() + self:F() self.StageType = 'CLIENT' return self end function STAGEUNLOAD:Execute( Mission, Client, Task ) -self:T() + self:F() Client:Message( 'The ' .. Task.CargoType .. ' are being ' .. Task.TEXT[2] .. ' within the landing zone. Wait until the helicopter is ' .. Task.TEXT[3] .. '.', self.MSG.TIME, Mission.Name .. "/StageUnLoad", "Co-Pilot: Unload" ) Task:RemoveCargoMenus( Client ) end function STAGEUNLOAD:Executing( Mission, Client, Task ) -self:T() + self:F() env.info( 'STAGEUNLOAD:Executing() Task.Cargo.CargoName = ' .. Task.Cargo.CargoName ) local TargetZoneName @@ -464,7 +464,7 @@ self:T() end function STAGEUNLOAD:Validate( Mission, Client, Task ) -self:T() + self:F() env.info( 'STAGEUNLOAD:Validate()' ) if routines.IsUnitInZones( Client:GetClientGroupDCSUnit(), Task.CurrentLandingZoneName ) then @@ -503,13 +503,13 @@ STAGELOAD = { function STAGELOAD:New() local self = BASE:Inherit( self, STAGE:New() ) - self:T() + self:F() self.StageType = 'CLIENT' return self end function STAGELOAD:Execute( Mission, Client, Task ) -self:T() + self:F() if not Task.IsSlingLoad then Client:Message( 'The ' .. Task.CargoType .. ' are being ' .. Task.TEXT[2] .. ' within the landing zone. Wait until the helicopter is ' .. Task.TEXT[3] .. '.', @@ -524,13 +524,13 @@ self:T() end function STAGELOAD:Executing( Mission, Client, Task ) -self:T() + self:F() -- If the Cargo is ready to be loaded, load it into the Client. if not Task.IsSlingLoad then - trace.i(self.ClassName, Task.Cargo.CargoName) + self:T( Task.Cargo.CargoName) if Task.Cargo:OnBoarded( Client, Task.CurrentCargoZone ) then @@ -553,12 +553,12 @@ self:T() if Cargo:IsSlingLoad() then local CargoStatic = StaticObject.getByName( Cargo.CargoStaticName ) if CargoStatic then - trace.i(self.ClassName, "Cargo is found in the DCS simulator.") + self:T( "Cargo is found in the DCS simulator.") local CargoStaticPosition = CargoStatic:getPosition().p - trace.i(self.ClassName, "Cargo Position x = " .. CargoStaticPosition.x .. ", y = " .. CargoStaticPosition.y .. ", z = " .. CargoStaticPosition.z ) + self:T( "Cargo Position x = " .. CargoStaticPosition.x .. ", y = " .. CargoStaticPosition.y .. ", z = " .. CargoStaticPosition.z ) local CargoStaticHeight = routines.GetUnitHeight( CargoStatic ) if CargoStaticHeight > 5 then - trace.i(self.ClassName, "Cargo is airborne.") + self:T( "Cargo is airborne.") Cargo:StatusLoaded() Task.Cargo = Cargo Client:Message( 'The Cargo has been successfully hooked onto the helicopter and is now being sling loaded. Fly outside the landing zone.', @@ -576,7 +576,7 @@ self:T() end function STAGELOAD:Validate( Mission, Client, Task ) -self:T() + self:F() self:T( "Task.CurrentLandingZoneName = " .. Task.CurrentLandingZoneName ) @@ -635,18 +635,18 @@ STAGEDONE = { function STAGEDONE:New() local self = BASE:Inherit( self, STAGE:New() ) - self:T() + self:F() self.StageType = 'AI' return self end function STAGEDONE:Execute( Mission, Client, Task ) -self:T() + self:F() end function STAGEDONE:Validate( Mission, Client, Task ) -self:T() + self:F() Task:Done() @@ -661,20 +661,20 @@ STAGEARRIVE = { function STAGEARRIVE:New() local self = BASE:Inherit( self, STAGE:New() ) - self:T() + self:F() self.StageType = 'CLIENT' return self end function STAGEARRIVE:Execute( Mission, Client, Task ) -self:T() + self:F() Client:Message( 'We have arrived at ' .. Task.CurrentLandingZoneName .. ".", self.MSG.TIME, Mission.Name .. "/Stage", "Co-Pilot: Arrived" ) end function STAGEARRIVE:Validate( Mission, Client, Task ) -self:T() + self:F() Task.CurrentLandingZoneID = routines.IsUnitInZones( Client:GetClientGroupDCSUnit(), Task.LandingZones ) if ( Task.CurrentLandingZoneID ) then @@ -695,7 +695,7 @@ STAGEGROUPSDESTROYED = { function STAGEGROUPSDESTROYED:New() local self = BASE:Inherit( self, STAGE:New() ) - self:T() + self:F() self.StageType = 'AI' return self end @@ -707,7 +707,7 @@ end --end function STAGEGROUPSDESTROYED:Validate( Mission, Client, Task ) -self:T() + self:F() if Task.MissionTask:IsGoalReached() then return 1 @@ -717,7 +717,7 @@ self:T() end function STAGEGROUPSDESTROYED:Execute( Mission, Client, Task ) -self:T() + self:F() self:T( { Task.ClassName, Task.Destroyed } ) --env.info( 'Event Table Task = ' .. tostring(Task) ) diff --git a/Moose/Task.lua b/Moose/Task.lua index 4e45ad4f9..3481963a2 100644 --- a/Moose/Task.lua +++ b/Moose/Task.lua @@ -8,7 +8,8 @@ Include.File( "Client" ) Include.File( "Stage" ) --- The TASK class --- @type +-- @type TASK +-- @extends Base#BASE TASK = { -- Defines the different signal types with a Task. @@ -47,10 +48,9 @@ TASK = { --- Instantiates a new TASK Base. Should never be used. Interface Class. -- @return TASK function TASK:New() -trace.f(self.ClassName) - local self = BASE:Inherit( self, BASE:New() ) - + self:F() + -- assign Task default values during construction self.TaskBriefing = "Task: No Task." self.Time = timer.getTime() @@ -60,14 +60,14 @@ trace.f(self.ClassName) end function TASK:SetStage( StageSequenceIncrement ) -trace.f(self.ClassName, { StageSequenceIncrement } ) + self:F( { StageSequenceIncrement } ) local Valid = false if StageSequenceIncrement ~= 0 then self.ActiveStage = self.ActiveStage + StageSequenceIncrement if 1 <= self.ActiveStage and self.ActiveStage <= #self.Stages then self.Stage = self.Stages[self.ActiveStage] - trace.i( self.ClassName, { self.Stage.Name } ) + self:T( { self.Stage.Name } ) self.Frequency = self.Stage.Frequency Valid = true else @@ -80,7 +80,7 @@ trace.f(self.ClassName, { StageSequenceIncrement } ) end function TASK:Init() -trace.f(self.ClassName) + self:F() self.ActiveStage = 0 self:SetStage(1) self.TaskDone = false @@ -91,7 +91,7 @@ end --- Get progress of a TASK. -- @return string GoalsText function TASK:GetGoalProgress() -trace.f(self.ClassName) + self:F() local GoalsText = "" for GoalVerb, GoalVerbData in pairs( self.GoalTasks ) do @@ -115,7 +115,7 @@ end -- @param MISSION Mission Group structure describing the Mission. -- @param CLIENT Client Group structure describing the Client. function TASK:ShowGoalProgress( Mission, Client ) -trace.f(self.ClassName) + self:F() local GoalsText = "" for GoalVerb, GoalVerbData in pairs( self.GoalTasks ) do @@ -137,32 +137,32 @@ end --- Sets a TASK to status Done. function TASK:Done() -trace.f(self.ClassName) + self:F() self.TaskDone = true end --- Returns if a TASK is done. -- @return bool function TASK:IsDone() - trace.i( self.ClassName, self.TaskDone ) + self:F( self.TaskDone ) return self.TaskDone end --- Sets a TASK to status failed. function TASK:Failed() -trace.f(self.ClassName) + self:F() self.TaskFailed = true end --- Returns if a TASk has failed. -- @return bool function TASK:IsFailed() - trace.i( self.ClassName, self.TaskFailed ) + self:F( self.TaskFailed ) return self.TaskFailed end function TASK:Reset( Mission, Client ) -trace.f(self.ClassName) + self:F() self.ExecuteStage = _TransportExecuteStage.NONE end @@ -176,7 +176,7 @@ end -- @param ?string GoalVerb is the name of the Goal of the TASK. -- @return bool function TASK:Goal( GoalVerb ) -trace.f(self.ClassName) + self:F() if not GoalVerb then GoalVerb = self.GoalVerb end @@ -191,7 +191,7 @@ end -- @param number GoalTotal is the number of times the GoalVerb needs to be achieved. -- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used. function TASK:SetGoalTotal( GoalTotal, GoalVerb ) -trace.f(self.ClassName, { GoalTotal, GoalVerb } ) + self:F( { GoalTotal, GoalVerb } ) if not GoalVerb then GoalVerb = self.GoalVerb @@ -206,7 +206,7 @@ end --- Gets the total of Goals to be achieved within the TASK of the GoalVerb. -- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used. function TASK:GetGoalTotal( GoalVerb ) -trace.f(self.ClassName) + self:F() if not GoalVerb then GoalVerb = self.GoalVerb end @@ -222,7 +222,7 @@ end -- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used. -- @return TASK function TASK:SetGoalCount( GoalCount, GoalVerb ) -trace.f(self.ClassName) + self:F() if not GoalVerb then GoalVerb = self.GoalVerb end @@ -237,7 +237,7 @@ end -- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used. -- @return TASK function TASK:IncreaseGoalCount( GoalCountIncrease, GoalVerb ) -trace.f(self.ClassName) + self:F() if not GoalVerb then GoalVerb = self.GoalVerb end @@ -251,7 +251,7 @@ end -- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used. -- @return TASK function TASK:GetGoalCount( GoalVerb ) -trace.f(self.ClassName) + self:F() if not GoalVerb then GoalVerb = self.GoalVerb end @@ -266,7 +266,7 @@ end -- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used. -- @return TASK function TASK:GetGoalPercentage( GoalVerb ) -trace.f(self.ClassName) + self:F() if not GoalVerb then GoalVerb = self.GoalVerb end @@ -284,10 +284,10 @@ function TASK:IsGoalReached( ) local GoalReached = true for GoalVerb, Goals in pairs( self.GoalTasks ) do - trace.i( self.ClassName, { "GoalVerb", GoalVerb } ) + self:T( { "GoalVerb", GoalVerb } ) if self:Goal( GoalVerb ) then local GoalToDo = self:GetGoalTotal( GoalVerb ) - self:GetGoalCount( GoalVerb ) - trace.i( self.ClassName, "GoalToDo = " .. GoalToDo ) + self:T( "GoalToDo = " .. GoalToDo ) if GoalToDo <= 0 then else GoalReached = false @@ -298,7 +298,7 @@ function TASK:IsGoalReached( ) end end - trace.i( self.ClassName, GoalReached ) + self:T( GoalReached ) return GoalReached end @@ -307,7 +307,7 @@ end -- @param string GoalTask is a text describing the Goal of the TASK to be achieved. -- @param number GoalIncrease is a number by which the Goal achievement is increasing. function TASK:AddGoalCompletion( GoalVerb, GoalTask, GoalIncrease ) -trace.f( self.ClassName, { GoalVerb, GoalTask, GoalIncrease } ) + self:F( { GoalVerb, GoalTask, GoalIncrease } ) if self:Goal( GoalVerb ) then self.GoalTasks[GoalVerb].Goals[#self.GoalTasks[GoalVerb].Goals+1] = GoalTask @@ -320,7 +320,7 @@ end -- @param ?string GoalVerb is the name of the Goal of the TASK. If the GoalVerb is not given, then the default TASK Goals will be used. -- @return string Goals function TASK:GetGoalCompletion( GoalVerb ) -trace.f( self.ClassName, { GoalVerb } ) + self:F( { GoalVerb } ) if self:Goal( GoalVerb ) then local Goals = "" @@ -330,14 +330,12 @@ trace.f( self.ClassName, { GoalVerb } ) end function TASK.MenuAction( Parameter ) -trace.menu("TASK","MenuAction") - trace.l( "TASK", "MenuAction" ) Parameter.ReferenceTask.ExecuteStage = _TransportExecuteStage.EXECUTING Parameter.ReferenceTask.Cargo = Parameter.CargoTask end function TASK:StageExecute() -trace.f(self.ClassName) + self:F() local Execute = false @@ -356,7 +354,7 @@ end --- Work function to set signal events within a TASK. function TASK:AddSignal( SignalUnitNames, SignalType, SignalColor, SignalHeight ) -trace.f(self.ClassName) + self:F() local Valid = true @@ -387,7 +385,7 @@ end -- @param table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone. -- @param number SignalHeight Altitude that the Signal should be fired... function TASK:AddSmokeRed( SignalUnitNames, SignalHeight ) -trace.f(self.ClassName) + self:F() self:AddSignal( SignalUnitNames, TASK.SIGNAL.TYPE.SMOKE, TASK.SIGNAL.COLOR.RED, SignalHeight ) end @@ -395,7 +393,7 @@ end -- @param table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone. -- @param number SignalHeight Altitude that the Signal should be fired... function TASK:AddSmokeGreen( SignalUnitNames, SignalHeight ) -trace.f(self.ClassName) + self:F() self:AddSignal( SignalUnitNames, TASK.SIGNAL.TYPE.SMOKE, TASK.SIGNAL.COLOR.GREEN, SignalHeight ) end @@ -403,7 +401,7 @@ end -- @param table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone. -- @param number SignalHeight Altitude that the Signal should be fired... function TASK:AddSmokeBlue( SignalUnitNames, SignalHeight ) -trace.f(self.ClassName) + self:F() self:AddSignal( SignalUnitNames, TASK.SIGNAL.TYPE.SMOKE, TASK.SIGNAL.COLOR.BLUE, SignalHeight ) end @@ -411,7 +409,7 @@ end -- @param table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone. -- @param number SignalHeight Altitude that the Signal should be fired... function TASK:AddSmokeWhite( SignalUnitNames, SignalHeight ) -trace.f(self.ClassName) + self:F() self:AddSignal( SignalUnitNames, TASK.SIGNAL.TYPE.SMOKE, TASK.SIGNAL.COLOR.WHITE, SignalHeight ) end @@ -419,7 +417,7 @@ end -- @param table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone. -- @param number SignalHeight Altitude that the Signal should be fired... function TASK:AddSmokeOrange( SignalUnitNames, SignalHeight ) -trace.f(self.ClassName) + self:F() self:AddSignal( SignalUnitNames, TASK.SIGNAL.TYPE.SMOKE, TASK.SIGNAL.COLOR.ORANGE, SignalHeight ) end @@ -427,7 +425,7 @@ end -- @param table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone. -- @param number SignalHeight Altitude that the Signal should be fired... function TASK:AddFlareRed( SignalUnitNames, SignalHeight ) -trace.f(self.ClassName) + self:F() self:AddSignal( SignalUnitNames, TASK.SIGNAL.TYPE.FLARE, TASK.SIGNAL.COLOR.RED, SignalHeight ) end @@ -435,7 +433,7 @@ end -- @param table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone. -- @param number SignalHeight Altitude that the Signal should be fired... function TASK:AddFlareGreen( SignalUnitNames, SignalHeight ) -trace.f(self.ClassName) + self:F() self:AddSignal( SignalUnitNames, TASK.SIGNAL.TYPE.FLARE, TASK.SIGNAL.COLOR.GREEN, SignalHeight ) end @@ -443,7 +441,7 @@ end -- @param table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone. -- @param number SignalHeight Altitude that the Signal should be fired... function TASK:AddFlareBlue( SignalUnitNames, SignalHeight ) -trace.f(self.ClassName) + self:F() self:AddSignal( SignalUnitNames, TASK.SIGNAL.TYPE.FLARE, TASK.SIGNAL.COLOR.BLUE, SignalHeight ) end @@ -451,7 +449,7 @@ end -- @param table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone. -- @param number SignalHeight Altitude that the Signal should be fired... function TASK:AddFlareWhite( SignalUnitNames, SignalHeight ) -trace.f(self.ClassName) + self:F() self:AddSignal( SignalUnitNames, TASK.SIGNAL.TYPE.FLARE, TASK.SIGNAL.COLOR.WHITE, SignalHeight ) end @@ -459,6 +457,6 @@ end -- @param table|string SignalUnitNames Name of the Group that will fire the signal. If this parameter is NIL, the signal will be fired from the center of the landing zone. -- @param number SignalHeight Altitude that the Signal should be fired... function TASK:AddFlareOrange( SignalUnitNames, SignalHeight ) -trace.f(self.ClassName) + self:F() self:AddSignal( SignalUnitNames, TASK.SIGNAL.TYPE.FLARE, TASK.SIGNAL.COLOR.ORANGE, SignalHeight ) end diff --git a/Moose/Unit.lua b/Moose/Unit.lua index 6432e3b10..67089077a 100644 --- a/Moose/Unit.lua +++ b/Moose/Unit.lua @@ -1,19 +1,27 @@ --- UNIT Classes --- @module UNIT +-- @module Unit Include.File( "Routines" ) Include.File( "Base" ) Include.File( "Message" ) --- The UNIT class --- @type +-- @type UNIT +-- @Extends Base#BASE UNIT = { ClassName="UNIT", + CategoryName = { + [Unit.Category.AIRPLANE] = "Airplane", + [Unit.Category.HELICOPTER] = "Helicoper", + [Unit.Category.GROUND_UNIT] = "Ground Unit", + [Unit.Category.SHIP] = "Ship", + [Unit.Category.STRUCTURE] = "Structure", + } } function UNIT:New( DCSUnit ) local self = BASE:Inherit( self, BASE:New() ) - self:T( DCSUnit:getName() ) + self:F( DCSUnit:getName() ) self.DCSUnit = DCSUnit self.UnitName = DCSUnit:getName() @@ -23,39 +31,39 @@ function UNIT:New( DCSUnit ) end function UNIT:IsAlive() - self:T( self.UnitName ) + self:F( self.UnitName ) return ( self.DCSUnit and self.DCSUnit:isExist() ) end function UNIT:GetDCSUnit() - self:T( self.DCSUnit ) + self:F( self.DCSUnit ) return self.DCSUnit end function UNIT:GetID() - self:T( self.UnitID ) + self:F( self.UnitID ) return self.UnitID end function UNIT:GetName() - self:T( self.UnitName ) + self:F( self.UnitName ) return self.UnitName end function UNIT:GetTypeName() - self:T( self.UnitName ) + self:F( self.UnitName ) return self.DCSUnit:getTypeName() end function UNIT:GetPrefix() - self:T( self.UnitName ) + self:F( self.UnitName ) local UnitPrefix = string.match( self.UnitName, ".*#" ):sub( 1, -2 ) self:T( UnitPrefix ) @@ -65,14 +73,14 @@ end function UNIT:GetCallSign() - self:T( self.UnitName ) + self:F( self.UnitName ) return self.DCSUnit:getCallsign() end -function UNIT:GetPoint() - self:T( self.UnitName ) +function UNIT:GetPointVec2() + self:F( self.UnitName ) local UnitPos = self.DCSUnit:getPosition().p @@ -86,7 +94,7 @@ end function UNIT:GetPositionVec3() - self:T( self.UnitName ) + self:F( self.UnitName ) local UnitPos = self.DCSUnit:getPosition().p @@ -95,7 +103,7 @@ function UNIT:GetPositionVec3() end function UNIT:OtherUnitInRadius( AwaitUnit, Radius ) - self:T( { self.UnitName, AwaitUnit.UnitName, Radius } ) + self:F( { self.UnitName, AwaitUnit.UnitName, Radius } ) local UnitPos = self:GetPositionVec3() local AwaitUnitPos = AwaitUnit:GetPositionVec3() @@ -112,3 +120,7 @@ function UNIT:OtherUnitInRadius( AwaitUnit, Radius ) return false end +function UNIT:GetCategoryName() + return self.CategoryName[ self.DCSUnit:getDesc().category ] +end + diff --git a/Moose/Zone.lua b/Moose/Zone.lua index de42744b9..760a15fd6 100644 --- a/Moose/Zone.lua +++ b/Moose/Zone.lua @@ -1,20 +1,20 @@ --- ZONE Classes --- @module ZONE +-- @module Zone Include.File( "Routines" ) Include.File( "Base" ) Include.File( "Message" ) --- The ZONE class --- @type +-- @type ZONE +-- @Extends Base#BASE ZONE = { ClassName="ZONE", } function ZONE:New( ZoneName ) -trace.f( self.ClassName, ZoneName ) - local self = BASE:Inherit( self, BASE:New() ) + self:F( ZoneName ) local Zone = trigger.misc.getZone( ZoneName ) @@ -29,8 +29,8 @@ trace.f( self.ClassName, ZoneName ) return self end -function ZONE:GetPoint() - self:T( self.ZoneName ) +function ZONE:GetPointVec2() + self:F( self.ZoneName ) local Zone = trigger.misc.getZone( self.ZoneName ) local Point = { x = Zone.point.x, y = Zone.point.z } @@ -41,7 +41,7 @@ function ZONE:GetPoint() end function ZONE:GetRandomPoint() -trace.f( self.ClassName, self.ZoneName ) + self:F( self.ZoneName ) local Point = {} @@ -50,18 +50,17 @@ trace.f( self.ClassName, self.ZoneName ) Point.x = Zone.point.x + math.random( Zone.radius * -1, Zone.radius ) Point.y = Zone.point.z + math.random( Zone.radius * -1, Zone.radius ) - trace.i( self.ClassName, { Zone } ) - trace.i( self.ClassName, { Point } ) + self:T( { Zone, Point } ) return Point end function ZONE:GetRadius() -trace.f( self.ClassName, self.ZoneName ) + self:F( self.ZoneName ) local Zone = trigger.misc.getZone( self.ZoneName ) - trace.i( self.ClassName, { Zone } ) + self:T( { Zone } ) return Zone.radius end diff --git a/Test Missions/lua/MOOSE_Escort_Test_Follow.lua b/Test Missions/lua/MOOSE_Escort_Test_Follow.lua new file mode 100644 index 000000000..5bcce439c --- /dev/null +++ b/Test Missions/lua/MOOSE_Escort_Test_Follow.lua @@ -0,0 +1,38 @@ +Include.File( "Mission" ) +Include.File( "Client" ) +Include.File( "Spawn" ) +Include.File( "Escort" ) + + +do + + local function EventAliveHelicopter( Client ) + local SpawnEscortHeli = SPAWN:New( "Escort Helicopter" ) + local EscortGroupHeli1 = SpawnEscortHeli:Spawn() + local EscortGroupHeli2 = SpawnEscortHeli:Spawn() + local EscortGroupHeli3 = SpawnEscortHeli:Spawn() + local EscortGroupHeli4 = SpawnEscortHeli:Spawn() + local EscortHeli1 = ESCORT:New( Client, EscortGroupHeli1, "Escort Alpha" ) + local EscortHeli2 = ESCORT:New( Client, EscortGroupHeli2, "Escort Bravo" ) + local EscortHeli3 = ESCORT:New( Client, EscortGroupHeli3, "Escort Delta" ) + local EscortHeli4 = ESCORT:New( Client, EscortGroupHeli4, "Escort Gamma" ) + end + + local function EventAlivePlane( Client ) + local SpawnEscortPlane = SPAWN:New( "Escort Plane" ) + local EscortGroupPlane = SpawnEscortPlane:Spawn() + local EscortPlane = ESCORT:New( Client, EscortGroupPlane, "Escort Test Plane" ) + end + + local EscortClientHeli = CLIENT:New( "Lead Helicopter", "Fly around and observe the behaviour of the escort helicopter" ):Alive( EventAliveHelicopter ) + local EscortClientPlane = CLIENT:New( "Lead Plane", "Fly around and observe the behaviour of the escort airplane. Select Navigate->Joun-Up and airplane should follow you. Change speed and directions." ) + :Alive( EventAlivePlane ) + +end + +-- MISSION SCHEDULER STARTUP +MISSIONSCHEDULER.Start() +MISSIONSCHEDULER.ReportMenu() +MISSIONSCHEDULER.ReportMissionsHide() + +env.info( "Test Mission loaded" ) diff --git a/Test Missions/MOOSE_Pickup_Test.lua b/Test Missions/lua/MOOSE_Pickup_Test.lua similarity index 100% rename from Test Missions/MOOSE_Pickup_Test.lua rename to Test Missions/lua/MOOSE_Pickup_Test.lua diff --git a/Test Missions/MOOSE_Spawn_Test.lua b/Test Missions/lua/MOOSE_Spawn_Test.lua similarity index 99% rename from Test Missions/MOOSE_Spawn_Test.lua rename to Test Missions/lua/MOOSE_Spawn_Test.lua index 38306ef23..074aa5a9c 100644 --- a/Test Missions/MOOSE_Spawn_Test.lua +++ b/Test Missions/lua/MOOSE_Spawn_Test.lua @@ -32,8 +32,8 @@ Group_Plane:Route( Route_Plane ) --Route_Helicopter[#Route_Helicopter].linkUnit = Group_Ship1:GetDCSUnit(1) --Route_Helicopter[#Route_Helicopter].helipadId = Group_Ship1:GetDCSUnit(1) ---Route_Helicopter[#Route_Helicopter].x = Group_Ship1:GetUnit(1):GetPoint().x ---Route_Helicopter[#Route_Helicopter].y = Group_Ship1:GetUnit(1):GetPoint().y +--Route_Helicopter[#Route_Helicopter].x = Group_Ship1:GetUnit(1):GetPointVec2().x +--Route_Helicopter[#Route_Helicopter].y = Group_Ship1:GetUnit(1):GetPointVec2().y --env.info( Route_Helicopter[#Route_Helicopter].type .. " on " .. Group_Ship1:GetUnit(1):GetID() ) --Group_Helicopter:Route( Route_Helicopter ) diff --git a/Test Missions/miz/MOOSE_Escort_Test_Follow.miz b/Test Missions/miz/MOOSE_Escort_Test_Follow.miz new file mode 100644 index 000000000..9c73feb62 Binary files /dev/null and b/Test Missions/miz/MOOSE_Escort_Test_Follow.miz differ diff --git a/Test Missions/miz/MOOSE_Escort_Test_Follow/ABRIS/Database/NAVIGATION.lua b/Test Missions/miz/MOOSE_Escort_Test_Follow/ABRIS/Database/NAVIGATION.lua new file mode 100644 index 000000000..fe8a9d7c0 --- /dev/null +++ b/Test Missions/miz/MOOSE_Escort_Test_Follow/ABRIS/Database/NAVIGATION.lua @@ -0,0 +1,3262 @@ +navigation= +{ + ["date"]= + { + ["year"]=2011, + ["day"]=1, + ["month"]=6, + }, + ["expiration_date"]= + { + ["year"]=2011, + ["day"]=1, + ["month"]=6, + }, + ["region"]="", + ["waypoints"]= + { + ["{6D3E18FB-DC01-4dd7-8833-350C49D72638}"]= + { + ["band"]=115800000, + ["type"]=2, + ["name"]="Krasnodar-Pashkovsky", + ["callsign"]="KRD", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=39.163886994859, + ["latitude"]=45.020832065207, + ["course"]=0, + ["height"]=34.408920288086, + }, + }, + ["{EA7995CF-7D08-4b1a-9361-1F3A073A852F}"]= + { + ["band"]=381000, + ["type"]=2, + ["name"]="Agoy", + ["callsign"]="AG", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=39.034444546264, + ["latitude"]=44.133333334822, + ["course"]=0, + ["height"]=213.66403198242, + }, + ["sub_type"]=8, + }, + ["{451468DB-A355-4580-AECB-E76AB9099B0B}"]= + { + ["band"]=1065000, + ["type"]=2, + ["name"]="KHerson-CHernobaevka", + ["callsign"]="HS", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=32.499999899356, + ["latitude"]=46.666666721389, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["Sukhumi-Babushara"]= + { + ["type"]=1, + ["name"]="Sukhumi-Babushara", + ["callsign"]="", + ["runway_length"]=1418, + ["class"]="ABRIS_Waypoint_Airdrome", + ["position"]= + { + ["longitude"]=41.124569220701, + ["latitude"]=42.861288092232, + ["course"]=-1.1085398153117, + ["height"]=11.972095489502, + }, + ["sub_type"]=5, + }, + ["{AE406B8D-660B-4dd5-AD60-022026390323}"]= + { + ["band"]=682000, + ["type"]=2, + ["name"]="Maykop", + ["callsign"]="MA", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=40.14694442455, + ["latitude"]=44.623055556984, + ["course"]=0, + ["height"]=244.64227294922, + }, + ["sub_type"]=8, + }, + ["{16AB7446-613D-4317-B30D-292751D7FFCD}"]= + { + ["band"]=920000, + ["type"]=2, + ["name"]="Primorsko-Akhtarsk", + ["callsign"]="GW", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=38.233333335034, + ["latitude"]=46.050000027573, + ["course"]=0, + ["height"]=0, + }, + ["sub_type"]=8, + }, + ["{3B4BC574-82CB-4126-8675-78AB30E2AFDE}"]= + { + ["band"]=507000, + ["type"]=2, + ["name"]="Bolshevik", + ["callsign"]="ND", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=40.233333214237, + ["latitude"]=45.766666641333, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{37036ACB-BE77-4989-B621-CC04A3A2B8DA}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Maykop-KHanskaya", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=40.060506400589, + ["latitude"]=44.699959035543, + ["course"]=-2.4609196186066, + ["height"]=185.35874938965, + }, + ["sub_type"]=112, + }, + ["{7BC7638D-90C7-4d39-96F8-87F8DF0C7025}"]= + { + ["band"]=215000, + ["type"]=2, + ["name"]="Anapa-Vityazevo", + ["callsign"]="P", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=37.372305715442, + ["latitude"]=45.022565731494, + ["course"]=-2.4172778129578, + ["height"]=47.840591430664, + }, + ["sub_type"]=4104, + }, + ["{D408D5E5-E5D1-4907-B812-1E7477F4E3E5}"]= + { + ["band"]=283000, + ["type"]=2, + ["name"]="Mineralnye Vody", + ["callsign"]="M", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=43.046192426651, + ["latitude"]=44.243793576174, + ["course"]=2.0123660564423, + ["height"]=316.21087646484, + }, + ["sub_type"]=4104, + }, + ["{1ADA83B8-9925-4a16-950B-9AD1AB1BDD7F}"]= + { + ["band"]=907000, + ["type"]=2, + ["name"]="Sarmakovo", + ["callsign"]="SR", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=43.116666752873, + ["latitude"]=43.749999966496, + ["course"]=0, + ["height"]=1111.2216796875, + }, + ["sub_type"]=8, + }, + ["{75A75E4E-C026-4dcc-B866-F1B5188B72C8}"]= + { + ["band"]=1065000, + ["type"]=2, + ["name"]="Mozdok", + ["callsign"]="R", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=44.637370992226, + ["latitude"]=43.791323755707, + ["course"]=-1.6970900297165, + ["height"]=158.74685668945, + }, + ["sub_type"]=4104, + }, + ["{D38BD4F7-DEC1-4722-912F-F34891C60A16}"]= + { + ["band"]=443000, + ["type"]=2, + ["name"]="Anapa-Vityazevo", + ["callsign"]="AP", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=37.396339533105, + ["latitude"]=45.039844694135, + ["course"]=-2.4172778129578, + ["height"]=24.43581199646, + }, + ["sub_type"]=4104, + }, + ["Maykop-Khanskaya"]= + { + ["type"]=1, + ["name"]="Maykop-KHanskaya", + ["callsign"]="", + ["runway_length"]=1200, + ["class"]="ABRIS_Waypoint_Airdrome", + ["position"]= + { + ["longitude"]=40.035194185914, + ["latitude"]=44.681241298267, + ["course"]=-2.4609196073963, + ["height"]=180, + }, + ["sub_type"]=6, + }, + ["{C43F7CF2-3825-4d89-88B0-AA34DB0CAFD2}"]= + { + ["band"]=493000, + ["type"]=2, + ["name"]="Krasnodar-Pashkovsky", + ["callsign"]="KR", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=39.133186071592, + ["latitude"]=45.006849978673, + ["course"]=0.82039576768875, + ["height"]=31.459716796875, + }, + ["sub_type"]=4104, + }, + ["{A02321C0-3F1C-4275-879F-0D4FAB5E4602}"]= + { + ["band"]=114300000, + ["type"]=2, + ["name"]="Gelendzhik", + ["callsign"]="GNV", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=38.012222445868, + ["latitude"]=44.572498319582, + ["course"]=0, + ["height"]=25, + }, + }, + ["{B8918D50-540F-4ce9-8F67-D6EE903B5EEA}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Krymsk", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=37.94918121689, + ["latitude"]=44.933067755635, + ["course"]=0.68975001573563, + ["height"]=70.84228515625, + }, + ["sub_type"]=112, + }, + ["{00AA1CD4-19CC-406b-96A4-3B82C69B33FD}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Tbilisi-Lochini", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=44.977461919109, + ["latitude"]=41.650589722257, + ["course"]=-0.90759545564651, + ["height"]=474.58218383789, + }, + ["sub_type"]=112, + }, + ["{A5288D8F-35D5-46d7-BC47-27E08A40453A}"]= + { + ["band"]=307000, + ["type"]=2, + ["name"]="Lazarevskoe", + ["callsign"]="LA", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=39.337500040245, + ["latitude"]=43.917222231361, + ["course"]=0, + ["height"]=68.265350341797, + }, + ["sub_type"]=8, + }, + ["{79434585-6190-4c2b-8565-EA6C06EED62C}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Krasnodar-Pashkovsky", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=39.242923047897, + ["latitude"]=45.068978349367, + ["course"]=-2.3211970329285, + ["height"]=39.660533905029, + }, + ["sub_type"]=112, + }, + ["{01575042-1FD8-48ba-819E-5B83E203ADC4}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Krasnodar-TZentralny", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=38.972554727067, + ["latitude"]=45.086445138456, + ["course"]=-1.6230975389481, + ["height"]=29.684894561768, + }, + ["sub_type"]=112, + }, + ["{00B4A3C9-AB85-4547-A302-15B56CB2FDDD}"]= + { + ["band"]=342000, + ["type"]=2, + ["name"]="TZnori", + ["callsign"]="TO", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=46.015555585484, + ["latitude"]=41.630555462492, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["Vaziani"]= + { + ["type"]=1, + ["name"]="Vaziani", + ["callsign"]="", + ["runway_length"]=841, + ["class"]="ABRIS_Waypoint_Airdrome", + ["position"]= + { + ["longitude"]=45.027206848999, + ["latitude"]=41.629055409302, + ["course"]=2.3646639161617, + ["height"]=459.74453735352, + }, + ["sub_type"]=6, + }, + ["{2DF525C9-0BDB-4a59-94C6-0C673D2C5865}"]= + { + ["band"]=117100000, + ["type"]=2, + ["name"]="Mineralnye Vody", + ["callsign"]="MNV", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=43.054165210771, + ["latitude"]=44.239444709307, + ["course"]=0, + ["height"]=320, + }, + }, + ["{7904FBDC-946A-44a1-AE06-F42CD84EF8A4}"]= + { + ["band"]=515000, + ["type"]=2, + ["name"]="Rostov-na-Donu tzentr", + ["callsign"]="NV", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=39.633333392466, + ["latitude"]=47.283333305814, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{E359DB92-2210-4bc2-BF28-2D4896AA1A9A}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Krymsk", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=37.972489530998, + ["latitude"]=44.950801972146, + ["course"]=0.68975001573563, + ["height"]=27.12328338623, + }, + ["sub_type"]=112, + }, + ["{D83E4F74-98AA-4e95-83C3-6D3886C0063C}"]= + { + ["band"]=117350000, + ["type"]=2, + ["name"]="Krymsk", + ["callsign"]="KW", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=37.992110405136, + ["latitude"]=44.967297189351, + ["course"]=0.68975001573563, + ["height"]=20, + }, + ["sub_type"]=32, + }, + ["Kutaisi"]= + { + ["type"]=1, + ["name"]="Kutaisi", + ["callsign"]="", + ["runway_length"]=850, + ["class"]="ABRIS_Waypoint_Airdrome", + ["position"]= + { + ["longitude"]=42.481231059907, + ["latitude"]=42.177608840793, + ["course"]=1.2915590466874, + ["height"]=45, + }, + ["sub_type"]=5, + }, + ["{C602648E-3C89-4987-8334-881C1EBAC52F}"]= + { + ["band"]=845000, + ["type"]=2, + ["name"]="Kutaisi", + ["callsign"]="KN", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=42.625000275301, + ["latitude"]=42.268333186963, + ["course"]=0, + ["height"]=126.21682739258, + }, + ["sub_type"]=8, + }, + ["{838F92D0-0223-4375-8579-D56902421993}"]= + { + ["band"]=583000, + ["type"]=2, + ["name"]="Mineralnye Vody", + ["callsign"]="MD", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=43.017842556108, + ["latitude"]=44.256694325491, + ["course"]=2.0123660564423, + ["height"]=318.89764404297, + }, + ["sub_type"]=4104, + }, + ["{E420F52C-8772-4356-8043-96A6DD63304A}"]= + { + ["band"]=528000, + ["type"]=2, + ["name"]="Tikhoretzk", + ["callsign"]="UH", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=40.083333455866, + ["latitude"]=45.833333333627, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{3CF9B849-8E92-4033-BFC2-7C59671ECEC2}"]= + { + ["band"]=720000, + ["type"]=2, + ["name"]="Taganrog-YUzhny", + ["callsign"]="UF", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=38.85000014935, + ["latitude"]=47.199999973589, + ["course"]=0, + ["height"]=0, + }, + ["sub_type"]=8, + }, + ["{E974F4EA-E315-4098-A130-9B59879C696A}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Krasnodar-TZentralny", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=38.873723610789, + ["latitude"]=45.087918485615, + ["course"]=1.5184950828552, + ["height"]=20.947057723999, + }, + ["sub_type"]=112, + }, + ["{40489709-027A-4325-9425-DC17BACBC1B5}"]= + { + ["band"]=443000, + ["type"]=2, + ["name"]="Anapa-Vityazevo", + ["callsign"]="AN", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=37.299402775931, + ["latitude"]=44.970054188162, + ["course"]=0.72431498765945, + ["height"]=20.469882965088, + }, + ["sub_type"]=4104, + }, + ["{000A169C-D1FD-4058-8FB0-C51BAA217602}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Krymsk", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=38.040778144691, + ["latitude"]=45.002664878554, + ["course"]=-2.451842546463, + ["height"]=10.494524002075, + }, + ["sub_type"]=112, + }, + ["{080038D8-492C-4b87-9ECC-DC6D50A7CD21}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Maykop-KHanskaya", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=40.00989844675, + ["latitude"]=44.66251686896, + ["course"]=0.68067294359207, + ["height"]=180.70574951172, + }, + ["sub_type"]=112, + }, + ["Mozdok"]= + { + ["type"]=1, + ["name"]="Mozdok", + ["callsign"]="", + ["runway_length"]=1365, + ["class"]="ABRIS_Waypoint_Airdrome", + ["position"]= + { + ["longitude"]=44.599679347932, + ["latitude"]=43.791734916438, + ["course"]=1.4445026599326, + ["height"]=155.00003051758, + }, + ["sub_type"]=6, + }, + ["Gelendzhik"]= + { + ["type"]=1, + ["name"]="Gelendzhik", + ["callsign"]="", + ["runway_length"]=499, + ["class"]="ABRIS_Waypoint_Airdrome", + ["position"]= + { + ["longitude"]=38.011402844087, + ["latitude"]=44.572738119785, + ["course"]=0.69812567198489, + ["height"]=25, + }, + ["sub_type"]=5, + }, + ["{AE534DA8-FFF9-49df-973E-973499E462E7}"]= + { + ["band"]=591000, + ["type"]=2, + ["name"]="Maykop-KHanskaya", + ["callsign"]="D", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=40.00989844675, + ["latitude"]=44.66251686896, + ["course"]=0.68067294359207, + ["height"]=180.70574951172, + }, + ["sub_type"]=4104, + }, + ["Mineralnye Vody"]= + { + ["type"]=1, + ["name"]="Mineralnye Vody", + ["callsign"]="", + ["runway_length"]=1632, + ["class"]="ABRIS_Waypoint_Airdrome", + ["position"]= + { + ["longitude"]=43.081167856217, + ["latitude"]=44.22786123394, + ["course"]=-1.1292264568822, + ["height"]=320, + }, + ["sub_type"]=5, + }, + ["{165039F5-F4DC-4edd-8C37-A5EF2FDD7CF2}"]= + { + ["band"]=515000, + ["type"]=2, + ["name"]="Tiraspol", + ["callsign"]="TH", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=29.600000011301, + ["latitude"]=46.866666639115, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{93747CB7-628A-4ba2-96D7-CD70A3089998}"]= + { + ["band"]=329000, + ["type"]=2, + ["name"]="Nikolaev-Kulbakovo", + ["callsign"]="LC", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=32.100000047281, + ["latitude"]=46.933333325333, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{6479B3BB-1018-49a1-A78A-2250E643028D}"]= + { + ["band"]=740000, + ["type"]=2, + ["name"]="Armavir - TZentr", + ["callsign"]="WM", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=41.116666880031, + ["latitude"]=44.966666653241, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{6146843A-2910-43e8-80AA-41A1935DCEB8}"]= + { + ["band"]=870000, + ["type"]=2, + ["name"]="Kobuleti", + ["callsign"]="KT", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=41.80304745528, + ["latitude"]=41.918633401388, + ["course"]=1.2217304706573, + ["height"]=10.535722732544, + }, + ["sub_type"]=4104, + }, + ["{0860C87D-F9D3-4b68-BB0A-B04BD7B584EE}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Krymsk", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=38.017427440086, + ["latitude"]=44.984946612747, + ["course"]=-2.451842546463, + ["height"]=16.346725463867, + }, + ["sub_type"]=112, + }, + ["Nalchik"]= + { + ["type"]=1, + ["name"]="Nalchik", + ["callsign"]="", + ["runway_length"]=751, + ["class"]="ABRIS_Waypoint_Airdrome", + ["position"]= + { + ["longitude"]=43.636542729743, + ["latitude"]=43.514033270925, + ["course"]=0.96877320409637, + ["height"]=430, + }, + ["sub_type"]=5, + }, + ["{5A070E13-71C5-40af-B241-B101BA438AD4}"]= + { + ["band"]=866000, + ["type"]=2, + ["name"]="Sultanskoe", + ["callsign"]="SN", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=42.666666702721, + ["latitude"]=44.591666661132, + ["course"]=0, + ["height"]=260.27188110352, + }, + ["sub_type"]=8, + }, + ["{1B420597-B662-4c7a-B207-36417737871C}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Mineralnye Vody", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=43.046192426651, + ["latitude"]=44.243793576174, + ["course"]=2.0123660564423, + ["height"]=316.21087646484, + }, + ["sub_type"]=112, + }, + ["{24A6AD99-F338-464d-914C-7E2191D86CC1}"]= + { + ["band"]=1064000, + ["type"]=2, + ["name"]="Mozdok", + ["callsign"]="D", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=44.561984548905, + ["latitude"]=43.792133293965, + ["course"]=1.4445027112961, + ["height"]=152.32843017578, + }, + ["sub_type"]=4104, + }, + ["{12BC910C-C8B0-45d5-882A-B448A470391D}"]= + { + ["band"]=215000, + ["type"]=2, + ["name"]="Anapa-Vityazevo", + ["callsign"]="N", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=37.323392564705, + ["latitude"]=44.987350312609, + ["course"]=0.72431498765945, + ["height"]=35.370002746582, + }, + ["sub_type"]=4104, + }, + ["{5DD6E99D-BF2E-4c74-8347-2D99E117DD7F}"]= + { + ["band"]=380000, + ["type"]=2, + ["name"]="Voznesensk", + ["callsign"]="MN", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=31.266666711966, + ["latitude"]=47.516666658291, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{7F547727-1F60-4397-87F2-A5DD1C4C0C96}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Nalchik", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=43.692770117382, + ["latitude"]=43.534973922883, + ["course"]=-2.1728196144104, + ["height"]=376.85397338867, + }, + ["sub_type"]=112, + }, + ["{42047254-94F7-4667-884F-DA7DC240A298}"]= + { + ["band"]=311000, + ["type"]=2, + ["name"]="Elista", + ["callsign"]="SA", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=44.333333476884, + ["latitude"]=46.373333331268, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{9193E804-CC12-4d34-A2E6-BA8158E77CF4}"]= + { + ["band"]=337000, + ["type"]=2, + ["name"]="Zenzeli", + ["callsign"]="UP", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=47.066666630167, + ["latitude"]=45.933333270641, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{918C5A7C-36AC-4a04-97C7-B9727CD0CF0E}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Sukhumi-Babushara", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=41.156747561444, + ["latitude"]=42.846470447617, + ["course"]=-1.1085398197174, + ["height"]=18.967178344727, + }, + ["sub_type"]=112, + }, + ["{E164557E-F439-4b6d-8CD7-AEA59D3C7EB8}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Anapa-Vityazevo", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=37.396339533105, + ["latitude"]=45.039844694135, + ["course"]=-2.4172778129578, + ["height"]=24.43581199646, + }, + ["sub_type"]=112, + }, + ["{5BF47F48-091D-44dc-980E-64C6AB62FE5B}"]= + { + ["band"]=352000, + ["type"]=2, + ["name"]="Prikaspysky", + ["callsign"]="PK", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=47.208333343616, + ["latitude"]=46.224999985984, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{17F6D663-7FDE-44c2-8A81-B5D997610269}"]= + { + ["band"]=830000, + ["type"]=2, + ["name"]="Krymsk", + ["callsign"]="O", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=37.972489530998, + ["latitude"]=44.950801972146, + ["course"]=0.68975001573563, + ["height"]=27.12328338623, + }, + ["sub_type"]=4104, + }, + ["{E58FB2D2-9573-4a98-B2B1-63B6F374787D}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Mineralnye Vody", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=43.144428100003, + ["latitude"]=44.198998202113, + ["course"]=-1.1292264461517, + ["height"]=303.2926940918, + }, + ["sub_type"]=112, + }, + ["{C8F5F433-463C-488c-A9E5-32A4CD5E3C6C}"]= + { + ["band"]=977000000, + ["type"]=2, + ["name"]="Batumi", + ["callsign"]="BTM", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=41.600418698334, + ["latitude"]=41.610899175899, + ["course"]=0, + ["height"]=9.9645166397095, + }, + ["sub_type"]=4, + }, + ["{F79CFDB7-02CA-4b94-8BCB-685D09BD6E57}"]= + { + ["band"]=602000, + ["type"]=2, + ["name"]="Kuznetzovka", + ["callsign"]="KC", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=40.966666702314, + ["latitude"]=47.400000050324, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{A39B6CCC-2BB4-4e35-B384-F3DA5483B5D2}"]= + { + ["band"]=353000, + ["type"]=2, + ["name"]="Ali", + ["callsign"]="BT", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=43.644722125523, + ["latitude"]=42.096111078745, + ["course"]=0, + ["height"]=720, + }, + ["sub_type"]=8, + }, + ["{D4D9D6BB-0D39-4916-8817-CCE1CCB07E58}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Tbilisi-Lochini", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=44.909702215984, + ["latitude"]=41.703205066957, + ["course"]=2.2339971065521, + ["height"]=566.43151855469, + }, + ["sub_type"]=112, + }, + ["{541D404A-D701-41a6-AD4F-79A3EC956EDD}"]= + { + ["band"]=641000, + ["type"]=2, + ["name"]="Vesely", + ["callsign"]="WS", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=40.716666661574, + ["latitude"]=47.116666655808, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{F8BD2A4D-FB6F-4678-AF85-6C2EE7FB3F5B}"]= + { + ["band"]=300500, + ["type"]=2, + ["name"]="Akhilleonsky", + ["callsign"]="AN", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=36.853055551249, + ["latitude"]=45.440000007044, + ["course"]=0, + ["height"]=77.428512573242, + }, + ["sub_type"]=8, + }, + ["{5CFFEBC9-D3B9-4e7c-B0BF-455E68EEAC26}"]= + { + ["band"]=396000, + ["type"]=2, + ["name"]="Sochoy", + ["callsign"]="SH", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=41.350000287381, + ["latitude"]=47.100000003956, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{C6A3D589-C529-4944-86C7-F99B2817B08A}"]= + { + ["band"]=830000, + ["type"]=2, + ["name"]="Krymsk", + ["callsign"]="K", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=38.017427440086, + ["latitude"]=44.984946612747, + ["course"]=-2.451842546463, + ["height"]=16.346725463867, + }, + ["sub_type"]=4104, + }, + ["{F771C182-D706-493c-A878-D4A296FDB897}"]= + { + ["band"]=435000, + ["type"]=2, + ["name"]="Egrikskaya", + ["callsign"]="QG", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=40.666666615451, + ["latitude"]=46.883333402189, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{D2A3D3A9-5250-42d6-9D8C-D92D6B9ABB86}"]= + { + ["band"]=348000, + ["type"]=2, + ["name"]="Odessa - TZentralny", + ["callsign"]="OD", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=30.661111289097, + ["latitude"]=46.306388883259, + ["course"]=0, + ["height"]=0, + }, + ["sub_type"]=8, + }, + ["{627C3B78-4A8A-4013-9B0F-3BB58FD76356}"]= + { + ["band"]=923000, + ["type"]=2, + ["name"]="Tbilisi-Lochini", + ["callsign"]="W", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=44.931974291323, + ["latitude"]=41.685923549921, + ["course"]=2.2339971065521, + ["height"]=518.65625, + }, + ["sub_type"]=4104, + }, + ["{28AD4D52-29A2-4cf6-9AF7-BFDEBFC29194}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Gudauta", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=40.578915959804, + ["latitude"]=43.099088468953, + ["course"]=-0.50608837604523, + ["height"]=21, + }, + ["sub_type"]=112, + }, + ["{45D91C15-75E1-411d-9E56-B8418BF69D20}"]= + { + ["band"]=1175000, + ["type"]=2, + ["name"]="Bagaevsky", + ["callsign"]="BA", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=40.366666740007, + ["latitude"]=47.316666743178, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{1EC4E87A-A3AE-4817-8B27-90657B9AD267}"]= + { + ["band"]=320000, + ["type"]=2, + ["name"]="Rostov-na-donu Vostochny", + ["callsign"]="RN", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=39.769999944682, + ["latitude"]=47.225000044919, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{3C275B48-0ED2-45ca-9290-A8DD9936A121}"]= + { + ["band"]=1050000, + ["type"]=2, + ["name"]="Beslan", + ["callsign"]="CH", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=44.539993803635, + ["latitude"]=43.215477513059, + ["course"]=1.6318835020065, + ["height"]=543.41900634766, + }, + ["sub_type"]=4104, + }, + ["{09C449BB-9725-4bdd-B6E8-68BE9A7639BF}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Senaki-Kolkhi", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=42.018370629355, + ["latitude"]=42.245052975629, + ["course"]=1.6528304815292, + ["height"]=23.467279434204, + }, + ["sub_type"]=112, + }, + ["{30B5CBDE-6BD6-4592-9609-60A3D813A0B6}"]= + { + ["band"]=1210000, + ["type"]=2, + ["name"]="Peredovaya", + ["callsign"]="PR", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=41.466666760671, + ["latitude"]=44.116666648632, + ["course"]=0, + ["height"]=632.06207275391, + }, + ["sub_type"]=8, + }, + ["{8CEAEA62-A738-4dea-9A02-1025DE47813E}"]= + { + ["band"]=1025000, + ["type"]=2, + ["name"]="Krasny", + ["callsign"]="KS", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=40.349999897763, + ["latitude"]=47.19999997768, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{CAA378D7-D3A3-4f3a-9049-1572540279AB}"]= + { + ["band"]=730000, + ["type"]=2, + ["name"]="Stavropol-SHpakovskoe", + ["callsign"]="KT", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=42.181666600404, + ["latitude"]=45.121666657445, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{D988C10B-A2ED-41f2-B9BB-6F67813416F2}"]= + { + ["band"]=214000, + ["type"]=2, + ["name"]="Kropotkin", + ["callsign"]="KP", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=40.566666483437, + ["latitude"]=45.450000023144, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{23F1A703-1D37-4be7-988A-B36AB86834F9}"]= + { + ["band"]=324000, + ["type"]=2, + ["name"]="Ladozhskaya", + ["callsign"]="RF", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=39.916666860444, + ["latitude"]=45.283333318466, + ["course"]=0, + ["height"]=80.809173583984, + }, + ["sub_type"]=8, + }, + ["{F84B9F47-2400-433d-BC6F-63A9E8C73765}"]= + { + ["band"]=662000, + ["type"]=2, + ["name"]="Smolenskaya", + ["callsign"]="SM", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=38.796388878985, + ["latitude"]=44.787499998116, + ["course"]=0, + ["height"]=78.472930908203, + }, + ["sub_type"]=8, + }, + ["{44689E55-C104-4400-8896-69F4C81290C5}"]= + { + ["band"]=156000, + ["type"]=2, + ["name"]="Senaki-Kolkhi", + ["callsign"]="TI", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=41.986436464281, + ["latitude"]=42.249570732027, + ["course"]=1.6528304815292, + ["height"]=21.472751617432, + }, + ["sub_type"]=4104, + }, + ["{140E2DC1-6A9B-49a9-8C9B-9100458ACCDF}"]= + { + ["band"]=312000, + ["type"]=2, + ["name"]="Ryazanskaya", + ["callsign"]="XT", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=39.566666698538, + ["latitude"]=44.96666666409, + ["course"]=0, + ["height"]=40.001003265381, + }, + ["sub_type"]=8, + }, + ["{76038C66-8A7F-45df-93BB-4FC7DBE221B3}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Sochi-Adler", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=39.911168781419, + ["latitude"]=43.43519586845, + ["course"]=1.0821976661682, + ["height"]=4.3798685073853, + }, + ["sub_type"]=112, + }, + ["{3F715664-543F-4521-97AE-70DDE04904D1}"]= + { + ["band"]=240000, + ["type"]=2, + ["name"]="Krasnodar-Pashkovsky", + ["callsign"]="L", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=39.216192032071, + ["latitude"]=45.053867564375, + ["course"]=-2.3211970329285, + ["height"]=38.959575653076, + }, + ["sub_type"]=4104, + }, + ["{192BA661-61AB-4353-936D-ABF3A5F504E4}"]= + { + ["band"]=1182000, + ["type"]=2, + ["name"]="Teplorechensky", + ["callsign"]="TP", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=43.533333031236, + ["latitude"]=44.155000024262, + ["course"]=0, + ["height"]=263.61557006836, + }, + ["sub_type"]=8, + }, + ["{8CED2827-A2B9-4eac-9302-CB5F0FEE14C4}"]= + { + ["band"]=1005000000, + ["type"]=2, + ["name"]="Kutaisi", + ["callsign"]="KTS", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=42.479213330824, + ["latitude"]=42.178443019783, + ["course"]=0, + ["height"]=45, + }, + ["sub_type"]=4, + }, + ["{70065F51-9EBE-4a8a-8667-047BD1B789B9}"]= + { + ["band"]=995000, + ["type"]=2, + ["name"]="Sukhumi-Babushara", + ["callsign"]="A", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=41.156747561444, + ["latitude"]=42.846470447617, + ["course"]=-1.1085398197174, + ["height"]=18.967178344727, + }, + ["sub_type"]=4104, + }, + ["{F3578977-50C9-45de-A9A3-21491A314857}"]= + { + ["band"]=384000, + ["type"]=2, + ["name"]="Alushta", + ["callsign"]="AL", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=34.398333334698, + ["latitude"]=44.675000017156, + ["course"]=0, + ["height"]=-2.8605400075321e-006, + }, + ["sub_type"]=8, + }, + ["{A14E485A-E9E6-4ecf-BDC8-7834DAAC7E83}"]= + { + ["band"]=493000, + ["type"]=2, + ["name"]="Krasnodar-Pashkovsky", + ["callsign"]="LD", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=39.242923047897, + ["latitude"]=45.068978349367, + ["course"]=-2.3211970329285, + ["height"]=39.660533905029, + }, + ["sub_type"]=4104, + }, + ["{CF2EA740-F402-4000-837C-D16CBB7274E4}"]= + { + ["band"]=625000, + ["type"]=2, + ["name"]="Krasnodar-TZentralny", + ["callsign"]="MB", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=38.873723610789, + ["latitude"]=45.087918485615, + ["course"]=1.5184950828552, + ["height"]=20.947057723999, + }, + ["sub_type"]=4104, + }, + ["Krasnodar-Pashkovsky"]= + { + ["type"]=1, + ["name"]="Krasnodar-Pashkovsky", + ["callsign"]="", + ["runway_length"]=1146, + ["class"]="ABRIS_Waypoint_Airdrome", + ["position"]= + { + ["longitude"]=39.18802521083, + ["latitude"]=45.037929060373, + ["course"]=0.8203957479386, + ["height"]=34, + }, + ["sub_type"]=5, + }, + ["{5652EE65-0F0A-4cdc-83CF-ED292F942469}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Krasnodar-Pashkovsky", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=39.216192032071, + ["latitude"]=45.053867564375, + ["course"]=-2.3211970329285, + ["height"]=38.959575653076, + }, + ["sub_type"]=112, + }, + ["{FA95D7EE-453B-49bc-A693-E254CF3F04FB}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Anapa-Vityazevo", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=37.323392564705, + ["latitude"]=44.987350312609, + ["course"]=0.72431498765945, + ["height"]=35.370002746582, + }, + ["sub_type"]=112, + }, + ["{F4507C36-4CD0-415c-92C2-715CBFBA4D35}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Krasnodar-Pashkovsky", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=39.159873850437, + ["latitude"]=45.02198271643, + ["course"]=0.82039576768875, + ["height"]=34.374855041504, + }, + ["sub_type"]=112, + }, + ["Novorossiysk"]= + { + ["type"]=1, + ["name"]="Novorossysk", + ["callsign"]="", + ["runway_length"]=499, + ["class"]="ABRIS_Waypoint_Airdrome", + ["position"]= + { + ["longitude"]=37.778238633922, + ["latitude"]=44.668068985973, + ["course"]=0.73304063019746, + ["height"]=40, + }, + ["sub_type"]=6, + }, + ["{EE57F7DA-163A-4b5c-A64B-FB0ED146243D}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Tbilisi-Lochini", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=44.999697078343, + ["latitude"]=41.633299706948, + ["course"]=-0.90759545564651, + ["height"]=459.41839599609, + }, + ["sub_type"]=112, + }, + ["{314E0FD7-2696-4a5c-82B4-2011ADF8B2A0}"]= + { + ["band"]=462000, + ["type"]=2, + ["name"]="Gori", + ["callsign"]="OZ", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=44.132221940757, + ["latitude"]=42.016666555471, + ["course"]=0, + ["height"]=604.78430175781, + }, + ["sub_type"]=8, + }, + ["{4F81A9F3-CC8A-42c1-944A-E7F7D569E73B}"]= + { + ["band"]=283000, + ["type"]=2, + ["name"]="Mineralnye Vody", + ["callsign"]="N", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=43.116124501349, + ["latitude"]=44.211919658446, + ["course"]=-1.1292264461517, + ["height"]=320, + }, + ["sub_type"]=4104, + }, + ["{720C9A85-7BE6-427e-A35F-356397226419}"]= + { + ["band"]=240000, + ["type"]=2, + ["name"]="Krasnodar-Pashkovsky", + ["callsign"]="K", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=39.159873850437, + ["latitude"]=45.02198271643, + ["course"]=0.82039576768875, + ["height"]=34.374855041504, + }, + ["sub_type"]=4104, + }, + ["{A3CD46FC-1C4B-4caf-9665-76EB09596E97}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Krasnodar-Pashkovsky", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=39.133186071592, + ["latitude"]=45.006849978673, + ["course"]=0.82039576768875, + ["height"]=31.459716796875, + }, + ["sub_type"]=112, + }, + ["{5EEEA845-728A-4617-B73D-AB7B95C0BF14}"]= + { + ["band"]=770000, + ["type"]=2, + ["name"]="Mariupol", + ["callsign"]="MA", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=37.449999910781, + ["latitude"]=47.083333342844, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{9C4955CF-8F2E-4447-8ADA-D34BAD346FA1}"]= + { + ["band"]=342000, + ["type"]=2, + ["name"]="Berdyansk", + ["callsign"]="BD", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=36.766666662967, + ["latitude"]=46.816666632055, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{F825D676-6710-4ab0-ACDD-D4CCE63018EA}"]= + { + ["band"]=470000, + ["type"]=2, + ["name"]="Taganrog-TZentr", + ["callsign"]="TN", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=38.833333449616, + ["latitude"]=47.250000040204, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{1C17D867-0AC8-48cd-BE17-769F10A3F5A9}"]= + { + ["band"]=745000, + ["type"]=2, + ["name"]="Astrakhan", + ["callsign"]="AD", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=47.88333319274, + ["latitude"]=46.349999974477, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{6A4D7CD3-15A6-45de-A551-C9CE55BC23F5}"]= + { + ["band"]=303000, + ["type"]=2, + ["name"]="Krasnodar-TZentralny", + ["callsign"]="O", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=38.972554727067, + ["latitude"]=45.086445138456, + ["course"]=-1.6230975389481, + ["height"]=29.684894561768, + }, + ["sub_type"]=4104, + }, + ["{8AE7C2EE-7B4E-4e28-B01A-BB9212B906B4}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Nalchik", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=43.663293698368, + ["latitude"]=43.524002039126, + ["course"]=-2.1728196144104, + ["height"]=430, + }, + ["sub_type"]=112, + }, + ["{78C892D0-62A0-41f4-B216-04D6590D370B}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Krasnodar-TZentralny", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=39.006761833256, + ["latitude"]=45.0859151671, + ["course"]=-1.6230975389481, + ["height"]=26.556413650513, + }, + ["sub_type"]=112, + }, + ["{F0D00BE3-D414-4504-BFA8-57456343F983}"]= + { + ["band"]=750000, + ["type"]=2, + ["name"]="Limanskoe", + ["callsign"]="KE", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=30.00000011322, + ["latitude"]=46.666666667637, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{F6384C59-B29A-493f-9BC5-AF5333DB076B}"]= + { + ["band"]=625000, + ["type"]=2, + ["name"]="Krasnodar-TZentralny", + ["callsign"]="Oyo", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=39.006761833256, + ["latitude"]=45.0859151671, + ["course"]=-1.6230975389481, + ["height"]=26.556413650513, + }, + ["sub_type"]=4104, + }, + ["{657FD001-F740-41b7-A9D1-DC8EE6AF85B4}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Maykop-KHanskaya", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=40.084087240926, + ["latitude"]=44.717379887168, + ["course"]=-2.4609196186066, + ["height"]=216.91372680664, + }, + ["sub_type"]=112, + }, + ["{603826C0-DA1C-4b20-9DEF-C75B680D6F7C}"]= + { + ["band"]=303000, + ["type"]=2, + ["name"]="Krasnodar-TZentralny", + ["callsign"]="M", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=38.907935555841, + ["latitude"]=45.087418185601, + ["course"]=1.5184950828552, + ["height"]=30, + }, + ["sub_type"]=4104, + }, + ["{4352EE5E-8A18-4807-BE5F-FEE655FCC959}"]= + { + ["band"]=430000, + ["type"]=2, + ["name"]="Batumi", + ["callsign"]="LU", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=41.606666808765, + ["latitude"]=41.613887679663, + ["course"]=0, + ["height"]=9.984808921814, + }, + ["sub_type"]=4104, + }, + ["{0431F814-C3D7-45a4-AF13-A67A43CCAAAC}"]= + { + ["band"]=116350000, + ["type"]=2, + ["name"]="Krasnodar-TZentralny", + ["callsign"]="MB", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=38.928128326203, + ["latitude"]=45.084424147438, + ["course"]=1.5184950828552, + ["height"]=30, + }, + ["sub_type"]=32, + }, + ["{C382D774-5121-4c23-86E6-7116164FE603}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Kobuleti", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=41.83442330282, + ["latitude"]=41.924511693408, + ["course"]=1.2217304706573, + ["height"]=18.219362258911, + }, + ["sub_type"]=112, + }, + ["{FC180E41-CAE0-4bcc-A657-E1DFE3C861BF}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Krasnodar-TZentralny", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=38.907935555841, + ["latitude"]=45.087418185601, + ["course"]=1.5184950828552, + ["height"]=30, + }, + ["sub_type"]=112, + }, + ["{F9C00BBF-3CDC-4d8b-AB37-0273E9315F75}"]= + { + ["band"]=950000, + ["type"]=2, + ["name"]="Komissarovo", + ["callsign"]="KM", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=35.016666687172, + ["latitude"]=46.266666673198, + ["course"]=0, + ["height"]=0, + }, + ["sub_type"]=8, + }, + ["{039B4712-1F13-48e1-A67F-F8CB815216BF}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Tbilisi-Lochini", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=44.931974291323, + ["latitude"]=41.685923549921, + ["course"]=2.2339971065521, + ["height"]=518.65625, + }, + ["sub_type"]=112, + }, + ["{3672E620-C61C-4318-B474-69B4CE6034C5}"]= + { + ["band"]=862000, + ["type"]=2, + ["name"]="Sukhoy", + ["callsign"]="SH", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=41.350000287381, + ["latitude"]=47.100000003956, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{C5931F6D-6525-41e3-8F22-9994690BED2E}"]= + { + ["band"]=389000, + ["type"]=2, + ["name"]="SHiryaevo", + ["callsign"]="SH", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=30.280000014199, + ["latitude"]=47.403333287882, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{9D7CEAEB-8E52-4775-B825-CA62E0EEB43F}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Kutaisi", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=42.419028299913, + ["latitude"]=42.169763922025, + ["course"]=1.2915591001511, + ["height"]=34.913619995117, + }, + ["sub_type"]=112, + }, + ["{322D5B49-F59D-4d7f-9655-1DAA7AF94344}"]= + { + ["band"]=420000, + ["type"]=2, + ["name"]="Dzhubga", + ["callsign"]="RQ", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=38.701389026511, + ["latitude"]=44.320555530626, + ["course"]=0, + ["height"]=63.587341308594, + }, + ["sub_type"]=8, + }, + ["{498DF95B-CAA4-4642-BCD6-2ED7AC366214}"]= + { + ["band"]=408000, + ["type"]=2, + ["name"]="Krymsk", + ["callsign"]="KW", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=38.040778144691, + ["latitude"]=45.002664878554, + ["course"]=-2.451842546463, + ["height"]=10.494524002075, + }, + ["sub_type"]=4104, + }, + ["{6E655001-7D12-400e-A4F5-DF3B48005E06}"]= + { + ["band"]=690000, + ["type"]=2, + ["name"]="Dmitrovka", + ["callsign"]="DM", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=35.058611107534, + ["latitude"]=45.489444431369, + ["course"]=0, + ["height"]=31.682126998901, + }, + ["sub_type"]=8, + }, + ["{839D524E-BB23-4a7c-87B6-436BBDFABCC8}"]= + { + ["band"]=408000, + ["type"]=2, + ["name"]="Krymsk", + ["callsign"]="yuO", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=37.94918121689, + ["latitude"]=44.933067755635, + ["course"]=0.68975001573563, + ["height"]=70.84228515625, + }, + ["sub_type"]=4104, + }, + ["{099B1B66-552F-44e7-817A-9E395150DBA0}"]= + { + ["band"]=1050000, + ["type"]=2, + ["name"]="Kerch", + ["callsign"]="KS", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=36.400000028215, + ["latitude"]=45.366666665613, + ["course"]=0, + ["height"]=36.203407287598, + }, + ["sub_type"]=8, + }, + ["{7B6744C4-3945-4a19-AD08-8ED6A1E8BCDD}"]= + { + ["band"]=485000, + ["type"]=2, + ["name"]="Kakhovka", + ["callsign"]="KH", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=33.496666642802, + ["latitude"]=46.808333264695, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{0B6C84AE-2A8C-4623-8103-B85C66F9F627}"]= + { + ["band"]=440000, + ["type"]=2, + ["name"]="Artziz", + ["callsign"]="BT", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=29.383333152565, + ["latitude"]=45.950000001714, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["Batumi"]= + { + ["type"]=1, + ["name"]="Batumi", + ["callsign"]="", + ["runway_length"]=822, + ["class"]="ABRIS_Waypoint_Airdrome", + ["position"]= + { + ["longitude"]=41.600567780743, + ["latitude"]=41.609371050613, + ["course"]=2.1918691046878, + ["height"]=9.9645166397095, + }, + ["sub_type"]=5, + }, + ["{DB73D633-0760-4765-88D9-2125C3B61A28}"]= + { + ["band"]=395000, + ["type"]=2, + ["name"]="Gudauta", + ["callsign"]="ZC", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=40.578915959804, + ["latitude"]=43.099088468953, + ["course"]=-0.50608837604523, + ["height"]=21, + }, + ["sub_type"]=4104, + }, + ["{6DBC6B40-38E2-457d-BC84-50521AC3D072}"]= + { + ["band"]=350000, + ["type"]=2, + ["name"]="Nalchik", + ["callsign"]="N", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=43.663293698368, + ["latitude"]=43.524002039126, + ["course"]=-2.1728196144104, + ["height"]=430, + }, + ["sub_type"]=4104, + }, + ["Sochi-Adler"]= + { + ["type"]=1, + ["name"]="Sochi-Adler", + ["callsign"]="", + ["runway_length"]=1151, + ["class"]="ABRIS_Waypoint_Airdrome", + ["position"]= + { + ["longitude"]=39.941488914396, + ["latitude"]=43.444479177936, + ["course"]=-2.059394842015, + ["height"]=30, + }, + ["sub_type"]=5, + }, + ["{2F54CFDB-24E0-4d59-B9E4-0D0A9923194D}"]= + { + ["band"]=591000, + ["type"]=2, + ["name"]="Maykop-KHanskaya", + ["callsign"]="R", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=40.060506400589, + ["latitude"]=44.699959035543, + ["course"]=-2.4609196186066, + ["height"]=185.35874938965, + }, + ["sub_type"]=4104, + }, + ["{791B532E-7081-43fd-9F90-4484BCEC2CE5}"]= + { + ["band"]=670000, + ["type"]=2, + ["name"]="Lyubimovka", + ["callsign"]="LB", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=34.898333338244, + ["latitude"]=45.625000014443, + ["course"]=0, + ["height"]=50.001346588135, + }, + ["sub_type"]=8, + }, + ["{F908523F-DF9E-4f63-9423-913582798F99}"]= + { + ["band"]=435000, + ["type"]=2, + ["name"]="Tbilisi-Lochini", + ["callsign"]="N", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=44.977461919109, + ["latitude"]=41.650589722257, + ["course"]=-0.90759545564651, + ["height"]=474.58218383789, + }, + ["sub_type"]=4104, + }, + ["{9286A133-DEE7-4006-9B75-B6279CCDF74F}"]= + { + ["band"]=525000, + ["type"]=2, + ["name"]="Mozdok", + ["callsign"]="DO", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=44.528781245533, + ["latitude"]=43.792473730478, + ["course"]=1.4445027112961, + ["height"]=153.11080932617, + }, + ["sub_type"]=4104, + }, + ["{7D1F43A3-D30B-40d3-A3B1-4D7D546B8E53}"]= + { + ["band"]=288000, + ["type"]=2, + ["name"]="Maykop-KHanskaya", + ["callsign"]="DG", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=39.986362565764, + ["latitude"]=44.645077755977, + ["course"]=0.68067294359207, + ["height"]=177.95664978027, + }, + ["sub_type"]=4104, + }, + ["{FB1CF904-A634-44ca-9AB7-DE7357600758}"]= + { + ["band"]=1030000, + ["type"]=2, + ["name"]="Mikolaivka", + ["callsign"]="NK", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=31.973055617388, + ["latitude"]=47.087500015661, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["Anapa-Vityazevo"]= + { + ["type"]=1, + ["name"]="Anapa-Vityazevo", + ["callsign"]="", + ["runway_length"]=1050, + ["class"]="ABRIS_Waypoint_Airdrome", + ["position"]= + { + ["longitude"]=37.34784162046, + ["latitude"]=45.004960953476, + ["course"]=0.72431498648244, + ["height"]=45, + }, + ["sub_type"]=5, + }, + ["{FA899F12-3708-4520-BD03-AC5B5FDAABFE}"]= + { + ["band"]=300500, + ["type"]=2, + ["name"]="KHenichesky", + ["callsign"]="GE", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=34.816111103122, + ["latitude"]=46.182500024812, + ["course"]=0, + ["height"]=0, + }, + ["sub_type"]=8, + }, + ["{7418FEDC-377B-40ba-BC1D-48D15E804B89}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Mozdok", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=44.637370992226, + ["latitude"]=43.791323755707, + ["course"]=-1.6970900297165, + ["height"]=158.74685668945, + }, + ["sub_type"]=112, + }, + ["Gudauta"]= + { + ["type"]=1, + ["name"]="Gudauta", + ["callsign"]="", + ["runway_length"]=850, + ["class"]="ABRIS_Waypoint_Airdrome", + ["position"]= + { + ["longitude"]=40.569781849787, + ["latitude"]=43.11425961416, + ["course"]=-0.50608837006882, + ["height"]=21, + }, + ["sub_type"]=6, + }, + ["{9D2D723F-CD98-46a3-AA95-444DD810AE6C}"]= + { + ["band"]=718000, + ["type"]=2, + ["name"]="Nalchik", + ["callsign"]="NL", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=43.692770117382, + ["latitude"]=43.534973922883, + ["course"]=-2.1728196144104, + ["height"]=376.85397338867, + }, + ["sub_type"]=4104, + }, + ["{6D4B161C-F96D-4e66-BB97-E25774343A67}"]= + { + ["band"]=129000, + ["type"]=2, + ["name"]="Senaki-Kolkhi", + ["callsign"]="I", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=42.018370629355, + ["latitude"]=42.245052975629, + ["course"]=1.6528304815292, + ["height"]=23.467279434204, + }, + ["sub_type"]=4104, + }, + ["{EE522F8B-8046-4d7a-A3C2-C166B81CBA14}"]= + { + ["band"]=680000, + ["type"]=2, + ["name"]="Skadovsk", + ["callsign"]="SK", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=32.916666617971, + ["latitude"]=46.13333333967, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{3B9069B3-92F0-474c-9629-35F940A7D6CB}"]= + { + ["band"]=1175000, + ["type"]=2, + ["name"]="Dobrushino", + ["callsign"]="DO", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=33.361666685089, + ["latitude"]=45.378055556009, + ["course"]=0, + ["height"]=50.001235961914, + }, + ["sub_type"]=8, + }, + ["{3CF293EE-56CF-464c-9695-E85D44690077}"]= + { + ["band"]=905000, + ["type"]=2, + ["name"]="Parutyne", + ["callsign"]="PA", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=31.905000082189, + ["latitude"]=46.695000058446, + ["course"]=0, + ["height"]=0, + }, + ["sub_type"]=8, + }, + ["{879CF29F-5127-4638-ABEA-408B83CE1520}"]= + { + ["band"]=625000, + ["type"]=2, + ["name"]="Buyalyk", + ["callsign"]="DW", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=30.699999929771, + ["latitude"]=46.899999972094, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{E2AA221C-41BD-4ba0-94D4-7A25521A4A02}"]= + { + ["band"]=845000, + ["type"]=2, + ["name"]="Kutaisi", + ["callsign"]="KN", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=42.419028299913, + ["latitude"]=42.169763922025, + ["course"]=1.2915591001511, + ["height"]=34.913619995117, + }, + ["sub_type"]=4104, + }, + ["{E9E09B4F-A4F7-402b-AB07-2F3501C5003E}"]= + { + ["band"]=309500, + ["type"]=2, + ["name"]="Vorontzovsky front - Odessa", + ["callsign"]="WR", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=30.723888999574, + ["latitude"]=46.496111141931, + ["course"]=0, + ["height"]=0, + }, + ["sub_type"]=8, + }, + ["{F82C7B3B-58AB-4f37-A7A9-D8CA6CD7F845}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Beslan", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=44.539993803635, + ["latitude"]=43.215477513059, + ["course"]=1.6318835020065, + ["height"]=543.41900634766, + }, + ["sub_type"]=112, + }, + ["{3AAD8E39-71D3-4952-BC6A-6FAA66100740}"]= + { + ["band"]=117650000, + ["type"]=2, + ["name"]="Maykop-KHanskaya", + ["callsign"]="DG", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=40.04064281205, + ["latitude"]=44.683721927129, + ["course"]=-2.4609196186066, + ["height"]=180, + }, + ["sub_type"]=32, + }, + ["{B379E11C-7F88-4389-89FB-6F53E7388747}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Anapa-Vityazevo", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=37.299402775931, + ["latitude"]=44.970054188162, + ["course"]=0.72431498765945, + ["height"]=20.469882965088, + }, + ["sub_type"]=112, + }, + ["{14A2F917-A2D6-483e-9E49-77E90E074B3A}"]= + { + ["band"]=455000, + ["type"]=2, + ["name"]="Kizlyar", + ["callsign"]="KZ", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=46.71666661869, + ["latitude"]=43.83333334862, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{91DCC6FD-AE23-4f03-BB94-228873913F50}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Senaki-Kolkhi", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=41.986436464281, + ["latitude"]=42.249570732027, + ["course"]=1.6528304815292, + ["height"]=21.472751617432, + }, + ["sub_type"]=112, + }, + ["{B4DD584A-3268-4ed8-A6BC-0F16BB1FFFC1}"]= + { + ["band"]=309500, + ["type"]=2, + ["name"]="Tendorovsky", + ["callsign"]="TD", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=31.522777764021, + ["latitude"]=46.318611082896, + ["course"]=0, + ["height"]=0, + }, + ["sub_type"]=8, + }, + ["{D2BF3722-93DC-4e25-BD1F-97B99641315A}"]= + { + ["band"]=580000, + ["type"]=2, + ["name"]="Kacha", + ["callsign"]="KC", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=33.566666669312, + ["latitude"]=44.749999997154, + ["course"]=0, + ["height"]=44.705688476563, + }, + ["sub_type"]=8, + }, + ["{B08554A5-CFF1-444b-86B9-F2D4A36AC450}"]= + { + ["band"]=525000, + ["type"]=2, + ["name"]="Gali", + ["callsign"]="DA", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=41.783333639785, + ["latitude"]=42.600000022704, + ["course"]=0, + ["height"]=153.07803344727, + }, + ["sub_type"]=8, + }, + ["{C4DA1D59-0135-4810-9FF1-98A3D0FD368C}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Mozdok", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=44.670566359666, + ["latitude"]=43.790951233713, + ["course"]=-1.6970900297165, + ["height"]=154.5718536377, + }, + ["sub_type"]=112, + }, + ["{C21DB5FB-78BF-440d-9645-D31513B98BAF}"]= + { + ["band"]=992000000, + ["type"]=2, + ["name"]="Senaki-Kolkhi", + ["callsign"]="TSK", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=42.04702008109, + ["latitude"]=42.242086543242, + ["course"]=0, + ["height"]=13.082180023193, + }, + ["sub_type"]=4, + }, + ["{818BCBB4-141F-4eb1-9199-593346420D68}"]= + { + ["band"]=761000, + ["type"]=2, + ["name"]="Sochi-Adler", + ["callsign"]="SO", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=39.911168781419, + ["latitude"]=43.43519586845, + ["course"]=1.0821976661682, + ["height"]=4.3798685073853, + }, + ["sub_type"]=4104, + }, + ["Krymsk"]= + { + ["type"]=1, + ["name"]="Krymsk", + ["callsign"]="", + ["runway_length"]=900, + ["class"]="ABRIS_Waypoint_Airdrome", + ["position"]= + { + ["longitude"]=37.994951766799, + ["latitude"]=44.967876819866, + ["course"]=-2.4518425368978, + ["height"]=20, + }, + ["sub_type"]=6, + }, + ["{2F6A39A0-1F26-406d-BCE6-48274102904D}"]= + { + ["band"]=288000, + ["type"]=2, + ["name"]="Maykop-KHanskaya", + ["callsign"]="RK", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=40.084087240926, + ["latitude"]=44.717379887168, + ["course"]=-2.4609196186066, + ["height"]=216.91372680664, + }, + ["sub_type"]=4104, + }, + ["{9D270DB1-9A0D-4704-8B9A-D00843BA6AF8}"]= + { + ["band"]=342000, + ["type"]=2, + ["name"]="Tbilisi-Lochini", + ["callsign"]="WP", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=44.909702215984, + ["latitude"]=41.703205066957, + ["course"]=2.2339971065521, + ["height"]=566.43151855469, + }, + ["sub_type"]=4104, + }, + ["{641A95FC-D90C-4313-9A4B-783DEB01D5E5}"]= + { + ["band"]=995000, + ["type"]=2, + ["name"]="Kislovodsk", + ["callsign"]="KW", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=42.650000029649, + ["latitude"]=43.941666665735, + ["course"]=0, + ["height"]=800.17553710938, + }, + ["sub_type"]=8, + }, + ["{86B21180-D7E9-47c3-8012-74C6092DDF4E}"]= + { + ["band"]=300500, + ["type"]=2, + ["name"]="Ilichevsk", + ["callsign"]="IO", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=35.419722196701, + ["latitude"]=45.014444444519, + ["course"]=0, + ["height"]=1.8064863979816e-005, + }, + ["sub_type"]=8, + }, + ["{7D1BE209-B33E-4e6f-88DE-FA4D55E9AFE9}"]= + { + ["band"]=735000, + ["type"]=2, + ["name"]="Kalaus", + ["callsign"]="BJ", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=45.216666759111, + ["latitude"]=43.466666663757, + ["course"]=0, + ["height"]=343.54925537109, + }, + ["sub_type"]=8, + }, + ["{65B77E50-8B99-48a8-A355-3A6844C86A2A}"]= + { + ["band"]=830000, + ["type"]=2, + ["name"]="Gronzy - Vostochny", + ["callsign"]="WK", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=45.700000076209, + ["latitude"]=43.383333345666, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["Kobuleti"]= + { + ["type"]=1, + ["name"]="Kobuleti", + ["callsign"]="", + ["runway_length"]=799, + ["class"]="ABRIS_Waypoint_Airdrome", + ["position"]= + { + ["longitude"]=41.863479703668, + ["latitude"]=41.929946253786, + ["course"]=1.2217305208975, + ["height"]=18, + }, + ["sub_type"]=5, + }, + ["Soganlug"]= + { + ["type"]=1, + ["name"]="Soganlug", + ["callsign"]="", + ["runway_length"]=835, + ["class"]="ABRIS_Waypoint_Airdrome", + ["position"]= + { + ["longitude"]=44.938407241324, + ["latitude"]=41.649498903439, + ["course"]=2.3086751290292, + ["height"]=458.72555541992, + }, + ["sub_type"]=5, + }, + ["{93E74802-597F-4d4f-B0E0-7A5A43A79EA9}"]= + { + ["band"]=525000, + ["type"]=2, + ["name"]="Mozdok", + ["callsign"]="RM", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=44.670566359666, + ["latitude"]=43.790951233713, + ["course"]=-1.6970900297165, + ["height"]=154.5718536377, + }, + ["sub_type"]=4104, + }, + ["{B8A2BBE0-959D-4856-AFEB-AC092A6C76E4}"]= + { + ["band"]=705000, + ["type"]=2, + ["name"]="Manychsky", + ["callsign"]="MN", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=40.366666550758, + ["latitude"]=47.049999993999, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{654A7048-AE8C-4932-A060-E351F4A047A9}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Beslan", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=44.572220563029, + ["latitude"]=43.210694410745, + ["course"]=1.6318835020065, + ["height"]=543.05224609375, + }, + ["sub_type"]=112, + }, + ["{2CF16904-80B3-4bdd-9659-E949BA3F4E78}"]= + { + ["band"]=330000, + ["type"]=2, + ["name"]="Ust-Labinsk", + ["callsign"]="NZ", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=39.654166830374, + ["latitude"]=45.226666650569, + ["course"]=0, + ["height"]=80.053146362305, + }, + ["sub_type"]=8, + }, + ["{AC45C2C1-6D32-4e03-B52D-3051A01D7B1D}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Sukhumi-Babushara", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=41.184595069577, + ["latitude"]=42.833634213401, + ["course"]=-1.1085398197174, + ["height"]=23.724117279053, + }, + ["sub_type"]=112, + }, + ["Krasnodar-Center"]= + { + ["type"]=1, + ["name"]="Krasnodar-TZentralny", + ["callsign"]="", + ["runway_length"]=850, + ["class"]="ABRIS_Waypoint_Airdrome", + ["position"]= + { + ["longitude"]=38.940245888497, + ["latitude"]=45.086936242812, + ["course"]=-1.6230975387504, + ["height"]=30, + }, + ["sub_type"]=6, + }, + ["{B2B0EA6D-30FA-4254-9F85-FE00D13A981A}"]= + { + ["band"]=395000, + ["type"]=2, + ["name"]="Krasnolesye", + ["callsign"]="LE", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=34.250000000095, + ["latitude"]=44.83333333867, + ["course"]=0, + ["height"]=419.28756713867, + }, + ["sub_type"]=8, + }, + ["{CB0B82C9-16F5-4299-A646-47747AD20253}"]= + { + ["band"]=983000000, + ["type"]=2, + ["name"]="Vaziani", + ["callsign"]="VAS", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=45.027339550197, + ["latitude"]=41.6307070249, + ["course"]=0, + ["height"]=456.05590820313, + }, + ["sub_type"]=4, + }, + ["{52F5B421-C5AE-4e31-BB82-82655FC79F80}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Mozdok", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=44.528781245533, + ["latitude"]=43.792473730478, + ["course"]=1.4445027112961, + ["height"]=153.11080932617, + }, + ["sub_type"]=112, + }, + ["{D0AE8C50-F6B3-4f8f-93EA-C64344183CCB}"]= + { + ["band"]=250000, + ["type"]=2, + ["name"]="Beslan", + ["callsign"]="C", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=44.572220563029, + ["latitude"]=43.210694410745, + ["course"]=1.6318835020065, + ["height"]=543.05224609375, + }, + ["sub_type"]=4104, + }, + ["Tbilisi-Lochini"]= + { + ["type"]=1, + ["name"]="Tbilisi-Lochini", + ["callsign"]="", + ["runway_length"]=1059, + ["class"]="ABRIS_Waypoint_Airdrome", + ["position"]= + { + ["longitude"]=44.954725173474, + ["latitude"]=41.668258016603, + ["course"]=-0.90759545507394, + ["height"]=464.50350952148, + }, + ["sub_type"]=5, + }, + ["{72467CBD-F38A-4a44-B6A3-E8A8C6D2560F}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Maykop-KHanskaya", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=39.986362565764, + ["latitude"]=44.645077755977, + ["course"]=0.68067294359207, + ["height"]=177.95664978027, + }, + ["sub_type"]=112, + }, + ["{AFD16F93-F82A-467d-8F46-DD6E953264EA}"]= + { + ["band"]=113700000, + ["type"]=2, + ["name"]="Tbilisi-Lochini", + ["callsign"]="TBS", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=44.946945391997, + ["latitude"]=41.670555186786, + ["course"]=0, + ["height"]=469.86624145508, + }, + }, + ["{7B562F00-3CCA-4d91-BE5A-E2D1E97E4877}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Mineralnye Vody", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=43.116124501349, + ["latitude"]=44.211919658446, + ["course"]=-1.1292264461517, + ["height"]=320, + }, + ["sub_type"]=112, + }, + ["{6BFE6F5C-4121-4646-ABEA-A31E72381C88}"]= + { + ["band"]=1000000, + ["type"]=2, + ["name"]="Gelendzhik", + ["callsign"]="GN", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=38.015277672561, + ["latitude"]=44.564445491859, + ["course"]=0, + ["height"]=0, + }, + ["sub_type"]=4104, + }, + ["{2541CFCF-AE47-4eb8-A2D5-49785B244912}"]= + { + ["band"]=740000, + ["type"]=2, + ["name"]="Melitopol", + ["callsign"]="NE", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=35.299999969228, + ["latitude"]=46.866666696345, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{FC2C1E65-B8E8-40f7-8D00-CBF1800D3D7B}"]= + { + ["band"]=211000, + ["type"]=2, + ["name"]="Tbilisi-Lochini", + ["callsign"]="NA", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=44.999697078343, + ["latitude"]=41.633299706948, + ["course"]=-0.90759545564651, + ["height"]=459.41839599609, + }, + ["sub_type"]=4104, + }, + ["{4E2A763F-5528-4d03-9D2A-3396F93CA516}"]= + { + ["band"]=117600000, + ["type"]=2, + ["name"]="Mineralnye Vody", + ["callsign"]="MW", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=43.070295945672, + ["latitude"]=44.228586168404, + ["course"]=2.0123660564423, + ["height"]=320, + }, + ["sub_type"]=32, + }, + ["{867AB331-3908-47b5-B977-4A88BCB0E41C}"]= + { + ["band"]=520000, + ["type"]=2, + ["name"]="Mukhrani", + ["callsign"]="DF", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=44.565555194134, + ["latitude"]=41.916666643449, + ["course"]=0, + ["height"]=515.787109375, + }, + ["sub_type"]=8, + }, + ["{AC8FD1BA-08A3-4a73-B13E-4F7D7077607D}"]= + { + ["band"]=489000, + ["type"]=2, + ["name"]="Sukhumi-Babushara", + ["callsign"]="AV", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=41.184595069577, + ["latitude"]=42.833634213401, + ["course"]=-1.1085398197174, + ["height"]=23.724117279053, + }, + ["sub_type"]=4104, + }, + ["{05A67A03-1287-4f18-8477-52DD0CF8FF73}"]= + { + ["band"]=435000, + ["type"]=2, + ["name"]="Egorlykskaya", + ["callsign"]="ER", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=40.666666758319, + ["latitude"]=46.583333276832, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{D9016381-E3DD-4348-8D43-D12C681A7EF9}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Mineralnye Vody", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=43.017842556108, + ["latitude"]=44.256694325491, + ["course"]=2.0123660564423, + ["height"]=318.89764404297, + }, + ["sub_type"]=112, + }, + ["{2C860AD8-14CC-466d-B530-B07FB0B06EBA}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Mozdok", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=44.561984548905, + ["latitude"]=43.792133293965, + ["course"]=1.4445027112961, + ["height"]=152.32843017578, + }, + ["sub_type"]=112, + }, + ["{BD9C7F8E-B6EF-4df6-AE6A-FA6F07F279B7}"]= + { + ["band"]=722000, + ["type"]=2, + ["name"]="Biryuchya Kosa", + ["callsign"]="YO", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=47.600000064833, + ["latitude"]=45.716666602437, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["{8ABE5D65-1EED-464f-B5FF-164FC525CEB6}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Anapa-Vityazevo", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=37.372305715442, + ["latitude"]=45.022565731494, + ["course"]=-2.4172778129578, + ["height"]=47.840591430664, + }, + ["sub_type"]=112, + }, + ["{5750696B-22FB-4b75-BA00-9D9F8D6C66C0}"]= + { + ["band"]=583000, + ["type"]=2, + ["name"]="Mineralnye Vody", + ["callsign"]="NR", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=43.144428100003, + ["latitude"]=44.198998202113, + ["course"]=-1.1292264461517, + ["height"]=303.2926940918, + }, + ["sub_type"]=4104, + }, + ["{4EA94532-05FD-4be9-9DCF-AB6E62614B07}"]= + { + ["band"]=490000, + ["type"]=2, + ["name"]="Kobuleti", + ["callsign"]="T", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=41.83442330282, + ["latitude"]=41.924511693408, + ["course"]=1.2217304706573, + ["height"]=18.219362258911, + }, + ["sub_type"]=4104, + }, + ["{9FB9FADD-714D-4040-9358-7D8B97F7F5B1}"]= + { + ["band"]=75000000, + ["type"]=2, + ["name"]="Kobuleti", + ["callsign"]="", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=41.80304745528, + ["latitude"]=41.918633401388, + ["course"]=1.2217304706573, + ["height"]=10.535722732544, + }, + ["sub_type"]=112, + }, + ["{3C9AD127-83CE-41c6-9D07-3478B16BBCB4}"]= + { + ["band"]=113600000, + ["type"]=2, + ["name"]="Kutaisi", + ["callsign"]="KTS", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=42.456112245443, + ["latitude"]=42.173610536789, + ["course"]=0, + ["height"]=45, + }, + }, + ["{71F34A61-6419-48d1-BF78-02F8D97395CA}"]= + { + ["band"]=1154000000, + ["type"]=2, + ["name"]="Kobuleti", + ["callsign"]="KBL", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=41.861969842226, + ["latitude"]=41.930769894946, + ["course"]=0, + ["height"]=18, + }, + ["sub_type"]=4, + }, + ["Beslan"]= + { + ["type"]=1, + ["name"]="Beslan", + ["callsign"]="", + ["runway_length"]=1110, + ["class"]="ABRIS_Waypoint_Airdrome", + ["position"]= + { + ["longitude"]=44.605763506287, + ["latitude"]=43.205705800612, + ["course"]=1.6318834439122, + ["height"]=540.13690185547, + }, + ["sub_type"]=5, + }, + ["{FAD02FC6-6BDC-48c3-B380-CDEF4481EE6D}"]= + { + ["band"]=822000, + ["type"]=2, + ["name"]="Makhachkala", + ["callsign"]="TA", + ["class"]="ABRIS_Waypoint_Beacon", + ["position"]= + { + ["longitude"]=47.520000672166, + ["latitude"]=42.974999903165, + ["course"]=0, + ["height"]=0.00014901164104231, + }, + ["sub_type"]=8, + }, + ["Senaki-Kolkhi"]= + { + ["type"]=1, + ["name"]="Senaki-Kolkhi", + ["callsign"]="", + ["runway_length"]=778, + ["class"]="ABRIS_Waypoint_Airdrome", + ["position"]= + { + ["longitude"]=42.047685627404, + ["latitude"]=42.240897304126, + ["course"]=1.6528304225881, + ["height"]=10.602717399597, + }, + ["sub_type"]=6, + }, + }, +} diff --git a/Test Missions/miz/MOOSE_Escort_Test_Follow/ABRIS/Database/ROUTES.lua b/Test Missions/miz/MOOSE_Escort_Test_Follow/ABRIS/Database/ROUTES.lua new file mode 100644 index 000000000..1ca8329db --- /dev/null +++ b/Test Missions/miz/MOOSE_Escort_Test_Follow/ABRIS/Database/ROUTES.lua @@ -0,0 +1,3 @@ +routes= +{ +} diff --git a/Test Missions/miz/MOOSE_Escort_Test_Follow/Config/View/Server.lua b/Test Missions/miz/MOOSE_Escort_Test_Follow/Config/View/Server.lua new file mode 100644 index 000000000..df77a168a --- /dev/null +++ b/Test Missions/miz/MOOSE_Escort_Test_Follow/Config/View/Server.lua @@ -0,0 +1,209 @@ +-- View scripts +-- Copyright (C) 2004, Eagle Dynamics. +DisableCombatViews = false -- F5 & Ctrl-F5 +ExternalObjectsLockDistance = 10000.0 +ShowTargetInfo = false +CameraTerrainRestriction = true +hAngleRearDefault = 180 +vAngleRearDefault = -8.0 +vAngleRearMin = -90 -- -8.0 +vAngleRearMax = 90.0 + +dbg_shell = "weapons.shells.PKT_7_62_T" -- 23mm shell +-- dbg_shell = "weapons.shells.2A64_152" -- 152mm shell +dbg_shell_v0 = -1 -- Muzzle speed m/s (-1 - speed from shall database) +dbg_shell_fire_rate = 60 +--reformatted per-unit data to be mod system friendly +--this file is no longer should be edited for adding new flyable aircraft , DCS automatically check core database (i.e. where you define your aircraft in aircraft table just define ViewSettings and SnapViews tables) + +function default_fighter_player(t) + local res = { + CameraViewAngleLimits = {20.000000,140.000000}, + CameraAngleRestriction = {false ,90.000000,0.500000}, + EyePoint = {0.05 ,0.000000 ,0.000000}, + limits_6DOF = {x = {-0.050000,0.4500000},y ={-0.300000,0.100000},z = {-0.220000,0.220000},roll = 90.000000}, + Allow360rotation = false, + CameraAngleLimits = {200,-80.000000,110.000000}, + ShoulderSize = 0.2, -- move body when azimuth value more then 90 degrees + } + if t then + for i,o in pairs(t) do + res[i] = o + end + end + return res +end + +function fulcrum() + return { + Cockpit = { + default_fighter_player({CockpitLocalPoint = {4.71,1.28,0.000000}}) + }, + Chase = { + LocalPoint = {1.220000,3.750000,0.000000}, + AnglesDefault = {180.000000,-8.000000}, + }, -- Chase + Arcade = { + LocalPoint = {-15.080000,6.350000,0.000000}, + AnglesDefault = {0.000000,-8.000000}, + }, -- Arcade + } +end + +ViewSettings = {} +ViewSettings["A-10A"] = { + Cockpit = { + [1] = default_fighter_player({CockpitLocalPoint = {4.300000,1.282000,0.000000}, + EyePoint = {0.000000,0.000000,0.000000}, + limits_6DOF = {x = {-0.050000,0.600000}, + y = {-0.300000,0.100000}, + z = {-0.250000,0.250000}, + roll = 90.000000}}), + }, -- Cockpit + Chase = { + LocalPoint = {0.600000,3.682000,0.000000}, + AnglesDefault = {180.000000,-8.000000}, + }, -- Chase + Arcade = { + LocalPoint = {-27.000000,12.000000,0.000000}, + AnglesDefault = {0.000000,-12.000000}, + }, -- Arcade +} +ViewSettings["A-10C"] = { + Cockpit = { + [1] = default_fighter_player({CockpitLocalPoint = {4.300000,1.282000,0.000000}, + EyePoint = {0.000000,0.000000,0.000000}, + limits_6DOF = {x = {-0.050000,0.600000}, + y = {-0.300000,0.100000}, + z = {-0.250000,0.250000}, + roll = 90.000000}}), + }, -- Cockpit + Chase = { + LocalPoint = {0.600000,3.682000,0.000000}, + AnglesDefault = {180.000000,-8.000000}, + }, -- Chase + Arcade = { + LocalPoint = {-27.000000,12.000000,0.000000}, + AnglesDefault = {0.000000,-12.000000}, + }, -- Arcade +} +ViewSettings["F-15C"] = { + Cockpit = { + [1] = default_fighter_player({CockpitLocalPoint = {6.210000,1.204000,0.000000}})-- player slot 1 + }, -- Cockpit + Chase = { + LocalPoint = {2.510000,3.604000,0.000000}, + AnglesDefault = {180.000000,-8.000000}, + }, -- Chase + Arcade = { + LocalPoint = {-13.790000,6.204000,0.000000}, + AnglesDefault = {0.000000,-8.000000}, + }, -- Arcade +} +ViewSettings["Ka-50"] = { + Cockpit = { + [1] = {-- player slot 1 + CockpitLocalPoint = {3.188000,0.390000,0.000000}, + CameraViewAngleLimits = {20.000000,120.000000}, + CameraAngleRestriction = {false,60.000000,0.400000}, + CameraAngleLimits = {140.000000,-65.000000,90.000000}, + EyePoint = {0.090000,0.000000,0.000000}, + limits_6DOF = {x = {-0.020000,0.350000},y ={-0.150000,0.165000},z = {-0.170000,0.170000},roll = 90.000000}, + }, + }, -- Cockpit + Chase = { + LocalPoint = {-0.512000,2.790000,0.000000}, + AnglesDefault = {180.000000,-8.000000}, + }, -- Chase + Arcade = { + LocalPoint = {-16.812000,5.390000,0.000000}, + AnglesDefault = {0.000000,-8.000000}, + }, -- Arcade +} +ViewSettings["MiG-29A"] = fulcrum() +ViewSettings["MiG-29G"] = fulcrum() +ViewSettings["MiG-29S"] = fulcrum() + +ViewSettings["P-51D"] = { + Cockpit = { + [1] = {-- player slot 1 + CockpitLocalPoint = {-1.500000,0.618000,0.000000}, + CameraViewAngleLimits = {20.000000,120.000000}, + CameraAngleRestriction = {false,90.000000,0.500000}, + CameraAngleLimits = {200,-80.000000,90.000000}, + EyePoint = {0.025000,0.100000,0.000000}, + ShoulderSize = 0.15, + Allow360rotation = false, + limits_6DOF = {x = {-0.050000,0.450000},y ={-0.200000,0.200000},z = {-0.220000,0.220000},roll = 90.000000}, + }, + }, -- Cockpit + Chase = { + LocalPoint = {0.200000,-0.652000,-0.650000}, + AnglesDefault = {0.000000,0.000000}, + }, -- Chase + Arcade = { + LocalPoint = {-21.500000,5.618000,0.000000}, + AnglesDefault = {0.000000,-8.000000}, + }, -- Arcade +} +ViewSettings["Su-25"] = { + Cockpit = { + [1] = default_fighter_player({CockpitLocalPoint = {3.352000,0.506000,0.000000}}),-- player slot 1 + }, -- Cockpit + Chase = { + LocalPoint = {-0.348000,2.906000,0.000000}, + AnglesDefault = {180.000000,-8.000000}, + }, -- Chase + Arcade = { + LocalPoint = {-16.648001,5.506000,0.000000}, + AnglesDefault = {0.000000,-8.000000}, + }, -- Arcade +} +ViewSettings["Su-25T"] = { + Cockpit = { + [1] = default_fighter_player({CockpitLocalPoint = {3.406000,0.466000,0.000000}}),-- player slot 1 + }, -- Cockpit + Chase = { + LocalPoint = {-0.294000,2.866000,0.000000}, + AnglesDefault = {180.000000,-8.000000}, + }, -- Chase + Arcade = { + LocalPoint = {-16.594000,5.466000,0.000000}, + AnglesDefault = {0.000000,-8.000000}, + }, -- Arcade +} +ViewSettings["Su-25TM"] = { + Cockpit = { + [1] = {-- player slot 1 + CockpitLocalPoint = {4.000000,1.000000,0.000000}, + CameraViewAngleLimits = {20.000000,140.000000}, + CameraAngleRestriction = {true,90.000000,0.400000}, + CameraAngleLimits = {160.000000,-70.000000,90.000000}, + EyePoint = {0.000000,0.000000,0.000000}, + limits_6DOF = {x = {-0.200000,0.200000},y ={-0.200000,0.200000},z = {-0.200000,0.200000},roll = 60.000000}, + }, + }, -- Cockpit + Chase = { + LocalPoint = {4.000000,2.000000,0.000000}, + AnglesDefault = {180.000000,-8.000000}, + }, -- Chase + Arcade = { + LocalPoint = {4.000000,2.000000,0.000000}, + AnglesDefault = {180.000000,-8.000000}, + }, -- Arcade +} +ViewSettings["Su-27"] = { + Cockpit = { + [1] = default_fighter_player({CockpitLocalPoint = {7.959000,1.419000,0.000000}})-- player slot 1 + }, -- Cockpit + Chase = { + LocalPoint = {4.259000,3.819000,0.000000}, + AnglesDefault = {180.000000,-8.000000}, + }, -- Chase + Arcade = { + LocalPoint = {-12.041000,6.419000,0.000000}, + AnglesDefault = {0.000000,-8.000000}, + }, -- Arcade +} + +ViewSettings["Su-33"] = ViewSettings["Su-27"] diff --git a/Test Missions/miz/MOOSE_Escort_Test_Follow/Config/View/SnapViewsDefault.lua b/Test Missions/miz/MOOSE_Escort_Test_Follow/Config/View/SnapViewsDefault.lua new file mode 100644 index 000000000..754522d55 --- /dev/null +++ b/Test Missions/miz/MOOSE_Escort_Test_Follow/Config/View/SnapViewsDefault.lua @@ -0,0 +1,1698 @@ +--reformatted per-unit data to be mod system friendly +--this file is no longer should be edited for adding new flyable aircraft , DCS automatically check core database for this data(i.e. where you define your aircraft in aircraft table just define ViewSettings and SnapViews tables) +-- result of ingame editing is saved to Saved Games//DCS/Config/View/SnapViews.lua +SnapViews = {} +SnapViews["A-10A"] = { +[1] = {-- player slot 1 + [1] = { + viewAngle = 65.000000,--FOV + hAngle = 0.000000, + vAngle = -26.000000, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [2] = { + viewAngle = 49.626770,--FOV + hAngle = 0.000000, + vAngle = -90.631294, + x_trans = 0.180499, + y_trans = -0.137064, + z_trans = -0.250000, + rollAngle = 0.000000, + }, + [3] = { + viewAngle = 30.395041,--FOV + hAngle = 0.000000, + vAngle = -94.329208, + x_trans = 0.372718, + y_trans = -0.054055, + z_trans = 0.250000, + rollAngle = 0.000000, + }, + [4] = { + viewAngle = 55.238567,--FOV + hAngle = 0.000000, + vAngle = -90.631294, + x_trans = 0.158523, + y_trans = -0.137064, + z_trans = 0.250000, + rollAngle = 0.000000, + }, + [5] = { + viewAngle = 35.000000,--FOV + hAngle = 0.000000, + vAngle = -10.651850, + x_trans = 0.327622, + y_trans = -0.278207, + z_trans = -0.244799, + rollAngle = 0.000000, + }, + [6] = { + viewAngle = 34.340549,--FOV + hAngle = 0.000000, + vAngle = -9.500000, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [7] = { + viewAngle = 35.000000,--FOV + hAngle = 0.000000, + vAngle = -10.651850, + x_trans = 0.327622, + y_trans = -0.278207, + z_trans = 0.244799, + rollAngle = 0.000000, + }, + [8] = { + viewAngle = 68.628296,--FOV + hAngle = 68.292320, + vAngle = -11.477349, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [9] = { + viewAngle = 68.628296,--FOV + hAngle = 0.000000, + vAngle = 30.227919, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [10] = { + viewAngle = 68.628296,--FOV + hAngle = -67.172974, + vAngle = -11.477349, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [11] = {--look at left mirror + viewAngle = 70.000000,--FOV + hAngle = 20.000000, + vAngle = 8.000000, + x_trans = 0.360000, + y_trans = -0.041337, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [12] = {--look at right mirror + viewAngle = 70.000000,--FOV + hAngle = -20.000000, + vAngle = 8.000000, + x_trans = 0.360000, + y_trans = -0.041337, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [13] = {--default view + viewAngle = 75.000000,--FOV + hAngle = 0.000000, + vAngle = -23.000000, + x_trans = 0.360000, + y_trans = -0.041337, + z_trans = 0.000000, + rollAngle = 0.000000, + }, +}, +} +SnapViews["A-10C"] = { +[1] = {-- player slot 1 + [1] = { + viewAngle = 65.000000,--FOV + hAngle = 0.000000, + vAngle = -26.000000, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [2] = { + viewAngle = 49.626770,--FOV + hAngle = 0.000000, + vAngle = -90.631294, + x_trans = 0.180499, + y_trans = -0.137064, + z_trans = -0.250000, + rollAngle = 0.000000, + }, + [3] = { + viewAngle = 30.395041,--FOV + hAngle = 0.000000, + vAngle = -94.329208, + x_trans = 0.372718, + y_trans = -0.054055, + z_trans = 0.250000, + rollAngle = 0.000000, + }, + [4] = { + viewAngle = 55.238567,--FOV + hAngle = 0.000000, + vAngle = -90.631294, + x_trans = 0.158523, + y_trans = -0.137064, + z_trans = 0.250000, + rollAngle = 0.000000, + }, + [5] = { + viewAngle = 35.000000,--FOV + hAngle = 0.000000, + vAngle = -10.651850, + x_trans = 0.327622, + y_trans = -0.278207, + z_trans = -0.244799, + rollAngle = 0.000000, + }, + [6] = { + viewAngle = 34.340549,--FOV + hAngle = 0.000000, + vAngle = -9.500000, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [7] = { + viewAngle = 35.000000,--FOV + hAngle = 0.000000, + vAngle = -10.651850, + x_trans = 0.327622, + y_trans = -0.278207, + z_trans = 0.244799, + rollAngle = 0.000000, + }, + [8] = { + viewAngle = 68.628296,--FOV + hAngle = 68.292320, + vAngle = -11.477349, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [9] = { + viewAngle = 68.628296,--FOV + hAngle = 0.000000, + vAngle = 30.227919, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [10] = { + viewAngle = 68.628296,--FOV + hAngle = -67.172974, + vAngle = -11.477349, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [11] = {--look at left mirror + viewAngle = 70.000000,--FOV + hAngle = 20.000000, + vAngle = 8.000000, + x_trans = 0.360000, + y_trans = -0.041337, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [12] = {--look at right mirror + viewAngle = 70.000000,--FOV + hAngle = -20.000000, + vAngle = 8.000000, + x_trans = 0.360000, + y_trans = -0.041337, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [13] = {--default view + viewAngle = 75.000000,--FOV + hAngle = 0.000000, + vAngle = -23.000000, + x_trans = 0.360000, + y_trans = -0.041337, + z_trans = 0.000000, + rollAngle = 0.000000, + }, +}, +} +SnapViews["F-15C"] = { +[1] = {-- player slot 1 + [1] = { + viewAngle = 70.611748,--FOV + hAngle = -1.240272, + vAngle = -33.850250, + x_trans = 0.264295, + y_trans = -0.064373, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [2] = { + viewAngle = 32.704346,--FOV + hAngle = 25.696522, + vAngle = -34.778103, + x_trans = 0.264295, + y_trans = -0.064373, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [3] = { + viewAngle = 32.704346,--FOV + hAngle = 0.000000, + vAngle = -47.845268, + x_trans = 0.264295, + y_trans = -0.064373, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [4] = { + viewAngle = 36.106045,--FOV + hAngle = -28.878576, + vAngle = -36.780628, + x_trans = 0.264295, + y_trans = -0.064373, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [5] = { + viewAngle = 88.727844,--FOV + hAngle = 128.508865, + vAngle = 13.131046, + x_trans = 0.264295, + y_trans = -0.064373, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [6] = { + viewAngle = 41.928593,--FOV + hAngle = 0.000000, + vAngle = -4.630446, + x_trans = 0.264295, + y_trans = -0.064373, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [7] = { + viewAngle = 88.727844,--FOV + hAngle = -128.508865, + vAngle = 13.131046, + x_trans = 0.264295, + y_trans = -0.064373, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [8] = { + viewAngle = 88.727844,--FOV + hAngle = 81.648369, + vAngle = -9.500000, + x_trans = 0.264295, + y_trans = -0.064373, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [9] = { + viewAngle = 88.727844,--FOV + hAngle = 0.000000, + vAngle = 34.180634, + x_trans = 0.264295, + y_trans = -0.064373, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [10] = { + viewAngle = 88.727844,--FOV + hAngle = -80.997551, + vAngle = -9.500000, + x_trans = 0.264295, + y_trans = -0.064373, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [11] = {--look at left mirror + viewAngle = 56.032040,--FOV + hAngle = 14.803060, + vAngle = 3.332499, + x_trans = 0.264295, + y_trans = -0.064373, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [12] = {--look at right mirror + viewAngle = 56.032040,--FOV + hAngle = -14.414484, + vAngle = 3.332499, + x_trans = 0.264295, + y_trans = -0.064373, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [13] = {--default view + viewAngle = 88.727844,--FOV + hAngle = 0.000000, + vAngle = -9.678451, + x_trans = 0.264295, + y_trans = -0.064373, + z_trans = 0.000000, + rollAngle = 0.000000, + }, +}, +} +SnapViews["Ka-50"] = { +[1] = {-- player slot 1 + [1] = { + viewAngle = 67.452896,--FOV + hAngle = 0.000000, + vAngle = -40.067383, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [2] = { + viewAngle = 37.846794,--FOV + hAngle = 51.644135, + vAngle = -51.870411, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [3] = { + viewAngle = 36.178646,--FOV + hAngle = -1.912186, + vAngle = -34.446247, + x_trans = 0.000000, + y_trans = -0.025421, + z_trans = 0.073226, + rollAngle = 0.000000, + }, + [4] = { + viewAngle = 73.605141,--FOV + hAngle = -90.361992, + vAngle = -44.103138, + x_trans = 0.169696, + y_trans = -0.073508, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [5] = { + viewAngle = 91.348198,--FOV + hAngle = 109.752129, + vAngle = 1.484382, + x_trans = 0.190306, + y_trans = 0.044778, + z_trans = -0.150335, + rollAngle = 0.000000, + }, + [6] = { + viewAngle = 42.512844,--FOV + hAngle = 0.000000, + vAngle = -4.478010, + x_trans = 0.154018, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [7] = { + viewAngle = 91.348198,--FOV + hAngle = -108.852020, + vAngle = 0.085984, + x_trans = 0.190306, + y_trans = 0.044778, + z_trans = 0.139404, + rollAngle = 0.000000, + }, + [8] = { + viewAngle = 89.777542,--FOV + hAngle = 16.411518, + vAngle = -27.209915, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = -0.218292, + rollAngle = 0.000000, + }, + [9] = { + viewAngle = 88.727844,--FOV + hAngle = 0.000000, + vAngle = 34.042202, + x_trans = 0.142145, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [10] = { + viewAngle = 59.208893,--FOV + hAngle = -32.128311, + vAngle = -5.720805, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [11] = {--look at left mirror + viewAngle = 56.032040,--FOV + hAngle = 14.803060, + vAngle = 3.332499, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [12] = {--look at right mirror + viewAngle = 56.032040,--FOV + hAngle = -14.414484, + vAngle = 3.332499, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [13] = {--default view + viewAngle = 89.777542,--FOV + hAngle = 0.000000, + vAngle = -15.592758, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, +}, +} +SnapViews["MiG-29A"] = { +[1] = {-- player slot 1 + [1] = { + viewAngle = 76.124840,--FOV + hAngle = -2.623254, + vAngle = -26.566959, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [2] = { + viewAngle = 34.911949,--FOV + hAngle = 24.601770, + vAngle = -32.350807, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [3] = { + viewAngle = 26.184198,--FOV + hAngle = 12.026249, + vAngle = -40.075508, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [4] = { + viewAngle = 39.454399,--FOV + hAngle = -26.664328, + vAngle = -32.355324, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [5] = { + viewAngle = 81.240005,--FOV + hAngle = 131.503998, + vAngle = 10.804660, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [6] = { + viewAngle = 44.201855,--FOV + hAngle = 0.000000, + vAngle = -2.378299, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [7] = { + viewAngle = 81.240005,--FOV + hAngle = -131.503998, + vAngle = 10.804660, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [8] = { + viewAngle = 81.240005,--FOV + hAngle = 76.013145, + vAngle = 2.248441, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [9] = { + viewAngle = 81.240005,--FOV + hAngle = 0.000000, + vAngle = 36.304676, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [10] = { + viewAngle = 81.240005,--FOV + hAngle = -74.774559, + vAngle = 2.248441, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [11] = {--look at left mirror + viewAngle = 68.250000,--FOV + hAngle = 13.070938, + vAngle = 7.522498, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [12] = {--look at right mirror + viewAngle = 68.250000,--FOV + hAngle = -13.070938, + vAngle = 7.522498, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [13] = {--default view + viewAngle = 81.240005,--FOV + hAngle = 0.000000, + vAngle = -9.500000, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, +}, +} +SnapViews["MiG-29G"] = { +[1] = {-- player slot 1 + [1] = { + viewAngle = 76.124840,--FOV + hAngle = -2.623254, + vAngle = -26.566959, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [2] = { + viewAngle = 34.911949,--FOV + hAngle = 24.601770, + vAngle = -32.350807, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [3] = { + viewAngle = 26.184198,--FOV + hAngle = 12.026249, + vAngle = -40.075508, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [4] = { + viewAngle = 39.454399,--FOV + hAngle = -26.664328, + vAngle = -32.355324, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [5] = { + viewAngle = 81.240005,--FOV + hAngle = 131.503998, + vAngle = 10.804660, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [6] = { + viewAngle = 44.201855,--FOV + hAngle = 0.000000, + vAngle = -2.378299, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [7] = { + viewAngle = 81.240005,--FOV + hAngle = -131.503998, + vAngle = 10.804660, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [8] = { + viewAngle = 81.240005,--FOV + hAngle = 76.013145, + vAngle = 2.248441, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [9] = { + viewAngle = 81.240005,--FOV + hAngle = 0.000000, + vAngle = 36.304676, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [10] = { + viewAngle = 81.240005,--FOV + hAngle = -74.774559, + vAngle = 2.248441, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [11] = {--look at left mirror + viewAngle = 68.250000,--FOV + hAngle = 13.070938, + vAngle = 7.522498, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [12] = {--look at right mirror + viewAngle = 68.250000,--FOV + hAngle = -13.070938, + vAngle = 7.522498, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [13] = {--default view + viewAngle = 81.240005,--FOV + hAngle = 0.000000, + vAngle = -9.500000, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, +}, +} +SnapViews["MiG-29K"] = { +[1] = {-- player slot 1 + [1] = { + viewAngle = 65.000000,--FOV + hAngle = 0.000000, + vAngle = -26.000000, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [2] = { + viewAngle = 30.000000,--FOV + hAngle = 20.000000, + vAngle = -43.000000, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [3] = { + viewAngle = 30.000000,--FOV + hAngle = 0.000000, + vAngle = -43.000000, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [4] = { + viewAngle = 30.000000,--FOV + hAngle = -20.000000, + vAngle = -43.000000, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [5] = { + viewAngle = 30.000000,--FOV + hAngle = 20.000000, + vAngle = -23.000000, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [6] = { + viewAngle = 30.000000,--FOV + hAngle = 0.000000, + vAngle = -23.000000, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [7] = { + viewAngle = 30.000000,--FOV + hAngle = -20.000000, + vAngle = -23.000000, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [8] = { + viewAngle = 30.000000,--FOV + hAngle = 20.000000, + vAngle = 2.000000, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [9] = { + viewAngle = 30.000000,--FOV + hAngle = 0.000000, + vAngle = 2.000000, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [10] = { + viewAngle = 30.000000,--FOV + hAngle = -20.000000, + vAngle = 2.000000, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [11] = {--look at left mirror + viewAngle = 68.250000,--FOV + hAngle = 13.070938, + vAngle = 7.522498, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [12] = {--look at right mirror + viewAngle = 68.250000,--FOV + hAngle = -13.070938, + vAngle = 7.522498, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [13] = {--default view + viewAngle = 60.000000,--FOV + hAngle = 0.000000, + vAngle = -9.500000, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, +}, +} +SnapViews["MiG-29S"] = { +[1] = {-- player slot 1 + [1] = { + viewAngle = 76.124840,--FOV + hAngle = -2.623254, + vAngle = -26.566959, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [2] = { + viewAngle = 34.911949,--FOV + hAngle = 24.601770, + vAngle = -32.350807, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [3] = { + viewAngle = 26.184198,--FOV + hAngle = 12.026249, + vAngle = -40.075508, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [4] = { + viewAngle = 39.454399,--FOV + hAngle = -26.664328, + vAngle = -32.355324, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [5] = { + viewAngle = 81.240005,--FOV + hAngle = 131.503998, + vAngle = 10.804660, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [6] = { + viewAngle = 44.201855,--FOV + hAngle = 0.000000, + vAngle = -2.378299, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [7] = { + viewAngle = 81.240005,--FOV + hAngle = -131.503998, + vAngle = 10.804660, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [8] = { + viewAngle = 81.240005,--FOV + hAngle = 76.013145, + vAngle = 2.248441, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [9] = { + viewAngle = 81.240005,--FOV + hAngle = 0.000000, + vAngle = 36.304676, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [10] = { + viewAngle = 81.240005,--FOV + hAngle = -74.774559, + vAngle = 2.248441, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [11] = {--look at left mirror + viewAngle = 68.250000,--FOV + hAngle = 13.070938, + vAngle = 7.522498, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [12] = {--look at right mirror + viewAngle = 68.250000,--FOV + hAngle = -13.070938, + vAngle = 7.522498, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [13] = {--default view + viewAngle = 81.240005,--FOV + hAngle = 0.000000, + vAngle = -9.500000, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, +}, +} +SnapViews["P-51D"] = { +[1] = {-- player slot 1 + [1] = { + viewAngle = 80.000000,--FOV + hAngle = 0.000000, + vAngle = -45.000000, + x_trans = 0.120000, + y_trans = 0.059000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [2] = { + viewAngle = 80.000000,--FOV + hAngle = 45.000000, + vAngle = -45.000000, + x_trans = 0.120000, + y_trans = 0.059000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [3] = { + viewAngle = 80.000000,--FOV + hAngle = 0.000000, + vAngle = -75.000000, + x_trans = 0.120000, + y_trans = 0.059000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [4] = { + viewAngle = 80.000000,--FOV + hAngle = -45.000000, + vAngle = -45.000000, + x_trans = 0.120000, + y_trans = 0.059000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [5] = { + viewAngle = 91.040001,--FOV + hAngle = 157.332764, + vAngle = -28.359503, + x_trans = 0.063872, + y_trans = 0.082888, + z_trans = -0.116148, + rollAngle = 0.000000, + }, + [6] = { + viewAngle = 50.000000,--FOV + hAngle = 0.000000, + vAngle = -8.722581, + x_trans = 0.212078, + y_trans = 0.057813, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [7] = { + viewAngle = 80.000000,--FOV + hAngle = -143.000000, + vAngle = 0.000000, + x_trans = 0.350000, + y_trans = 0.059000, + z_trans = 0.100000, + rollAngle = 0.000000, + }, + [8] = { + viewAngle = 80.000000,--FOV + hAngle = 45.000000, + vAngle = -5.000000, + x_trans = 0.120000, + y_trans = 0.059000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [9] = { + viewAngle = 80.000000,--FOV + hAngle = 0.000000, + vAngle = 10.000000, + x_trans = 0.120000, + y_trans = 0.059000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [10] = { + viewAngle = 80.000000,--FOV + hAngle = -45.000000, + vAngle = -5.000000, + x_trans = 0.120000, + y_trans = 0.059000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [11] = {--look at left mirror + viewAngle = 80.000000,--FOV + hAngle = 0.000000, + vAngle = 10.000000, + x_trans = 0.120000, + y_trans = 0.059000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [12] = {--look at right mirror + viewAngle = 80.000000,--FOV + hAngle = -20.000000, + vAngle = 8.000000, + x_trans = 0.120000, + y_trans = 0.059000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [13] = {--default view + viewAngle = 80.000000,--FOV + hAngle = 0.000000, + vAngle = -9.500000, + x_trans = 0.120000, + y_trans = 0.059000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, +}, +} +SnapViews["Su-25"] = { +[1] = {-- player slot 1 + [1] = { + viewAngle = 68.767799,--FOV + hAngle = 1.929517, + vAngle = -30.846605, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [2] = { + viewAngle = 29.223452,--FOV + hAngle = 37.489525, + vAngle = -38.883888, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [3] = { + viewAngle = 40.635601,--FOV + hAngle = -0.438357, + vAngle = -33.138290, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [4] = { + viewAngle = 24.797405,--FOV + hAngle = -34.382549, + vAngle = -34.808853, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [5] = { + viewAngle = 69.302101,--FOV + hAngle = 89.405373, + vAngle = 1.213156, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [6] = { + viewAngle = 29.761202,--FOV + hAngle = 0.000000, + vAngle = -6.880077, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [7] = { + viewAngle = 69.302101,--FOV + hAngle = -89.691940, + vAngle = 4.554290, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [8] = { + viewAngle = 69.302101,--FOV + hAngle = 52.113377, + vAngle = -3.970644, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [9] = { + viewAngle = 72.856201,--FOV + hAngle = 0.000000, + vAngle = 30.866713, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [10] = { + viewAngle = 69.302101,--FOV + hAngle = -50.664936, + vAngle = -3.970644, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [11] = {--look at left mirror + viewAngle = 47.680202,--FOV + hAngle = 43.054649, + vAngle = -7.799250, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [12] = {--look at right mirror + viewAngle = 47.680202,--FOV + hAngle = -41.743240, + vAngle = -7.799250, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [13] = {--default view + viewAngle = 69.302101,--FOV + hAngle = 0.000000, + vAngle = -15.137112, + x_trans = 0.050000, + y_trans = 0.010000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, +}, +} +SnapViews["Su-25T"] = { +[1] = {-- player slot 1 + [1] = { + viewAngle = 80.663399,--FOV + hAngle = 0.000000, + vAngle = -30.619938, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [2] = { + viewAngle = 39.764698,--FOV + hAngle = 28.661316, + vAngle = -41.406044, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [3] = { + viewAngle = 38.090847,--FOV + hAngle = -24.622110, + vAngle = -45.153934, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [4] = { + viewAngle = 36.062012,--FOV + hAngle = -20.779360, + vAngle = -23.755520, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [5] = { + viewAngle = 80.663399,--FOV + hAngle = 99.816956, + vAngle = 8.032285, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [6] = { + viewAngle = 58.718098,--FOV + hAngle = 0.000000, + vAngle = -5.000803, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [7] = { + viewAngle = 80.663399,--FOV + hAngle = -99.999687, + vAngle = 8.032285, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [8] = { + viewAngle = 80.663399,--FOV + hAngle = 58.382488, + vAngle = -6.648195, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [9] = { + viewAngle = 94.037704,--FOV + hAngle = 0.000000, + vAngle = 41.421227, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [10] = { + viewAngle = 80.663399,--FOV + hAngle = -57.531212, + vAngle = -6.648195, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [11] = {--look at left mirror + viewAngle = 60.203396,--FOV + hAngle = 55.124939, + vAngle = -8.400513, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [12] = {--look at right mirror + viewAngle = 60.203396,--FOV + hAngle = -52.633553, + vAngle = -8.400513, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [13] = {--default view + viewAngle = 90.000000,--FOV + hAngle = 0.000000, + vAngle = -18.382137, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, +}, +} +SnapViews["Su-25TM"] = { +[1] = {-- player slot 1 + [1] = { + viewAngle = 80.663399,--FOV + hAngle = 0.000000, + vAngle = -30.619938, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [2] = { + viewAngle = 39.764698,--FOV + hAngle = 28.661316, + vAngle = -41.406044, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [3] = { + viewAngle = 38.090847,--FOV + hAngle = -24.622110, + vAngle = -45.153934, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [4] = { + viewAngle = 33.645596,--FOV + hAngle = -36.653450, + vAngle = -23.703861, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [5] = { + viewAngle = 80.663399,--FOV + hAngle = 99.816956, + vAngle = 8.032285, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [6] = { + viewAngle = 58.718098,--FOV + hAngle = 0.000000, + vAngle = -5.000803, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [7] = { + viewAngle = 80.663399,--FOV + hAngle = -99.999687, + vAngle = 8.032285, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [8] = { + viewAngle = 80.663399,--FOV + hAngle = 58.382488, + vAngle = -6.648195, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [9] = { + viewAngle = 94.037704,--FOV + hAngle = 0.000000, + vAngle = 41.421227, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [10] = { + viewAngle = 80.663399,--FOV + hAngle = -57.531212, + vAngle = -6.648195, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [11] = {--look at left mirror + viewAngle = 60.203396,--FOV + hAngle = 55.124939, + vAngle = -8.400513, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [12] = {--look at right mirror + viewAngle = 60.203396,--FOV + hAngle = -52.633553, + vAngle = -8.400513, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [13] = {--default view + viewAngle = 90.000000,--FOV + hAngle = 0.000000, + vAngle = -18.382137, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, +}, +} +SnapViews["Su-27"] = { +[1] = {-- player slot 1 + [1] = { + viewAngle = 71.824692,--FOV + hAngle = 0.000000, + vAngle = -32.458889, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [2] = { + viewAngle = 33.361835,--FOV + hAngle = 41.045925, + vAngle = -40.805656, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [3] = { + viewAngle = 30.427544,--FOV + hAngle = 0.000000, + vAngle = -41.808968, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [4] = { + viewAngle = 34.392349,--FOV + hAngle = -32.597401, + vAngle = -35.293747, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [5] = { + viewAngle = 87.468338,--FOV + hAngle = 129.012665, + vAngle = 14.547977, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [6] = { + viewAngle = 43.977936,--FOV + hAngle = 0.000000, + vAngle = -4.951577, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [7] = { + viewAngle = 87.468338,--FOV + hAngle = -129.012665, + vAngle = 14.491872, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [8] = { + viewAngle = 87.468338,--FOV + hAngle = 82.862923, + vAngle = -9.500000, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [9] = { + viewAngle = 87.468338,--FOV + hAngle = 0.000000, + vAngle = 38.979362, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [10] = { + viewAngle = 87.468338,--FOV + hAngle = -82.461266, + vAngle = -12.843998, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [11] = {--look at left mirror + viewAngle = 68.786629,--FOV + hAngle = 15.618313, + vAngle = 7.522498, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [12] = {--look at right mirror + viewAngle = 69.165199,--FOV + hAngle = -15.683434, + vAngle = 8.549150, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [13] = {--default view + viewAngle = 87.468338,--FOV + hAngle = 0.000000, + vAngle = -9.500000, + x_trans = 0.113927, + y_trans = -0.004946, + z_trans = 0.000000, + rollAngle = 0.000000, + }, +}, +} +SnapViews["Su-33"] = { +[1] = {-- player slot 1 + [1] = { + viewAngle = 71.824692,--FOV + hAngle = 0.000000, + vAngle = -32.458889, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [2] = { + viewAngle = 33.361835,--FOV + hAngle = 41.045925, + vAngle = -40.805656, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [3] = { + viewAngle = 30.427544,--FOV + hAngle = 0.000000, + vAngle = -41.808968, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [4] = { + viewAngle = 34.392349,--FOV + hAngle = -32.597401, + vAngle = -35.293747, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [5] = { + viewAngle = 87.468338,--FOV + hAngle = 129.012665, + vAngle = 14.547977, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [6] = { + viewAngle = 43.977936,--FOV + hAngle = 0.000000, + vAngle = -4.951577, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [7] = { + viewAngle = 87.468338,--FOV + hAngle = -129.012665, + vAngle = 14.491872, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [8] = { + viewAngle = 87.468338,--FOV + hAngle = 82.862923, + vAngle = -9.500000, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [9] = { + viewAngle = 87.468338,--FOV + hAngle = 0.000000, + vAngle = 38.979362, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [10] = { + viewAngle = 87.468338,--FOV + hAngle = -82.461266, + vAngle = -12.843998, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [11] = {--look at left mirror + viewAngle = 68.786629,--FOV + hAngle = 15.618313, + vAngle = 7.522498, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [12] = {--look at right mirror + viewAngle = 69.165199,--FOV + hAngle = -15.683434, + vAngle = 8.549150, + x_trans = 0.000000, + y_trans = 0.000000, + z_trans = 0.000000, + rollAngle = 0.000000, + }, + [13] = {--default view + viewAngle = 87.468338,--FOV + hAngle = 0.000000, + vAngle = -9.500000, + x_trans = 0.113927, + y_trans = -0.004946, + z_trans = 0.000000, + rollAngle = 0.000000, + }, +}, +} \ No newline at end of file diff --git a/Test Missions/miz/MOOSE_Escort_Test_Follow/Config/View/View.lua b/Test Missions/miz/MOOSE_Escort_Test_Follow/Config/View/View.lua new file mode 100644 index 000000000..9baf3b7df --- /dev/null +++ b/Test Missions/miz/MOOSE_Escort_Test_Follow/Config/View/View.lua @@ -0,0 +1,128 @@ +-- View scripts +-- Copyright (C) 2004, Eagle Dynamics. + +CockpitMouse = true --false +CockpitMouseSpeedSlow = 1.0 +CockpitMouseSpeedNormal = 10.0 +CockpitMouseSpeedFast = 20.0 +CockpitKeyboardAccelerationSlow = 5.0 +CockpitKeyboardAccelerationNormal = 30.0 +CockpitKeyboardAccelerationFast = 80.0 +CockpitKeyboardZoomAcceleration = 300.0 +DisableSnapViewsSaving = false +UseDefaultSnapViews = true +CockpitPanStepHor = 45.0 +CockpitPanStepVert = 30.0 +CockpitNyMove = true + +CockpitHAngleAccelerateTimeMax = 0.15 +CockpitVAngleAccelerateTimeMax = 0.15 +CockpitZoomAccelerateTimeMax = 0.2 + +function NaturalHeadMoving(tang, roll, omz) + local r = roll + if r > 90.0 then + r = 180.0 - r + elseif roll < -90.0 then + r = -180.0 - r + end + local hAngle = -0.25 * r + local vAngle = math.min(math.max(0.0, 0.4 * tang + 45.0 * omz), 90.0) + return hAngle, vAngle +end + +ExternalMouse = true +ExternalMouseSpeedSlow = 1.0 +ExternalMouseSpeedNormal = 5.0 +ExternalMouseSpeedFast = 20.0 +ExternalViewAngleMin = 3.0 +ExternalViewAngleMax = 170.0 +ExternalViewAngleDefault = 60.0 +ExternalKeyboardZoomAcceleration = 30.0 +ExternalKeyboardZoomAccelerateTimeMax = 1.0 +ExplosionExpoTime = 4.0 +ExternalKeyboardAccelerationSlow = 1.0 +ExternalKeyboardAccelerationNormal = 10.0 +ExternalKeyboardAccelerationFast = 30.0 +ExternalHAngleAccelerateTimeMax = 3.0 +ExternalVAngleAccelerateTimeMax = 3.0 +ExternalDistAccelerateTimeMax = 3.0 +ExternalHAngleLocalAccelerateTimeMax = 3.0 +ExternalVAngleLocalAccelerateTimeMax = 3.0 +ExternalAngleNormalDiscreteStep = 15.0/ExternalKeyboardAccelerationNormal -- When 'S' is pressed only +ChaseCameraNyMove = true +FreeCameraAngleIncrement = 3.0 +FreeCameraDistanceIncrement = 200.0 +FreeCameraLeftRightIncrement = 2.0 +FreeCameraAltitudeIncrement = 2.0 +FreeCameraScalarSpeedAcceleration = 0.1 +xMinMap = -300000 +xMaxMap = 500000 +yMinMap = -400000 +yMaxMap = 200000 +dxMap = 150000 +dyMap = 100000 + +head_roll_shaking = true +head_roll_shaking_max = 30.0 +head_roll_shaking_compensation_gain = 0.3 + +-- CameraJiggle() and CameraFloat() functions make camera position +-- dependent on FPS so be careful in using the Shift-J command with tracks, please. +-- uncomment to use custom jiggle functions +--[[ +function CameraJiggle(t,rnd1,rnd2,rnd3) + local rotX, rotY, rotZ + rotX = 0.05 * rnd1 * math.sin(37.0 * (t - 0.0)) + rotY = 0.05 * rnd2 * math.sin(41.0 * (t - 1.0)) + rotZ = 0.05 * rnd3 * math.sin(53.0 * (t - 2.0)) + return rotX, rotY, rotZ +end + +function CameraFloat(t) + local dX, dY, dZ + dX = 0.61 * math.sin(0.7 * t) + 0.047 * math.sin(1.6 * t); + dY = 0.43 * math.sin(0.6 * t) + 0.067 * math.sin(1.7 * t); + dZ = 0.53 * math.sin(1.0 * t) + 0.083 * math.sin(1.9 * t); + return dX, dY, dZ +end +--]] +--Debug keys + +DEBUG_TEXT = 1 +DEBUG_GEOMETRY = 2 + +debug_keys = { + [DEBUG_TEXT] = 1, + [DEBUG_GEOMETRY] = 1 +} + +function onDebugCommand(command) + if command == 10000 then + if debug_keys[DEBUG_TEXT] ~= 0 or debug_keys[DEBUG_GEOMETRY] ~= 0 then + debug_keys[DEBUG_GEOMETRY] = 0 + debug_keys[DEBUG_TEXT] = 0 + else + debug_keys[DEBUG_GEOMETRY] = 1 + debug_keys[DEBUG_TEXT] = 1 + end + elseif command == 10001 then + if debug_keys[DEBUG_TEXT] ~= 0 then + debug_keys[DEBUG_TEXT] = 0 + else + debug_keys[DEBUG_TEXT] = 1 + end + elseif command == 10002 then + if debug_keys[DEBUG_GEOMETRY] ~= 0 then + debug_keys[DEBUG_GEOMETRY] = 0 + else + debug_keys[DEBUG_GEOMETRY] = 1 + end + end +end + +-- gain values for TrackIR , to unify responce on diffrent types of aircraft +TrackIR_gain_x = -0.6 +TrackIR_gain_y = 0.3 +TrackIR_gain_z = -0.25 +TrackIR_gain_roll = -90 \ No newline at end of file diff --git a/Test Missions/miz/MOOSE_Escort_Test_Follow/Mods/aircraft/Ka-50/Cockpit/Scripts/ARK/ARK.lua b/Test Missions/miz/MOOSE_Escort_Test_Follow/Mods/aircraft/Ka-50/Cockpit/Scripts/ARK/ARK.lua new file mode 100644 index 000000000..61aa112a2 --- /dev/null +++ b/Test Missions/miz/MOOSE_Escort_Test_Follow/Mods/aircraft/Ka-50/Cockpit/Scripts/ARK/ARK.lua @@ -0,0 +1,53 @@ +mode = ADF_ADF +receiver_mode = ADF_RECEIVER_TLF +homer_selection_method = ADF_HOMER_SELECTION_AUTO +channel = 1 +volume = 0.5 + +local theatre = theatre or "none" +if theatre == 'Caucasus' then + +channels = { + [1] = runway_homer_pair(Airdrome[Krasnodar],nil,localizedAirdromeName(terrainAirdromes[Krasnodar])), + [2] = runway_homer_pair(Airdrome[Maykop] ,nil,localizedAirdromeName(terrainAirdromes[Maykop])), + [3] = runway_homer_pair(Airdrome[Krymsk] ,nil,localizedAirdromeName(terrainAirdromes[Krymsk])), + [4] = runway_homer_pair(Airdrome[Anapa] ,nil,localizedAirdromeName(terrainAirdromes[Anapa])), + [5] = runway_homer_pair(Airdrome[Mozdok] ,nil,localizedAirdromeName(terrainAirdromes[Mozdok])), + [6] = runway_homer_pair(Airdrome[Nalchick] ,nil,localizedAirdromeName(terrainAirdromes[Nalchick])), + [7] = runway_homer_pair(Airdrome[MinVody] ,nil,localizedAirdromeName(terrainAirdromes[MinVody])), + [8] = { + [ADF_HOMER_FAR] = NDB(beacons["NDB_KISLOVODSK"]), + [ADF_HOMER_NEAR] = NDB(beacons["NDB_PEREDOVAIA"]) + } +} + +elseif theatre == 'Nevada' then + + local beacons_by_name = {} + + for i,o in pairs(beacons) do + if o.name == '' then + beacons_by_name[o.beaconId] = o + else + beacons_by_name[o.name] = o + end + end + + local nevada_pair = function (id_1,id_2) return { + [ADF_HOMER_FAR] = NDB(beacons_by_name[id_1]), + [ADF_HOMER_NEAR] = NDB(beacons_by_name[id_2]) + } + end + + channels = { + nevada_pair('IndianSprings','Groom_Lake'), + nevada_pair('LasVegas','Nellis'), + nevada_pair("Milford","GOFFS"), + nevada_pair("Tonopah","Mina"), + nevada_pair("WilsonCreek","CedarCity"), + nevada_pair("BryceCanyon","MormonMesa"), + nevada_pair("Beatty","Bishop"), + nevada_pair("Coaldale","PeachSprings"), + nevada_pair("BoulderCity","Mercury"), +} +end \ No newline at end of file diff --git a/Test Missions/miz/MOOSE_Escort_Test_Follow/Scripts/World/GPS_GNSS.lua b/Test Missions/miz/MOOSE_Escort_Test_Follow/Scripts/World/GPS_GNSS.lua new file mode 100644 index 000000000..2cb4a8e8d --- /dev/null +++ b/Test Missions/miz/MOOSE_Escort_Test_Follow/Scripts/World/GPS_GNSS.lua @@ -0,0 +1,880 @@ +SAT_SYS_GLONASS = 0 +SAT_SYS_GPS = 1 + +almanac = {} +--GPS +almanac[0] = {} +almanac[0]["System"] = SAT_SYS_GPS +almanac[0]["Number"] = 1 +almanac[0]["Orbital"] = "F" +almanac[0]["Eccentricity"] = 6.294000e-003 +almanac[0]["Time_of_Applicability"] = 5.898240e+005 +almanac[0]["Orbital_Inclination"] = 9.885676e-001 +almanac[0]["Rate_of_Right_Ascen"] = -7.862702e-009 +almanac[0]["SQRT_A"] = 5.153700e+003 +almanac[0]["Right_Ascen_at_Week"] = 8.096750e-001 +almanac[0]["Argument_of_Perigee"] = -1.777773e+000 +almanac[0]["Mean_Anom"] = -5.315745e-001 +almanac[0]["week"] = 1390 + +almanac[1] = {} +almanac[1]["System"] = SAT_SYS_GPS +almanac[1]["Number"] = 2 +almanac[1]["Orbital"] = "C" +almanac[1]["Eccentricity"] = 8.794000e-003 +almanac[1]["Time_of_Applicability"] = 5.898240e+005 +almanac[1]["Orbital_Inclination"] = 9.487811e-001 +almanac[1]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[1]["SQRT_A"] = 5.153700e+003 +almanac[1]["Right_Ascen_at_Week"] = -1.329172e+000 +almanac[1]["Argument_of_Perigee"] = 2.138637e+000 +almanac[1]["Mean_Anom"] = 7.311702e-001 +almanac[1]["week"] = 1390 + +almanac[2] = {} +almanac[2]["System"] = SAT_SYS_GPS +almanac[2]["Number"] = 3 +almanac[2]["Orbital"] = "F" +almanac[2]["Eccentricity"] = 8.424000e-003 +almanac[2]["Time_of_Applicability"] = 5.898240e+005 +almanac[2]["Orbital_Inclination"] = 9.262804e-001 +almanac[2]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[2]["SQRT_A"] = 5.153600e+003 +almanac[2]["Right_Ascen_at_Week"] = -2.341514e+000 +almanac[2]["Argument_of_Perigee"] = 6.749357e-001 +almanac[2]["Mean_Anom"] = -2.296153e-001 +almanac[2]["week"] = 1389 + +almanac[3] = {} +almanac[3]["System"] = SAT_SYS_GPS +almanac[3]["Number"] = 4 +almanac[3]["Orbital"] = "D" +almanac[3]["Eccentricity"] = 7.413000e-003 +almanac[3]["Time_of_Applicability"] = 5.898240e+005 +almanac[3]["Orbital_Inclination"] = 9.482889e-001 +almanac[3]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[3]["SQRT_A"] = 5.153600e+003 +almanac[3]["Right_Ascen_at_Week"] = -1.309589e+000 +almanac[3]["Argument_of_Perigee"] = 1.623504e-001 +almanac[3]["Mean_Anom"] = -3.022943e+000 +almanac[3]["week"] = 1390 + +almanac[4] = {} +almanac[4]["System"] = SAT_SYS_GPS +almanac[4]["Number"] = 5 +almanac[4]["Orbital"] = "B" +almanac[4]["Eccentricity"] = 7.432000e-003 +almanac[4]["Time_of_Applicability"] = 5.898240e+005 +almanac[4]["Orbital_Inclination"] = 9.387437e-001 +almanac[4]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[4]["SQRT_A"] = 5.153700e+003 +almanac[4]["Right_Ascen_at_Week"] = 2.779487e+000 +almanac[4]["Argument_of_Perigee"] = 1.099033e+000 +almanac[4]["Mean_Anom"] = 2.970984e+000 +almanac[4]["week"] = 1390 + +almanac[5] = {} +almanac[5]["System"] = SAT_SYS_GPS +almanac[5]["Number"] = 6 +almanac[5]["Orbital"] = "C" +almanac[5]["Eccentricity"] = 6.020000e-003 +almanac[5]["Time_of_Applicability"] = 5.898240e+005 +almanac[5]["Orbital_Inclination"] = 9.337591e-001 +almanac[5]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[5]["SQRT_A"] = 5.153600e+003 +almanac[5]["Right_Ascen_at_Week"] = -2.407627e+000 +almanac[5]["Argument_of_Perigee"] = -1.788263e+000 +almanac[5]["Mean_Anom"] = -2.149877e+000 +almanac[5]["week"] = 1390 + +almanac[6] = {} +almanac[6]["System"] = SAT_SYS_GPS +almanac[6]["Number"] = 7 +almanac[6]["Orbital"] = "C" +almanac[6]["Eccentricity"] = 1.052400e-002 +almanac[6]["Time_of_Applicability"] = 5.898240e+005 +almanac[6]["Orbital_Inclination"] = 9.353229e-001 +almanac[6]["Rate_of_Right_Ascen"] = -8.080868e-009 +almanac[6]["SQRT_A"] = 5.153700e+003 +almanac[6]["Right_Ascen_at_Week"] = -2.433580e+000 +almanac[6]["Argument_of_Perigee"] = -1.767301e+000 +almanac[6]["Mean_Anom"] = -3.141503e+000 +almanac[6]["week"] = 1390 + +almanac[7] = {} +almanac[7]["System"] = SAT_SYS_GPS +almanac[7]["Number"] = 8 +almanac[7]["Orbital"] = "A" +almanac[7]["Eccentricity"] = 9.822000e-003 +almanac[7]["Time_of_Applicability"] = 5.898240e+005 +almanac[7]["Orbital_Inclination"] = 9.741390e-001 +almanac[7]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[7]["SQRT_A"] = 5.153600e+003 +almanac[7]["Right_Ascen_at_Week"] = 1.857849e+000 +almanac[7]["Argument_of_Perigee"] = 2.674034e+000 +almanac[7]["Mean_Anom"] = -2.009745e+000 +almanac[7]["week"] = 1390 + +almanac[8] = {} +almanac[8]["System"] = SAT_SYS_GPS +almanac[8]["Number"] = 9 +almanac[8]["Orbital"] = "A" +almanac[8]["Eccentricity"] = 1.839300e-002 +almanac[8]["Time_of_Applicability"] = 5.898240e+005 +almanac[8]["Orbital_Inclination"] = 9.617541e-001 +almanac[8]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[8]["SQRT_A"] = 5.153600e+003 +almanac[8]["Right_Ascen_at_Week"] = 1.777005e+000 +almanac[8]["Argument_of_Perigee"] = 1.274962e+000 +almanac[8]["Mean_Anom"] = -2.349578e+000 +almanac[8]["week"] = 1390 + +almanac[9] = {} +almanac[9]["System"] = SAT_SYS_GPS +almanac[9]["Number"] = 10 +almanac[9]["Orbital"] = "E" +almanac[9]["Eccentricity"] = 7.061000e-003 +almanac[9]["Time_of_Applicability"] = 5.898240e+005 +almanac[9]["Orbital_Inclination"] = 9.728876e-001 +almanac[9]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[9]["SQRT_A"] = 5.153600e+003 +almanac[9]["Right_Ascen_at_Week"] = -2.563014e-001 +almanac[9]["Argument_of_Perigee"] = 4.377980e-001 +almanac[9]["Mean_Anom"] = 1.210716e+000 +almanac[9]["week"] = 1390 + +almanac[10] = {} +almanac[10]["System"] = SAT_SYS_GPS +almanac[10]["Number"] = 11 +almanac[10]["Orbital"] = "D" +almanac[10]["Eccentricity"] = 5.744000e-003 +almanac[10]["Time_of_Applicability"] = 5.898240e+005 +almanac[10]["Orbital_Inclination"] = 8.959309e-001 +almanac[10]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[10]["SQRT_A"] = 5.153600e+003 +almanac[10]["Right_Ascen_at_Week"] = -1.478816e+000 +almanac[10]["Argument_of_Perigee"] = 3.750011e-001 +almanac[10]["Mean_Anom"] = -1.522048e+000 +almanac[10]["week"] = 1390 + +almanac[11] = {} +almanac[11]["System"] = SAT_SYS_GPS +almanac[11]["Number"] = 13 +almanac[11]["Orbital"] = "F" +almanac[11]["Eccentricity"] = 3.088000e-003 +almanac[11]["Time_of_Applicability"] = 5.898240e+005 +almanac[11]["Orbital_Inclination"] = 9.927564e-001 +almanac[11]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[11]["SQRT_A"] = 5.153700e+003 +almanac[11]["Right_Ascen_at_Week"] = 7.956600e-001 +almanac[11]["Argument_of_Perigee"] = 1.279395e+000 +almanac[11]["Mean_Anom"] = 1.004349e+000 +almanac[11]["week"] = 1390 + +almanac[12] = {} +almanac[12]["System"] = SAT_SYS_GPS +almanac[12]["Number"] = 14 +almanac[12]["Orbital"] = "F" +almanac[12]["Eccentricity"] = 2.591000e-003 +almanac[12]["Time_of_Applicability"] = 5.898240e+005 +almanac[12]["Orbital_Inclination"] = 9.868729e-001 +almanac[12]["Rate_of_Right_Ascen"] = -7.885391e-009 +almanac[12]["SQRT_A"] = 5.153600e+003 +almanac[12]["Right_Ascen_at_Week"] = 7.819592e-001 +almanac[12]["Argument_of_Perigee"] = -2.158621e+000 +almanac[12]["Mean_Anom"] = 5.412611e-001 +almanac[12]["week"] = 1390 + +almanac[13] = {} +almanac[13]["System"] = SAT_SYS_GPS +almanac[13]["Number"] = 15 +almanac[13]["Orbital"] = "D" +almanac[13]["Eccentricity"] = 9.828000e-003 +almanac[13]["Time_of_Applicability"] = 3.194880e+005 +almanac[13]["Orbital_Inclination"] = 9.554204e-001 +almanac[13]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[13]["SQRT_A"] = 5.153600e+003 +almanac[13]["Right_Ascen_at_Week"] = -1.123869e+000 +almanac[13]["Argument_of_Perigee"] = 2.690266e+000 +almanac[13]["Mean_Anom"] = 2.220476e+000 +almanac[13]["week"] = 1389 + +almanac[14] = {} +almanac[14]["System"] = SAT_SYS_GPS +almanac[14]["Number"] = 16 +almanac[14]["Orbital"] = "B" +almanac[14]["Eccentricity"] = 3.494000e-003 +almanac[14]["Time_of_Applicability"] = 5.898240e+005 +almanac[14]["Orbital_Inclination"] = 9.629340e-001 +almanac[14]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[14]["SQRT_A"] = 5.153700e+003 +almanac[14]["Right_Ascen_at_Week"] = 2.873124e+000 +almanac[14]["Argument_of_Perigee"] = -7.819243e-001 +almanac[14]["Mean_Anom"] = 2.623629e+000 +almanac[14]["week"] = 1390 + +almanac[15] = {} +almanac[15]["System"] = SAT_SYS_GPS +almanac[15]["Number"] = 17 +almanac[15]["Orbital"] = "C" +almanac[15]["Eccentricity"] = 2.141000e-003 +almanac[15]["Time_of_Applicability"] = 5.898240e+005 +almanac[15]["Orbital_Inclination"] = 9.601170e-001 +almanac[15]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[15]["SQRT_A"] = 5.153700e+003 +almanac[15]["Right_Ascen_at_Week"] = -2.371499e+000 +almanac[15]["Argument_of_Perigee"] = 3.087694e+000 +almanac[15]["Mean_Anom"] = 1.611217e+000 +almanac[15]["week"] = 1390 + +almanac[16] = {} +almanac[16]["System"] = SAT_SYS_GPS +almanac[16]["Number"] = 18 +almanac[16]["Orbital"] = "E" +almanac[16]["Eccentricity"] = 7.636000e-003 +almanac[16]["Time_of_Applicability"] = 5.898240e+005 +almanac[16]["Orbital_Inclination"] = 9.569597e-001 +almanac[16]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[16]["SQRT_A"] = 5.153700e+003 +almanac[16]["Right_Ascen_at_Week"] = -2.359858e-001 +almanac[16]["Argument_of_Perigee"] = -2.649216e+000 +almanac[16]["Mean_Anom"] = 2.675029e+000 +almanac[16]["week"] = 1390 + +almanac[17] = {} +almanac[17]["System"] = SAT_SYS_GPS +almanac[17]["Number"] = 19 +almanac[17]["Orbital"] = "C" +almanac[17]["Eccentricity"] = 3.602000e-003 +almanac[17]["Time_of_Applicability"] = 5.898240e+005 +almanac[17]["Orbital_Inclination"] = 9.580209e-001 +almanac[17]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[17]["SQRT_A"] = 5.153600e+003 +almanac[17]["Right_Ascen_at_Week"] = -2.312385e+000 +almanac[17]["Argument_of_Perigee"] = -1.161079e+000 +almanac[17]["Mean_Anom"] = 1.310619e+000 +almanac[17]["week"] = 1390 + +almanac[18] = {} +almanac[18]["System"] = SAT_SYS_GPS +almanac[18]["Number"] = 20 +almanac[18]["Orbital"] = "E" +almanac[18]["Eccentricity"] = 2.796000e-003 +almanac[18]["Time_of_Applicability"] = 5.898240e+005 +almanac[18]["Orbital_Inclination"] = 9.564693e-001 +almanac[18]["Rate_of_Right_Ascen"] = -7.908080e-009 +almanac[18]["SQRT_A"] = 5.153600e+003 +almanac[18]["Right_Ascen_at_Week"] = -2.889565e-001 +almanac[18]["Argument_of_Perigee"] = 1.379612e+000 +almanac[18]["Mean_Anom"] = 2.461750e+000 +almanac[18]["week"] = 1390 + +almanac[19] = {} +almanac[19]["System"] = SAT_SYS_GPS +almanac[19]["Number"] = 21 +almanac[19]["Orbital"] = "D" +almanac[19]["Eccentricity"] = 1.162900e-002 +almanac[19]["Time_of_Applicability"] = 5.898240e+005 +almanac[19]["Orbital_Inclination"] = 9.418592e-001 +almanac[19]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[19]["SQRT_A"] = 5.153600e+003 +almanac[19]["Right_Ascen_at_Week"] = -1.289972e+000 +almanac[19]["Argument_of_Perigee"] = -2.923686e+000 +almanac[19]["Mean_Anom"] = -2.349194e+000 +almanac[19]["week"] = 1390 + +almanac[20] = {} +almanac[20]["System"] = SAT_SYS_GPS +almanac[20]["Number"] = 22 +almanac[20]["Orbital"] = "E" +almanac[20]["Eccentricity"] = 4.893000e-003 +almanac[20]["Time_of_Applicability"] = 5.898240e+005 +almanac[20]["Orbital_Inclination"] = 9.545093e-001 +almanac[20]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[20]["SQRT_A"] = 5.153600e+003 +almanac[20]["Right_Ascen_at_Week"] = -2.280969e-001 +almanac[20]["Argument_of_Perigee"] = -1.674502e+000 +almanac[20]["Mean_Anom"] = 1.106852e+000 +almanac[20]["week"] = 1390 + +almanac[21] = {} +almanac[21]["System"] = SAT_SYS_GPS +almanac[21]["Number"] = 23 +almanac[21]["Orbital"] = "F" +almanac[21]["Eccentricity"] = 4.822000e-003 +almanac[21]["Time_of_Applicability"] = 5.898240e+005 +almanac[21]["Orbital_Inclination"] = 9.691247e-001 +almanac[21]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[21]["SQRT_A"] = 5.153700e+003 +almanac[21]["Right_Ascen_at_Week"] = 7.667399e-001 +almanac[21]["Argument_of_Perigee"] = 2.497634e+000 +almanac[21]["Mean_Anom"] = 3.184700e-001 +almanac[21]["week"] = 1390 + +almanac[22] = {} +almanac[22]["System"] = SAT_SYS_GPS +almanac[22]["Number"] = 24 +almanac[22]["Orbital"] = "D" +almanac[22]["Eccentricity"] = 9.277000e-003 +almanac[22]["Time_of_Applicability"] = 5.898240e+005 +almanac[22]["Orbital_Inclination"] = 9.585183e-001 +almanac[22]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[22]["SQRT_A"] = 5.153900e+003 +almanac[22]["Right_Ascen_at_Week"] = -1.274840e+000 +almanac[22]["Argument_of_Perigee"] = -8.815651e-001 +almanac[22]["Mean_Anom"] = -1.695551e+000 +almanac[22]["week"] = 1390 + +almanac[23] = {} +almanac[23]["System"] = SAT_SYS_GPS +almanac[23]["Number"] = 25 +almanac[23]["Orbital"] = "A" +almanac[23]["Eccentricity"] = 1.257400e-002 +almanac[23]["Time_of_Applicability"] = 5.898240e+005 +almanac[23]["Orbital_Inclination"] = 9.551027e-001 +almanac[23]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[23]["SQRT_A"] = 5.153600e+003 +almanac[23]["Right_Ascen_at_Week"] = 1.721853e+000 +almanac[23]["Argument_of_Perigee"] = -1.329870e+000 +almanac[23]["Mean_Anom"] = -1.769623e+000 +almanac[23]["week"] = 1390 + +almanac[24] = {} +almanac[24]["System"] = SAT_SYS_GPS +almanac[24]["Number"] = 26 +almanac[24]["Orbital"] = "F" +almanac[24]["Eccentricity"] = 1.745700e-002 +almanac[24]["Time_of_Applicability"] = 5.898240e+005 +almanac[24]["Orbital_Inclination"] = 9.908749e-001 +almanac[24]["Rate_of_Right_Ascen"] = -7.840012e-009 +almanac[24]["SQRT_A"] = 5.153700e+003 +almanac[24]["Right_Ascen_at_Week"] = 7.961836e-001 +almanac[24]["Argument_of_Perigee"] = 8.161502e-001 +almanac[24]["Mean_Anom"] = -5.841961e-001 +almanac[24]["week"] = 1390 + +almanac[25] = {} +almanac[25]["System"] = SAT_SYS_GPS +almanac[25]["Number"] = 27 +almanac[25]["Orbital"] = "A" +almanac[25]["Eccentricity"] = 1.991000e-002 +almanac[25]["Time_of_Applicability"] = 5.898240e+005 +almanac[25]["Orbital_Inclination"] = 9.596563e-001 +almanac[25]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[25]["SQRT_A"] = 5.153600e+003 +almanac[25]["Right_Ascen_at_Week"] = 1.754124e+000 +almanac[25]["Argument_of_Perigee"] = -1.900854e+000 +almanac[25]["Mean_Anom"] = 3.046487e+000 +almanac[25]["week"] = 1390 + +almanac[26] = {} +almanac[26]["System"] = SAT_SYS_GPS +almanac[26]["Number"] = 28 +almanac[26]["Orbital"] = "B" +almanac[26]["Eccentricity"] = 1.162800e-002 +almanac[26]["Time_of_Applicability"] = 5.898240e+005 +almanac[26]["Orbital_Inclination"] = 9.610106e-001 +almanac[26]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[26]["SQRT_A"] = 5.153600e+003 +almanac[26]["Right_Ascen_at_Week"] = 2.882583e+000 +almanac[26]["Argument_of_Perigee"] = -2.242868e+000 +almanac[26]["Mean_Anom"] = 1.860642e+000 +almanac[26]["week"] = 1390 + +almanac[27] = {} +almanac[27]["System"] = SAT_SYS_GPS +almanac[27]["Number"] = 29 +almanac[27]["Orbital"] = "F" +almanac[27]["Eccentricity"] = 9.462000e-003 +almanac[27]["Time_of_Applicability"] = 1.474560e+005 +almanac[27]["Orbital_Inclination"] = 9.874838e-001 +almanac[27]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[27]["SQRT_A"] = 5.153700e+003 +almanac[27]["Right_Ascen_at_Week"] = 7.647503e-001 +almanac[27]["Argument_of_Perigee"] = -8.614589e-001 +almanac[27]["Mean_Anom"] = -4.488983e-001 +almanac[27]["week"] = 1390 + +almanac[28] = {} +almanac[28]["System"] = SAT_SYS_GPS +almanac[28]["Number"] = 30 +almanac[28]["Orbital"] = "B" +almanac[28]["Eccentricity"] = 9.296000e-003 +almanac[28]["Time_of_Applicability"] = 5.898240e+005 +almanac[28]["Orbital_Inclination"] = 9.452992e-001 +almanac[28]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[28]["SQRT_A"] = 5.153600e+003 +almanac[28]["Right_Ascen_at_Week"] = 2.826698e+000 +almanac[28]["Argument_of_Perigee"] = 1.306413e+000 +almanac[28]["Mean_Anom"] = 2.148725e+000 +almanac[28]["week"] = 1390 + + + + + + +--GLONASS +--1 îđáẹ̀àëüíàÿ ïëîñêîṇ̃ü, íî́åđà 1-8 +almanac[29] = {} +almanac[29]["System"] = SAT_SYS_GLONASS +almanac[29]["Number"] = 1 +almanac[29]["Orbital"] = 1 +almanac[29]["GLONASS_Data"] = {} +almanac[29]["GLONASS_Data"]["NKU_Number"] = 796 +almanac[29]["GLONASS_Data"]["Cosmos_Number"] = 2411 +almanac[29]["Eccentricity"] = 1.184000e-003 +almanac[29]["Time_of_Applicability"] = 0.000000e+000 +almanac[29]["Orbital_Inclination"] = 1.126443e+000 +almanac[29]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[29]["SQRT_A"] = 5.050500e+003 +almanac[29]["Right_Ascen_at_Week"] = 5.979807e+000 +almanac[29]["Argument_of_Perigee"] = 2.622634e+000 +almanac[29]["Mean_Anom"] = -5.519651e+000 +almanac[29]["week"] = 1390 +almanac[29]["Commit_date"] = "06.02.2005" +almanac[29]["Life_dates"] = {} + +almanac[30] = {} +almanac[30]["System"] = SAT_SYS_GLONASS +almanac[30]["Number"] = 2 +almanac[30]["Orbital"] = 1 +almanac[30]["GLONASS_Data"] = {} +almanac[30]["GLONASS_Data"]["NKU_Number"] = 794 +almanac[30]["GLONASS_Data"]["Cosmos_Number"] = 2401 +almanac[30]["Eccentricity"] = 4.486000e-003 +almanac[30]["Time_of_Applicability"] = 0.000000e+000 +almanac[30]["Orbital_Inclination"] = 1.128459e+000 +almanac[30]["Rate_of_Right_Ascen"] = -6.759654e-009 +almanac[30]["SQRT_A"] = 5.050500e+003 +almanac[30]["Right_Ascen_at_Week"] = 5.997871e+000 +almanac[30]["Argument_of_Perigee"] = 1.709531e+000 +almanac[30]["Mean_Anom"] = -5.367633e+000 +almanac[30]["week"] = 1390 +almanac[30]["Commit_date"] = "02.02.2004" +almanac[30]["Life_dates"] = {} + +almanac[31] = {} +almanac[31]["System"] = SAT_SYS_GLONASS +almanac[31]["Number"] = 3 +almanac[31]["Orbital"] = 1 +almanac[31]["GLONASS_Data"] = {} +almanac[31]["GLONASS_Data"]["NKU_Number"] = 789 +almanac[31]["GLONASS_Data"]["Cosmos_Number"] = 2381 +almanac[31]["Eccentricity"] = 2.459000e-003 +almanac[31]["Time_of_Applicability"] = 0.000000e+000 +almanac[31]["Orbital_Inclination"] = 1.122958e+000 +almanac[31]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[31]["SQRT_A"] = 5.050500e+003 +almanac[31]["Right_Ascen_at_Week"] = 5.960713e+000 +almanac[31]["Argument_of_Perigee"] = -2.683407e+000 +almanac[31]["Mean_Anom"] = -1.791788e+000 +almanac[31]["week"] = 1390 +almanac[31]["Commit_date"] = "04.01.2002" +almanac[31]["Life_dates"] = {} + +almanac[32] = {} +almanac[32]["System"] = SAT_SYS_GLONASS +almanac[32]["Number"] = 4 +almanac[32]["Orbital"] = 1 +almanac[32]["GLONASS_Data"] = {} +almanac[32]["GLONASS_Data"]["NKU_Number"] = 795 +almanac[29]["GLONASS_Data"]["Cosmos_Number"] = 2403 +almanac[32]["Eccentricity"] = 4.054000e-003 +almanac[32]["Time_of_Applicability"] = 0.000000e+000 +almanac[32]["Orbital_Inclination"] = 1.128543e+000 +almanac[32]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[32]["SQRT_A"] = 5.050500e+003 +almanac[32]["Right_Ascen_at_Week"] = 5.998081e+000 +almanac[32]["Argument_of_Perigee"] = 1.497160e+000 +almanac[32]["Mean_Anom"] = -4.293681e-001 +almanac[32]["week"] = 1390 +almanac[32]["Commit_date"] = "29.01.2004" +almanac[32]["Life_dates"] = {} + +almanac[33] = {} +almanac[33]["System"] = SAT_SYS_GLONASS +almanac[33]["Number"] = 5 +almanac[33]["Orbital"] = 1 +almanac[33]["GLONASS_Data"] = {} +almanac[33]["GLONASS_Data"]["NKU_Number"] = 711 +almanac[33]["GLONASS_Data"]["Cosmos_Number"] = 2382 +almanac[33]["Eccentricity"] = 7.040000e-004 +almanac[33]["Time_of_Applicability"] = 0.000000e+000 +almanac[33]["Orbital_Inclination"] = 1.122886e+000 +almanac[33]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[33]["SQRT_A"] = 5.050600e+003 +almanac[33]["Right_Ascen_at_Week"] = 5.960713e+000 +almanac[33]["Argument_of_Perigee"] = 2.740933e+000 +almanac[33]["Mean_Anom"] = -2.523604e+000 +almanac[33]["week"] = 1390 +almanac[33]["Commit_date"] = "13.02.2003" +almanac[33]["Life_dates"] = {} + +almanac[34] = {} +almanac[34]["System"] = SAT_SYS_GLONASS +almanac[34]["Number"] = 6 +almanac[34]["Orbital"] = 1 +almanac[34]["GLONASS_Data"] = {} +almanac[34]["GLONASS_Data"]["NKU_Number"] = 701 +almanac[34]["GLONASS_Data"]["Cosmos_Number"] = 2404 +almanac[34]["Eccentricity"] = 4.766000e-003 +almanac[34]["Time_of_Applicability"] = 0.000000e+000 +almanac[34]["Orbital_Inclination"] = 1.128276e+000 +almanac[34]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[34]["SQRT_A"] = 5.050500e+003 +almanac[34]["Right_Ascen_at_Week"] = 5.997906e+000 +almanac[34]["Argument_of_Perigee"] = 1.802417e+000 +almanac[34]["Mean_Anom"] = -2.426512e+000 +almanac[34]["week"] = 1390 +almanac[34]["Commit_date"] = "08.12.2004" +almanac[34]["Life_dates"] = {} + +almanac[35] = {} +almanac[35]["System"] = SAT_SYS_GLONASS +almanac[35]["Number"] = 7 +almanac[35]["Orbital"] = 1 +almanac[35]["GLONASS_Data"] = {} +almanac[35]["GLONASS_Data"]["NKU_Number"] = 712 +almanac[35]["GLONASS_Data"]["Cosmos_Number"] = 2413 +almanac[35]["Eccentricity"] = 7.570000e-004 +almanac[35]["Time_of_Applicability"] = 0.000000e+000 +almanac[35]["Orbital_Inclination"] = 1.126344e+000 +almanac[35]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[35]["SQRT_A"] = 5.050500e+003 +almanac[35]["Right_Ascen_at_Week"] = 5.979388e+000 +almanac[35]["Argument_of_Perigee"] = 2.566068e+000 +almanac[35]["Mean_Anom"] = -3.921228e+000 +almanac[35]["week"] = 1390 +almanac[35]["Commit_date"] = "07.10.2005" +almanac[35]["Life_dates"] = {} + +almanac[36] = {} +almanac[36]["System"] = SAT_SYS_GLONASS +almanac[36]["GLONASS_Data"] = {} +almanac[36]["Number"] = 8 +almanac[36]["Orbital"] = 1 +almanac[36]["GLONASS_Data"] = {} +almanac[36]["GLONASS_Data"]["NKU_Number"] = 797 +almanac[36]["GLONASS_Data"]["Cosmos_Number"] = 2412 +almanac[36]["Eccentricity"] = 4.060000e-004 +almanac[36]["Time_of_Applicability"] = 0.000000e+000 +almanac[36]["Orbital_Inclination"] = 1.126564e+000 +almanac[36]["Rate_of_Right_Ascen"] = -6.785834e-009 +almanac[36]["SQRT_A"] = 5.050600e+003 +almanac[36]["Right_Ascen_at_Week"] = 5.980069e+000 +almanac[36]["Argument_of_Perigee"] = 2.673633e+000 +almanac[36]["Mean_Anom"] = -4.812026e+000 +almanac[36]["week"] = 1390 +almanac[36]["Commit_date"] = "06.02.2005" +almanac[36]["Life_dates"] = {} + +--3 îđáẹ̀àëüíàÿ ïëîñêîṇ̃ü, íî́åđà 17-24 +almanac[37] = {} +almanac[37]["System"] = SAT_SYS_GLONASS +almanac[37]["Number"] = 17 +almanac[37]["Orbital"] = 3 +almanac[37]["GLONASS_Data"] = {} +almanac[37]["GLONASS_Data"]["NKU_Number"] = 787 +almanac[37]["GLONASS_Data"]["Cosmos_Number"] = 2375 +almanac[37]["Eccentricity"] = 5.670000e-004 +almanac[37]["Time_of_Applicability"] = 0.000000e+000 +almanac[37]["Orbital_Inclination"] = 1.126524e+000 +almanac[37]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[37]["SQRT_A"] = 5.050500e+003 +almanac[37]["Right_Ascen_at_Week"] = 3.895554e+000 +almanac[37]["Argument_of_Perigee"] = 6.085085e-001 +almanac[37]["Mean_Anom"] = -2.977407e+000 +almanac[37]["week"] = 1390 +almanac[37]["Commit_date"] = "04.11.2000" +almanac[37]["Life_dates"] = {} + + +almanac[38] = {} +almanac[38]["System"] = SAT_SYS_GLONASS +almanac[38]["Number"] = 18 +almanac[38]["Orbital"] = 3 +almanac[38]["GLONASS_Data"] = {} +almanac[38]["GLONASS_Data"]["NKU_Number"] = 783 +almanac[38]["GLONASS_Data"]["Cosmos_Number"] = 2374 +almanac[38]["Eccentricity"] = 4.520000e-003 +almanac[38]["Time_of_Applicability"] = 0.000000e+000 +almanac[38]["Orbital_Inclination"] = 1.126239e+000 +almanac[38]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[38]["SQRT_A"] = 5.050600e+003 +almanac[38]["Right_Ascen_at_Week"] = 3.894071e+000 +almanac[38]["Argument_of_Perigee"] = -2.509589e+000 +almanac[38]["Mean_Anom"] = -1.020057e+000 +almanac[38]["week"] = 1390 +almanac[38]["Commit_date"] = "05.01.2001" +almanac[38]["Life_dates"] = {} + +almanac[39] = {} +almanac[39]["System"] = SAT_SYS_GLONASS +almanac[39]["Number"] = 19 +almanac[39]["Orbital"] = 3 +almanac[39]["GLONASS_Data"] = {} +almanac[39]["GLONASS_Data"]["NKU_Number"] = 798 +almanac[39]["GLONASS_Data"]["Cosmos_Number"] = 2417 +almanac[39]["Eccentricity"] = 2.023000e-003 +almanac[39]["Time_of_Applicability"] = 0.000000e+000 +almanac[39]["Orbital_Inclination"] = 1.132205e+000 +almanac[39]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[39]["SQRT_A"] = 5.050500e+003 +almanac[39]["Right_Ascen_at_Week"] = 3.884018e+000 +almanac[39]["Argument_of_Perigee"] = 2.718313e+000 +almanac[39]["Mean_Anom"] = -3.933620e-001 +almanac[39]["week"] = 1390 +almanac[39]["Commit_date"] = "22.01.2006" +almanac[39]["Life_dates"] = {} + +almanac[40] = {} +almanac[40]["System"] = SAT_SYS_GLONASS +almanac[40]["Number"] = 20 +almanac[40]["Orbital"] = 3 +almanac[40]["GLONASS_Data"] = {} +almanac[40]["GLONASS_Data"]["NKU_Number"] = 793 +almanac[40]["GLONASS_Data"]["Cosmos_Number"] = 2396 +almanac[40]["Eccentricity"] = 1.822000e-003 +almanac[40]["Time_of_Applicability"] = 0.000000e+000 +almanac[40]["Orbital_Inclination"] = 1.129789e+000 +almanac[40]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[40]["SQRT_A"] = 5.050500e+003 +almanac[40]["Right_Ascen_at_Week"] = 3.896863e+000 +almanac[40]["Argument_of_Perigee"] = 2.723776e+000 +almanac[40]["Mean_Anom"] = -1.193647e+000 +almanac[40]["week"] = 1390 +almanac[40]["Commit_date"] = "31.01.2003" +almanac[40]["Life_dates"] = {} + +almanac[41] = {} +almanac[41]["System"] = SAT_SYS_GLONASS +almanac[41]["Number"] = 21 +almanac[41]["Orbital"] = 3 +almanac[41]["GLONASS_Data"] = {} +almanac[41]["GLONASS_Data"]["NKU_Number"] = 792 +almanac[41]["GLONASS_Data"]["Cosmos_Number"] = 2395 +almanac[41]["Eccentricity"] = 5.290000e-004 +almanac[41]["Time_of_Applicability"] = 0.000000e+000 +almanac[41]["Orbital_Inclination"] = 1.129957e+000 +almanac[41]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[41]["SQRT_A"] = 5.050500e+003 +almanac[41]["Right_Ascen_at_Week"] = 3.897806e+000 +almanac[41]["Argument_of_Perigee"] = -9.519367e-001 +almanac[41]["Mean_Anom"] = -4.578920e+000 +almanac[41]["week"] = 1390 +almanac[41]["Commit_date"] = "31.01.2003" +almanac[41]["Life_dates"] = {} + +almanac[42] = {} +almanac[42]["System"] = SAT_SYS_GLONASS +almanac[42]["Number"] = 22 +almanac[42]["Orbital"] = 3 +almanac[42]["GLONASS_Data"] = {} +almanac[42]["GLONASS_Data"]["NKU_Number"] = 791 +almanac[42]["GLONASS_Data"]["Cosmos_Number"] = 2394 +almanac[42]["Eccentricity"] = 9.200000e-005 +almanac[42]["Time_of_Applicability"] = 0.000000e+000 +almanac[42]["Orbital_Inclination"] = 1.129742e+000 +almanac[42]["Rate_of_Right_Ascen"] = -6.740456e-009 +almanac[42]["SQRT_A"] = 5.050500e+003 +almanac[42]["Right_Ascen_at_Week"] = 3.897404e+000 +almanac[42]["Argument_of_Perigee"] = 2.518211e+000 +almanac[42]["Mean_Anom"] = -2.530167e+000 +almanac[42]["week"] = 1390 +almanac[42]["Commit_date"] = "21.01.2003" +almanac[42]["Life_dates"] = {} + +almanac[43] = {} +almanac[43]["System"] = SAT_SYS_GLONASS +almanac[43]["Number"] = 23 +almanac[43]["Orbital"] = 3 +almanac[43]["GLONASS_Data"] = {} +almanac[43]["GLONASS_Data"]["NKU_Number"] = 714 +almanac[43]["GLONASS_Data"]["Cosmos_Number"] = 2419 +almanac[43]["Eccentricity"] = 8.730000e-004 +almanac[43]["Time_of_Applicability"] = 0.000000e+000 +almanac[43]["Orbital_Inclination"] = 1.132105e+000 +almanac[43]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[43]["SQRT_A"] = 5.050500e+003 +almanac[43]["Right_Ascen_at_Week"] = 3.883808e+000 +almanac[43]["Argument_of_Perigee"] = -3.039139e-001 +almanac[43]["Mean_Anom"] = -5.228304e-001 +almanac[43]["week"] = 1390 +almanac[43]["Commit_date"] = "31.08.2006" +almanac[43]["Life_dates"] = {} + +almanac[44] = {} +almanac[44]["System"] = SAT_SYS_GLONASS +almanac[44]["Number"] = 24 +almanac[44]["Orbital"] = 3 +almanac[44]["GLONASS_Data"] = {} +almanac[44]["GLONASS_Data"]["NKU_Number"] = 713 +almanac[44]["GLONASS_Data"]["Cosmos_Number"] = 2418 +almanac[44]["Eccentricity"] = 2.044000e-003 +almanac[44]["Time_of_Applicability"] = 0.000000e+000 +almanac[44]["Orbital_Inclination"] = 1.132430e+000 +almanac[44]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[44]["SQRT_A"] = 5.050500e+003 +almanac[44]["Right_Ascen_at_Week"] = 3.883983e+000 +almanac[44]["Argument_of_Perigee"] = -3.722784e-001 +almanac[44]["Mean_Anom"] = -1.240457e+000 +almanac[44]["week"] = 1390 +almanac[44]["Commit_date"] = "31.08.2006" +almanac[44]["Life_dates"] = {} + +--2 îđáẹ̀àëüíàÿ ïëîñêîṇ̃ü, íî́åđà 9-16 +almanac[45] = {} +almanac[45]["System"] = SAT_SYS_GLONASS +almanac[45]["Number"] = 9 +almanac[45]["Orbital"] = 2 +almanac[45]["GLONASS_Data"] = {} +almanac[45]["GLONASS_Data"]["NKU_Number"] = "N/A" +almanac[45]["GLONASS_Data"]["Cosmos_Number"] = "N/A" +almanac[45]["Eccentricity"] = 1.184000e-003 +almanac[45]["Time_of_Applicability"] = 0.000000e+000 +almanac[45]["Orbital_Inclination"] = 1.126443e+000 +almanac[45]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[45]["SQRT_A"] = 5.050500e+003 +almanac[45]["Right_Ascen_at_Week"] = 1.79067e+000 +almanac[45]["Argument_of_Perigee"] = 2.88430067 +almanac[45]["Mean_Anom"] = -5.519651e+000 +almanac[45]["week"] = 1390 +almanac[45]["Commit_date"] = "N/A" +almanac[45]["Life_dates"] = {} + +almanac[46] = {} +almanac[46]["System"] = SAT_SYS_GLONASS +almanac[46]["Number"] = 10 +almanac[46]["Orbital"] = 2 +almanac[46]["GLONASS_Data"] = {} +almanac[46]["GLONASS_Data"]["NKU_Number"] = "N/A" +almanac[46]["GLONASS_Data"]["Cosmos_Number"] = "N/A" +almanac[46]["Eccentricity"] = 1.184000e-003 +almanac[46]["Time_of_Applicability"] = 0.000000e+000 +almanac[46]["Orbital_Inclination"] = 1.126443e+000 +almanac[46]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[46]["SQRT_A"] = 5.050500e+003 +almanac[46]["Right_Ascen_at_Week"] = 1.79067e+000 +almanac[46]["Argument_of_Perigee"] = 3.66930067 +almanac[46]["Mean_Anom"] = -5.519651e+000 +almanac[46]["week"] = 1390 +almanac[46]["Commit_date"] = "N/A" +almanac[46]["Life_dates"] = {} + +almanac[47] = {} +almanac[47]["System"] = SAT_SYS_GLONASS +almanac[47]["Number"] = 11 +almanac[47]["Orbital"] = 2 +almanac[47]["GLONASS_Data"] = {} +almanac[47]["GLONASS_Data"]["NKU_Number"] = "N/A" +almanac[47]["GLONASS_Data"]["Cosmos_Number"] = "N/A" +almanac[47]["Eccentricity"] = 1.184000e-003 +almanac[47]["Time_of_Applicability"] = 0.000000e+000 +almanac[47]["Orbital_Inclination"] = 1.126443e+000 +almanac[47]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[47]["SQRT_A"] = 5.050500e+003 +almanac[47]["Right_Ascen_at_Week"] = 1.79067e+000 +almanac[47]["Argument_of_Perigee"] = 4.45430067 +almanac[47]["Mean_Anom"] = -5.519651e+000 +almanac[47]["week"] = 1390 +almanac[47]["Commit_date"] = "N/A" +almanac[47]["Life_dates"] = {} + +almanac[48] = {} +almanac[48]["System"] = SAT_SYS_GLONASS +almanac[48]["Number"] = 12 +almanac[48]["Orbital"] = 2 +almanac[48]["GLONASS_Data"] = {} +almanac[48]["GLONASS_Data"]["NKU_Number"] = "N/A" +almanac[48]["GLONASS_Data"]["Cosmos_Number"] = "N/A" +almanac[48]["Eccentricity"] = 1.184000e-003 +almanac[48]["Time_of_Applicability"] = 0.000000e+000 +almanac[48]["Orbital_Inclination"] = 1.126443e+000 +almanac[48]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[48]["SQRT_A"] = 5.050500e+003 +almanac[48]["Right_Ascen_at_Week"] = 1.79067e+000 +almanac[48]["Argument_of_Perigee"] = 5.23930067 +almanac[48]["Mean_Anom"] = -5.519651e+000 +almanac[48]["week"] = 1390 +almanac[48]["Commit_date"] = "N/A" +almanac[48]["Life_dates"] = {} + +almanac[49] = {} +almanac[49]["System"] = SAT_SYS_GLONASS +almanac[49]["Number"] = 13 +almanac[49]["Orbital"] = 2 +almanac[49]["GLONASS_Data"] = {} +almanac[49]["GLONASS_Data"]["NKU_Number"] = "N/A" +almanac[49]["GLONASS_Data"]["Cosmos_Number"] = "N/A" +almanac[49]["Eccentricity"] = 1.184000e-003 +almanac[49]["Time_of_Applicability"] = 0.000000e+000 +almanac[49]["Orbital_Inclination"] = 1.126443e+000 +almanac[49]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[49]["SQRT_A"] = 5.050500e+003 +almanac[49]["Right_Ascen_at_Week"] = 1.79067e+000 +almanac[49]["Argument_of_Perigee"] = 6.02430067 +almanac[49]["Mean_Anom"] = -5.519651e+000 +almanac[49]["week"] = 1390 +almanac[49]["Commit_date"] = "N/A" +almanac[49]["Life_dates"] = {} + +almanac[50] = {} +almanac[50]["System"] = SAT_SYS_GLONASS +almanac[50]["Number"] = 14 +almanac[50]["Orbital"] = 2 +almanac[50]["GLONASS_Data"] = {} +almanac[50]["GLONASS_Data"]["NKU_Number"] = "N/A" +almanac[50]["GLONASS_Data"]["Cosmos_Number"] = "N/A" +almanac[50]["Eccentricity"] = 1.184000e-003 +almanac[50]["Time_of_Applicability"] = 0.000000e+000 +almanac[50]["Orbital_Inclination"] = 1.126443e+000 +almanac[50]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[50]["SQRT_A"] = 5.050500e+003 +almanac[50]["Right_Ascen_at_Week"] = 1.79067e+000 +almanac[50]["Argument_of_Perigee"] = 0.52930067 +almanac[50]["Mean_Anom"] = -5.519651e+000 +almanac[50]["week"] = 1390 +almanac[50]["Commit_date"] = "N/A" +almanac[50]["Life_dates"] = {} + +almanac[51] = {} +almanac[51]["System"] = SAT_SYS_GLONASS +almanac[51]["Number"] = 15 +almanac[51]["Orbital"] = 2 +almanac[51]["GLONASS_Data"] = {} +almanac[51]["GLONASS_Data"]["NKU_Number"] = "N/A" +almanac[51]["GLONASS_Data"]["Cosmos_Number"] = "N/A" +almanac[51]["Eccentricity"] = 1.184000e-003 +almanac[51]["Time_of_Applicability"] = 0.000000e+000 +almanac[51]["Orbital_Inclination"] = 1.126443e+000 +almanac[51]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[51]["SQRT_A"] = 5.050500e+003 +almanac[51]["Right_Ascen_at_Week"] = 1.79067e+000 +almanac[51]["Argument_of_Perigee"] = 1.31430067 +almanac[51]["Mean_Anom"] = -5.519651e+000 +almanac[51]["week"] = 1390 +almanac[51]["Commit_date"] = "N/A" +almanac[51]["Life_dates"] = {} + +almanac[52] = {} +almanac[52]["System"] = SAT_SYS_GLONASS +almanac[52]["Number"] = 16 +almanac[52]["Orbital"] = 2 +almanac[52]["GLONASS_Data"] = {} +almanac[52]["GLONASS_Data"]["NKU_Number"] = "N/A" +almanac[52]["GLONASS_Data"]["Cosmos_Number"] = "N/A" +almanac[52]["Eccentricity"] = 1.184000e-003 +almanac[52]["Time_of_Applicability"] = 0.000000e+000 +almanac[52]["Orbital_Inclination"] = 1.126443e+000 +almanac[52]["Rate_of_Right_Ascen"] = 0.000000e+000 +almanac[52]["SQRT_A"] = 5.050500e+003 +almanac[52]["Right_Ascen_at_Week"] = 1.79067e+000 +almanac[52]["Argument_of_Perigee"] = 2.09930067 +almanac[52]["Mean_Anom"] = -5.519651e+000 +almanac[52]["week"] = 1390 +almanac[52]["Commit_date"] = "N/A" +almanac[52]["Life_dates"] = {} + +SA_mode = false +AS_mode = false diff --git a/Test Missions/miz/MOOSE_Escort_Test_Follow/Scripts/World/birds.lua b/Test Missions/miz/MOOSE_Escort_Test_Follow/Scripts/World/birds.lua new file mode 100644 index 000000000..8aee1f700 --- /dev/null +++ b/Test Missions/miz/MOOSE_Escort_Test_Follow/Scripts/World/birds.lua @@ -0,0 +1,27 @@ +birds_avail = true --Birds availability. false - there is no birds +birds_maximum_hrad = 200 --Maximum altitude above ground al sea level bird could be met +birds_maximum_absolute_height = 8000 --Maximum absolute altitude bird could be met +birds_minimum_velocity = 40 --Minimum velocity bird could be met +birds_delta_time = 3.55 +birds_probability = {0.006333333*150, + 0.004166667*150, + 0.001966667*150, + 0.001090909*150, + 0.000741818*150, + 0.0006*150, + 0.000510545*150, + 0.000447273*150, + 0.000389455*150, + 0.000349091*150, + 0.000310909*150, + 0.000282545*150, + 0.000250909*150, + 0.000220364*150, + 0.000196364*150, + 0.000174545*150, + 0.000152727*150, + 0.000128727*150, + 0.000103636*150, + 7.63636E-05*150, + 0*150 +} diff --git a/Test Missions/miz/MOOSE_Escort_Test_Follow/l10n/DEFAULT/MOOSE_Escort_Test_Follow.lua b/Test Missions/miz/MOOSE_Escort_Test_Follow/l10n/DEFAULT/MOOSE_Escort_Test_Follow.lua new file mode 100644 index 000000000..5bcce439c --- /dev/null +++ b/Test Missions/miz/MOOSE_Escort_Test_Follow/l10n/DEFAULT/MOOSE_Escort_Test_Follow.lua @@ -0,0 +1,38 @@ +Include.File( "Mission" ) +Include.File( "Client" ) +Include.File( "Spawn" ) +Include.File( "Escort" ) + + +do + + local function EventAliveHelicopter( Client ) + local SpawnEscortHeli = SPAWN:New( "Escort Helicopter" ) + local EscortGroupHeli1 = SpawnEscortHeli:Spawn() + local EscortGroupHeli2 = SpawnEscortHeli:Spawn() + local EscortGroupHeli3 = SpawnEscortHeli:Spawn() + local EscortGroupHeli4 = SpawnEscortHeli:Spawn() + local EscortHeli1 = ESCORT:New( Client, EscortGroupHeli1, "Escort Alpha" ) + local EscortHeli2 = ESCORT:New( Client, EscortGroupHeli2, "Escort Bravo" ) + local EscortHeli3 = ESCORT:New( Client, EscortGroupHeli3, "Escort Delta" ) + local EscortHeli4 = ESCORT:New( Client, EscortGroupHeli4, "Escort Gamma" ) + end + + local function EventAlivePlane( Client ) + local SpawnEscortPlane = SPAWN:New( "Escort Plane" ) + local EscortGroupPlane = SpawnEscortPlane:Spawn() + local EscortPlane = ESCORT:New( Client, EscortGroupPlane, "Escort Test Plane" ) + end + + local EscortClientHeli = CLIENT:New( "Lead Helicopter", "Fly around and observe the behaviour of the escort helicopter" ):Alive( EventAliveHelicopter ) + local EscortClientPlane = CLIENT:New( "Lead Plane", "Fly around and observe the behaviour of the escort airplane. Select Navigate->Joun-Up and airplane should follow you. Change speed and directions." ) + :Alive( EventAlivePlane ) + +end + +-- MISSION SCHEDULER STARTUP +MISSIONSCHEDULER.Start() +MISSIONSCHEDULER.ReportMenu() +MISSIONSCHEDULER.ReportMissionsHide() + +env.info( "Test Mission loaded" ) diff --git a/Test Missions/miz/MOOSE_Escort_Test_Follow/l10n/DEFAULT/Moose_Load_Dynamic.lua b/Test Missions/miz/MOOSE_Escort_Test_Follow/l10n/DEFAULT/Moose_Load_Dynamic.lua new file mode 100644 index 000000000..e12d51570 --- /dev/null +++ b/Test Missions/miz/MOOSE_Escort_Test_Follow/l10n/DEFAULT/Moose_Load_Dynamic.lua @@ -0,0 +1,43 @@ + +local base = _G +env.info("Loading MOOSE " .. base.timer.getAbsTime() ) + +Include = {} + +Include.Path = function() + local str = debug.getinfo(2, "S").source + return str:match("(.*/)"):sub(1,-2):gsub("\\","/") +end + +Include.File = function( IncludeFile ) + if not Include.Files[ IncludeFile ] then + Include.Files[IncludeFile] = IncludeFile + env.info( "Include:" .. IncludeFile .. " from " .. Include.ProgramPath ) + local f = assert( base.loadfile( Include.ProgramPath .. IncludeFile .. ".lua" ) ) + if f == nil then + env.info( "Include:" .. IncludeFile .. " from " .. Include.MissionPath ) + local f = assert( base.loadfile( Include.MissionPath .. IncludeFile .. ".lua" ) ) + if f == nil then + error ("Could not load MOOSE file " .. IncludeFile .. ".lua" ) + else + env.info( "Include:" .. IncludeFile .. " loaded from " .. Include.MissionPath ) + return f() + end + else + env.info( "Include:" .. IncludeFile .. " loaded from " .. Include.ProgramPath ) + return f() + end + end +end + +Include.ProgramPath = "Scripts/Moose/Moose/" +Include.MissionPath = Include.Path() + +env.info( "Include.ProgramPath = " .. Include.ProgramPath) +env.info( "Include.MissionPath = " .. Include.MissionPath) + +Include.Files = {} + +Include.File( "Database" ) + +env.info("Loaded MOOSE Include Engine") \ No newline at end of file diff --git a/Test Missions/miz/MOOSE_Escort_Test_Follow/l10n/DEFAULT/Moose_Load_Embedded.lua b/Test Missions/miz/MOOSE_Escort_Test_Follow/l10n/DEFAULT/Moose_Load_Embedded.lua new file mode 100644 index 000000000..350bb9c92 --- /dev/null +++ b/Test Missions/miz/MOOSE_Escort_Test_Follow/l10n/DEFAULT/Moose_Load_Embedded.lua @@ -0,0 +1,23 @@ + +local base = _G +env.info("Loading MOOSE " .. base.timer.getAbsTime() ) + +Include = {} + +Include.Path = function() + local str = debug.getinfo(2, "S").source + return str:match("(.*/)"):sub(1,-2):gsub("\\","/") +end + +Include.File = function( IncludeFile ) +end + +Include.ProgramPath = "Scripts/Moose/Moose/" +Include.MissionPath = Include.Path() + +env.info( "Include.ProgramPath = " .. Include.ProgramPath) +env.info( "Include.MissionPath = " .. Include.MissionPath) + +Include.Files = {} + +env.info("Loaded MOOSE Include Engine") diff --git a/Test Missions/miz/MOOSE_Escort_Test_Follow/l10n/DEFAULT/dictionary b/Test Missions/miz/MOOSE_Escort_Test_Follow/l10n/DEFAULT/dictionary new file mode 100644 index 000000000..50ee177b8 --- /dev/null +++ b/Test Missions/miz/MOOSE_Escort_Test_Follow/l10n/DEFAULT/dictionary @@ -0,0 +1,33 @@ +dictionary = +{ + ["DictKey_GroupName_19"] = "Escort Plane", + ["DictKey_WptName_11"] = "", + ["DictKey_UnitName_20"] = "Escort Plane", + ["DictKey_GroupName_12"] = "Escort Helicopter", + ["DictKey_WptName_30"] = "", + ["DictKey_sortie_4"] = "", + ["DictKey_WptName_28"] = "", + ["DictKey_WptName_14"] = "", + ["DictKey_WptName_29"] = "", + ["DictKey_WptName_23"] = "", + ["DictKey_GroupName_15"] = "Lead Plane", + ["DictKey_descriptionRedTask_2"] = "", + ["DictKey_GroupName_9"] = "Lead Helicopter", + ["DictKey_GroupName_31"] = "Test Attack", + ["DictKey_descriptionText_1"] = "", + ["DictKey_UnitName_13"] = "Escort Helicopter", + ["DictKey_UnitName_32"] = "Unit #1", + ["DictKey_WptName_21"] = "", + ["DictKey_descriptionBlueTask_3"] = "", + ["DictKey_WptName_22"] = "", + ["DictKey_WptName_18"] = "", + ["DictKey_UnitName_10"] = "Lead Helicopter", + ["DictKey_WptName_17"] = "", + ["DictKey_WptName_33"] = "", + ["DictKey_WptName_26"] = "", + ["DictKey_WptName_25"] = "", + ["DictKey_UnitName_16"] = "Lead Plane", + ["DictKey_WptName_24"] = "", + ["DictKey_WptName_34"] = "", + ["DictKey_WptName_27"] = "", +} -- end of dictionary diff --git a/Test Missions/miz/MOOSE_Escort_Test_Follow/l10n/DEFAULT/mapResource b/Test Missions/miz/MOOSE_Escort_Test_Follow/l10n/DEFAULT/mapResource new file mode 100644 index 000000000..19be00d9b --- /dev/null +++ b/Test Missions/miz/MOOSE_Escort_Test_Follow/l10n/DEFAULT/mapResource @@ -0,0 +1,6 @@ +mapResource = +{ + ["ResKey_Action_5"] = "Moose_Load_Dynamic.lua", + ["ResKey_Action_6"] = "Moose_Load_Embedded.lua", + ["ResKey_Action_8"] = "MOOSE_Escort_Test_Follow.lua", +} -- end of mapResource diff --git a/Test Missions/miz/MOOSE_Escort_Test_Follow/mission b/Test Missions/miz/MOOSE_Escort_Test_Follow/mission new file mode 100644 index 000000000..25ec48b82 --- /dev/null +++ b/Test Missions/miz/MOOSE_Escort_Test_Follow/mission @@ -0,0 +1,4302 @@ +mission = +{ + ["trig"] = + { + ["actions"] = + { + [1] = "a_set_flag(9999); mission.trig.func[1]=nil;", + [2] = "a_do_script_file(getValueResourceByKey(\"ResKey_Action_5\")); mission.trig.func[2]=nil;", + [3] = "a_do_script_file(getValueResourceByKey(\"ResKey_Action_6\")); mission.trig.func[3]=nil;", + [4] = "a_do_script_file(getValueResourceByKey(\"ResKey_Action_8\")); mission.trig.func[4]=nil;", + }, -- end of ["actions"] + ["events"] = + { + }, -- end of ["events"] + ["custom"] = + { + }, -- end of ["custom"] + ["func"] = + { + [1] = "if mission.trig.conditions[1]() then mission.trig.actions[1]() end", + [2] = "if mission.trig.conditions[2]() then mission.trig.actions[2]() end", + [3] = "if mission.trig.conditions[3]() then mission.trig.actions[3]() end", + [4] = "if mission.trig.conditions[4]() then mission.trig.actions[4]() end", + }, -- end of ["func"] + ["flag"] = + { + [1] = true, + [2] = true, + [3] = true, + [4] = true, + }, -- end of ["flag"] + ["conditions"] = + { + [1] = "return(true)", + [2] = "return(c_flag_is_true(9999) )", + [3] = "return(c_flag_is_false(9999) )", + [4] = "return(true)", + }, -- end of ["conditions"] + ["customStartup"] = + { + }, -- end of ["customStartup"] + ["funcStartup"] = + { + }, -- end of ["funcStartup"] + }, -- end of ["trig"] + ["result"] = + { + ["offline"] = + { + ["conditions"] = + { + }, -- end of ["conditions"] + ["actions"] = + { + }, -- end of ["actions"] + ["func"] = + { + }, -- end of ["func"] + }, -- end of ["offline"] + ["total"] = 0, + ["blue"] = + { + ["conditions"] = + { + }, -- end of ["conditions"] + ["actions"] = + { + }, -- end of ["actions"] + ["func"] = + { + }, -- end of ["func"] + }, -- end of ["blue"] + ["red"] = + { + ["conditions"] = + { + }, -- end of ["conditions"] + ["actions"] = + { + }, -- end of ["actions"] + ["func"] = + { + }, -- end of ["func"] + }, -- end of ["red"] + }, -- end of ["result"] + ["maxDictId"] = 34, + ["groundControl"] = + { + ["isPilotControlVehicles"] = false, + ["roles"] = + { + ["artillery_commander"] = + { + ["blue"] = 0, + ["red"] = 0, + }, -- end of ["artillery_commander"] + ["instructor"] = + { + ["blue"] = 0, + ["red"] = 0, + }, -- end of ["instructor"] + ["observer"] = + { + ["blue"] = 0, + ["red"] = 0, + }, -- end of ["observer"] + ["forward_observer"] = + { + ["blue"] = 0, + ["red"] = 0, + }, -- end of ["forward_observer"] + }, -- end of ["roles"] + }, -- end of ["groundControl"] + ["usedModules"] = + { + ["F-86F Sabre AI by Eagle Dynamics"] = true, + ["Su-27 Flanker by Eagle Dynamics"] = false, + ["TF-51D Mustang by Eagle Dynamics"] = true, + ["M-2000C by RAZBAM Sims"] = true, + ["Su-25A by Eagle Dynamics"] = false, + ["Su-25T by Eagle Dynamics"] = true, + ["F-5E/E-3 by Belsimtek"] = true, + ["MiG-21Bis AI by Leatherneck Simulations"] = true, + ["Mi-8MTV2 Hip by Belsimtek"] = true, + ["Bf 109 K-4 by Eagle Dynamics"] = true, + ["A-10A by Eagle Dynamics"] = false, + ["Hawk T.1A AI by VEAO Simulations"] = true, + ["FW-190D9 Dora by Eagle Dynamics"] = true, + ["MiG-15bis by Belsimtek"] = true, + ["MiG-15bis AI by Eagle Dynamics"] = true, + ["A-10C Warthog by Eagle Dynamics"] = true, + ["Combined Arms by Eagle Dynamics"] = true, + ["UH-1H Huey by Belsimtek"] = true, + ["C-101 Aviojet"] = true, + ["./CoreMods/aircraft/MQ-9 Reaper"] = true, + ["C-101 Aviojet by AvioDev"] = true, + ["F-86F Sabre by Belsimtek"] = true, + ["F-15C"] = false, + ["L-39C/ZA by Eagle Dynamics"] = true, + ["Hawk T.1A by VEAO Simulations"] = true, + ["Caucasus"] = true, + ["Ka-50 Black Shark by Eagle Dynamics"] = true, + ["M-2000C AI by RAZBAM Sims"] = true, + ["P-51D Mustang by Eagle Dynamics"] = true, + ["World War II AI Units by Eagle Dynamics"] = true, + ["MiG-21Bis by Leatherneck Simulations"] = true, + ["Flaming Cliffs by Eagle Dynamics"] = true, + }, -- end of ["usedModules"] + ["resourceCounter"] = + { + }, -- end of ["resourceCounter"] + ["triggers"] = + { + ["zones"] = + { + }, -- end of ["zones"] + }, -- end of ["triggers"] + ["weather"] = + { + ["name_ru"] = "ĐÑĐµĐ½ÑŒ. Đ›Đ¸Đ²ĐµĐ½ÑŒ", + ["wind"] = + { + ["at8000"] = + { + ["speed"] = 0, + ["dir"] = 0, + }, -- end of ["at8000"] + ["atGround"] = + { + ["speed"] = 0, + ["dir"] = 0, + }, -- end of ["atGround"] + ["at2000"] = + { + ["speed"] = 0, + ["dir"] = 0, + }, -- end of ["at2000"] + }, -- end of ["wind"] + ["enable_fog"] = true, + ["atmosphere_type"] = 0, + ["turbulence"] = + { + ["at8000"] = 0, + ["atGround"] = 0, + ["at2000"] = 0, + }, -- end of ["turbulence"] + ["name_es"] = "Otoño. Lluvia fuerte", + ["season"] = + { + ["iseason"] = 1, + ["temperature"] = 20, + }, -- end of ["season"] + ["type_weather"] = 1, + ["qnh"] = 760, + ["cyclones"] = + { + }, -- end of ["cyclones"] + ["name_de"] = "Herbst, Starker Regen", + ["fog"] = + { + ["thickness"] = 0, + ["visibility"] = 25, + ["density"] = 7, + }, -- end of ["fog"] + ["name"] = "Winter, clean sky", + ["name_fr"] = "Automne, pluie violente", + ["visibility"] = + { + ["distance"] = 80000, + }, -- end of ["visibility"] + ["clouds"] = + { + ["thickness"] = 200, + ["density"] = 0, + ["base"] = 300, + ["iprecptns"] = 0, + }, -- end of ["clouds"] + }, -- end of ["weather"] + ["theatre"] = "Caucasus", + ["needModules"] = + { + }, -- end of ["needModules"] + ["map"] = + { + ["centerY"] = 649668.57142857, + ["zoom"] = 100000, + ["centerX"] = -285813.71428571, + }, -- end of ["map"] + ["coalitions"] = + { + ["blue"] = + { + [1] = 21, + [2] = 11, + [3] = 8, + [4] = 28, + [5] = 26, + [6] = 13, + [7] = 5, + [8] = 16, + [9] = 6, + [10] = 15, + [11] = 20, + [12] = 12, + [13] = 40, + [14] = 45, + [15] = 9, + [16] = 10, + [17] = 3, + [18] = 4, + [19] = 2, + }, -- end of ["blue"] + ["neutrals"] = + { + [1] = 23, + [2] = 25, + [3] = 29, + [4] = 30, + [5] = 31, + [6] = 32, + [7] = 33, + [8] = 17, + [9] = 35, + [10] = 36, + [11] = 39, + [12] = 41, + [13] = 42, + [14] = 44, + [15] = 46, + [16] = 22, + [17] = 7, + }, -- end of ["neutrals"] + ["red"] = + { + [1] = 18, + [2] = 24, + [3] = 27, + [4] = 34, + [5] = 37, + [6] = 38, + [7] = 0, + [8] = 43, + [9] = 19, + [10] = 47, + [11] = 1, + }, -- end of ["red"] + }, -- end of ["coalitions"] + ["descriptionText"] = "DictKey_descriptionText_1", + ["pictureFileNameR"] = + { + }, -- end of ["pictureFileNameR"] + ["descriptionBlueTask"] = "DictKey_descriptionBlueTask_3", + ["descriptionRedTask"] = "DictKey_descriptionRedTask_2", + ["pictureFileNameB"] = + { + }, -- end of ["pictureFileNameB"] + ["trigrules"] = + { + [1] = + { + ["rules"] = + { + }, -- end of ["rules"] + ["eventlist"] = "", + ["actions"] = + { + [1] = + { + ["flag"] = 9999, + ["predicate"] = "a_set_flag", + ["ai_task"] = + { + [1] = "", + [2] = "", + }, -- end of ["ai_task"] + }, -- end of [1] + }, -- end of ["actions"] + ["predicate"] = "triggerOnce", + ["comment"] = "MOOSE Load Method", + }, -- end of [1] + [2] = + { + ["rules"] = + { + [1] = + { + ["flag"] = 9999, + ["coalitionlist"] = "red", + ["predicate"] = "c_flag_is_true", + ["zone"] = "", + }, -- end of [1] + }, -- end of ["rules"] + ["eventlist"] = "", + ["actions"] = + { + [1] = + { + ["file"] = "ResKey_Action_5", + ["predicate"] = "a_do_script_file", + ["ai_task"] = + { + [1] = "", + [2] = "", + }, -- end of ["ai_task"] + }, -- end of [1] + }, -- end of ["actions"] + ["predicate"] = "triggerOnce", + ["comment"] = "MOOSE Load Dynamic", + }, -- end of [2] + [3] = + { + ["rules"] = + { + [1] = + { + ["flag"] = 9999, + ["coalitionlist"] = "red", + ["predicate"] = "c_flag_is_false", + ["zone"] = "", + }, -- end of [1] + }, -- end of ["rules"] + ["eventlist"] = "", + ["actions"] = + { + [1] = + { + ["file"] = "ResKey_Action_6", + ["predicate"] = "a_do_script_file", + ["ai_task"] = + { + [1] = "", + [2] = "", + }, -- end of ["ai_task"] + }, -- end of [1] + }, -- end of ["actions"] + ["predicate"] = "triggerOnce", + ["comment"] = "MOOSE Load Embedded", + }, -- end of [3] + [4] = + { + ["rules"] = + { + }, -- end of ["rules"] + ["eventlist"] = "", + ["actions"] = + { + [1] = + { + ["file"] = "ResKey_Action_8", + ["predicate"] = "a_do_script_file", + ["ai_task"] = + { + [1] = "", + [2] = "", + }, -- end of ["ai_task"] + }, -- end of [1] + }, -- end of ["actions"] + ["predicate"] = "triggerOnce", + ["comment"] = "MOOSE Load Mission", + }, -- end of [4] + }, -- end of ["trigrules"] + ["coalition"] = + { + ["blue"] = + { + ["bullseye"] = + { + ["y"] = 617414, + ["x"] = -291014, + }, -- end of ["bullseye"] + ["nav_points"] = + { + }, -- end of ["nav_points"] + ["name"] = "blue", + ["country"] = + { + [1] = + { + ["id"] = 21, + ["name"] = "Australia", + }, -- end of [1] + [2] = + { + ["id"] = 11, + ["name"] = "Belgium", + }, -- end of [2] + [3] = + { + ["id"] = 8, + ["name"] = "Canada", + }, -- end of [3] + [4] = + { + ["id"] = 28, + ["name"] = "Croatia", + }, -- end of [4] + [5] = + { + ["id"] = 26, + ["name"] = "Czech Republic", + }, -- end of [5] + [6] = + { + ["id"] = 13, + ["name"] = "Denmark", + }, -- end of [6] + [7] = + { + ["id"] = 5, + ["name"] = "France", + }, -- end of [7] + [8] = + { + ["id"] = 16, + ["name"] = "Georgia", + ["plane"] = + { + ["group"] = + { + [1] = + { + ["modulation"] = 0, + ["tasks"] = + { + }, -- end of ["tasks"] + ["radioSet"] = false, + ["task"] = "CAS", + ["uncontrolled"] = false, + ["route"] = + { + ["points"] = + { + [1] = + { + ["alt"] = 2000, + ["type"] = "Turning Point", + ["action"] = "Turning Point", + ["alt_type"] = "BARO", + ["formation_template"] = "", + ["properties"] = + { + ["vnav"] = 1, + ["scale"] = 0, + ["angle"] = 0, + ["vangle"] = 0, + ["steer"] = 2, + }, -- end of ["properties"] + ["ETA"] = 0, + ["y"] = 629928.57142857, + ["x"] = -285709.42857143, + ["name"] = "DictKey_WptName_17", + ["speed"] = 138.88888888889, + ["ETA_locked"] = true, + ["task"] = + { + ["id"] = "ComboTask", + ["params"] = + { + ["tasks"] = + { + [1] = + { + ["number"] = 1, + ["key"] = "CAS", + ["id"] = "EngageTargets", + ["enabled"] = true, + ["auto"] = true, + ["params"] = + { + ["targetTypes"] = + { + [1] = "Helicopters", + [2] = "Ground Units", + [3] = "Light armed ships", + }, -- end of ["targetTypes"] + ["priority"] = 0, + }, -- end of ["params"] + }, -- end of [1] + }, -- end of ["tasks"] + }, -- end of ["params"] + }, -- end of ["task"] + ["speed_locked"] = true, + }, -- end of [1] + [2] = + { + ["alt"] = 2000, + ["type"] = "Turning Point", + ["action"] = "Turning Point", + ["alt_type"] = "BARO", + ["formation_template"] = "", + ["properties"] = + { + ["vnav"] = 1, + ["scale"] = 0, + ["angle"] = 0, + ["vangle"] = 0, + ["steer"] = 2, + }, -- end of ["properties"] + ["ETA"] = 15.86677699613, + ["y"] = 629307.14285715, + ["x"] = -283595.14285714, + ["name"] = "DictKey_WptName_24", + ["speed"] = 138.88888888889, + ["ETA_locked"] = false, + ["task"] = + { + ["id"] = "ComboTask", + ["params"] = + { + ["tasks"] = + { + }, -- end of ["tasks"] + }, -- end of ["params"] + }, -- end of ["task"] + ["speed_locked"] = true, + }, -- end of [2] + }, -- end of ["points"] + }, -- end of ["route"] + ["groupId"] = 3, + ["hidden"] = false, + ["units"] = + { + [1] = + { + ["alt"] = 2000, + ["alt_type"] = "BARO", + ["livery_id"] = "af standard", + ["skill"] = "Client", + ["speed"] = 138.88888888889, + ["type"] = "Su-25T", + ["unitId"] = 3, + ["psi"] = 0.28586852603922, + ["y"] = 629928.57142857, + ["x"] = -285709.42857143, + ["name"] = "DictKey_UnitName_16", + ["payload"] = + { + ["pylons"] = + { + }, -- end of ["pylons"] + ["fuel"] = "3790", + ["flare"] = 128, + ["chaff"] = 128, + ["gun"] = 100, + }, -- end of ["payload"] + ["heading"] = -0.28586852603922, + ["callsign"] = + { + [1] = 3, + [2] = 1, + [3] = 1, + ["name"] = "Uzi11", + }, -- end of ["callsign"] + ["onboard_num"] = "010", + }, -- end of [1] + }, -- end of ["units"] + ["y"] = 629928.57142857, + ["x"] = -285709.42857143, + ["name"] = "DictKey_GroupName_15", + ["communication"] = true, + ["start_time"] = 0, + ["frequency"] = 124, + }, -- end of [1] + [2] = + { + ["lateActivation"] = true, + ["tasks"] = + { + }, -- end of ["tasks"] + ["radioSet"] = false, + ["task"] = "CAS", + ["uncontrolled"] = false, + ["route"] = + { + ["routeRelativeTOT"] = true, + ["points"] = + { + [1] = + { + ["alt"] = 2000, + ["type"] = "Turning Point", + ["action"] = "Turning Point", + ["alt_type"] = "BARO", + ["formation_template"] = "", + ["properties"] = + { + ["vnav"] = 1, + ["scale"] = 0, + ["angle"] = 0, + ["vangle"] = 0, + ["steer"] = 2, + }, -- end of ["properties"] + ["ETA"] = 0, + ["y"] = 628607.14285715, + ["x"] = -287052.28571429, + ["name"] = "DictKey_WptName_21", + ["speed"] = 138.88888888889, + ["ETA_locked"] = true, + ["task"] = + { + ["id"] = "ComboTask", + ["params"] = + { + ["tasks"] = + { + }, -- end of ["tasks"] + }, -- end of ["params"] + }, -- end of ["task"] + ["speed_locked"] = true, + }, -- end of [1] + [2] = + { + ["alt"] = 2000, + ["type"] = "Turning Point", + ["action"] = "Turning Point", + ["alt_type"] = "BARO", + ["formation_template"] = "", + ["properties"] = + { + ["vnav"] = 1, + ["scale"] = 0, + ["angle"] = 0, + ["vangle"] = 0, + ["steer"] = 2, + }, -- end of ["properties"] + ["ETA"] = 48.824518671544, + ["y"] = 634468.57142857, + ["x"] = -283642.28571428, + ["name"] = "DictKey_WptName_22", + ["speed"] = 138.88888888889, + ["ETA_locked"] = false, + ["task"] = + { + ["id"] = "ComboTask", + ["params"] = + { + ["tasks"] = + { + }, -- end of ["tasks"] + }, -- end of ["params"] + }, -- end of ["task"] + ["speed_locked"] = true, + }, -- end of [2] + [3] = + { + ["alt"] = 2000, + ["type"] = "Turning Point", + ["action"] = "Turning Point", + ["alt_type"] = "BARO", + ["formation_template"] = "", + ["properties"] = + { + ["vnav"] = 1, + ["scale"] = 0, + ["angle"] = 0, + ["vangle"] = 0, + ["steer"] = 2, + }, -- end of ["properties"] + ["ETA"] = 231.0526539667, + ["y"] = 659754.28571428, + ["x"] = -284642.28571428, + ["name"] = "DictKey_WptName_23", + ["speed"] = 138.88888888889, + ["ETA_locked"] = false, + ["task"] = + { + ["id"] = "ComboTask", + ["params"] = + { + ["tasks"] = + { + [1] = + { + ["number"] = 1, + ["auto"] = false, + ["id"] = "WrappedAction", + ["enabled"] = true, + ["params"] = + { + ["action"] = + { + ["id"] = "SwitchWaypoint", + ["params"] = + { + ["goToWaypointIndex"] = 2, + ["fromWaypointIndex"] = 3, + }, -- end of ["params"] + }, -- end of ["action"] + }, -- end of ["params"] + }, -- end of [1] + }, -- end of ["tasks"] + }, -- end of ["params"] + }, -- end of ["task"] + ["speed_locked"] = true, + }, -- end of [3] + [4] = + { + ["alt"] = 13, + ["type"] = "Land", + ["action"] = "Landing", + ["alt_type"] = "BARO", + ["formation_template"] = "", + ["properties"] = + { + ["vnav"] = 1, + ["scale"] = 0, + ["angle"] = 0, + ["vangle"] = 0, + ["steer"] = 2, + }, -- end of ["properties"] + ["ETA"] = 322.67941016458, + ["airdromeId"] = 23, + ["y"] = 647369.87369832, + ["x"] = -281713.83114196, + ["name"] = "DictKey_WptName_34", + ["speed"] = 138.88888888889, + ["ETA_locked"] = false, + ["task"] = + { + ["id"] = "ComboTask", + ["params"] = + { + ["tasks"] = + { + }, -- end of ["tasks"] + }, -- end of ["params"] + }, -- end of ["task"] + ["speed_locked"] = true, + }, -- end of [4] + }, -- end of ["points"] + }, -- end of ["route"] + ["groupId"] = 4, + ["hidden"] = false, + ["units"] = + { + [1] = + { + ["alt"] = 2000, + ["alt_type"] = "BARO", + ["livery_id"] = "af standard", + ["skill"] = "High", + ["speed"] = 138.88888888889, + ["type"] = "Su-25T", + ["unitId"] = 4, + ["psi"] = -1.0438895175357, + ["y"] = 628607.14285715, + ["x"] = -287052.28571429, + ["name"] = "DictKey_UnitName_20", + ["payload"] = + { + ["pylons"] = + { + }, -- end of ["pylons"] + ["fuel"] = "3790", + ["flare"] = 128, + ["chaff"] = 128, + ["gun"] = 100, + }, -- end of ["payload"] + ["heading"] = 1.0438895175357, + ["callsign"] = + { + [1] = 1, + [2] = 1, + [3] = 1, + ["name"] = "Enfield11", + }, -- end of ["callsign"] + ["onboard_num"] = "011", + }, -- end of [1] + }, -- end of ["units"] + ["y"] = 628607.14285715, + ["x"] = -287052.28571429, + ["name"] = "DictKey_GroupName_19", + ["communication"] = true, + ["start_time"] = 0, + ["modulation"] = 0, + ["frequency"] = 124, + }, -- end of [2] + }, -- end of ["group"] + }, -- end of ["plane"] + }, -- end of [8] + [9] = + { + ["id"] = 6, + ["name"] = "Germany", + }, -- end of [9] + [10] = + { + ["id"] = 15, + ["name"] = "Israel", + }, -- end of [10] + [11] = + { + ["id"] = 20, + ["name"] = "Italy", + }, -- end of [11] + [12] = + { + ["id"] = 12, + ["name"] = "Norway", + }, -- end of [12] + [13] = + { + ["id"] = 40, + ["name"] = "Poland", + }, -- end of [13] + [14] = + { + ["id"] = 45, + ["name"] = "South Korea", + }, -- end of [14] + [15] = + { + ["id"] = 9, + ["name"] = "Spain", + }, -- end of [15] + [16] = + { + ["id"] = 10, + ["name"] = "The Netherlands", + }, -- end of [16] + [17] = + { + ["id"] = 3, + ["name"] = "Turkey", + }, -- end of [17] + [18] = + { + ["id"] = 4, + ["name"] = "UK", + }, -- end of [18] + [19] = + { + ["id"] = 2, + ["name"] = "USA", + ["helicopter"] = + { + ["group"] = + { + [1] = + { + ["modulation"] = 0, + ["tasks"] = + { + }, -- end of ["tasks"] + ["radioSet"] = false, + ["task"] = "CAS", + ["uncontrolled"] = false, + ["route"] = + { + ["points"] = + { + [1] = + { + ["alt"] = 500, + ["type"] = "Turning Point", + ["action"] = "Turning Point", + ["alt_type"] = "BARO", + ["formation_template"] = "", + ["properties"] = + { + ["vnav"] = 1, + ["scale"] = 0, + ["angle"] = 0, + ["vangle"] = 0, + ["steer"] = 2, + }, -- end of ["properties"] + ["ETA"] = 0, + ["y"] = 628382.85714286, + ["x"] = -290099.42857143, + ["name"] = "DictKey_WptName_11", + ["speed"] = 27.777777777778, + ["ETA_locked"] = true, + ["task"] = + { + ["id"] = "ComboTask", + ["params"] = + { + ["tasks"] = + { + [1] = + { + ["number"] = 1, + ["key"] = "CAS", + ["id"] = "EngageTargets", + ["enabled"] = true, + ["auto"] = true, + ["params"] = + { + ["targetTypes"] = + { + [1] = "Helicopters", + [2] = "Ground Units", + [3] = "Light armed ships", + }, -- end of ["targetTypes"] + ["priority"] = 0, + }, -- end of ["params"] + }, -- end of [1] + }, -- end of ["tasks"] + }, -- end of ["params"] + }, -- end of ["task"] + ["speed_locked"] = true, + }, -- end of [1] + [2] = + { + ["alt"] = 500, + ["type"] = "Turning Point", + ["action"] = "Turning Point", + ["alt_type"] = "BARO", + ["formation_template"] = "", + ["properties"] = + { + ["vnav"] = 1, + ["scale"] = 0, + ["angle"] = 0, + ["vangle"] = 0, + ["steer"] = 2, + }, -- end of ["properties"] + ["ETA"] = 243.18972185585, + ["y"] = 641840, + ["x"] = -288899.42857143, + ["name"] = "DictKey_WptName_26", + ["speed"] = 55.555555555556, + ["ETA_locked"] = false, + ["task"] = + { + ["id"] = "ComboTask", + ["params"] = + { + ["tasks"] = + { + }, -- end of ["tasks"] + }, -- end of ["params"] + }, -- end of ["task"] + ["speed_locked"] = true, + }, -- end of [2] + }, -- end of ["points"] + }, -- end of ["route"] + ["groupId"] = 1, + ["hidden"] = false, + ["units"] = + { + [1] = + { + ["alt"] = 500, + ["alt_type"] = "BARO", + ["livery_id"] = "us army", + ["skill"] = "Client", + ["ropeLength"] = 15, + ["speed"] = 27.777777777778, + ["type"] = "Ka-50", + ["Radio"] = + { + [1] = + { + ["channels"] = + { + [7] = 40, + [1] = 21.5, + [2] = 25.7, + [4] = 28, + [8] = 50, + [9] = 55.5, + [5] = 30, + [10] = 59.9, + [3] = 27, + [6] = 32, + }, -- end of ["channels"] + }, -- end of [1] + [2] = + { + ["channels"] = + { + [4] = 0.591, + [13] = 0.583, + [7] = 0.443, + [1] = 0.625, + [2] = 0.303, + [15] = 0.995, + [8] = 0.215, + [16] = 1.21, + [9] = 0.525, + [5] = 0.408, + [10] = 1.065, + [3] = 0.289, + [11] = 0.718, + [6] = 0.803, + [12] = 0.35, + [14] = 0.283, + }, -- end of ["channels"] + }, -- end of [2] + }, -- end of ["Radio"] + ["unitId"] = 1, + ["psi"] = -1.481859585505, + ["y"] = 628382.85714286, + ["x"] = -290099.42857143, + ["name"] = "DictKey_UnitName_10", + ["payload"] = + { + ["pylons"] = + { + }, -- end of ["pylons"] + ["fuel"] = "1450", + ["flare"] = 128, + ["chaff"] = 0, + ["gun"] = 100, + }, -- end of ["payload"] + ["heading"] = 1.481859585505, + ["callsign"] = + { + [1] = 1, + [2] = 1, + [3] = 1, + ["name"] = "Enfield11", + }, -- end of ["callsign"] + ["onboard_num"] = "050", + }, -- end of [1] + }, -- end of ["units"] + ["y"] = 628382.85714286, + ["x"] = -290099.42857143, + ["name"] = "DictKey_GroupName_9", + ["communication"] = true, + ["start_time"] = 0, + ["frequency"] = 124, + }, -- end of [1] + [2] = + { + ["lateActivation"] = true, + ["tasks"] = + { + }, -- end of ["tasks"] + ["radioSet"] = false, + ["task"] = "CAS", + ["uncontrolled"] = false, + ["route"] = + { + ["routeRelativeTOT"] = true, + ["points"] = + { + [1] = + { + ["alt"] = 500, + ["type"] = "Turning Point", + ["action"] = "Turning Point", + ["alt_type"] = "BARO", + ["formation_template"] = "", + ["properties"] = + { + ["vnav"] = 1, + ["scale"] = 0, + ["angle"] = 0, + ["vangle"] = 0, + ["steer"] = 2, + }, -- end of ["properties"] + ["ETA"] = 0, + ["y"] = 630782.85714286, + ["x"] = -290756.57142857, + ["name"] = "DictKey_WptName_14", + ["speed"] = 55.555555555556, + ["ETA_locked"] = true, + ["task"] = + { + ["id"] = "ComboTask", + ["params"] = + { + ["tasks"] = + { + }, -- end of ["tasks"] + }, -- end of ["params"] + }, -- end of ["task"] + ["speed_locked"] = true, + }, -- end of [1] + [2] = + { + ["alt"] = 500, + ["type"] = "Turning Point", + ["action"] = "Turning Point", + ["alt_type"] = "BARO", + ["formation_template"] = "", + ["properties"] = + { + ["vnav"] = 1, + ["scale"] = 0, + ["angle"] = 0, + ["vangle"] = 0, + ["steer"] = 2, + }, -- end of ["properties"] + ["ETA"] = 73.425880995736, + ["y"] = 631182.85714286, + ["x"] = -292756.57142857, + ["name"] = "DictKey_WptName_25", + ["speed"] = 27.777777777778, + ["ETA_locked"] = false, + ["task"] = + { + ["id"] = "ComboTask", + ["params"] = + { + ["tasks"] = + { + [1] = + { + ["enabled"] = true, + ["auto"] = false, + ["id"] = "WrappedAction", + ["number"] = 1, + ["params"] = + { + ["action"] = + { + ["id"] = "Script", + ["params"] = + { + ["command"] = "local DCSGroup = GROUP.FindGroup( ... )\ +DCSGroup:RegisterWayPoint ( 2 )", + }, -- end of ["params"] + }, -- end of ["action"] + }, -- end of ["params"] + }, -- end of [1] + }, -- end of ["tasks"] + }, -- end of ["params"] + }, -- end of ["task"] + ["speed_locked"] = true, + }, -- end of [2] + [3] = + { + ["alt"] = 500, + ["type"] = "Turning Point", + ["action"] = "Turning Point", + ["alt_type"] = "BARO", + ["formation_template"] = "", + ["properties"] = + { + ["vnav"] = 1, + ["scale"] = 0, + ["angle"] = 0, + ["vangle"] = 0, + ["steer"] = 2, + }, -- end of ["properties"] + ["ETA"] = 138.35636187296, + ["y"] = 632354.28571429, + ["x"] = -294128, + ["name"] = "DictKey_WptName_27", + ["speed"] = 27.777777777778, + ["ETA_locked"] = false, + ["task"] = + { + ["id"] = "ComboTask", + ["params"] = + { + ["tasks"] = + { + [1] = + { + ["enabled"] = true, + ["auto"] = false, + ["id"] = "WrappedAction", + ["number"] = 1, + ["params"] = + { + ["action"] = + { + ["id"] = "Script", + ["params"] = + { + ["command"] = "local DCSGroup = GROUP.FindGroup( ... )\ +DCSGroup:RegisterWayPoint ( 3 )", + }, -- end of ["params"] + }, -- end of ["action"] + }, -- end of ["params"] + }, -- end of [1] + }, -- end of ["tasks"] + }, -- end of ["params"] + }, -- end of ["task"] + ["speed_locked"] = true, + }, -- end of [3] + [4] = + { + ["alt"] = 500, + ["type"] = "Turning Point", + ["action"] = "Turning Point", + ["alt_type"] = "BARO", + ["formation_template"] = "", + ["properties"] = + { + ["vnav"] = 1, + ["scale"] = 0, + ["angle"] = 0, + ["vangle"] = 0, + ["steer"] = 2, + }, -- end of ["properties"] + ["ETA"] = 338.52413460414, + ["y"] = 635240, + ["x"] = -294699.42857143, + ["name"] = "DictKey_WptName_28", + ["speed"] = 27.777777777778, + ["ETA_locked"] = false, + ["task"] = + { + ["id"] = "ComboTask", + ["params"] = + { + ["tasks"] = + { + }, -- end of ["tasks"] + }, -- end of ["params"] + }, -- end of ["task"] + ["speed_locked"] = true, + }, -- end of [4] + [5] = + { + ["alt"] = 500, + ["type"] = "Turning Point", + ["action"] = "Turning Point", + ["alt_type"] = "BARO", + ["formation_template"] = "", + ["properties"] = + { + ["vnav"] = 1, + ["scale"] = 0, + ["angle"] = 0, + ["vangle"] = 0, + ["steer"] = 2, + }, -- end of ["properties"] + ["ETA"] = 513.40850223263, + ["y"] = 640097.14285714, + ["x"] = -294613.71428571, + ["name"] = "DictKey_WptName_29", + ["speed"] = 27.777777777778, + ["ETA_locked"] = false, + ["task"] = + { + ["id"] = "ComboTask", + ["params"] = + { + ["tasks"] = + { + [1] = + { + ["enabled"] = true, + ["auto"] = false, + ["id"] = "EngageTargetsInZone", + ["number"] = 1, + ["params"] = + { + ["targetTypes"] = + { + [1] = "Ground Units", + }, -- end of ["targetTypes"] + ["x"] = -288242.28571428, + ["priority"] = 0, + ["y"] = 641982.85714286, + ["zoneRadius"] = 5000, + }, -- end of ["params"] + }, -- end of [1] + }, -- end of ["tasks"] + }, -- end of ["params"] + }, -- end of ["task"] + ["speed_locked"] = true, + }, -- end of [5] + [6] = + { + ["alt"] = 500, + ["type"] = "Turning Point", + ["action"] = "Turning Point", + ["alt_type"] = "BARO", + ["formation_template"] = "", + ["properties"] = + { + ["vnav"] = 1, + ["scale"] = 0, + ["angle"] = 0, + ["vangle"] = 0, + ["steer"] = 2, + }, -- end of ["properties"] + ["ETA"] = 467.11155297145, + ["y"] = 642132.85714286, + ["x"] = -281992.28571428, + ["name"] = "DictKey_WptName_30", + ["speed"] = 27.777777777778, + ["ETA_locked"] = false, + ["task"] = + { + ["id"] = "ComboTask", + ["params"] = + { + ["tasks"] = + { + }, -- end of ["tasks"] + }, -- end of ["params"] + }, -- end of ["task"] + ["speed_locked"] = true, + }, -- end of [6] + }, -- end of ["points"] + }, -- end of ["route"] + ["groupId"] = 2, + ["hidden"] = false, + ["units"] = + { + [1] = + { + ["alt"] = 500, + ["alt_type"] = "BARO", + ["livery_id"] = "us army", + ["skill"] = "High", + ["ropeLength"] = 15, + ["speed"] = 55.555555555556, + ["type"] = "Ka-50", + ["unitId"] = 2, + ["psi"] = -2.9441970937399, + ["y"] = 630782.85714286, + ["x"] = -290756.57142857, + ["name"] = "DictKey_UnitName_13", + ["payload"] = + { + ["pylons"] = + { + }, -- end of ["pylons"] + ["fuel"] = "1450", + ["flare"] = 128, + ["chaff"] = 0, + ["gun"] = 100, + }, -- end of ["payload"] + ["heading"] = 2.9441970937399, + ["callsign"] = + { + [1] = 2, + [2] = 1, + [3] = 1, + ["name"] = "Springfield11", + }, -- end of ["callsign"] + ["onboard_num"] = "051", + }, -- end of [1] + }, -- end of ["units"] + ["y"] = 630782.85714286, + ["x"] = -290756.57142857, + ["name"] = "DictKey_GroupName_12", + ["communication"] = true, + ["start_time"] = 0, + ["modulation"] = 0, + ["frequency"] = 124, + }, -- end of [2] + }, -- end of ["group"] + }, -- end of ["helicopter"] + }, -- end of [19] + }, -- end of ["country"] + }, -- end of ["blue"] + ["red"] = + { + ["bullseye"] = + { + ["y"] = 371700, + ["x"] = 11557, + }, -- end of ["bullseye"] + ["nav_points"] = + { + }, -- end of ["nav_points"] + ["name"] = "red", + ["country"] = + { + [1] = + { + ["id"] = 18, + ["name"] = "Abkhazia", + }, -- end of [1] + [2] = + { + ["id"] = 24, + ["name"] = "Belarus", + }, -- end of [2] + [3] = + { + ["id"] = 27, + ["name"] = "China", + }, -- end of [3] + [4] = + { + ["id"] = 34, + ["name"] = "Iran", + }, -- end of [4] + [5] = + { + ["id"] = 37, + ["name"] = "Kazakhstan", + }, -- end of [5] + [6] = + { + ["id"] = 38, + ["name"] = "North Korea", + }, -- end of [6] + [7] = + { + ["id"] = 0, + ["vehicle"] = + { + ["group"] = + { + [1] = + { + ["visible"] = false, + ["taskSelected"] = true, + ["route"] = + { + ["spans"] = + { + }, -- end of ["spans"] + ["points"] = + { + [1] = + { + ["alt"] = 9, + ["type"] = "Turning Point", + ["ETA"] = 0, + ["alt_type"] = "BARO", + ["formation_template"] = "", + ["y"] = 641868.57142857, + ["x"] = -288928, + ["name"] = "DictKey_WptName_33", + ["ETA_locked"] = true, + ["speed"] = 5.5555555555556, + ["action"] = "Off Road", + ["task"] = + { + ["id"] = "ComboTask", + ["params"] = + { + ["tasks"] = + { + }, -- end of ["tasks"] + }, -- end of ["params"] + }, -- end of ["task"] + ["speed_locked"] = true, + }, -- end of [1] + }, -- end of ["points"] + }, -- end of ["route"] + ["groupId"] = 5, + ["tasks"] = + { + }, -- end of ["tasks"] + ["hidden"] = false, + ["units"] = + { + [1] = + { + ["type"] = "BTR-80", + ["transportable"] = + { + ["randomTransportable"] = false, + }, -- end of ["transportable"] + ["unitId"] = 5, + ["skill"] = "Average", + ["y"] = 641868.57142857, + ["x"] = -288928, + ["name"] = "DictKey_UnitName_32", + ["playerCanDrive"] = true, + ["heading"] = 0, + }, -- end of [1] + }, -- end of ["units"] + ["y"] = 641868.57142857, + ["x"] = -288928, + ["name"] = "DictKey_GroupName_31", + ["start_time"] = 0, + ["task"] = "Ground Nothing", + }, -- end of [1] + }, -- end of ["group"] + }, -- end of ["vehicle"] + ["name"] = "Russia", + }, -- end of [7] + [8] = + { + ["id"] = 43, + ["name"] = "Serbia", + }, -- end of [8] + [9] = + { + ["id"] = 19, + ["name"] = "South Ossetia", + }, -- end of [9] + [10] = + { + ["id"] = 47, + ["name"] = "Syria", + }, -- end of [10] + [11] = + { + ["id"] = 1, + ["name"] = "Ukraine", + }, -- end of [11] + }, -- end of ["country"] + }, -- end of ["red"] + }, -- end of ["coalition"] + ["sortie"] = "DictKey_sortie_4", + ["version"] = 11, + ["goals"] = + { + }, -- end of ["goals"] + ["currentKey"] = 1192, + ["start_time"] = 43200, + ["forcedOptions"] = + { + }, -- end of ["forcedOptions"] + ["failures"] = + { + ["OIL_RADIATOR_SENSOR"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "OIL_RADIATOR_SENSOR", + ["mm"] = 0, + }, -- end of ["OIL_RADIATOR_SENSOR"] + ["TURNIND_POINTER_FAILS_NO_VACUUM"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "TURNIND_POINTER_FAILS_NO_VACUUM", + ["mm"] = 0, + }, -- end of ["TURNIND_POINTER_FAILS_NO_VACUUM"] + ["helmet"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "helmet", + ["mm"] = 0, + }, -- end of ["helmet"] + ["GUN_LEFT_IN_MOUNT_LOOSE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_LEFT_IN_MOUNT_LOOSE", + ["mm"] = 0, + }, -- end of ["GUN_LEFT_IN_MOUNT_LOOSE"] + ["es_damage_MainInverter"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "es_damage_MainInverter", + ["mm"] = 0, + }, -- end of ["es_damage_MainInverter"] + ["rws"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "rws", + ["mm"] = 0, + }, -- end of ["rws"] + ["AN_ALR69V_FAILURE_SENSOR_TAIL_RIGHT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "AN_ALR69V_FAILURE_SENSOR_TAIL_RIGHT", + ["mm"] = 0, + }, -- end of ["AN_ALR69V_FAILURE_SENSOR_TAIL_RIGHT"] + ["MainReductor_ShaveInOil"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "MainReductor_ShaveInOil", + ["mm"] = 0, + }, -- end of ["MainReductor_ShaveInOil"] + ["asc_y"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "asc_y", + ["mm"] = 0, + }, -- end of ["asc_y"] + ["MAIN_L_GEAR_D_LOCK"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "MAIN_L_GEAR_D_LOCK", + ["mm"] = 0, + }, -- end of ["MAIN_L_GEAR_D_LOCK"] + ["AAR_47_FAILURE_SENSOR_LEFT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "AAR_47_FAILURE_SENSOR_LEFT", + ["mm"] = 0, + }, -- end of ["AAR_47_FAILURE_SENSOR_LEFT"] + ["tail_reductor_chip"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "tail_reductor_chip", + ["mm"] = 0, + }, -- end of ["tail_reductor_chip"] + ["TACAN_FAILURE_TOTAL"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "TACAN_FAILURE_TOTAL", + ["mm"] = 0, + }, -- end of ["TACAN_FAILURE_TOTAL"] + ["OIL_RADIATOR_MOTOR"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "OIL_RADIATOR_MOTOR", + ["mm"] = 0, + }, -- end of ["OIL_RADIATOR_MOTOR"] + ["SUPERCHARGER_WIRE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "SUPERCHARGER_WIRE", + ["mm"] = 0, + }, -- end of ["SUPERCHARGER_WIRE"] + ["CADC_FAILURE_TEMPERATURE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "CADC_FAILURE_TEMPERATURE", + ["mm"] = 0, + }, -- end of ["CADC_FAILURE_TEMPERATURE"] + ["FUSELAGE_TANK_LEAK"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "FUSELAGE_TANK_LEAK", + ["mm"] = 0, + }, -- end of ["FUSELAGE_TANK_LEAK"] + ["AN_ALE_40V_FAILURE_TOTAL"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "AN_ALE_40V_FAILURE_TOTAL", + ["mm"] = 0, + }, -- end of ["AN_ALE_40V_FAILURE_TOTAL"] + ["HORIZON_BAR_NOT_SETTLE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "HORIZON_BAR_NOT_SETTLE", + ["mm"] = 0, + }, -- end of ["HORIZON_BAR_NOT_SETTLE"] + ["AN_ALE_40V_FAILURE_CONTAINER_LEFT_WING"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "AN_ALE_40V_FAILURE_CONTAINER_LEFT_WING", + ["mm"] = 0, + }, -- end of ["AN_ALE_40V_FAILURE_CONTAINER_LEFT_WING"] + ["OIL_DILUTION_WIRE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "OIL_DILUTION_WIRE", + ["mm"] = 0, + }, -- end of ["OIL_DILUTION_WIRE"] + ["FLEX_S_BKP_LAMP_DEFECTIVE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "FLEX_S_BKP_LAMP_DEFECTIVE", + ["mm"] = 0, + }, -- end of ["FLEX_S_BKP_LAMP_DEFECTIVE"] + ["TAIL_GEAR_FAIL_GO_DOWN"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "TAIL_GEAR_FAIL_GO_DOWN", + ["mm"] = 0, + }, -- end of ["TAIL_GEAR_FAIL_GO_DOWN"] + ["GUN_FAIL_RIGHT_CENTER_GUN"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_FAIL_RIGHT_CENTER_GUN", + ["mm"] = 0, + }, -- end of ["GUN_FAIL_RIGHT_CENTER_GUN"] + ["LeftEngine_ShaveInOil"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "LeftEngine_ShaveInOil", + ["mm"] = 0, + }, -- end of ["LeftEngine_ShaveInOil"] + ["MAIN_R_GEAR_D_LOCK"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "MAIN_R_GEAR_D_LOCK", + ["mm"] = 0, + }, -- end of ["MAIN_R_GEAR_D_LOCK"] + ["R_GEAR_DLK_FAULT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "R_GEAR_DLK_FAULT", + ["mm"] = 0, + }, -- end of ["R_GEAR_DLK_FAULT"] + ["GMC_GYRO_FAILURE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GMC_GYRO_FAILURE", + ["mm"] = 0, + }, -- end of ["GMC_GYRO_FAILURE"] + ["L_GEAR_DLK_FAULT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "L_GEAR_DLK_FAULT", + ["mm"] = 0, + }, -- end of ["L_GEAR_DLK_FAULT"] + ["K14_FIXED_LAMP_DEFECTIVE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "K14_FIXED_LAMP_DEFECTIVE", + ["mm"] = 0, + }, -- end of ["K14_FIXED_LAMP_DEFECTIVE"] + ["GUN_FAIL_LEFT_CENTER_GUN"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_FAIL_LEFT_CENTER_GUN", + ["mm"] = 0, + }, -- end of ["GUN_FAIL_LEFT_CENTER_GUN"] + ["engine_droop_failure"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "engine_droop_failure", + ["mm"] = 0, + }, -- end of ["engine_droop_failure"] + ["TGP_FAILURE_LEFT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "TGP_FAILURE_LEFT", + ["mm"] = 0, + }, -- end of ["TGP_FAILURE_LEFT"] + ["CADC_FAILURE_TOTAL"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "CADC_FAILURE_TOTAL", + ["mm"] = 0, + }, -- end of ["CADC_FAILURE_TOTAL"] + ["COOLANT_POOR_CONNTECT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "COOLANT_POOR_CONNTECT", + ["mm"] = 0, + }, -- end of ["COOLANT_POOR_CONNTECT"] + ["TURNIND_POINTER_FAILS_DEFECTIVE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "TURNIND_POINTER_FAILS_DEFECTIVE", + ["mm"] = 0, + }, -- end of ["TURNIND_POINTER_FAILS_DEFECTIVE"] + ["GUN_FAIL_RIGHT_OUT_GUN"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_FAIL_RIGHT_OUT_GUN", + ["mm"] = 0, + }, -- end of ["GUN_FAIL_RIGHT_OUT_GUN"] + ["BOMBS_DAMAGE_LINKAGE_LEFT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "BOMBS_DAMAGE_LINKAGE_LEFT", + ["mm"] = 0, + }, -- end of ["BOMBS_DAMAGE_LINKAGE_LEFT"] + ["FUSELAGE_TANK_PUMP_FAULT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "FUSELAGE_TANK_PUMP_FAULT", + ["mm"] = 0, + }, -- end of ["FUSELAGE_TANK_PUMP_FAULT"] + ["hydro_main"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "hydro_main", + ["mm"] = 0, + }, -- end of ["hydro_main"] + ["CICU_FAILURE_TOTAL"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "CICU_FAILURE_TOTAL", + ["mm"] = 0, + }, -- end of ["CICU_FAILURE_TOTAL"] + ["GUN_LEFT_OUT_MOUNT_LOOSE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_LEFT_OUT_MOUNT_LOOSE", + ["mm"] = 0, + }, -- end of ["GUN_LEFT_OUT_MOUNT_LOOSE"] + ["TAIL_GEAR_U_LOCK"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "TAIL_GEAR_U_LOCK", + ["mm"] = 0, + }, -- end of ["TAIL_GEAR_U_LOCK"] + ["RADAR_ALT_TOTAL_FAILURE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "RADAR_ALT_TOTAL_FAILURE", + ["mm"] = 0, + }, -- end of ["RADAR_ALT_TOTAL_FAILURE"] + ["GUN_RIGHT_CENTER_MOUNT_LOOSE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_RIGHT_CENTER_MOUNT_LOOSE", + ["mm"] = 0, + }, -- end of ["GUN_RIGHT_CENTER_MOUNT_LOOSE"] + ["TAIL_GEAR_FAIL_GO_UP"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "TAIL_GEAR_FAIL_GO_UP", + ["mm"] = 0, + }, -- end of ["TAIL_GEAR_FAIL_GO_UP"] + ["asc_r"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "asc_r", + ["mm"] = 0, + }, -- end of ["asc_r"] + ["BOMBS_SOLENOID_FAULT_LEFT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "BOMBS_SOLENOID_FAULT_LEFT", + ["mm"] = 0, + }, -- end of ["BOMBS_SOLENOID_FAULT_LEFT"] + ["sas_yaw_left"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "sas_yaw_left", + ["mm"] = 0, + }, -- end of ["sas_yaw_left"] + ["BOMBS_ARMING_NO_VOLATAGE_LEFT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "BOMBS_ARMING_NO_VOLATAGE_LEFT", + ["mm"] = 0, + }, -- end of ["BOMBS_ARMING_NO_VOLATAGE_LEFT"] + ["PITOT_HEAT_ELEMENT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "PITOT_HEAT_ELEMENT", + ["mm"] = 0, + }, -- end of ["PITOT_HEAT_ELEMENT"] + ["ILS_FAILURE_ANT_LOCALIZER"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "ILS_FAILURE_ANT_LOCALIZER", + ["mm"] = 0, + }, -- end of ["ILS_FAILURE_ANT_LOCALIZER"] + ["AN_ALE_40V_FAILURE_CONTAINER_LEFT_GEAR"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "AN_ALE_40V_FAILURE_CONTAINER_LEFT_GEAR", + ["mm"] = 0, + }, -- end of ["AN_ALE_40V_FAILURE_CONTAINER_LEFT_GEAR"] + ["CARBAIR_SHORT_CIRCUIT_BLB"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "CARBAIR_SHORT_CIRCUIT_BLB", + ["mm"] = 0, + }, -- end of ["CARBAIR_SHORT_CIRCUIT_BLB"] + ["LEFT_TANK_PUMP_FAULT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "LEFT_TANK_PUMP_FAULT", + ["mm"] = 0, + }, -- end of ["LEFT_TANK_PUMP_FAULT"] + ["Surge_RightEngine"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "Surge_RightEngine", + ["mm"] = 0, + }, -- end of ["Surge_RightEngine"] + ["RightEngine_Fire"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["mm"] = 0, + }, -- end of ["RightEngine_Fire"] + ["GUN_FAIL_LEFT_IN_GUN"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_FAIL_LEFT_IN_GUN", + ["mm"] = 0, + }, -- end of ["GUN_FAIL_LEFT_IN_GUN"] + ["CADC_FAILURE_TAS"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "CADC_FAILURE_TAS", + ["mm"] = 0, + }, -- end of ["CADC_FAILURE_TAS"] + ["STARTER_SOL_SHORT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "STARTER_SOL_SHORT", + ["mm"] = 0, + }, -- end of ["STARTER_SOL_SHORT"] + ["asc_p"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "asc_p", + ["mm"] = 0, + }, -- end of ["asc_p"] + ["COOLANT_SHORT_CIRCUIT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "COOLANT_SHORT_CIRCUIT", + ["mm"] = 0, + }, -- end of ["COOLANT_SHORT_CIRCUIT"] + ["GUN_LEFT_IN_AMMUN_FAULT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_LEFT_IN_AMMUN_FAULT", + ["mm"] = 0, + }, -- end of ["GUN_LEFT_IN_AMMUN_FAULT"] + ["PUMP_RELIEF_VALVE_SCREEN_CLOGGED"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "PUMP_RELIEF_VALVE_SCREEN_CLOGGED", + ["mm"] = 0, + }, -- end of ["PUMP_RELIEF_VALVE_SCREEN_CLOGGED"] + ["abris_hardware"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "abris_hardware", + ["mm"] = 0, + }, -- end of ["abris_hardware"] + ["EEC_Failure_LeftEngine"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "EEC_Failure_LeftEngine", + ["mm"] = 0, + }, -- end of ["EEC_Failure_LeftEngine"] + ["COMPASS_POINTER_PULLS"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "COMPASS_POINTER_PULLS", + ["mm"] = 0, + }, -- end of ["COMPASS_POINTER_PULLS"] + ["Failure_RightEngine"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "Failure_RightEngine", + ["mm"] = 0, + }, -- end of ["Failure_RightEngine"] + ["ecm"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "ecm", + ["mm"] = 0, + }, -- end of ["ecm"] + ["CLOCK_FAILURE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "CLOCK_FAILURE", + ["mm"] = 0, + }, -- end of ["CLOCK_FAILURE"] + ["TURNIND_INCORRECT_SENS_VAC_HIGH"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "TURNIND_INCORRECT_SENS_VAC_HIGH", + ["mm"] = 0, + }, -- end of ["TURNIND_INCORRECT_SENS_VAC_HIGH"] + ["OIL_RADIATOR_WIRING"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "OIL_RADIATOR_WIRING", + ["mm"] = 0, + }, -- end of ["OIL_RADIATOR_WIRING"] + ["IGNITION_NO_OUTPUT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "IGNITION_NO_OUTPUT", + ["mm"] = 0, + }, -- end of ["IGNITION_NO_OUTPUT"] + ["AAR_47_FAILURE_TOTAL"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "AAR_47_FAILURE_TOTAL", + ["mm"] = 0, + }, -- end of ["AAR_47_FAILURE_TOTAL"] + ["PILOT_KILLED_FAILURE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "PILOT_KILLED_FAILURE", + ["mm"] = 0, + }, -- end of ["PILOT_KILLED_FAILURE"] + ["BOMBS_ARMING_BROKEN_WIRING_RIGHT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "BOMBS_ARMING_BROKEN_WIRING_RIGHT", + ["mm"] = 0, + }, -- end of ["BOMBS_ARMING_BROKEN_WIRING_RIGHT"] + ["VHF_VT_BURNED_OUT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "VHF_VT_BURNED_OUT", + ["mm"] = 0, + }, -- end of ["VHF_VT_BURNED_OUT"] + ["COOLANT_RADIATOR_WIRING"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "COOLANT_RADIATOR_WIRING", + ["mm"] = 0, + }, -- end of ["COOLANT_RADIATOR_WIRING"] + ["asc_a"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "asc_a", + ["mm"] = 0, + }, -- end of ["asc_a"] + ["AIRSPEED_INDICATOR_FAILURE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "AIRSPEED_INDICATOR_FAILURE", + ["mm"] = 0, + }, -- end of ["AIRSPEED_INDICATOR_FAILURE"] + ["GUN_LEFT_CENTER_BARREL_WORN"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_LEFT_CENTER_BARREL_WORN", + ["mm"] = 0, + }, -- end of ["GUN_LEFT_CENTER_BARREL_WORN"] + ["abris_software"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "abris_software", + ["mm"] = 0, + }, -- end of ["abris_software"] + ["GUN_FAIL_LEFT_OUT_GUN"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_FAIL_LEFT_OUT_GUN", + ["mm"] = 0, + }, -- end of ["GUN_FAIL_LEFT_OUT_GUN"] + ["PUMP_FAILS"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "PUMP_FAILS", + ["mm"] = 0, + }, -- end of ["PUMP_FAILS"] + ["ROCKETS_INTERVALOMETER_WIRING"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "ROCKETS_INTERVALOMETER_WIRING", + ["mm"] = 0, + }, -- end of ["ROCKETS_INTERVALOMETER_WIRING"] + ["MainReductor_LowOilPressure"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "MainReductor_LowOilPressure", + ["mm"] = 0, + }, -- end of ["MainReductor_LowOilPressure"] + ["GUN_RIGHT_IN_AMMUN_FAULT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_RIGHT_IN_AMMUN_FAULT", + ["mm"] = 0, + }, -- end of ["GUN_RIGHT_IN_AMMUN_FAULT"] + ["D2_LEFT_CYLINDER"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "D2_LEFT_CYLINDER", + ["mm"] = 0, + }, -- end of ["D2_LEFT_CYLINDER"] + ["Surge_LeftEngine"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "Surge_LeftEngine", + ["mm"] = 0, + }, -- end of ["Surge_LeftEngine"] + ["BOMBS_RUST_LEFT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "BOMBS_RUST_LEFT", + ["mm"] = 0, + }, -- end of ["BOMBS_RUST_LEFT"] + ["ARN_83_ADF_DAMAGE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "ARN_83_ADF_DAMAGE", + ["mm"] = 0, + }, -- end of ["ARN_83_ADF_DAMAGE"] + ["asc"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "asc", + ["mm"] = 0, + }, -- end of ["asc"] + ["COMPASS_NO_TORQUE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "COMPASS_NO_TORQUE", + ["mm"] = 0, + }, -- end of ["COMPASS_NO_TORQUE"] + ["COOLANT_BREAK_BULB"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "COOLANT_BREAK_BULB", + ["mm"] = 0, + }, -- end of ["COOLANT_BREAK_BULB"] + ["PROP_GOVERNOR"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "PROP_GOVERNOR", + ["mm"] = 0, + }, -- end of ["PROP_GOVERNOR"] + ["MANIFOLD_SHIFT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "MANIFOLD_SHIFT", + ["mm"] = 0, + }, -- end of ["MANIFOLD_SHIFT"] + ["RIGHT_GUNNER_KILLED_FAILURE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "RIGHT_GUNNER_KILLED_FAILURE", + ["mm"] = 0, + }, -- end of ["RIGHT_GUNNER_KILLED_FAILURE"] + ["es_damage_SpareInverter"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "es_damage_SpareInverter", + ["mm"] = 0, + }, -- end of ["es_damage_SpareInverter"] + ["STARTER_BURNOUT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "STARTER_BURNOUT", + ["mm"] = 0, + }, -- end of ["STARTER_BURNOUT"] + ["UNLOAD_VALVE_NOT_LOAD"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "UNLOAD_VALVE_NOT_LOAD", + ["mm"] = 0, + }, -- end of ["UNLOAD_VALVE_NOT_LOAD"] + ["TURNIND_INCORRECT_SENS_VAC_LOW"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "TURNIND_INCORRECT_SENS_VAC_LOW", + ["mm"] = 0, + }, -- end of ["TURNIND_INCORRECT_SENS_VAC_LOW"] + ["Failure_LeftEngine"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "Failure_LeftEngine", + ["mm"] = 0, + }, -- end of ["Failure_LeftEngine"] + ["GUN_RIGHT_IN_BARREL_WORN"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_RIGHT_IN_BARREL_WORN", + ["mm"] = 0, + }, -- end of ["GUN_RIGHT_IN_BARREL_WORN"] + ["K14_MOV_LAMP_DEFECTIVE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "K14_MOV_LAMP_DEFECTIVE", + ["mm"] = 0, + }, -- end of ["K14_MOV_LAMP_DEFECTIVE"] + ["ILS_FAILURE_TOTAL"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "ILS_FAILURE_TOTAL", + ["mm"] = 0, + }, -- end of ["ILS_FAILURE_TOTAL"] + ["GUN_RIGHT_OUT_BARREL_WORN"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_RIGHT_OUT_BARREL_WORN", + ["mm"] = 0, + }, -- end of ["GUN_RIGHT_OUT_BARREL_WORN"] + ["fuel_sys_transfer_pumps"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "fuel_sys_transfer_pumps", + ["mm"] = 0, + }, -- end of ["fuel_sys_transfer_pumps"] + ["PITOT_HEAT_WIRING"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "PITOT_HEAT_WIRING", + ["mm"] = 0, + }, -- end of ["PITOT_HEAT_WIRING"] + ["TURNIND_POINTER_NOT_SET_ZERO"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "TURNIND_POINTER_NOT_SET_ZERO", + ["mm"] = 0, + }, -- end of ["TURNIND_POINTER_NOT_SET_ZERO"] + ["MD1_GYRO_TOTAL_FAILURE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "MD1_GYRO_TOTAL_FAILURE", + ["mm"] = 0, + }, -- end of ["MD1_GYRO_TOTAL_FAILURE"] + ["VHF_FM_RADIO_FAILURE_TOTAL"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "VHF_FM_RADIO_FAILURE_TOTAL", + ["mm"] = 0, + }, -- end of ["VHF_FM_RADIO_FAILURE_TOTAL"] + ["RIGHT_MFCD_FAILURE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "RIGHT_MFCD_FAILURE", + ["mm"] = 0, + }, -- end of ["RIGHT_MFCD_FAILURE"] + ["F2_BOTTOM_CYLINDER"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "F2_BOTTOM_CYLINDER", + ["mm"] = 0, + }, -- end of ["F2_BOTTOM_CYLINDER"] + ["LEFT_WING_TANK_LEAK"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "LEFT_WING_TANK_LEAK", + ["mm"] = 0, + }, -- end of ["LEFT_WING_TANK_LEAK"] + ["CARBAIR_BREAK_LEADS"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "CARBAIR_BREAK_LEADS", + ["mm"] = 0, + }, -- end of ["CARBAIR_BREAK_LEADS"] + ["GUN_LEFT_IN_OPEN_CIRCUIT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_LEFT_IN_OPEN_CIRCUIT", + ["mm"] = 0, + }, -- end of ["GUN_LEFT_IN_OPEN_CIRCUIT"] + ["EGI_FAILURE_TOTAL"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "EGI_FAILURE_TOTAL", + ["mm"] = 0, + }, -- end of ["EGI_FAILURE_TOTAL"] + ["UHF_RADIO_FAILURE_TOTAL"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "UHF_RADIO_FAILURE_TOTAL", + ["mm"] = 0, + }, -- end of ["UHF_RADIO_FAILURE_TOTAL"] + ["GUN_RIGHT_CENTER_AMMUN_FAULT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_RIGHT_CENTER_AMMUN_FAULT", + ["mm"] = 0, + }, -- end of ["GUN_RIGHT_CENTER_AMMUN_FAULT"] + ["LEFT_GUNNER_KILLED_FAILURE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "LEFT_GUNNER_KILLED_FAILURE", + ["mm"] = 0, + }, -- end of ["LEFT_GUNNER_KILLED_FAILURE"] + ["VHF_VT207_DEFECTIVE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "VHF_VT207_DEFECTIVE", + ["mm"] = 0, + }, -- end of ["VHF_VT207_DEFECTIVE"] + ["RightEngine_LowOilPressure"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "RightEngine_LowOilPressure", + ["mm"] = 0, + }, -- end of ["RightEngine_LowOilPressure"] + ["radar"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "radar", + ["mm"] = 0, + }, -- end of ["radar"] + ["RIGHT_TANK_PUMP_FAULT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "RIGHT_TANK_PUMP_FAULT", + ["mm"] = 0, + }, -- end of ["RIGHT_TANK_PUMP_FAULT"] + ["COOLANT_UNPRES"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "COOLANT_UNPRES", + ["mm"] = 0, + }, -- end of ["COOLANT_UNPRES"] + ["ARN_82_FAILURE_TOTAL"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "ARN_82_FAILURE_TOTAL", + ["mm"] = 0, + }, -- end of ["ARN_82_FAILURE_TOTAL"] + ["FLEX_S_NO_POWER_SUPPLY"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "FLEX_S_NO_POWER_SUPPLY", + ["mm"] = 0, + }, -- end of ["FLEX_S_NO_POWER_SUPPLY"] + ["eos"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "eos", + ["mm"] = 0, + }, -- end of ["eos"] + ["HYDRO_LOW_AIR_PRESSURE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "HYDRO_LOW_AIR_PRESSURE", + ["mm"] = 0, + }, -- end of ["HYDRO_LOW_AIR_PRESSURE"] + ["K14_MOTOR_DEFECTIVE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "K14_MOTOR_DEFECTIVE", + ["mm"] = 0, + }, -- end of ["K14_MOTOR_DEFECTIVE"] + ["GENERATOR_FAULT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GENERATOR_FAULT", + ["mm"] = 0, + }, -- end of ["GENERATOR_FAULT"] + ["FUEL_PUMP_FAILURE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "FUEL_PUMP_FAILURE", + ["mm"] = 0, + }, -- end of ["FUEL_PUMP_FAILURE"] + ["RADAR_ALTIMETR_LEFT_ANT_FAILURE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "RADAR_ALTIMETR_LEFT_ANT_FAILURE", + ["mm"] = 0, + }, -- end of ["RADAR_ALTIMETR_LEFT_ANT_FAILURE"] + ["hydro"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "hydro", + ["mm"] = 0, + }, -- end of ["hydro"] + ["BAT_SOLENOID_DEFECTIVE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "BAT_SOLENOID_DEFECTIVE", + ["mm"] = 0, + }, -- end of ["BAT_SOLENOID_DEFECTIVE"] + ["LeftEngine_Fire"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["mm"] = 0, + }, -- end of ["LeftEngine_Fire"] + ["SUPERCHARGER_LIGHT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "SUPERCHARGER_LIGHT", + ["mm"] = 0, + }, -- end of ["SUPERCHARGER_LIGHT"] + ["L_GEAR_UPL_FAULT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "L_GEAR_UPL_FAULT", + ["mm"] = 0, + }, -- end of ["L_GEAR_UPL_FAULT"] + ["fs_damage_right_cell_boost_pump"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "fs_damage_right_cell_boost_pump", + ["mm"] = 0, + }, -- end of ["fs_damage_right_cell_boost_pump"] + ["TACH_RESISTANCE_ADJ"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "TACH_RESISTANCE_ADJ", + ["mm"] = 0, + }, -- end of ["TACH_RESISTANCE_ADJ"] + ["MAGNETO_1"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "MAGNETO_1", + ["mm"] = 0, + }, -- end of ["MAGNETO_1"] + ["BOMBS_NO_VOLATAGE_AT_RACK_RIGHT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "BOMBS_NO_VOLATAGE_AT_RACK_RIGHT", + ["mm"] = 0, + }, -- end of ["BOMBS_NO_VOLATAGE_AT_RACK_RIGHT"] + ["GUN_RIGHT_OUT_MOUNT_LOOSE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_RIGHT_OUT_MOUNT_LOOSE", + ["mm"] = 0, + }, -- end of ["GUN_RIGHT_OUT_MOUNT_LOOSE"] + ["TailReductor_ShaveInOil"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "TailReductor_ShaveInOil", + ["mm"] = 0, + }, -- end of ["TailReductor_ShaveInOil"] + ["R_GEAR_UPL_FAULT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "R_GEAR_UPL_FAULT", + ["mm"] = 0, + }, -- end of ["R_GEAR_UPL_FAULT"] + ["BOMBS_TRAIN_DEFECTIVE_WIRING"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "BOMBS_TRAIN_DEFECTIVE_WIRING", + ["mm"] = 0, + }, -- end of ["BOMBS_TRAIN_DEFECTIVE_WIRING"] + ["autopilot"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "autopilot", + ["mm"] = 0, + }, -- end of ["autopilot"] + ["BOMBS_TRAIN_DEFECTIVE_SWITCH"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "BOMBS_TRAIN_DEFECTIVE_SWITCH", + ["mm"] = 0, + }, -- end of ["BOMBS_TRAIN_DEFECTIVE_SWITCH"] + ["CARBAIR_SHORT_CIRCUIT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "CARBAIR_SHORT_CIRCUIT", + ["mm"] = 0, + }, -- end of ["CARBAIR_SHORT_CIRCUIT"] + ["STARTER_RELAY"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "STARTER_RELAY", + ["mm"] = 0, + }, -- end of ["STARTER_RELAY"] + ["AN_ALE_40V_FAILURE_CONTAINER_RIGHT_WING"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "AN_ALE_40V_FAILURE_CONTAINER_RIGHT_WING", + ["mm"] = 0, + }, -- end of ["AN_ALE_40V_FAILURE_CONTAINER_RIGHT_WING"] + ["TACH_POOR_CONNECTION"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "TACH_POOR_CONNECTION", + ["mm"] = 0, + }, -- end of ["TACH_POOR_CONNECTION"] + ["GUN_RIGHT_IN_MOUNT_LOOSE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_RIGHT_IN_MOUNT_LOOSE", + ["mm"] = 0, + }, -- end of ["GUN_RIGHT_IN_MOUNT_LOOSE"] + ["hydro_right"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "hydro_right", + ["mm"] = 0, + }, -- end of ["hydro_right"] + ["sas_yaw_right"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "sas_yaw_right", + ["mm"] = 0, + }, -- end of ["sas_yaw_right"] + ["DOORS_TVC_BROKEN"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "DOORS_TVC_BROKEN", + ["mm"] = 0, + }, -- end of ["DOORS_TVC_BROKEN"] + ["SADL_FAILURE_TOTAL"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "SADL_FAILURE_TOTAL", + ["mm"] = 0, + }, -- end of ["SADL_FAILURE_TOTAL"] + ["fs_damage_left_cell_boost_pump"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "fs_damage_left_cell_boost_pump", + ["mm"] = 0, + }, -- end of ["fs_damage_left_cell_boost_pump"] + ["BOMBS_DAMAGE_ELINKAGE_LEFT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "BOMBS_DAMAGE_ELINKAGE_LEFT", + ["mm"] = 0, + }, -- end of ["BOMBS_DAMAGE_ELINKAGE_LEFT"] + ["r_conv"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "r_conv", + ["mm"] = 0, + }, -- end of ["r_conv"] + ["ENGINE_JAM"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "ENGINE_JAM", + ["mm"] = 0, + }, -- end of ["ENGINE_JAM"] + ["MAGNETO_2"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "MAGNETO_2", + ["mm"] = 0, + }, -- end of ["MAGNETO_2"] + ["SAR_1_95"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "SAR_1_95", + ["mm"] = 0, + }, -- end of ["SAR_1_95"] + ["BOMBS_SOLENOID_FAULT_RIGHT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "BOMBS_SOLENOID_FAULT_RIGHT", + ["mm"] = 0, + }, -- end of ["BOMBS_SOLENOID_FAULT_RIGHT"] + ["CDU_FAILURE_TOTAL"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "CDU_FAILURE_TOTAL", + ["mm"] = 0, + }, -- end of ["CDU_FAILURE_TOTAL"] + ["STARTER_SOLENOID"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "STARTER_SOLENOID", + ["mm"] = 0, + }, -- end of ["STARTER_SOLENOID"] + ["TAIL_GEAR_C_CABLE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "TAIL_GEAR_C_CABLE", + ["mm"] = 0, + }, -- end of ["TAIL_GEAR_C_CABLE"] + ["STARTER_WIRING"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "STARTER_WIRING", + ["mm"] = 0, + }, -- end of ["STARTER_WIRING"] + ["engine_driveshaft_failure"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "engine_driveshaft_failure", + ["mm"] = 0, + }, -- end of ["engine_driveshaft_failure"] + ["PUMP_RELIEF_VALVE_LEAKS"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "PUMP_RELIEF_VALVE_LEAKS", + ["mm"] = 0, + }, -- end of ["PUMP_RELIEF_VALVE_LEAKS"] + ["HUD_FAILURE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "HUD_FAILURE", + ["mm"] = 0, + }, -- end of ["HUD_FAILURE"] + ["mfd"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "mfd", + ["mm"] = 0, + }, -- end of ["mfd"] + ["CARBAIR_GND_LEAD"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "CARBAIR_GND_LEAD", + ["mm"] = 0, + }, -- end of ["CARBAIR_GND_LEAD"] + ["GMC_MAGN_COMP_FAILURE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GMC_MAGN_COMP_FAILURE", + ["mm"] = 0, + }, -- end of ["GMC_MAGN_COMP_FAILURE"] + ["es_damage_GeneratorLeft"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "es_damage_GeneratorLeft", + ["mm"] = 0, + }, -- end of ["es_damage_GeneratorLeft"] + ["ILS_FAILURE_ANT_GLIDESLOPE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "ILS_FAILURE_ANT_GLIDESLOPE", + ["mm"] = 0, + }, -- end of ["ILS_FAILURE_ANT_GLIDESLOPE"] + ["engine_chip"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "engine_chip", + ["mm"] = 0, + }, -- end of ["engine_chip"] + ["GUN_LEFT_CENTER_AMMUN_FAULT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_LEFT_CENTER_AMMUN_FAULT", + ["mm"] = 0, + }, -- end of ["GUN_LEFT_CENTER_AMMUN_FAULT"] + ["CADC_FAILURE_MACH"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "CADC_FAILURE_MACH", + ["mm"] = 0, + }, -- end of ["CADC_FAILURE_MACH"] + ["ROCKETS_DEFECTIVE_WIRING"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "ROCKETS_DEFECTIVE_WIRING", + ["mm"] = 0, + }, -- end of ["ROCKETS_DEFECTIVE_WIRING"] + ["COPILOT_GYRO_TOTAL_FAILURE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "COPILOT_GYRO_TOTAL_FAILURE", + ["mm"] = 0, + }, -- end of ["COPILOT_GYRO_TOTAL_FAILURE"] + ["RightEngine_ShaveInOil"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "RightEngine_ShaveInOil", + ["mm"] = 0, + }, -- end of ["RightEngine_ShaveInOil"] + ["EEC_Failure_RightEngine"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "EEC_Failure_RightEngine", + ["mm"] = 0, + }, -- end of ["EEC_Failure_RightEngine"] + ["laser_failure"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "laser_failure", + ["mm"] = 0, + }, -- end of ["laser_failure"] + ["RADAR_ALTIMETR_RIGHT_ANT_FAILURE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "RADAR_ALTIMETR_RIGHT_ANT_FAILURE", + ["mm"] = 0, + }, -- end of ["RADAR_ALTIMETR_RIGHT_ANT_FAILURE"] + ["AN_ALR69V_FAILURE_SENSOR_TAIL_LEFT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "AN_ALR69V_FAILURE_SENSOR_TAIL_LEFT", + ["mm"] = 0, + }, -- end of ["AN_ALR69V_FAILURE_SENSOR_TAIL_LEFT"] + ["COMPASS_ERRATIC_OPERATION"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "COMPASS_ERRATIC_OPERATION", + ["mm"] = 0, + }, -- end of ["COMPASS_ERRATIC_OPERATION"] + ["BOMBS_ARMING_BROKEN_WIRING_LEFT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "BOMBS_ARMING_BROKEN_WIRING_LEFT", + ["mm"] = 0, + }, -- end of ["BOMBS_ARMING_BROKEN_WIRING_LEFT"] + ["VHF_SHORTED_CTL_BOX"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "VHF_SHORTED_CTL_BOX", + ["mm"] = 0, + }, -- end of ["VHF_SHORTED_CTL_BOX"] + ["CARBAIR_SHORT_CIRCUIT_LEADS"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "CARBAIR_SHORT_CIRCUIT_LEADS", + ["mm"] = 0, + }, -- end of ["CARBAIR_SHORT_CIRCUIT_LEADS"] + ["BATTERY_OVERHEAT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "BATTERY_OVERHEAT", + ["mm"] = 0, + }, -- end of ["BATTERY_OVERHEAT"] + ["NOSE_AIRSPEED_INDICATOR_FAILURE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "NOSE_AIRSPEED_INDICATOR_FAILURE", + ["mm"] = 0, + }, -- end of ["NOSE_AIRSPEED_INDICATOR_FAILURE"] + ["es_damage_GeneratorRight"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "es_damage_GeneratorRight", + ["mm"] = 0, + }, -- end of ["es_damage_GeneratorRight"] + ["GUN_RIGHT_OUT_AMMUN_FAULT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_RIGHT_OUT_AMMUN_FAULT", + ["mm"] = 0, + }, -- end of ["GUN_RIGHT_OUT_AMMUN_FAULT"] + ["BOMBS_NO_VOLATAGE_BOTH"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "BOMBS_NO_VOLATAGE_BOTH", + ["mm"] = 0, + }, -- end of ["BOMBS_NO_VOLATAGE_BOTH"] + ["CADC_FAILURE_IAS"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "CADC_FAILURE_IAS", + ["mm"] = 0, + }, -- end of ["CADC_FAILURE_IAS"] + ["BOMBS_DAMAGE_ELINKAGE_RIGHT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "BOMBS_DAMAGE_ELINKAGE_RIGHT", + ["mm"] = 0, + }, -- end of ["BOMBS_DAMAGE_ELINKAGE_RIGHT"] + ["ROOF_AIRSPEED_INDICATOR_FAILURE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "ROOF_AIRSPEED_INDICATOR_FAILURE", + ["mm"] = 0, + }, -- end of ["ROOF_AIRSPEED_INDICATOR_FAILURE"] + ["AAR_47_FAILURE_SENSOR_BOTTOM"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "AAR_47_FAILURE_SENSOR_BOTTOM", + ["mm"] = 0, + }, -- end of ["AAR_47_FAILURE_SENSOR_BOTTOM"] + ["DEFECTIVE_MECHANISM"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "DEFECTIVE_MECHANISM", + ["mm"] = 0, + }, -- end of ["DEFECTIVE_MECHANISM"] + ["AN_ALR69V_FAILURE_SENSOR_NOSE_RIGHT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "AN_ALR69V_FAILURE_SENSOR_NOSE_RIGHT", + ["mm"] = 0, + }, -- end of ["AN_ALR69V_FAILURE_SENSOR_NOSE_RIGHT"] + ["TACH_BREAK_CIRCUIT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "TACH_BREAK_CIRCUIT", + ["mm"] = 0, + }, -- end of ["TACH_BREAK_CIRCUIT"] + ["hydro_main_irreversible_valve"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "hydro_main_irreversible_valve", + ["mm"] = 0, + }, -- end of ["hydro_main_irreversible_valve"] + ["CADC_FAILURE_DYNAMIC"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "CADC_FAILURE_DYNAMIC", + ["mm"] = 0, + }, -- end of ["CADC_FAILURE_DYNAMIC"] + ["hud"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "hud", + ["mm"] = 0, + }, -- end of ["hud"] + ["INT_HYDRO_LEAK"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "INT_HYDRO_LEAK", + ["mm"] = 0, + }, -- end of ["INT_HYDRO_LEAK"] + ["BOOST_REG"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "BOOST_REG", + ["mm"] = 0, + }, -- end of ["BOOST_REG"] + ["SAR_1_2_95"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "SAR_1_2_95", + ["mm"] = 0, + }, -- end of ["SAR_1_2_95"] + ["fuel_sys_left_transfer_pump"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "fuel_sys_left_transfer_pump", + ["mm"] = 0, + }, -- end of ["fuel_sys_left_transfer_pump"] + ["LeftEngine_LowOilPressure"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "LeftEngine_LowOilPressure", + ["mm"] = 0, + }, -- end of ["LeftEngine_LowOilPressure"] + ["FAULTY_ROCKET_LEFT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "FAULTY_ROCKET_LEFT", + ["mm"] = 0, + }, -- end of ["FAULTY_ROCKET_LEFT"] + ["es_damage_MainGenerator"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "es_damage_MainGenerator", + ["mm"] = 0, + }, -- end of ["es_damage_MainGenerator"] + ["RIGHT_WING_TANK_LEAK"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "RIGHT_WING_TANK_LEAK", + ["mm"] = 0, + }, -- end of ["RIGHT_WING_TANK_LEAK"] + ["IGNITION_TERM_CONNECT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "IGNITION_TERM_CONNECT", + ["mm"] = 0, + }, -- end of ["IGNITION_TERM_CONNECT"] + ["es_damage_StarterGenerator"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "es_damage_StarterGenerator", + ["mm"] = 0, + }, -- end of ["es_damage_StarterGenerator"] + ["es_damage_Battery"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "es_damage_Battery", + ["mm"] = 0, + }, -- end of ["es_damage_Battery"] + ["ILS_FAILURE_ANT_MARKER"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "ILS_FAILURE_ANT_MARKER", + ["mm"] = 0, + }, -- end of ["ILS_FAILURE_ANT_MARKER"] + ["VHF_SQUELCH_RELAY"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "VHF_SQUELCH_RELAY", + ["mm"] = 0, + }, -- end of ["VHF_SQUELCH_RELAY"] + ["SAR_1_101"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "SAR_1_101", + ["mm"] = 0, + }, -- end of ["SAR_1_101"] + ["GUN_LEFT_CENTER_OPEN_CIRCUIT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_LEFT_CENTER_OPEN_CIRCUIT", + ["mm"] = 0, + }, -- end of ["GUN_LEFT_CENTER_OPEN_CIRCUIT"] + ["sas_pitch_right"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "sas_pitch_right", + ["mm"] = 0, + }, -- end of ["sas_pitch_right"] + ["BOMBS_NO_VOLATAGE_AT_RACK_LEFT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "BOMBS_NO_VOLATAGE_AT_RACK_LEFT", + ["mm"] = 0, + }, -- end of ["BOMBS_NO_VOLATAGE_AT_RACK_LEFT"] + ["TURNIND_POINTER_VIBRATES"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "TURNIND_POINTER_VIBRATES", + ["mm"] = 0, + }, -- end of ["TURNIND_POINTER_VIBRATES"] + ["TACAN_FAILURE_RECEIVER"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "TACAN_FAILURE_RECEIVER", + ["mm"] = 0, + }, -- end of ["TACAN_FAILURE_RECEIVER"] + ["VHF_AM_RADIO_FAILURE_TOTAL"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "VHF_AM_RADIO_FAILURE_TOTAL", + ["mm"] = 0, + }, -- end of ["VHF_AM_RADIO_FAILURE_TOTAL"] + ["main_reductor_chip"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "main_reductor_chip", + ["mm"] = 0, + }, -- end of ["main_reductor_chip"] + ["VHF_CRYSTAL"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "VHF_CRYSTAL", + ["mm"] = 0, + }, -- end of ["VHF_CRYSTAL"] + ["GUN_FAIL_RIGHT_IN_GUN"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_FAIL_RIGHT_IN_GUN", + ["mm"] = 0, + }, -- end of ["GUN_FAIL_RIGHT_IN_GUN"] + ["sas_pitch_left"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "sas_pitch_left", + ["mm"] = 0, + }, -- end of ["sas_pitch_left"] + ["F2_TOP_CYLINDER"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "F2_TOP_CYLINDER", + ["mm"] = 0, + }, -- end of ["F2_TOP_CYLINDER"] + ["FLEX_S_MAIN_LAMP_DEFECTIVE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "FLEX_S_MAIN_LAMP_DEFECTIVE", + ["mm"] = 0, + }, -- end of ["FLEX_S_MAIN_LAMP_DEFECTIVE"] + ["MANIFOLD_LINE_LEAK"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "MANIFOLD_LINE_LEAK", + ["mm"] = 0, + }, -- end of ["MANIFOLD_LINE_LEAK"] + ["COPILOT_KILLED_FAILURE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "COPILOT_KILLED_FAILURE", + ["mm"] = 0, + }, -- end of ["COPILOT_KILLED_FAILURE"] + ["CADC_FAILURE_PRESSURE_ALT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "CADC_FAILURE_PRESSURE_ALT", + ["mm"] = 0, + }, -- end of ["CADC_FAILURE_PRESSURE_ALT"] + ["K14_NO_POWER_SUPPLY"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "K14_NO_POWER_SUPPLY", + ["mm"] = 0, + }, -- end of ["K14_NO_POWER_SUPPLY"] + ["COOLANT_RADIATOR_SENSOR"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "COOLANT_RADIATOR_SENSOR", + ["mm"] = 0, + }, -- end of ["COOLANT_RADIATOR_SENSOR"] + ["INSUF_FUEL_PRES"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "INSUF_FUEL_PRES", + ["mm"] = 0, + }, -- end of ["INSUF_FUEL_PRES"] + ["BOMBS_DAMAGE_LINKAGE_RIGHT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "BOMBS_DAMAGE_LINKAGE_RIGHT", + ["mm"] = 0, + }, -- end of ["BOMBS_DAMAGE_LINKAGE_RIGHT"] + ["fs_damage_engine_pump"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "fs_damage_engine_pump", + ["mm"] = 0, + }, -- end of ["fs_damage_engine_pump"] + ["GUN_RIGHT_OUT_OPEN_CIRCUIT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_RIGHT_OUT_OPEN_CIRCUIT", + ["mm"] = 0, + }, -- end of ["GUN_RIGHT_OUT_OPEN_CIRCUIT"] + ["CADC_FAILURE_STATIC"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "CADC_FAILURE_STATIC", + ["mm"] = 0, + }, -- end of ["CADC_FAILURE_STATIC"] + ["CADC_FAILURE_BARO_ALT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "CADC_FAILURE_BARO_ALT", + ["mm"] = 0, + }, -- end of ["CADC_FAILURE_BARO_ALT"] + ["GUN_RIGHT_CENTER_OPEN_CIRCUIT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_RIGHT_CENTER_OPEN_CIRCUIT", + ["mm"] = 0, + }, -- end of ["GUN_RIGHT_CENTER_OPEN_CIRCUIT"] + ["IFFCC_FAILURE_TOTAL"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "IFFCC_FAILURE_TOTAL", + ["mm"] = 0, + }, -- end of ["IFFCC_FAILURE_TOTAL"] + ["UNLOAD_VALVE_NOT_UNLOAD"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "UNLOAD_VALVE_NOT_UNLOAD", + ["mm"] = 0, + }, -- end of ["UNLOAD_VALVE_NOT_UNLOAD"] + ["TAIL_GEAR_D_LOCK"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "TAIL_GEAR_D_LOCK", + ["mm"] = 0, + }, -- end of ["TAIL_GEAR_D_LOCK"] + ["TACH_BREAK_IN_INDICATOR"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "TACH_BREAK_IN_INDICATOR", + ["mm"] = 0, + }, -- end of ["TACH_BREAK_IN_INDICATOR"] + ["GMC_TOTAL_FAILURE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GMC_TOTAL_FAILURE", + ["mm"] = 0, + }, -- end of ["GMC_TOTAL_FAILURE"] + ["GUN_RIGHT_CENTER_BARREL_WORN"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_RIGHT_CENTER_BARREL_WORN", + ["mm"] = 0, + }, -- end of ["GUN_RIGHT_CENTER_BARREL_WORN"] + ["EXT_HYDRO_LEAK"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "EXT_HYDRO_LEAK", + ["mm"] = 0, + }, -- end of ["EXT_HYDRO_LEAK"] + ["BOMBS_ARMING_BROKEN_SOLENOID_RIGHT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "BOMBS_ARMING_BROKEN_SOLENOID_RIGHT", + ["mm"] = 0, + }, -- end of ["BOMBS_ARMING_BROKEN_SOLENOID_RIGHT"] + ["DEFECTIVE_INSTRUMENT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "DEFECTIVE_INSTRUMENT", + ["mm"] = 0, + }, -- end of ["DEFECTIVE_INSTRUMENT"] + ["AN_ALR69V_FAILURE_SENSOR_NOSE_LEFT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "AN_ALR69V_FAILURE_SENSOR_NOSE_LEFT", + ["mm"] = 0, + }, -- end of ["AN_ALR69V_FAILURE_SENSOR_NOSE_LEFT"] + ["mlws"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "mlws", + ["mm"] = 0, + }, -- end of ["mlws"] + ["BOMBS_ARMING_NO_VOLATAGE_BOTH"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "BOMBS_ARMING_NO_VOLATAGE_BOTH", + ["mm"] = 0, + }, -- end of ["BOMBS_ARMING_NO_VOLATAGE_BOTH"] + ["BAT_SOLENOID_WIRING"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "BAT_SOLENOID_WIRING", + ["mm"] = 0, + }, -- end of ["BAT_SOLENOID_WIRING"] + ["STARTER_LOSE_CON"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "STARTER_LOSE_CON", + ["mm"] = 0, + }, -- end of ["STARTER_LOSE_CON"] + ["FUEL_VALVE_LEAK"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "FUEL_VALVE_LEAK", + ["mm"] = 0, + }, -- end of ["FUEL_VALVE_LEAK"] + ["FLEX_S_NO_GUN_SIGN"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "FLEX_S_NO_GUN_SIGN", + ["mm"] = 0, + }, -- end of ["FLEX_S_NO_GUN_SIGN"] + ["fuel_sys_right_transfer_pump"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "fuel_sys_right_transfer_pump", + ["mm"] = 0, + }, -- end of ["fuel_sys_right_transfer_pump"] + ["COOLANT_RADIATOR_MOTOR"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "COOLANT_RADIATOR_MOTOR", + ["mm"] = 0, + }, -- end of ["COOLANT_RADIATOR_MOTOR"] + ["CARBAIR_OPEN_CIRCUIT_BLB"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "CARBAIR_OPEN_CIRCUIT_BLB", + ["mm"] = 0, + }, -- end of ["CARBAIR_OPEN_CIRCUIT_BLB"] + ["AAR_47_FAILURE_SENSOR_TAIL"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "AAR_47_FAILURE_SENSOR_TAIL", + ["mm"] = 0, + }, -- end of ["AAR_47_FAILURE_SENSOR_TAIL"] + ["GUN_LEFT_OUT_OPEN_CIRCUIT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_LEFT_OUT_OPEN_CIRCUIT", + ["mm"] = 0, + }, -- end of ["GUN_LEFT_OUT_OPEN_CIRCUIT"] + ["TACAN_FAILURE_TRANSMITTER"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "TACAN_FAILURE_TRANSMITTER", + ["mm"] = 0, + }, -- end of ["TACAN_FAILURE_TRANSMITTER"] + ["AN_ALE_40V_FAILURE_CONTAINER_RIGHT_GEAR"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "AN_ALE_40V_FAILURE_CONTAINER_RIGHT_GEAR", + ["mm"] = 0, + }, -- end of ["AN_ALE_40V_FAILURE_CONTAINER_RIGHT_GEAR"] + ["l_gen"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "l_gen", + ["mm"] = 0, + }, -- end of ["l_gen"] + ["TransitionalReductor_ShaveInOil"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "TransitionalReductor_ShaveInOil", + ["mm"] = 0, + }, -- end of ["TransitionalReductor_ShaveInOil"] + ["GUN_LEFT_IN_BARREL_WORN"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_LEFT_IN_BARREL_WORN", + ["mm"] = 0, + }, -- end of ["GUN_LEFT_IN_BARREL_WORN"] + ["r_gen"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "r_gen", + ["mm"] = 0, + }, -- end of ["r_gen"] + ["GUN_LEFT_OUT_BARREL_WORN"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_LEFT_OUT_BARREL_WORN", + ["mm"] = 0, + }, -- end of ["GUN_LEFT_OUT_BARREL_WORN"] + ["AAR_47_FAILURE_SENSOR_RIGHT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "AAR_47_FAILURE_SENSOR_RIGHT", + ["mm"] = 0, + }, -- end of ["AAR_47_FAILURE_SENSOR_RIGHT"] + ["ROCKETS_INTERVALOMETER_SEQ"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "ROCKETS_INTERVALOMETER_SEQ", + ["mm"] = 0, + }, -- end of ["ROCKETS_INTERVALOMETER_SEQ"] + ["hydro_common"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "hydro_common", + ["mm"] = 0, + }, -- end of ["hydro_common"] + ["SAR_2_95"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "SAR_2_95", + ["mm"] = 0, + }, -- end of ["SAR_2_95"] + ["SAR_2_101"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "SAR_2_101", + ["mm"] = 0, + }, -- end of ["SAR_2_101"] + ["BOOSTER_COIL"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "BOOSTER_COIL", + ["mm"] = 0, + }, -- end of ["BOOSTER_COIL"] + ["engine_surge_failure"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "engine_surge_failure", + ["mm"] = 0, + }, -- end of ["engine_surge_failure"] + ["FAULTY_ROCKET_RIGHT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "FAULTY_ROCKET_RIGHT", + ["mm"] = 0, + }, -- end of ["FAULTY_ROCKET_RIGHT"] + ["GUN_RIGHT_IN_OPEN_CIRCUIT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_RIGHT_IN_OPEN_CIRCUIT", + ["mm"] = 0, + }, -- end of ["GUN_RIGHT_IN_OPEN_CIRCUIT"] + ["COMPASS_ERRATIC_INDIACATON"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "COMPASS_ERRATIC_INDIACATON", + ["mm"] = 0, + }, -- end of ["COMPASS_ERRATIC_INDIACATON"] + ["OIL_DILUTION_SOLENOID"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "OIL_DILUTION_SOLENOID", + ["mm"] = 0, + }, -- end of ["OIL_DILUTION_SOLENOID"] + ["PUMP_SEPARATOR_CLOGGED"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "PUMP_SEPARATOR_CLOGGED", + ["mm"] = 0, + }, -- end of ["PUMP_SEPARATOR_CLOGGED"] + ["LEFT_MFCD_FAILURE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "LEFT_MFCD_FAILURE", + ["mm"] = 0, + }, -- end of ["LEFT_MFCD_FAILURE"] + ["BOMBS_RUST_RIGHT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "BOMBS_RUST_RIGHT", + ["mm"] = 0, + }, -- end of ["BOMBS_RUST_RIGHT"] + ["CLOGGED_FUEL_STRAINER"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "CLOGGED_FUEL_STRAINER", + ["mm"] = 0, + }, -- end of ["CLOGGED_FUEL_STRAINER"] + ["GUN_LEFT_OUT_AMMUN_FAULT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_LEFT_OUT_AMMUN_FAULT", + ["mm"] = 0, + }, -- end of ["GUN_LEFT_OUT_AMMUN_FAULT"] + ["r_engine"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "r_engine", + ["mm"] = 0, + }, -- end of ["r_engine"] + ["hydro_left"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "hydro_left", + ["mm"] = 0, + }, -- end of ["hydro_left"] + ["A11_CLOCK_FAILURE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "A11_CLOCK_FAILURE", + ["mm"] = 0, + }, -- end of ["A11_CLOCK_FAILURE"] + ["DOORS_TV_JAMMED"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "DOORS_TV_JAMMED", + ["mm"] = 0, + }, -- end of ["DOORS_TV_JAMMED"] + ["D2_RIGHT_CYLINDER"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "D2_RIGHT_CYLINDER", + ["mm"] = 0, + }, -- end of ["D2_RIGHT_CYLINDER"] + ["ecf"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["mm"] = 0, + }, -- end of ["ecf"] + ["AN_ALR69V_FAILURE_TOTAL"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "AN_ALR69V_FAILURE_TOTAL", + ["mm"] = 0, + }, -- end of ["AN_ALR69V_FAILURE_TOTAL"] + ["BOMBS_ARMING_BROKEN_SOLENOID_LEFT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "BOMBS_ARMING_BROKEN_SOLENOID_LEFT", + ["mm"] = 0, + }, -- end of ["BOMBS_ARMING_BROKEN_SOLENOID_LEFT"] + ["SUPERCHARGER_SOLENOID"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "SUPERCHARGER_SOLENOID", + ["mm"] = 0, + }, -- end of ["SUPERCHARGER_SOLENOID"] + ["ARN_83_TOTAL_FAILURE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "ARN_83_TOTAL_FAILURE", + ["mm"] = 0, + }, -- end of ["ARN_83_TOTAL_FAILURE"] + ["l_engine"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "l_engine", + ["mm"] = 0, + }, -- end of ["l_engine"] + ["GUN_LEFT_CENTER_MOUNT_LOOSE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "GUN_LEFT_CENTER_MOUNT_LOOSE", + ["mm"] = 0, + }, -- end of ["GUN_LEFT_CENTER_MOUNT_LOOSE"] + ["TGP_FAILURE_RIGHT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "TGP_FAILURE_RIGHT", + ["mm"] = 0, + }, -- end of ["TGP_FAILURE_RIGHT"] + ["COOLANT_DEFECTIVE_IND"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "COOLANT_DEFECTIVE_IND", + ["mm"] = 0, + }, -- end of ["COOLANT_DEFECTIVE_IND"] + ["l_conv"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "l_conv", + ["mm"] = 0, + }, -- end of ["l_conv"] + ["JADRO_1A_FAILURE_TOTAL"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["mm"] = 0, + }, -- end of ["JADRO_1A_FAILURE_TOTAL"] + ["BOMBS_ARMING_NO_VOLATAGE_RIGHT"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "BOMBS_ARMING_NO_VOLATAGE_RIGHT", + ["mm"] = 0, + }, -- end of ["BOMBS_ARMING_NO_VOLATAGE_RIGHT"] + ["IFFCC_FAILURE_GUN"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "IFFCC_FAILURE_GUN", + ["mm"] = 0, + }, -- end of ["IFFCC_FAILURE_GUN"] + ["APU_Fire"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["mm"] = 0, + }, -- end of ["APU_Fire"] + ["TURNIND_INCORRECT_SENS_DEFECTIVE"] = + { + ["hh"] = 0, + ["prob"] = 100, + ["enable"] = false, + ["mmint"] = 1, + ["id"] = "TURNIND_INCORRECT_SENS_DEFECTIVE", + ["mm"] = 0, + }, -- end of ["TURNIND_INCORRECT_SENS_DEFECTIVE"] + }, -- end of ["failures"] +} -- end of mission diff --git a/Test Missions/miz/MOOSE_Escort_Test_Follow/options b/Test Missions/miz/MOOSE_Escort_Test_Follow/options new file mode 100644 index 000000000..f17fc57c6 --- /dev/null +++ b/Test Missions/miz/MOOSE_Escort_Test_Follow/options @@ -0,0 +1,203 @@ +options = +{ + ["difficulty"] = + { + ["fuel"] = false, + ["labels"] = true, + ["easyRadar"] = false, + ["easyCommunication"] = true, + ["miniHUD"] = false, + ["setGlobal"] = true, + ["birds"] = 0, + ["optionsView"] = "optview_all", + ["permitCrash"] = true, + ["immortal"] = true, + ["avionicsLanguage"] = "native", + ["cockpitVisualRM"] = true, + ["padlock"] = true, + ["reports"] = true, + ["hideStick"] = false, + ["radio"] = true, + ["map"] = true, + ["externalViews"] = true, + ["spectatorExternalViews"] = true, + ["cockpitLanguage"] = "english", + ["tips"] = true, + ["userSnapView"] = true, + ["units"] = "metric", + ["impostors"] = "medium", + ["iconsTheme"] = "nato", + ["easyFlight"] = false, + ["weapons"] = true, + ["cockpitStatusBarAllowed"] = false, + ["geffect"] = "realistic", + }, -- end of ["difficulty"] + ["playerName"] = "Killer", + ["graphics"] = + { + ["OculusRift"] = false, + ["color"] = "32", + ["preloadRadius"] = 150000, + ["heatBlr"] = 1, + ["scenes"] = "high", + ["water"] = 2, + ["visibRange"] = "Medium", + ["treesVisibility"] = 10505, + ["aspect"] = 1.7777777777778, + ["lights"] = 2, + ["HDR"] = 1, + ["MSAA"] = 3, + ["civTraffic"] = "medium", + ["clutterMaxDistance"] = 920, + ["terrainTextures"] = "max", + ["multiMonitorSetup"] = "1camera", + ["shadowTree"] = true, + ["fullScreen"] = false, + ["disableAero"] = false, + ["DOF"] = 0, + ["clouds"] = 1, + ["flatTerrainShadows"] = 0, + ["cockpitShadows"] = true, + ["height"] = 1080, + ["width"] = 1920, + ["shadows"] = 3, + ["textures"] = 2, + ["sync"] = true, + ["LensEffects"] = 3, + ["anisotropy"] = 4, + ["TranspSSAA"] = false, + ["haze"] = 1, + ["effects"] = 3, + }, -- end of ["graphics"] + ["plugins"] = + { + ["CA"] = + { + ["kompass_options"] = 1, + ["ground_target_info"] = true, + ["ground_aim_helper"] = true, + ["ground_platform_shake"] = true, + ["ground_automatic"] = true, + }, -- end of ["CA"] + ["MiG-15bis"] = + { + ["autoLeanToAimMiG15"] = true, + ["CPLocalList"] = "chinese", + ["gunCamera"] = 0, + ["aiHelper"] = false, + }, -- end of ["MiG-15bis"] + ["A-10C"] = + { + ["CPLocalList"] = "default", + }, -- end of ["A-10C"] + ["Ka-50"] = + { + ["altTrimmingMethod"] = false, + ["Ka50RudderTrimmer"] = false, + ["CPLocalList"] = "english", + }, -- end of ["Ka-50"] + ["P-51D"] = + { + ["assistance"] = 100, + ["CPLocalList"] = "default", + ["autoRudder"] = false, + }, -- end of ["P-51D"] + ["MiG-21Bis"] = + { + ["Engine"] = false, + ["CustomCockpit"] = false, + ["Shake"] = 100, + ["Reticle"] = false, + ["Freeze"] = false, + }, -- end of ["MiG-21Bis"] + ["F-86F"] = + { + ["landSeatAdjustF86"] = true, + ["CPLocalList"] = "default", + ["NoseWheelSteeringSimpleBehaviourF86"] = true, + ["gunCamera"] = 0, + }, -- end of ["F-86F"] + ["FC3"] = + { + ["CPLocalList_F-15C"] = "default", + ["CPLocalList_MiG-29S"] = "default", + ["CPLocalList_MiG-29A"] = "default", + ["CPLocalList_Su-25"] = "default", + ["CPLocalList_A-10A"] = "default", + ["CPLocalList_Su-27"] = "chinese", + ["CPLocalList_MiG-29G"] = "default", + ["CPLocalList_Su-33"] = "default", + }, -- end of ["FC3"] + ["Mi-8MTV2"] = + { + ["altMi8TrimmingMethod"] = false, + ["Mi8AutopilotAdjustment"] = false, + ["Mi8RudderTrimmer"] = false, + ["controlHelperMi8"] = false, + ["CPLocalList"] = "default", + ["weapTooltipsMi8"] = true, + ["Mi8FOV"] = 120, + }, -- end of ["Mi-8MTV2"] + ["TF-51D"] = + { + ["assistance"] = 100, + ["CPLocalList"] = "default", + ["autoRudder"] = false, + }, -- end of ["TF-51D"] + ["FW-190D9"] = + { + ["assistance"] = 100, + ["CPLocalList"] = "default", + ["autoRudder"] = false, + }, -- end of ["FW-190D9"] + ["UH-1H"] = + { + ["UHRudderTrimmer"] = false, + ["autoPilot"] = true, + ["altUHTrimmingMethod"] = false, + ["CPLocalList"] = "default", + ["weapTooltips"] = true, + ["UHTrackIRAiming"] = true, + }, -- end of ["UH-1H"] + ["Su-25T"] = + { + ["CPLocalList"] = "default", + }, -- end of ["Su-25T"] + }, -- end of ["plugins"] + ["views"] = + { + ["cockpit"] = + { + ["mirrors"] = false, + ["reflections"] = false, + ["avionics"] = 3, + ["russianHud"] = false, + }, -- end of ["cockpit"] + }, -- end of ["views"] + ["sound"] = + { + ["hear_in_helmet"] = true, + ["headphones"] = -15, + ["cockpit"] = 0, + ["GBreathEffect"] = true, + ["gui"] = 0, + ["volume"] = 0, + ["radioSpeech"] = true, + ["music"] = -100, + ["subtitles"] = true, + ["world"] = 0, + }, -- end of ["sound"] + ["miscellaneous"] = + { + ["headmove"] = true, + ["f5_nearest_ac"] = true, + ["f11_free_camera"] = true, + ["F2_view_effects"] = 2, + ["f10_awacs"] = true, + ["Coordinate_Display"] = "Lat Long", + ["accidental_failures"] = false, + ["force_feedback_enabled"] = true, + ["synchronize_controls"] = false, + ["show_pilot_body"] = true, + }, -- end of ["miscellaneous"] +} -- end of options diff --git a/Test Missions/miz/MOOSE_Escort_Test_Follow/warehouses b/Test Missions/miz/MOOSE_Escort_Test_Follow/warehouses new file mode 100644 index 000000000..4da4b8597 --- /dev/null +++ b/Test Missions/miz/MOOSE_Escort_Test_Follow/warehouses @@ -0,0 +1,807 @@ +warehouses = +{ + ["airports"] = + { + [12] = + { + ["gasoline"] = + { + ["InitFuel"] = 100, + }, -- end of ["gasoline"] + ["unlimitedMunitions"] = true, + ["methanol_mixture"] = + { + ["InitFuel"] = 100, + }, -- end of ["methanol_mixture"] + ["OperatingLevel_Air"] = 10, + ["diesel"] = + { + ["InitFuel"] = 100, + }, -- end of ["diesel"] + ["speed"] = 16.666666, + ["size"] = 100, + ["periodicity"] = 30, + ["suppliers"] = + { + }, -- end of ["suppliers"] + ["coalition"] = "NEUTRAL", + ["jet_fuel"] = + { + ["InitFuel"] = 100, + }, -- end of ["jet_fuel"] + ["OperatingLevel_Eqp"] = 10, + ["unlimitedFuel"] = true, + ["aircrafts"] = + { + }, -- end of ["aircrafts"] + ["weapons"] = + { + }, -- end of ["weapons"] + ["OperatingLevel_Fuel"] = 10, + ["unlimitedAircrafts"] = true, + }, -- end of [12] + [13] = + { + ["gasoline"] = + { + ["InitFuel"] = 100, + }, -- end of ["gasoline"] + ["unlimitedMunitions"] = true, + ["methanol_mixture"] = + { + ["InitFuel"] = 100, + }, -- end of ["methanol_mixture"] + ["OperatingLevel_Air"] = 10, + ["diesel"] = + { + ["InitFuel"] = 100, + }, -- end of ["diesel"] + ["speed"] = 16.666666, + ["size"] = 100, + ["periodicity"] = 30, + ["suppliers"] = + { + }, -- end of ["suppliers"] + ["coalition"] = "NEUTRAL", + ["jet_fuel"] = + { + ["InitFuel"] = 100, + }, -- end of ["jet_fuel"] + ["OperatingLevel_Eqp"] = 10, + ["unlimitedFuel"] = true, + ["aircrafts"] = + { + }, -- end of ["aircrafts"] + ["weapons"] = + { + }, -- end of ["weapons"] + ["OperatingLevel_Fuel"] = 10, + ["unlimitedAircrafts"] = true, + }, -- end of [13] + [14] = + { + ["gasoline"] = + { + ["InitFuel"] = 100, + }, -- end of ["gasoline"] + ["unlimitedMunitions"] = true, + ["methanol_mixture"] = + { + ["InitFuel"] = 100, + }, -- end of ["methanol_mixture"] + ["OperatingLevel_Air"] = 10, + ["diesel"] = + { + ["InitFuel"] = 100, + }, -- end of ["diesel"] + ["speed"] = 16.666666, + ["size"] = 100, + ["periodicity"] = 30, + ["suppliers"] = + { + }, -- end of ["suppliers"] + ["coalition"] = "NEUTRAL", + ["jet_fuel"] = + { + ["InitFuel"] = 100, + }, -- end of ["jet_fuel"] + ["OperatingLevel_Eqp"] = 10, + ["unlimitedFuel"] = true, + ["aircrafts"] = + { + }, -- end of ["aircrafts"] + ["weapons"] = + { + }, -- end of ["weapons"] + ["OperatingLevel_Fuel"] = 10, + ["unlimitedAircrafts"] = true, + }, -- end of [14] + [15] = + { + ["gasoline"] = + { + ["InitFuel"] = 100, + }, -- end of ["gasoline"] + ["unlimitedMunitions"] = true, + ["methanol_mixture"] = + { + ["InitFuel"] = 100, + }, -- end of ["methanol_mixture"] + ["OperatingLevel_Air"] = 10, + ["diesel"] = + { + ["InitFuel"] = 100, + }, -- end of ["diesel"] + ["speed"] = 16.666666, + ["size"] = 100, + ["periodicity"] = 30, + ["suppliers"] = + { + }, -- end of ["suppliers"] + ["coalition"] = "NEUTRAL", + ["jet_fuel"] = + { + ["InitFuel"] = 100, + }, -- end of ["jet_fuel"] + ["OperatingLevel_Eqp"] = 10, + ["unlimitedFuel"] = true, + ["aircrafts"] = + { + }, -- end of ["aircrafts"] + ["weapons"] = + { + }, -- end of ["weapons"] + ["OperatingLevel_Fuel"] = 10, + ["unlimitedAircrafts"] = true, + }, -- end of [15] + [16] = + { + ["gasoline"] = + { + ["InitFuel"] = 100, + }, -- end of ["gasoline"] + ["unlimitedMunitions"] = true, + ["methanol_mixture"] = + { + ["InitFuel"] = 100, + }, -- end of ["methanol_mixture"] + ["OperatingLevel_Air"] = 10, + ["diesel"] = + { + ["InitFuel"] = 100, + }, -- end of ["diesel"] + ["speed"] = 16.666666, + ["size"] = 100, + ["periodicity"] = 30, + ["suppliers"] = + { + }, -- end of ["suppliers"] + ["coalition"] = "NEUTRAL", + ["jet_fuel"] = + { + ["InitFuel"] = 100, + }, -- end of ["jet_fuel"] + ["OperatingLevel_Eqp"] = 10, + ["unlimitedFuel"] = true, + ["aircrafts"] = + { + }, -- end of ["aircrafts"] + ["weapons"] = + { + }, -- end of ["weapons"] + ["OperatingLevel_Fuel"] = 10, + ["unlimitedAircrafts"] = true, + }, -- end of [16] + [17] = + { + ["gasoline"] = + { + ["InitFuel"] = 100, + }, -- end of ["gasoline"] + ["unlimitedMunitions"] = true, + ["methanol_mixture"] = + { + ["InitFuel"] = 100, + }, -- end of ["methanol_mixture"] + ["OperatingLevel_Air"] = 10, + ["diesel"] = + { + ["InitFuel"] = 100, + }, -- end of ["diesel"] + ["speed"] = 16.666666, + ["size"] = 100, + ["periodicity"] = 30, + ["suppliers"] = + { + }, -- end of ["suppliers"] + ["coalition"] = "NEUTRAL", + ["jet_fuel"] = + { + ["InitFuel"] = 100, + }, -- end of ["jet_fuel"] + ["OperatingLevel_Eqp"] = 10, + ["unlimitedFuel"] = true, + ["aircrafts"] = + { + }, -- end of ["aircrafts"] + ["weapons"] = + { + }, -- end of ["weapons"] + ["OperatingLevel_Fuel"] = 10, + ["unlimitedAircrafts"] = true, + }, -- end of [17] + [18] = + { + ["gasoline"] = + { + ["InitFuel"] = 100, + }, -- end of ["gasoline"] + ["unlimitedMunitions"] = true, + ["methanol_mixture"] = + { + ["InitFuel"] = 100, + }, -- end of ["methanol_mixture"] + ["OperatingLevel_Air"] = 10, + ["diesel"] = + { + ["InitFuel"] = 100, + }, -- end of ["diesel"] + ["speed"] = 16.666666, + ["size"] = 100, + ["periodicity"] = 30, + ["suppliers"] = + { + }, -- end of ["suppliers"] + ["coalition"] = "NEUTRAL", + ["jet_fuel"] = + { + ["InitFuel"] = 100, + }, -- end of ["jet_fuel"] + ["OperatingLevel_Eqp"] = 10, + ["unlimitedFuel"] = true, + ["aircrafts"] = + { + }, -- end of ["aircrafts"] + ["weapons"] = + { + }, -- end of ["weapons"] + ["OperatingLevel_Fuel"] = 10, + ["unlimitedAircrafts"] = true, + }, -- end of [18] + [19] = + { + ["gasoline"] = + { + ["InitFuel"] = 100, + }, -- end of ["gasoline"] + ["unlimitedMunitions"] = true, + ["methanol_mixture"] = + { + ["InitFuel"] = 100, + }, -- end of ["methanol_mixture"] + ["OperatingLevel_Air"] = 10, + ["diesel"] = + { + ["InitFuel"] = 100, + }, -- end of ["diesel"] + ["speed"] = 16.666666, + ["size"] = 100, + ["periodicity"] = 30, + ["suppliers"] = + { + }, -- end of ["suppliers"] + ["coalition"] = "NEUTRAL", + ["jet_fuel"] = + { + ["InitFuel"] = 100, + }, -- end of ["jet_fuel"] + ["OperatingLevel_Eqp"] = 10, + ["unlimitedFuel"] = true, + ["aircrafts"] = + { + }, -- end of ["aircrafts"] + ["weapons"] = + { + }, -- end of ["weapons"] + ["OperatingLevel_Fuel"] = 10, + ["unlimitedAircrafts"] = true, + }, -- end of [19] + [20] = + { + ["gasoline"] = + { + ["InitFuel"] = 100, + }, -- end of ["gasoline"] + ["unlimitedMunitions"] = true, + ["methanol_mixture"] = + { + ["InitFuel"] = 100, + }, -- end of ["methanol_mixture"] + ["OperatingLevel_Air"] = 10, + ["diesel"] = + { + ["InitFuel"] = 100, + }, -- end of ["diesel"] + ["speed"] = 16.666666, + ["size"] = 100, + ["periodicity"] = 30, + ["suppliers"] = + { + }, -- end of ["suppliers"] + ["coalition"] = "NEUTRAL", + ["jet_fuel"] = + { + ["InitFuel"] = 100, + }, -- end of ["jet_fuel"] + ["OperatingLevel_Eqp"] = 10, + ["unlimitedFuel"] = true, + ["aircrafts"] = + { + }, -- end of ["aircrafts"] + ["weapons"] = + { + }, -- end of ["weapons"] + ["OperatingLevel_Fuel"] = 10, + ["unlimitedAircrafts"] = true, + }, -- end of [20] + [21] = + { + ["gasoline"] = + { + ["InitFuel"] = 100, + }, -- end of ["gasoline"] + ["unlimitedMunitions"] = true, + ["methanol_mixture"] = + { + ["InitFuel"] = 100, + }, -- end of ["methanol_mixture"] + ["OperatingLevel_Air"] = 10, + ["diesel"] = + { + ["InitFuel"] = 100, + }, -- end of ["diesel"] + ["speed"] = 16.666666, + ["size"] = 100, + ["periodicity"] = 30, + ["suppliers"] = + { + }, -- end of ["suppliers"] + ["coalition"] = "NEUTRAL", + ["jet_fuel"] = + { + ["InitFuel"] = 100, + }, -- end of ["jet_fuel"] + ["OperatingLevel_Eqp"] = 10, + ["unlimitedFuel"] = true, + ["aircrafts"] = + { + }, -- end of ["aircrafts"] + ["weapons"] = + { + }, -- end of ["weapons"] + ["OperatingLevel_Fuel"] = 10, + ["unlimitedAircrafts"] = true, + }, -- end of [21] + [22] = + { + ["gasoline"] = + { + ["InitFuel"] = 100, + }, -- end of ["gasoline"] + ["unlimitedMunitions"] = true, + ["methanol_mixture"] = + { + ["InitFuel"] = 100, + }, -- end of ["methanol_mixture"] + ["OperatingLevel_Air"] = 10, + ["diesel"] = + { + ["InitFuel"] = 100, + }, -- end of ["diesel"] + ["speed"] = 16.666666, + ["size"] = 100, + ["periodicity"] = 30, + ["suppliers"] = + { + }, -- end of ["suppliers"] + ["coalition"] = "NEUTRAL", + ["jet_fuel"] = + { + ["InitFuel"] = 100, + }, -- end of ["jet_fuel"] + ["OperatingLevel_Eqp"] = 10, + ["unlimitedFuel"] = true, + ["aircrafts"] = + { + }, -- end of ["aircrafts"] + ["weapons"] = + { + }, -- end of ["weapons"] + ["OperatingLevel_Fuel"] = 10, + ["unlimitedAircrafts"] = true, + }, -- end of [22] + [23] = + { + ["gasoline"] = + { + ["InitFuel"] = 100, + }, -- end of ["gasoline"] + ["unlimitedMunitions"] = true, + ["methanol_mixture"] = + { + ["InitFuel"] = 100, + }, -- end of ["methanol_mixture"] + ["OperatingLevel_Air"] = 10, + ["diesel"] = + { + ["InitFuel"] = 100, + }, -- end of ["diesel"] + ["speed"] = 16.666666, + ["size"] = 100, + ["periodicity"] = 30, + ["suppliers"] = + { + }, -- end of ["suppliers"] + ["coalition"] = "BLUE", + ["jet_fuel"] = + { + ["InitFuel"] = 100, + }, -- end of ["jet_fuel"] + ["OperatingLevel_Eqp"] = 10, + ["unlimitedFuel"] = true, + ["aircrafts"] = + { + }, -- end of ["aircrafts"] + ["weapons"] = + { + }, -- end of ["weapons"] + ["OperatingLevel_Fuel"] = 10, + ["unlimitedAircrafts"] = true, + }, -- end of [23] + [24] = + { + ["gasoline"] = + { + ["InitFuel"] = 100, + }, -- end of ["gasoline"] + ["unlimitedMunitions"] = true, + ["methanol_mixture"] = + { + ["InitFuel"] = 100, + }, -- end of ["methanol_mixture"] + ["OperatingLevel_Air"] = 10, + ["diesel"] = + { + ["InitFuel"] = 100, + }, -- end of ["diesel"] + ["speed"] = 16.666666, + ["size"] = 100, + ["periodicity"] = 30, + ["suppliers"] = + { + }, -- end of ["suppliers"] + ["coalition"] = "NEUTRAL", + ["jet_fuel"] = + { + ["InitFuel"] = 100, + }, -- end of ["jet_fuel"] + ["OperatingLevel_Eqp"] = 10, + ["unlimitedFuel"] = true, + ["aircrafts"] = + { + }, -- end of ["aircrafts"] + ["weapons"] = + { + }, -- end of ["weapons"] + ["OperatingLevel_Fuel"] = 10, + ["unlimitedAircrafts"] = true, + }, -- end of [24] + [25] = + { + ["gasoline"] = + { + ["InitFuel"] = 100, + }, -- end of ["gasoline"] + ["unlimitedMunitions"] = true, + ["methanol_mixture"] = + { + ["InitFuel"] = 100, + }, -- end of ["methanol_mixture"] + ["OperatingLevel_Air"] = 10, + ["diesel"] = + { + ["InitFuel"] = 100, + }, -- end of ["diesel"] + ["speed"] = 16.666666, + ["size"] = 100, + ["periodicity"] = 30, + ["suppliers"] = + { + }, -- end of ["suppliers"] + ["coalition"] = "NEUTRAL", + ["jet_fuel"] = + { + ["InitFuel"] = 100, + }, -- end of ["jet_fuel"] + ["OperatingLevel_Eqp"] = 10, + ["unlimitedFuel"] = true, + ["aircrafts"] = + { + }, -- end of ["aircrafts"] + ["weapons"] = + { + }, -- end of ["weapons"] + ["OperatingLevel_Fuel"] = 10, + ["unlimitedAircrafts"] = true, + }, -- end of [25] + [26] = + { + ["gasoline"] = + { + ["InitFuel"] = 100, + }, -- end of ["gasoline"] + ["unlimitedMunitions"] = true, + ["methanol_mixture"] = + { + ["InitFuel"] = 100, + }, -- end of ["methanol_mixture"] + ["OperatingLevel_Air"] = 10, + ["diesel"] = + { + ["InitFuel"] = 100, + }, -- end of ["diesel"] + ["speed"] = 16.666666, + ["size"] = 100, + ["periodicity"] = 30, + ["suppliers"] = + { + }, -- end of ["suppliers"] + ["coalition"] = "NEUTRAL", + ["jet_fuel"] = + { + ["InitFuel"] = 100, + }, -- end of ["jet_fuel"] + ["OperatingLevel_Eqp"] = 10, + ["unlimitedFuel"] = true, + ["aircrafts"] = + { + }, -- end of ["aircrafts"] + ["weapons"] = + { + }, -- end of ["weapons"] + ["OperatingLevel_Fuel"] = 10, + ["unlimitedAircrafts"] = true, + }, -- end of [26] + [27] = + { + ["gasoline"] = + { + ["InitFuel"] = 100, + }, -- end of ["gasoline"] + ["unlimitedMunitions"] = true, + ["methanol_mixture"] = + { + ["InitFuel"] = 100, + }, -- end of ["methanol_mixture"] + ["OperatingLevel_Air"] = 10, + ["diesel"] = + { + ["InitFuel"] = 100, + }, -- end of ["diesel"] + ["speed"] = 16.666666, + ["size"] = 100, + ["periodicity"] = 30, + ["suppliers"] = + { + }, -- end of ["suppliers"] + ["coalition"] = "NEUTRAL", + ["jet_fuel"] = + { + ["InitFuel"] = 100, + }, -- end of ["jet_fuel"] + ["OperatingLevel_Eqp"] = 10, + ["unlimitedFuel"] = true, + ["aircrafts"] = + { + }, -- end of ["aircrafts"] + ["weapons"] = + { + }, -- end of ["weapons"] + ["OperatingLevel_Fuel"] = 10, + ["unlimitedAircrafts"] = true, + }, -- end of [27] + [28] = + { + ["gasoline"] = + { + ["InitFuel"] = 100, + }, -- end of ["gasoline"] + ["unlimitedMunitions"] = true, + ["methanol_mixture"] = + { + ["InitFuel"] = 100, + }, -- end of ["methanol_mixture"] + ["OperatingLevel_Air"] = 10, + ["diesel"] = + { + ["InitFuel"] = 100, + }, -- end of ["diesel"] + ["speed"] = 16.666666, + ["size"] = 100, + ["periodicity"] = 30, + ["suppliers"] = + { + }, -- end of ["suppliers"] + ["coalition"] = "NEUTRAL", + ["jet_fuel"] = + { + ["InitFuel"] = 100, + }, -- end of ["jet_fuel"] + ["OperatingLevel_Eqp"] = 10, + ["unlimitedFuel"] = true, + ["aircrafts"] = + { + }, -- end of ["aircrafts"] + ["weapons"] = + { + }, -- end of ["weapons"] + ["OperatingLevel_Fuel"] = 10, + ["unlimitedAircrafts"] = true, + }, -- end of [28] + [29] = + { + ["gasoline"] = + { + ["InitFuel"] = 100, + }, -- end of ["gasoline"] + ["unlimitedMunitions"] = true, + ["methanol_mixture"] = + { + ["InitFuel"] = 100, + }, -- end of ["methanol_mixture"] + ["OperatingLevel_Air"] = 10, + ["diesel"] = + { + ["InitFuel"] = 100, + }, -- end of ["diesel"] + ["speed"] = 16.666666, + ["size"] = 100, + ["periodicity"] = 30, + ["suppliers"] = + { + }, -- end of ["suppliers"] + ["coalition"] = "NEUTRAL", + ["jet_fuel"] = + { + ["InitFuel"] = 100, + }, -- end of ["jet_fuel"] + ["OperatingLevel_Eqp"] = 10, + ["unlimitedFuel"] = true, + ["aircrafts"] = + { + }, -- end of ["aircrafts"] + ["weapons"] = + { + }, -- end of ["weapons"] + ["OperatingLevel_Fuel"] = 10, + ["unlimitedAircrafts"] = true, + }, -- end of [29] + [30] = + { + ["gasoline"] = + { + ["InitFuel"] = 100, + }, -- end of ["gasoline"] + ["unlimitedMunitions"] = true, + ["methanol_mixture"] = + { + ["InitFuel"] = 100, + }, -- end of ["methanol_mixture"] + ["OperatingLevel_Air"] = 10, + ["diesel"] = + { + ["InitFuel"] = 100, + }, -- end of ["diesel"] + ["speed"] = 16.666666, + ["size"] = 100, + ["periodicity"] = 30, + ["suppliers"] = + { + }, -- end of ["suppliers"] + ["coalition"] = "NEUTRAL", + ["jet_fuel"] = + { + ["InitFuel"] = 100, + }, -- end of ["jet_fuel"] + ["OperatingLevel_Eqp"] = 10, + ["unlimitedFuel"] = true, + ["aircrafts"] = + { + }, -- end of ["aircrafts"] + ["weapons"] = + { + }, -- end of ["weapons"] + ["OperatingLevel_Fuel"] = 10, + ["unlimitedAircrafts"] = true, + }, -- end of [30] + [31] = + { + ["gasoline"] = + { + ["InitFuel"] = 100, + }, -- end of ["gasoline"] + ["unlimitedMunitions"] = true, + ["methanol_mixture"] = + { + ["InitFuel"] = 100, + }, -- end of ["methanol_mixture"] + ["OperatingLevel_Air"] = 10, + ["diesel"] = + { + ["InitFuel"] = 100, + }, -- end of ["diesel"] + ["speed"] = 16.666666, + ["size"] = 100, + ["periodicity"] = 30, + ["suppliers"] = + { + }, -- end of ["suppliers"] + ["coalition"] = "NEUTRAL", + ["jet_fuel"] = + { + ["InitFuel"] = 100, + }, -- end of ["jet_fuel"] + ["OperatingLevel_Eqp"] = 10, + ["unlimitedFuel"] = true, + ["aircrafts"] = + { + }, -- end of ["aircrafts"] + ["weapons"] = + { + }, -- end of ["weapons"] + ["OperatingLevel_Fuel"] = 10, + ["unlimitedAircrafts"] = true, + }, -- end of [31] + [32] = + { + ["gasoline"] = + { + ["InitFuel"] = 100, + }, -- end of ["gasoline"] + ["unlimitedMunitions"] = true, + ["methanol_mixture"] = + { + ["InitFuel"] = 100, + }, -- end of ["methanol_mixture"] + ["OperatingLevel_Air"] = 10, + ["diesel"] = + { + ["InitFuel"] = 100, + }, -- end of ["diesel"] + ["speed"] = 16.666666, + ["size"] = 100, + ["periodicity"] = 30, + ["suppliers"] = + { + }, -- end of ["suppliers"] + ["coalition"] = "NEUTRAL", + ["jet_fuel"] = + { + ["InitFuel"] = 100, + }, -- end of ["jet_fuel"] + ["OperatingLevel_Eqp"] = 10, + ["unlimitedFuel"] = true, + ["aircrafts"] = + { + }, -- end of ["aircrafts"] + ["weapons"] = + { + }, -- end of ["weapons"] + ["OperatingLevel_Fuel"] = 10, + ["unlimitedAircrafts"] = true, + }, -- end of [32] + }, -- end of ["airports"] + ["warehouses"] = + { + }, -- end of ["warehouses"] +} -- end of warehouses diff --git a/Test Missions/MOOSE_Pickup_Test.miz b/Test Missions/miz/MOOSE_Pickup_Test.miz similarity index 100% rename from Test Missions/MOOSE_Pickup_Test.miz rename to Test Missions/miz/MOOSE_Pickup_Test.miz diff --git a/Test Missions/MOOSE_Spawn_Test.miz b/Test Missions/miz/MOOSE_Spawn_Test.miz similarity index 100% rename from Test Missions/MOOSE_Spawn_Test.miz rename to Test Missions/miz/MOOSE_Spawn_Test.miz diff --git a/Moose/Trace.lua b/Trash/Trace.lua similarity index 100% rename from Moose/Trace.lua rename to Trash/Trace.lua