Merge remote-tracking branch 'refs/remotes/origin/master' into FlightControl

# Conflicts:
#	Moose Development/Moose/Functional/Scoring.lua
#	Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
#	Moose Mission Setup/Moose.lua
#	Moose Test Missions/ABP - Airbase Police/APL-001 - Caucasus/APL-001 -
Caucasus.miz
#	Moose Test Missions/ABP - Airbase Police/APL-002 - Nevada/APL-002 -
Nevada.miz
#	Moose Test Missions/ACL - Airbase Cleaner/ACL-001 - Airbase
CleanUp/ACL-001 - Airbase CleanUp.miz
#	Moose Test Missions/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 -
Spawned AI.miz
#	Moose Test Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 -
Patrol AI.miz
#	Moose Test Missions/AIB - AI Balancing/AIB-003 - Two coalitions
InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.miz
#	Moose Test Missions/AIB - AI Balancing/AIB-004 - Respawn Test when
Destroyed/AIB-004 - Respawn Test when Destroyed.miz
#	Moose Test Missions/AIB - AI Balancing/AIB-005 - Patrol AI and
Randomize Zones/AIB-005 - Patrol AI and Randomize Zones.miz
#	Moose Test Missions/AIB - AI Balancing/AIB-006 - Declutter AI at
Airbases/AIB-006 - Declutter AI at Airbases.miz
#	Moose Test Missions/CAP - Combat Air Patrol/CAP-001 - Combat Air
Patrol/CAP-001 - Combat Air Patrol.miz
#	Moose Test Missions/CAP - Combat Air Patrol/CAP-010 - CAP and Engage
within Range/CAP-010 - CAP and Engage within Range.miz
#	Moose Test Missions/CAP - Combat Air Patrol/CAP-011 - CAP and Engage
within Zone/CAP-011 - CAP and Engage within Zone.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-001 - CAS in a Zone by
Airplane Group/CAS-001 - CAS in a ZONE-ME Test.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-001 - CAS in a Zone by
Airplane Group/CAS-001 - CAS in a Zone by Airplane Group.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-002 - CAS in a Zone by
Airplane Group - Engage with Speed/CAS-002 - CAS in a Zone by Airplane
Group - Engage with Speed.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-003 - CAS in a Zone by
Airplane Group - Engage with Speed and Altitude/CAS-003 - CAS in a Zone
by Airplane Group - Engage with Speed and Altitude.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-010 - CAS in a Zone by
Helicopter/CAS-010 - CAS in a Zone by Helicopter.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-011 - CAS in a Zone by
Helicopter Group/CAS-011 - CAS in a Zone by Helicopter Group.miz
#	Moose Test Missions/CAS - Close Air Support/CAS-111 - Multiple CAS in
1 Radius Zone by Helicopter and AirPlane Groups/CAS-111 - Multiple CAS
in 1 Radius Zone by Helicopter and AirPlane Groups.miz
#	Moose Test Missions/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit
Boarding.miz
#	Moose Test Missions/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 -
Unit Unboarding.miz
#	Moose Test Missions/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 -
Unit Transferring.miz
#	Moose Test Missions/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 -
Group Boarding.miz
#	Moose Test Missions/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 -
Group Unboarding.miz
#	Moose Test Missions/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 -
Group Transferring.miz
#	Moose Test Missions/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 -
Package Boarding.miz
#	Moose Test Missions/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 -
Package Unboarding.miz
#	Moose Test Missions/DET - Detection/DET-001 - Detection Areas/DET-001
- Detection Areas.miz
#	Moose Test Missions/DET - Detection/DET-101 - Detection
Reporting/DET-101 - Detection Reporting.miz
#	Moose Test Missions/ESC - Escorting/ESC-001 - Escorting
Helicopters/ESC-001 - Escorting Helicopters.miz
#	Moose Test Missions/EVT - Event Handling/EVT-001 - API Demo 1/EVT-001
- API Demo 1.miz
#	Moose Test Missions/EVT - Event Handling/EVT-100 - OnEventShot
Example/EVT-100 - OnEventShot Example.miz
#	Moose Test Missions/EVT - Event Handling/EVT-101 - OnEventHit
Example/EVT-101 - OnEventHit Example.miz
#	Moose Test Missions/EVT - Event Handling/EVT-102 - OnEventTakeoff
Example/EVT-102 - OnEventTakeoff Example.miz
#	Moose Test Missions/EVT - Event Handling/EVT-103 - OnEventLand
Example/EVT-103 - OnEventLand Example.miz
#	Moose Test Missions/EVT - Event Handling/EVT-104 - OnEventCrash
Example/EVT-104 - OnEventCrash Example.miz
#	Moose Test Missions/FSM - Finite State Machine/FSM-100 - Transition
Explanation/FSM-100 - Transition Explanation.miz
#	Moose Test Missions/GRP - Group Commands/GRP-200 - Follow
Group/GRP-200 - Follow Group.miz
#	Moose Test Missions/GRP - Group Commands/GRP-300 - Switch
WayPoints/GRP-300 - Switch WayPoints.miz
#	Moose Test Missions/GRP - Group Commands/Moose_Test_WRAPPER.miz
#	Moose Test Missions/MEN - Menu Options/MEN-001 - Menu Client/MEN-001 -
Menu Client.miz
#	Moose Test Missions/MEN - Menu Options/MEN-002 - Menu
Coalition/MEN-002 - Menu Coalition.miz
#	Moose Test Missions/MEN - Menu Options/MEN-003 - Menu Group/MEN-003 -
Menu Group.miz
#	Moose Test Missions/MIT - Missile Trainer/MIT-001 - Missile
Trainer/MIT-001 - Missile Trainer.miz
#	Moose Test Missions/MOOSE_Test_Template.miz
#	Moose Test Missions/PAT - Patrolling/PAT-001 - Switching Patrol
Zones/PAT-001 - Switching Patrol Zones.miz
#	Moose Test Missions/SCH - Scheduler/SCH-000 - Simple
Scheduling/SCH-000 - Simple Scheduling.miz
#	Moose Test Missions/SCH - Scheduler/SCH-001 - Simple Object
Scheduling/SCH-001 - Simple Object Scheduling.miz
#	Moose Test Missions/SCH - Scheduler/SCH-100 - Simple Repeat
Scheduling/SCH-100 - Simple Repeat Scheduling.miz
#	Moose Test Missions/SCH - Scheduler/SCH-110 - Object Repeat
Scheduling/SCH-110 - Object Repeat Scheduling.miz
#	Moose Test Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling
Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.miz
#	Moose Test Missions/SCH - Scheduler/SCH-300 - GC Simple Object
Scheduling/SCH-300 - GC Simple Object Scheduling.miz
#	Moose Test Missions/SCH - Scheduler/SCH-310 - GC Object Repeat
Scheduling/SCH-310 - GC Object Repeat Scheduling.miz
#	Moose Test Missions/SCO - Scoring/SCO-100 - Scoring of Statics/SCO-100
- Scoring of Statics.miz
#	Moose Test Missions/SCO - Scoring/SCO-101 - Scoring Client to
Client/SCO-101 - Scoring Client to Client.miz
#	Moose Test Missions/SET - Data Sets/SET-001 - Airbase Sets/SET-001 -
Airbase Sets.miz
#	Moose Test Missions/SET - Data Sets/SET-101 - Group Sets/SET-101 -
Group Sets.miz
#	Moose Test Missions/SET - Data Sets/SET-201 - Client Sets/SET-201 -
Client Sets.miz
#	Moose Test Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001
- SEAD Evasion.miz
#	Moose Test Missions/SPA - Spawning/SPA-010 - Spawn Demo/SPA-010 -
Spawn Demo.miz
#	Moose Test Missions/SPA - Spawning/SPA-011 - Ground Ops - Simple
Spawning/SPA-011 - Ground Ops - Simple Spawning.miz
#	Moose Test Missions/SPA - Spawning/SPA-012 - Ground Ops - Multiple
Spawns/SPA-012 - Ground Ops - Multiple Spawns.miz
#	Moose Test Missions/SPA - Spawning/SPA-013 - Ground Ops - Scheduled
Spawns/SPA-013 - Ground Ops - Scheduled Spawns.miz
#	Moose Test Missions/SPA - Spawning/SPA-014 - Ground Ops - Scheduled
Spawns Limited/SPA-014 - Ground Ops - Scheduled Spawns Limited.miz
#	Moose Test Missions/SPA - Spawning/SPA-015 - Ground Ops - Randomize
Route/SPA-015 - Ground Ops - Randomize Route.miz
#	Moose Test Missions/SPA - Spawning/SPA-016 - Ground Ops - Randomize
Zones/SPA-016 - Ground Ops - Randomize Zones.miz
#	Moose Test Missions/SPA - Spawning/SPA-017 - Ground Ops - Set AI
inactive while spawning/SPA-017 - Ground Ops - Set AI inactive while
spawning.miz
#	Moose Test Missions/SPA - Spawning/SPA-018 - Ground Ops - Randomize
Templates/SPA-018 - Ground Ops - Randomize Templates.miz
#	Moose Test Missions/SPA - Spawning/SPA-100 - CleanUp Inactive
Units/SPA-100 - CleanUp Inactive Units.miz
#	Moose Test Missions/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 -
Limit Spawning.miz
#	Moose Test Missions/SPA - Spawning/SPA-121 - Air Ops - Scheduled
Spawns with Repeat on Landing with Limit/SPA-121 - Air Ops - Scheduled
Spawns with Repeat on Landing with Limit.miz
#	Moose Test Missions/SPA - Spawning/SPA-130 - Uncontrolled
Spawning/SPA-130 - Uncontrolled Spawning.miz
#	Moose Test Missions/SPA - Spawning/SPA-200 - Randomize Unit
Types/SPA-200 - Randomize Unit Types.miz
#	Moose Test Missions/SPA - Spawning/SPA-220 - Randomize Zones/SPA-220 -
Randomize Zones.miz
#	Moose Test Missions/SPA - Spawning/SPA-310 - Spawn at Static
position/SPA-310 - Spawn at Static position.miz
#	Moose Test Missions/SPA - Spawning/SPA-320 - Spawn at Unit
position/SPA-320 - Spawn at Unit position.miz
#	Moose Test Missions/SPA - Spawning/SPA-330 - Spawn at Vec2
position/SPA-330 - Spawn at Vec2 position.miz
#	Moose Test Missions/SPA - Spawning/SPA-340 - Spawn at Vec3
position/SPA-340 - Spawn at Vec3 position.miz
#	Moose Test Missions/TAD - Task Dispatching/TAD-010 - Task Dispatching
Demo/TAD-010 - Task Dispatching Demo.miz
#	Moose Test Missions/TSK - Task Modelling/TSK-010 - Task Modelling -
SEAD/TSK-010 - Task Modelling - SEAD.miz
#	Moose Test Missions/TSK - Task Modelling/TSK-020 - Task Modelling -
Pickup/TSK-020 - Task Modelling - Pickup.miz
#	Moose Test Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal
Zone.miz
#	Moose Test Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group
Zone.miz
#	Moose Test Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit
Zone.miz
#	Moose Test Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius
Zone.miz
#	Moose Test Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 -
Polygon Zone.miz
#	Moose Test Missions/ZON - Zones/ZON-510 - Send message if Clients fly
the first time in the Polygon Zones/ZON-510 - Send message if Clients
fly the first time in the Polygon Zones.miz
This commit is contained in:
FlightControl 2017-03-05 07:45:08 +01:00
commit cd3648f03d
18 changed files with 161 additions and 44 deletions

