From 3e22411328dd37ea28b9ac068c2372ea357cfa44 Mon Sep 17 00:00:00 2001 From: Frank Date: Mon, 29 Mar 2021 18:01:42 +0200 Subject: [PATCH] Events - Added new DCS events --- Moose Development/Moose/Core/Base.lua | 31 +++++++++++++++++++++ Moose Development/Moose/Core/Event.lua | 38 ++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/Moose Development/Moose/Core/Base.lua b/Moose Development/Moose/Core/Base.lua index 4398c6d1a..1b809252a 100644 --- a/Moose Development/Moose/Core/Base.lua +++ b/Moose Development/Moose/Core/Base.lua @@ -676,6 +676,37 @@ do -- Event Handling -- @param #BASE self -- @param Core.Event#EVENTDATA EventData The EventData structure. + --- Paratrooper landing. + -- @function [parent=#BASE] OnEventParatrooperLanding + -- @param #BASE self + -- @param Core.Event#EVENTDATA EventData The EventData structure. + + --- Discard chair after ejection. + -- @function [parent=#BASE] OnEventDiscardChairAfterEjection + -- @param #BASE self + -- @param Core.Event#EVENTDATA EventData The EventData structure. + + --- Weapon add. Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. + -- @function [parent=#BASE] OnEventParatrooperLanding + -- @param #BASE self + -- @param Core.Event#EVENTDATA EventData The EventData structure. + + --- Trigger zone. + -- @function [parent=#BASE] OnEventTriggerZone + -- @param #BASE self + -- @param Core.Event#EVENTDATA EventData The EventData structure. + + --- Landing quality mark. + -- @function [parent=#BASE] OnEventLandingQualityMark + -- @param #BASE self + -- @param Core.Event#EVENTDATA EventData The EventData structure. + + --- BDA. + -- @function [parent=#BASE] OnEventBDA + -- @param #BASE self + -- @param Core.Event#EVENTDATA EventData The EventData structure. + + --- Occurs when a player enters a slot and takes control of an aircraft. -- **NOTE**: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. -- initiator : The unit that is being taken control of. diff --git a/Moose Development/Moose/Core/Event.lua b/Moose Development/Moose/Core/Event.lua index 4588c6ba7..22b86e1ce 100644 --- a/Moose Development/Moose/Core/Event.lua +++ b/Moose Development/Moose/Core/Event.lua @@ -241,6 +241,13 @@ EVENTS = { Score = world.event.S_EVENT_SCORE or -1, UnitLost = world.event.S_EVENT_UNIT_LOST or -1, LandingAfterEjection = world.event.S_EVENT_LANDING_AFTER_EJECTION or -1, + -- Added with DCS 2.7.0 + ParatrooperLanding = world.event.S_EVENT_PARATROOPER_LENDING or -1, + DiscardChairAfterEjection = world.event.S_EVENT_DISCARD_CHAIR_AFTER_EJECTION or -1, + WeaponAdd = world.event.S_EVENT_WEAPON_ADD or -1, + TriggerZone = world.event.S_EVENT_TRIGGER_ZONE or -1, + LandingQualityMark = world.event.S_EVENT_LANDING_QUALITY_MARK or -1, + BDA = world.event.S_EVENT_BDA or -1, } --- The Event structure @@ -521,6 +528,37 @@ local _EVENTMETA = { Order = 1, Event = "OnEventLandingAfterEjection", Text = "S_EVENT_LANDING_AFTER_EJECTION" + }, + -- Added with DCS 2.7.0 + [EVENTS.ParatrooperLanding] = { + Order = 1, + Event = "OnEventParatrooperLanding", + Text = "S_EVENT_PARATROOPER_LENDING" + }, + [EVENTS.DicardChairAfterEjection] = { + Order = 1, + Event = "OnEventDiscardChairAfterEjection", + Text = "S_EVENT_DISCARD_CHAIR_AFTER_EJECTION" + }, + [EVENTS.WeaponAdd] = { + Order = 1, + Event = "OnEventWeaponAdd", + Text = "S_EVENT_WEAPON_ADD" + }, + [EVENTS.TriggerZone] = { + Order = 1, + Event = "OnEventTriggerZone", + Text = "S_EVENT_TRIGGER_ZONE" + }, + [EVENTS.LandingQualityMark] = { + Order = 1, + Event = "OnEventLandingQualityMark", + Text = "S_EVENT_LANDING_QUALITYMARK" + }, + [EVENTS.BDA] = { + Order = 1, + Event = "OnEventBDA", + Text = "S_EVENT_BDA" }, }