View File

@ -110,7 +110,7 @@
--
-- # 3) EVENTDATA type
--
-- The EVENTDATA contains all the fields that are populated with event information before
-- The @{Event#EVENTDATA} structure contains all the fields that are populated with event information before
-- an Event Handler method is being called by the event dispatcher.
-- The Event Handler received the EVENTDATA object as a parameter, and can be used to investigate further the different events.
-- There are basically 4 main categories of information stored in the EVENTDATA structure:
@ -120,6 +120,17 @@
-- * Weapon data: Certain events populate weapon information.
-- * Place data: Certain events populate place information.
--
-- --- This function is an Event Handling function that will be called when Tank1 is Dead.
-- -- EventData is an EVENTDATA structure.
-- -- We use the EventData.IniUnit to smoke the tank Green.
-- -- @param Wrapper.Unit#UNIT self
-- -- @param Core.Event#EVENTDATA EventData
-- function Tank1:OnEventDead( EventData )
--
-- EventData.IniUnit:SmokeGreen()
-- end
--
--
-- Find below an overview which events populate which information categories:
--
-- ![Objects](..\Presentations\EVENT\Dia14.JPG)
@ -220,35 +231,35 @@ EVENTS = {
-- @type EVENTDATA
-- @field #number id The identifier of the event.
--
-- @field Dcs.DCSUnit#Unit initiator (UNIT/STATIC/SCENERY) The initiating @{Dcs.DCSUnit#Unit} or @{Dcs.DCSStaticObject#StaticObject}.
-- @field Dcs.DCSObject#Object.Category IniObjectCategory (UNIT/STATIC/SCENERY) The initiator object category ( Object.Category.UNIT or Object.Category.STATIC ).
-- @field Dcs.DCSUnit#Unit IniDCSUnit (UNIT/STATIC) The initiating @{Dcs.DCSUnit#Unit} or @{Dcs.DCSStaticObject#StaticObject}.
-- @field #string IniDCSUnitName (UNIT/STATIC) The initiating Unit name.
-- @field Wrapper.Unit#UNIT IniUnit (UNIT/STATIC) The initiating MOOSE wrapper @{Wrapper.Unit#UNIT} of the initiator Unit object.
-- @field #string IniUnitName (UNIT/STATIC) The initiating UNIT name (same as IniDCSUnitName).
-- @field Dcs.DCSGroup#Group IniDCSGroup (UNIT) The initiating {Dcs.DCSGroup#Group}.
-- @field #string IniDCSGroupName (UNIT) The initiating Group name.
-- @field Wrapper.Group#GROUP IniGroup (UNIT) The initiating MOOSE wrapper @{Wrapper.Group#GROUP} of the initiator Group object.
-- @field #string IniGroupName (UNIT) The initiating GROUP name (same as IniDCSGroupName).
-- @field #string IniPlayerName (UNIT) The name of the initiating player in case the Unit is a client or player slot.
-- @field Dcs.DCScoalition#coalition.side IniCoalition (UNIT) The coalition of the initiator.
-- @field Dcs.DCSUnit#Unit.Category IniCategory (UNIT) The category of the initiator.
-- @field #string IniTypeName (UNIT) The type name of the initiator.
-- @field Dcs.DCSUnit#Unit initiator (UNIT/STATIC/SCENERY) The initiating @{Dcs.DCSUnit#Unit} or @{Dcs.DCSStaticObject#StaticObject}.
-- @field Dcs.DCSObject#Object.Category IniObjectCategory (UNIT/STATIC/SCENERY) The initiator object category ( Object.Category.UNIT or Object.Category.STATIC ).
-- @field Dcs.DCSUnit#Unit IniDCSUnit (UNIT/STATIC) The initiating @{DCSUnit#Unit} or @{DCSStaticObject#StaticObject}.
-- @field #string IniDCSUnitName (UNIT/STATIC) The initiating Unit name.
-- @field Wrapper.Unit#UNIT IniUnit (UNIT/STATIC) The initiating MOOSE wrapper @{Unit#UNIT} of the initiator Unit object.
-- @field #string IniUnitName (UNIT/STATIC) The initiating UNIT name (same as IniDCSUnitName).
-- @field Dcs.DCSGroup#Group IniDCSGroup (UNIT) The initiating {DCSGroup#Group}.
-- @field #string IniDCSGroupName (UNIT) The initiating Group name.
-- @field Wrapper.Group#GROUP IniGroup (UNIT) The initiating MOOSE wrapper @{Group#GROUP} of the initiator Group object.
-- @field #string IniGroupName UNIT) The initiating GROUP name (same as IniDCSGroupName).
-- @field #string IniPlayerName (UNIT) The name of the initiating player in case the Unit is a client or player slot.
-- @field Dcs.DCScoalition#coalition.side IniCoalition (UNIT) The coalition of the initiator.
-- @field Dcs.DCSUnit#Unit.Category IniCategory (UNIT) The category of the initiator.
-- @field #string IniTypeName (UNIT) The type name of the initiator.
--
-- @field Dcs.DCSUnit#Unit target (UNIT/STATIC) The target @{Dcs.DCSUnit#Unit} or @{Dcs.DCSStaticObject#StaticObject}.
-- @field Dcs.DCSObject#Object.Category TgtObjectCategory (UNIT/STATIC) The target object category ( Object.Category.UNIT or Object.Category.STATIC ).
-- @field Dcs.DCSUnit#Unit TgtDCSUnit (UNIT/STATIC) The target @{Dcs.DCSUnit#Unit} or @{Dcs.DCSStaticObject#StaticObject}.
-- @field #string TgtDCSUnitName (UNIT/STATIC) The target Unit name.
-- @field Wrapper.Unit#UNIT TgtUnit (UNIT/STATIC) The target MOOSE wrapper @{Wrapper.Unit#UNIT} of the target Unit object.
-- @field #string TgtUnitName (UNIT/STATIC) The target UNIT name (same as TgtDCSUnitName).
-- @field Dcs.DCSGroup#Group TgtDCSGroup (UNIT) The target {Dcs.DCSGroup#Group}.
-- @field #string TgtDCSGroupName (UNIT) The target Group name.
-- @field Wrapper.Group#GROUP TgtGroup (UNIT) The target MOOSE wrapper @{Wrapper.Group#GROUP} of the target Group object.
-- @field #string TgtGroupName (UNIT) The target GROUP name (same as TgtDCSGroupName).
-- @field #string TgtPlayerName (UNIT) The name of the target player in case the Unit is a client or player slot.
-- @field Dcs.DCScoalition#coalition.side TgtCoalition (UNIT) The coalition of the target.
-- @field Dcs.DCSUnit#Unit.Category TgtCategory (UNIT) The category of the target.
-- @field #string TgtTypeName (UNIT) The type name of the target.
-- @field Dcs.DCSUnit#Unit target (UNIT/STATIC) The target @{Dcs.DCSUnit#Unit} or @{DCSStaticObject#StaticObject}.
-- @field Dcs.DCSObject#Object.Category TgtObjectCategory (UNIT/STATIC) The target object category ( Object.Category.UNIT or Object.Category.STATIC ).
-- @field Dcs.DCSUnit#Unit TgtDCSUnit (UNIT/STATIC) The target @{DCSUnit#Unit} or @{DCSStaticObject#StaticObject}.
-- @field #string TgtDCSUnitName (UNIT/STATIC) The target Unit name.
-- @field Wrapper.Unit#UNIT TgtUnit (UNIT/STATIC) The target MOOSE wrapper @{Unit#UNIT} of the target Unit object.
-- @field #string TgtUnitName (UNIT/STATIC) The target UNIT name (same as TgtDCSUnitName).
-- @field Dcs.DCSGroup#Group TgtDCSGroup (UNIT) The target {DCSGroup#Group}.
-- @field #string TgtDCSGroupName (UNIT) The target Group name.
-- @field Wrapper.Group#GROUP TgtGroup (UNIT) The target MOOSE wrapper @{Group#GROUP} of the target Group object.
-- @field #string TgtGroupName (UNIT) The target GROUP name (same as TgtDCSGroupName).
-- @field #string TgtPlayerName (UNIT) The name of the target player in case the Unit is a client or player slot.
-- @field Dcs.DCScoalition#coalition.side TgtCoalition (UNIT) The coalition of the target.
-- @field Dcs.DCSUnit#Unit.Category TgtCategory (UNIT) The category of the target.
-- @field #string TgtTypeName (UNIT) The type name of the target.
--
-- @field weapon The weapon used during the event.
-- @field Weapon

View File

@ -14,11 +14,25 @@
-- * @{Point#POINT_VEC3.New}(): a 3D point.
-- * @{Point#POINT_VEC3.NewFromVec3}(): a 3D point created from a @{DCSTypes#Vec3}.
--
-- ## 1.2) Smoke, flare, explode, illuminate
-- ## 1.2) Manupulate the X, Y, Z coordinates of the point
--
-- A POINT_VEC3 class works in 3D space. It contains internally an X, Y, Z coordinate.
-- Methods exist to manupulate these coordinates.
--
-- The current X, Y, Z axis can be retrieved with the methods @{#POINT_VEC3.GetX}(), @{#POINT_VEC3.GetY}(), @{#POINT_VEC3.GetZ}() respectively.
-- The methods @{#POINT_VEC3.SetX}(), @{#POINT_VEC3.SetY}(), @{#POINT_VEC3.SetZ}() change the respective axis with a new value.
-- The current axis values can be changed by using the methods @{#POINT_VEC3.AddX}(), @{#POINT_VEC3.AddY}(), @{#POINT_VEC3.AddZ}()
-- to add or substract a value from the current respective axis value.
-- Note that the Set and Add methods return the current POINT_VEC3 object, so these manipulation methods can be chained... For example:
--
-- local Vec3 = PointVec3:AddX( 100 ):AddZ( 150 ):GetVec3()
--
--
-- ## 1.5) Smoke, flare, explode, illuminate
--
-- At the point a smoke, flare, explosion and illumination bomb can be triggered. Use the following methods:
--
-- ### 1.2.1) Smoke
-- ### 1.5.1) Smoke
--
-- * @{#POINT_VEC3.Smoke}(): To smoke the point in a certain color.
-- * @{#POINT_VEC3.SmokeBlue}(): To smoke the point in blue.
@ -27,7 +41,7 @@
-- * @{#POINT_VEC3.SmokeWhite}(): To smoke the point in white.
-- * @{#POINT_VEC3.SmokeGreen}(): To smoke the point in green.
--
-- ### 1.2.2) Flare
-- ### 1.5.2) Flare
--
-- * @{#POINT_VEC3.Flare}(): To flare the point in a certain color.
-- * @{#POINT_VEC3.FlareRed}(): To flare the point in red.
@ -35,14 +49,14 @@
-- * @{#POINT_VEC3.FlareWhite}(): To flare the point in white.
-- * @{#POINT_VEC3.FlareGreen}(): To flare the point in green.
--
-- ### 1.2.3) Explode
-- ### 1.5.3) Explode
--
-- * @{#POINT_VEC3.Explosion}(): To explode the point with a certain intensity.
--
-- ### 1.2.4) Illuminate
-- ### 1.5.4) Illuminate
--
-- * @{#POINT_VEC3.IlluminationBomb}(): To illuminate the point.
--
--
--
-- 2) @{Point#POINT_VEC2} class, extends @{Point#POINT_VEC3}
-- =========================================================
@ -55,6 +69,19 @@
-- * @{Point#POINT_VEC2.New}(): a 2D point, taking an additional height parameter.
-- * @{Point#POINT_VEC2.NewFromVec2}(): a 2D point created from a @{DCSTypes#Vec2}.
--
-- ## 1.2) Manupulate the X, Altitude, Y coordinates of the 2D point
--
-- A POINT_VEC2 class works in 2D space, with an altitude setting. It contains internally an X, Altitude, Y coordinate.
-- Methods exist to manupulate these coordinates.
--
-- The current X, Altitude, Y axis can be retrieved with the methods @{#POINT_VEC2.GetX}(), @{#POINT_VEC2.GetAlt}(), @{#POINT_VEC2.GetY}() respectively.
-- The methods @{#POINT_VEC2.SetX}(), @{#POINT_VEC2.SetAlt}(), @{#POINT_VEC2.SetY}() change the respective axis with a new value.
-- The current axis values can be changed by using the methods @{#POINT_VEC2.AddX}(), @{#POINT_VEC2.AddAlt}(), @{#POINT_VEC2.AddY}()
-- to add or substract a value from the current respective axis value.
-- Note that the Set and Add methods return the current POINT_VEC2 object, so these manipulation methods can be chained... For example:
--
-- local Vec2 = PointVec2:AddX( 100 ):AddY( 2000 ):GetVec2()
--
-- ===
--
-- **API CHANGE HISTORY**
@ -228,21 +255,57 @@ function POINT_VEC3:GetZ()
end
--- Set the x coordinate of the POINT_VEC3.
-- @param #POINT_VEC3 self
-- @param #number x The x coordinate.
-- @return #POINT_VEC3
function POINT_VEC3:SetX( x )
self.x = x
return self
end
--- Set the y coordinate of the POINT_VEC3.
-- @param #POINT_VEC3 self
-- @param #number y The y coordinate.
-- @return #POINT_VEC3
function POINT_VEC3:SetY( y )
self.y = y
return self
end
--- Set the z coordinate of the POINT_VEC3.
-- @param #POINT_VEC3 self
-- @param #number z The z coordinate.
-- @return #POINT_VEC3
function POINT_VEC3:SetZ( z )
self.z = z
return self
end
--- Add to the x coordinate of the POINT_VEC3.
-- @param #POINT_VEC3 self
-- @param #number x The x coordinate value to add to the current x coodinate.
-- @return #POINT_VEC3
function POINT_VEC3:AddX( x )
self.x = self.x + x
return self
end
--- Add to the y coordinate of the POINT_VEC3.
-- @param #POINT_VEC3 self
-- @param #number y The y coordinate value to add to the current y coodinate.
-- @return #POINT_VEC3
function POINT_VEC3:AddY( y )
self.y = self.y + y
return self
end
--- Add to the z coordinate of the POINT_VEC3.
-- @param #POINT_VEC3 self
-- @param #number z The z coordinate value to add to the current z coodinate.
-- @return #POINT_VEC3
function POINT_VEC3:AddZ( z )
self.z = self.z +z
return self
end
--- Return a random Vec2 within an Outer Radius and optionally NOT within an Inner Radius of the POINT_VEC3.
@ -713,15 +776,57 @@ function POINT_VEC2:GetAlt()
end
--- Set the x coordinate of the POINT_VEC2.
-- @param #POINT_VEC2 self
-- @param #number x The x coordinate.
-- @return #POINT_VEC2
function POINT_VEC2:SetX( x )
self.x = x
return self
end
--- Set the y coordinate of the POINT_VEC2.
-- @param #POINT_VEC2 self
-- @param #number y The y coordinate.
-- @return #POINT_VEC2
function POINT_VEC2:SetY( y )
self.z = y
return self
end
--- Set the altitude of the POINT_VEC2.
-- @param #POINT_VEC2 self
-- @param #number Altitude The land altitude. If nothing (nil) is given, then the current land altitude is set.
-- @return #POINT_VEC2
function POINT_VEC2:SetAlt( Altitude )
self.y = Altitude or land.getHeight( { x = self.x, y = self.z } )
return self
end
--- Add to the x coordinate of the POINT_VEC2.
-- @param #POINT_VEC2 self
-- @param #number x The x coordinate.
-- @return #POINT_VEC2
function POINT_VEC2:AddX( x )
self.x = self.x + x
return self
end
--- Add to the y coordinate of the POINT_VEC2.
-- @param #POINT_VEC2 self
-- @param #number y The y coordinate.
-- @return #POINT_VEC2
function POINT_VEC2:AddY( y )
self.z = self.z + y
return self
end
--- Add to the current land height an altitude.
-- @param #POINT_VEC2 self
-- @param #number Altitude The Altitude to add. If nothing (nil) is given, then the current land altitude is set.
-- @return #POINT_VEC2
function POINT_VEC2:AddAlt( Altitude )
self.y = land.getHeight( { x = self.x, y = self.z } ) + Altitude or 0
return self
end

View File

@ -553,6 +553,7 @@ function SCORING:_AddPlayerFromUnit( UnitData )
self.Players[PlayerName] = {}
self.Players[PlayerName].Hit = {}
self.Players[PlayerName].Destroy = {}
self.Players[PlayerName].Goals = {}
self.Players[PlayerName].Mission = {}
-- for CategoryID, CategoryName in pairs( SCORINGCategory ) do
@ -944,7 +945,7 @@ function SCORING:_EventOnDeadOrCrash( Event )
if Event.IniDCSUnit then
TargetUnit = Event.IniDCSUnit
TargetUnit = Event.IniUnit
TargetUnitName = Event.IniDCSUnitName
TargetGroup = Event.IniDCSGroup
TargetGroupName = Event.IniDCSGroupName
@ -990,11 +991,10 @@ function SCORING:_EventOnDeadOrCrash( Event )
TargetDestroy.ScoreDestroy = TargetDestroy.ScoreDestroy or 0
TargetDestroy.Penalty = TargetDestroy.Penalty or 0
TargetDestroy.PenaltyDestroy = TargetDestroy.PenaltyDestroy or 0
local TargetUNIT = Player.Hit[TargetCategory][TargetUnitName].UNIT
if TargetCoalition then
if InitCoalition == TargetCoalition then
local ThreatLevelTarget, ThreatTypeTarget = TargetUNIT:GetThreatLevel()
local ThreatLevelTarget, ThreatTypeTarget = TargetUnit:GetThreatLevel()
local ThreatLevelPlayer = Player.UNIT:GetThreatLevel() / 10 + 1
local ThreatPenalty = math.ceil( ( ThreatLevelTarget / ThreatLevelPlayer ) * self.ScaleDestroyPenalty / 10 )
self:E( { ThreatLevel = ThreatPenalty, ThreatLevelTarget = ThreatLevelTarget, ThreatTypeTarget = ThreatTypeTarget, ThreatLevelPlayer = ThreatLevelPlayer } )
@ -1023,9 +1023,10 @@ function SCORING:_EventOnDeadOrCrash( Event )
:ToCoalitionIf( InitCoalition, self:IfMessagesDestroy() and self:IfMessagesToCoalition() )
end
self:ScoreCSV( PlayerName, "DESTROY_PENALTY", 1, ThreatPenalty, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
else
local ThreatLevelTarget, ThreatTypeTarget = TargetUNIT:GetThreatLevel()
local ThreatLevelTarget, ThreatTypeTarget = TargetUnit:GetThreatLevel()
local ThreatLevelPlayer = Player.UNIT:GetThreatLevel() / 10 + 1
local ThreatScore = math.ceil( ( ThreatLevelTarget / ThreatLevelPlayer ) * self.ScaleDestroyScore / 10 )
@ -1055,7 +1056,7 @@ function SCORING:_EventOnDeadOrCrash( Event )
end
self:ScoreCSV( PlayerName, "DESTROY_SCORE", 1, ThreatScore, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
local UnitName = TargetUNIT:GetName()
local UnitName = TargetUnit:GetName()
local Score = self.ScoringObjects[UnitName]
if Score then
Player.Score = Player.Score + Score
@ -1075,7 +1076,7 @@ function SCORING:_EventOnDeadOrCrash( Event )
self:E( { ScoringZone = ScoreZoneData } )
local ScoreZone = ScoreZoneData.ScoreZone -- Core.Zone#ZONE_BASE
local Score = ScoreZoneData.Score
if ScoreZone:IsVec2InZone( TargetUNIT:GetVec2() ) then
if ScoreZone:IsVec2InZone( TargetUnit:GetVec2() ) then
Player.Score = Player.Score + Score
TargetDestroy.Score = TargetDestroy.Score + Score
MESSAGE
@ -1096,7 +1097,7 @@ function SCORING:_EventOnDeadOrCrash( Event )
self:E( { ScoringZone = ScoreZoneData } )
local ScoreZone = ScoreZoneData.ScoreZone -- Core.Zone#ZONE_BASE
local Score = ScoreZoneData.Score
if ScoreZone:IsVec2InZone( TargetUNIT:GetVec2() ) then
if ScoreZone:IsVec2InZone( TargetUnit:GetVec2() ) then
Player.Score = Player.Score + Score
TargetDestroy.Score = TargetDestroy.Score + Score
MESSAGE
@ -1264,7 +1265,7 @@ end
-- @param #SCORING self
-- @param #string PlayerName The name of the player.
-- @return #string The report.
function SCORING:ReportDetailedPlayerMissions( PlayerName )
function SCORING:ReportDetailedPlayerGoals( PlayerName )
local ScoreMessage = ""
local PlayerScore = 0

Binary file not shown.