diff --git a/Moose Development/Moose/AI/AI_Balancer.lua b/Moose Development/Moose/AI/AI_Balancer.lua index 75a1c5a2c..dd8fa50c9 100644 --- a/Moose Development/Moose/AI/AI_Balancer.lua +++ b/Moose Development/Moose/AI/AI_Balancer.lua @@ -139,7 +139,7 @@ end -- @param Core.Set#SET_GROUP SetGroup -- @param #string ClientName -- @param Wrapper.Group#GROUP AIGroup -function AI_BALANCER:onenterSpawning( SetGroup, Event, From, To, ClientName ) +function AI_BALANCER:onenterSpawning( SetGroup, From, Event, To, ClientName ) -- OK, Spawn a new group from the default SpawnAI object provided. local AIGroup = self.SpawnAI:Spawn() @@ -156,7 +156,7 @@ end --- @param #AI_BALANCER self -- @param Core.Set#SET_GROUP SetGroup -- @param Wrapper.Group#GROUP AIGroup -function AI_BALANCER:onenterDestroying( SetGroup, Event, From, To, AIGroup ) +function AI_BALANCER:onenterDestroying( SetGroup, From, Event, To, AIGroup ) AIGroup:Destroy() end @@ -164,7 +164,7 @@ end --- @param #AI_BALANCER self -- @param Core.Set#SET_GROUP SetGroup -- @param Wrapper.Group#GROUP AIGroup -function AI_BALANCER:onenterReturning( SetGroup, Event, From, To, AIGroup ) +function AI_BALANCER:onenterReturning( SetGroup, From, Event, To, AIGroup ) local AIGroupTemplate = AIGroup:GetTemplate() if self.ToHomeAirbase == true then diff --git a/Moose Development/Moose/AI/AI_Cargo.lua b/Moose Development/Moose/AI/AI_Cargo.lua index 5c3da2180..eeecd3226 100644 --- a/Moose Development/Moose/AI/AI_Cargo.lua +++ b/Moose Development/Moose/AI/AI_Cargo.lua @@ -368,7 +368,7 @@ end -- @param #string From -- @param #string To -- @param Core.Point#POINT_VEC2 ToPointVec2 -function AI_CARGO_UNIT:onenterUnBoarding( Event, From, To, ToPointVec2 ) +function AI_CARGO_UNIT:onenterUnBoarding( From, Event, To, ToPointVec2 ) self:F() local Angle = 180 @@ -413,8 +413,8 @@ end -- @param #string From -- @param #string To -- @param Core.Point#POINT_VEC2 ToPointVec2 -function AI_CARGO_UNIT:onleaveUnBoarding( Event, From, To, ToPointVec2 ) - self:F( { ToPointVec2, Event, From, To } ) +function AI_CARGO_UNIT:onleaveUnBoarding( From, Event, To, ToPointVec2 ) + self:F( { ToPointVec2, From, Event, To } ) local Angle = 180 local Speed = 10 @@ -437,8 +437,8 @@ end -- @param #string From -- @param #string To -- @param Core.Point#POINT_VEC2 ToPointVec2 -function AI_CARGO_UNIT:onafterUnBoarding( Event, From, To, ToPointVec2 ) - self:F( { ToPointVec2, Event, From, To } ) +function AI_CARGO_UNIT:onafterUnBoarding( From, Event, To, ToPointVec2 ) + self:F( { ToPointVec2, From, Event, To } ) self.CargoInAir = self.CargoObject:InAir() @@ -462,8 +462,8 @@ end -- @param #string From -- @param #string To -- @param Core.Point#POINT_VEC2 -function AI_CARGO_UNIT:onenterUnLoaded( Event, From, To, ToPointVec2 ) - self:F( { ToPointVec2, Event, From, To } ) +function AI_CARGO_UNIT:onenterUnLoaded( From, Event, To, ToPointVec2 ) + self:F( { ToPointVec2, From, Event, To } ) local Angle = 180 local Speed = 10 @@ -500,8 +500,8 @@ end -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function AI_CARGO_UNIT:onenterBoarding( Event, From, To, CargoCarrier ) - self:F( { CargoCarrier.UnitName, Event, From, To } ) +function AI_CARGO_UNIT:onenterBoarding( From, Event, To, CargoCarrier ) + self:F( { CargoCarrier.UnitName, From, Event, To } ) local Speed = 10 local Angle = 180 @@ -532,8 +532,8 @@ end -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function AI_CARGO_UNIT:onleaveBoarding( Event, From, To, CargoCarrier ) - self:F( { CargoCarrier.UnitName, Event, From, To } ) +function AI_CARGO_UNIT:onleaveBoarding( From, Event, To, CargoCarrier ) + self:F( { CargoCarrier.UnitName, From, Event, To } ) if self:IsNear( CargoCarrier:GetPointVec2() ) then self:__Load( 1, CargoCarrier ) @@ -550,7 +550,7 @@ end -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function AI_CARGO_UNIT:onenterLoaded( Event, From, To, CargoCarrier ) +function AI_CARGO_UNIT:onenterLoaded( From, Event, To, CargoCarrier ) self:F() self.CargoCarrier = CargoCarrier @@ -568,7 +568,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function AI_CARGO_UNIT:onafterBoard( Event, From, To, CargoCarrier ) +function AI_CARGO_UNIT:onafterBoard( From, Event, To, CargoCarrier ) self:F() self.CargoInAir = self.CargoObject:InAir() @@ -621,7 +621,7 @@ end -- @param #number Speed -- @param #number BoardDistance -- @param #number Angle -function AI_CARGO_PACKAGE:onafterOnBoard( Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle ) +function AI_CARGO_PACKAGE:onafterOnBoard( From, Event, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle ) self:F() self.CargoInAir = self.CargoCarrier:InAir() @@ -675,7 +675,7 @@ end -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function AI_CARGO_PACKAGE:onafterOnBoarded( Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle ) +function AI_CARGO_PACKAGE:onafterOnBoarded( From, Event, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle ) self:F() if self:IsNear( CargoCarrier ) then @@ -695,7 +695,7 @@ end -- @param #number UnBoardDistance -- @param #number Radius -- @param #number Angle -function AI_CARGO_PACKAGE:onafterUnBoard( Event, From, To, CargoCarrier, Speed, UnLoadDistance, UnBoardDistance, Radius, Angle ) +function AI_CARGO_PACKAGE:onafterUnBoard( From, Event, To, CargoCarrier, Speed, UnLoadDistance, UnBoardDistance, Radius, Angle ) self:F() self.CargoInAir = self.CargoCarrier:InAir() @@ -733,7 +733,7 @@ end -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function AI_CARGO_PACKAGE:onafterUnBoarded( Event, From, To, CargoCarrier, Speed ) +function AI_CARGO_PACKAGE:onafterUnBoarded( From, Event, To, CargoCarrier, Speed ) self:F() if self:IsNear( CargoCarrier ) then @@ -752,7 +752,7 @@ end -- @param #number Speed -- @param #number LoadDistance -- @param #number Angle -function AI_CARGO_PACKAGE:onafterLoad( Event, From, To, CargoCarrier, Speed, LoadDistance, Angle ) +function AI_CARGO_PACKAGE:onafterLoad( From, Event, To, CargoCarrier, Speed, LoadDistance, Angle ) self:F() self.CargoCarrier = CargoCarrier @@ -778,7 +778,7 @@ end -- @param #string To -- @param #number Distance -- @param #number Angle -function AI_CARGO_PACKAGE:onafterUnLoad( Event, From, To, CargoCarrier, Speed, Distance, Angle ) +function AI_CARGO_PACKAGE:onafterUnLoad( From, Event, To, CargoCarrier, Speed, Distance, Angle ) self:F() local StartPointVec2 = self.CargoCarrier:GetPointVec2() @@ -861,8 +861,8 @@ end -- @param #string Event -- @param #string From -- @param #string To -function AI_CARGO_GROUPED:onenterBoarding( Event, From, To, CargoCarrier ) - self:F( { CargoCarrier.UnitName, Event, From, To } ) +function AI_CARGO_GROUPED:onenterBoarding( From, Event, To, CargoCarrier ) + self:F( { CargoCarrier.UnitName, From, Event, To } ) if From == "UnLoaded" then @@ -884,8 +884,8 @@ end -- @param #string Event -- @param #string From -- @param #string To -function AI_CARGO_GROUPED:onenterLoaded( Event, From, To, CargoCarrier ) - self:F( { CargoCarrier.UnitName, Event, From, To } ) +function AI_CARGO_GROUPED:onenterLoaded( From, Event, To, CargoCarrier ) + self:F( { CargoCarrier.UnitName, From, Event, To } ) if From == "UnLoaded" then -- For each Cargo object within the AI_CARGO_GROUPED, load each cargo to the CargoCarrier. @@ -901,8 +901,8 @@ end -- @param #string Event -- @param #string From -- @param #string To -function AI_CARGO_GROUPED:onleaveBoarding( Event, From, To, CargoCarrier ) - self:F( { CargoCarrier.UnitName, Event, From, To } ) +function AI_CARGO_GROUPED:onleaveBoarding( From, Event, To, CargoCarrier ) + self:F( { CargoCarrier.UnitName, From, Event, To } ) local Boarded = true @@ -928,7 +928,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function AI_CARGO_GROUPED:onenterUnBoarding( Event, From, To, ToPointVec2 ) +function AI_CARGO_GROUPED:onenterUnBoarding( From, Event, To, ToPointVec2 ) self:F() local Timer = 1 @@ -954,8 +954,8 @@ end -- @param #string Event -- @param #string From -- @param #string To -function AI_CARGO_GROUPED:onleaveUnBoarding( Event, From, To, ToPointVec2 ) - self:F( { ToPointVec2, Event, From, To } ) +function AI_CARGO_GROUPED:onleaveUnBoarding( From, Event, To, ToPointVec2 ) + self:F( { ToPointVec2, From, Event, To } ) local Angle = 180 local Speed = 10 @@ -989,8 +989,8 @@ end -- @param #string Event -- @param #string From -- @param #string To -function AI_CARGO_GROUPED:onafterUnBoarding( Event, From, To, ToPointVec2 ) - self:F( { ToPointVec2, Event, From, To } ) +function AI_CARGO_GROUPED:onafterUnBoarding( From, Event, To, ToPointVec2 ) + self:F( { ToPointVec2, From, Event, To } ) self:__UnLoad( 1, ToPointVec2 ) end @@ -1003,8 +1003,8 @@ end -- @param #string Event -- @param #string From -- @param #string To -function AI_CARGO_GROUPED:onenterUnLoaded( Event, From, To, ToPointVec2 ) - self:F( { ToPointVec2, Event, From, To } ) +function AI_CARGO_GROUPED:onenterUnLoaded( From, Event, To, ToPointVec2 ) + self:F( { ToPointVec2, From, Event, To } ) if From == "Loaded" then diff --git a/Moose Development/Moose/Actions/Act_Account.lua b/Moose Development/Moose/Actions/Act_Account.lua index 8b8d914f1..684d1742d 100644 --- a/Moose Development/Moose/Actions/Act_Account.lua +++ b/Moose Development/Moose/Actions/Act_Account.lua @@ -115,7 +115,7 @@ do -- ACT_ACCOUNT -- @param #string Event -- @param #string From -- @param #string To - function ACT_ACCOUNT:onafterStart( ProcessUnit, Event, From, To ) + function ACT_ACCOUNT:onafterStart( ProcessUnit, From, Event, To ) self:EventOnDead( self.onfuncEventDead ) @@ -129,7 +129,7 @@ do -- ACT_ACCOUNT -- @param #string Event -- @param #string From -- @param #string To - function ACT_ACCOUNT:onenterWaiting( ProcessUnit, Event, From, To ) + function ACT_ACCOUNT:onenterWaiting( ProcessUnit, From, Event, To ) if self.DisplayCount >= self.DisplayInterval then self:Report() @@ -147,7 +147,7 @@ do -- ACT_ACCOUNT -- @param #string Event -- @param #string From -- @param #string To - function ACT_ACCOUNT:onafterEvent( ProcessUnit, Event, From, To, Event ) + function ACT_ACCOUNT:onafterEvent( ProcessUnit, From, Event, To, Event ) self:__NoMore( 1 ) end @@ -209,8 +209,8 @@ do -- ACT_ACCOUNT_DEADS -- @param #string Event -- @param #string From -- @param #string To - function ACT_ACCOUNT_DEADS:onenterReport( ProcessUnit, Event, From, To ) - self:E( { ProcessUnit, Event, From, To } ) + function ACT_ACCOUNT_DEADS:onenterReport( ProcessUnit, From, Event, To ) + self:E( { ProcessUnit, From, Event, To } ) self:Message( "Your group with assigned " .. self.TaskName .. " task has " .. self.TargetSetUnit:GetUnitTypesText() .. " targets left to be destroyed." ) end @@ -222,8 +222,8 @@ do -- ACT_ACCOUNT_DEADS -- @param #string Event -- @param #string From -- @param #string To - function ACT_ACCOUNT_DEADS:onenterAccount( ProcessUnit, Event, From, To, EventData ) - self:T( { ProcessUnit, EventData, Event, From, To } ) + function ACT_ACCOUNT_DEADS:onenterAccount( ProcessUnit, From, Event, To, EventData ) + self:T( { ProcessUnit, EventData, From, Event, To } ) self:T({self.Controllable}) @@ -242,7 +242,7 @@ do -- ACT_ACCOUNT_DEADS -- @param #string Event -- @param #string From -- @param #string To - function ACT_ACCOUNT_DEADS:onafterEvent( ProcessUnit, Event, From, To, EventData ) + function ACT_ACCOUNT_DEADS:onafterEvent( ProcessUnit, From, Event, To, EventData ) if self.TargetSetUnit:Count() > 0 then self:__More( 1 ) diff --git a/Moose Development/Moose/Actions/Act_Assign.lua b/Moose Development/Moose/Actions/Act_Assign.lua index a1303fcf5..aa3162ffb 100644 --- a/Moose Development/Moose/Actions/Act_Assign.lua +++ b/Moose Development/Moose/Actions/Act_Assign.lua @@ -155,8 +155,8 @@ do -- ACT_ASSIGN_ACCEPT -- @param #string Event -- @param #string From -- @param #string To - function ACT_ASSIGN_ACCEPT:onafterStart( ProcessUnit, Event, From, To ) - self:E( { ProcessUnit, Event, From, To } ) + function ACT_ASSIGN_ACCEPT:onafterStart( ProcessUnit, From, Event, To ) + self:E( { ProcessUnit, From, Event, To } ) self:__Assign( 1 ) end @@ -167,9 +167,9 @@ do -- ACT_ASSIGN_ACCEPT -- @param #string Event -- @param #string From -- @param #string To - function ACT_ASSIGN_ACCEPT:onenterAssigned( ProcessUnit, Event, From, To ) + function ACT_ASSIGN_ACCEPT:onenterAssigned( ProcessUnit, From, Event, To ) env.info( "in here" ) - self:E( { ProcessUnit, Event, From, To } ) + self:E( { ProcessUnit, From, Event, To } ) local ProcessGroup = ProcessUnit:GetGroup() @@ -235,8 +235,8 @@ do -- ACT_ASSIGN_MENU_ACCEPT -- @param #string Event -- @param #string From -- @param #string To - function ACT_ASSIGN_MENU_ACCEPT:onafterStart( ProcessUnit, Event, From, To ) - self:E( { ProcessUnit, Event, From, To } ) + function ACT_ASSIGN_MENU_ACCEPT:onafterStart( ProcessUnit, From, Event, To ) + self:E( { ProcessUnit, From, Event, To } ) self:Message( "Access the radio menu to accept the task. You have 30 seconds or the assignment will be cancelled." ) @@ -269,8 +269,8 @@ do -- ACT_ASSIGN_MENU_ACCEPT -- @param #string Event -- @param #string From -- @param #string To - function ACT_ASSIGN_MENU_ACCEPT:onafterAssign( ProcessUnit, Event, From, To ) - self:E( { ProcessUnit.UnitNameEvent, From, To } ) + function ACT_ASSIGN_MENU_ACCEPT:onafterAssign( ProcessUnit, From, Event, To ) + self:E( { ProcessUnit.UnitNameFrom, Event, To } ) self.Menu:Remove() end @@ -281,8 +281,8 @@ do -- ACT_ASSIGN_MENU_ACCEPT -- @param #string Event -- @param #string From -- @param #string To - function ACT_ASSIGN_MENU_ACCEPT:onafterReject( ProcessUnit, Event, From, To ) - self:E( { ProcessUnit.UnitName, Event, From, To } ) + function ACT_ASSIGN_MENU_ACCEPT:onafterReject( ProcessUnit, From, Event, To ) + self:E( { ProcessUnit.UnitName, From, Event, To } ) self.Menu:Remove() --TODO: need to resolve this problem ... it has to do with the events ... diff --git a/Moose Development/Moose/Actions/Act_Assist.lua b/Moose Development/Moose/Actions/Act_Assist.lua index 105a22bd4..d10e29953 100644 --- a/Moose Development/Moose/Actions/Act_Assist.lua +++ b/Moose Development/Moose/Actions/Act_Assist.lua @@ -105,7 +105,7 @@ do -- ACT_ASSIST -- @param #string Event -- @param #string From -- @param #string To - function ACT_ASSIST:onafterStart( ProcessUnit, Event, From, To ) + function ACT_ASSIST:onafterStart( ProcessUnit, From, Event, To ) local ProcessGroup = ProcessUnit:GetGroup() local MissionMenu = self:GetMission():GetMissionMenu( ProcessGroup ) @@ -184,7 +184,7 @@ do -- ACT_ASSIST_SMOKE_TARGETS_ZONE -- @param #string Event -- @param #string From -- @param #string To - function ACT_ASSIST_SMOKE_TARGETS_ZONE:onenterSmoking( ProcessUnit, Event, From, To ) + function ACT_ASSIST_SMOKE_TARGETS_ZONE:onenterSmoking( ProcessUnit, From, Event, To ) self.TargetSetUnit:ForEachUnit( --- @param Wrapper.Unit#UNIT SmokeUnit diff --git a/Moose Development/Moose/Actions/Act_JTAC.lua b/Moose Development/Moose/Actions/Act_JTAC.lua index 592ee5e7e..668abfcb5 100644 --- a/Moose Development/Moose/Actions/Act_JTAC.lua +++ b/Moose Development/Moose/Actions/Act_JTAC.lua @@ -70,7 +70,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function PROCESS_JTAC:OnStart( Fsm, Event, From, To ) +function PROCESS_JTAC:OnStart( Fsm, From, Event, To ) self:NextEvent( Fsm.JTACMenuUpdate ) end @@ -81,7 +81,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function PROCESS_JTAC:OnJTACMenuUpdate( Fsm, Event, From, To ) +function PROCESS_JTAC:OnJTACMenuUpdate( Fsm, From, Event, To ) local function JTACMenuSpot( MenuParam ) self:E( MenuParam.TargetUnit.UnitName ) @@ -127,7 +127,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function PROCESS_JTAC:OnJTACMenuAwait( Fsm, Event, From, To ) +function PROCESS_JTAC:OnJTACMenuAwait( Fsm, From, Event, To ) if self.DisplayCount >= self.DisplayInterval then @@ -152,7 +152,7 @@ end -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT TargetUnit -function PROCESS_JTAC:OnJTACMenuSpot( Fsm, Event, From, To, TargetUnit ) +function PROCESS_JTAC:OnJTACMenuSpot( Fsm, From, Event, To, TargetUnit ) local TargetUnitName = TargetUnit:GetName() @@ -179,7 +179,7 @@ end -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT TargetUnit -function PROCESS_JTAC:OnJTACMenuCancel( Fsm, Event, From, To, TargetUnit ) +function PROCESS_JTAC:OnJTACMenuCancel( Fsm, From, Event, To, TargetUnit ) local TargetUnitName = TargetUnit:GetName() diff --git a/Moose Development/Moose/Actions/Act_Pickup.lua b/Moose Development/Moose/Actions/Act_Pickup.lua index ca79ccfdc..af27c11a4 100644 --- a/Moose Development/Moose/Actions/Act_Pickup.lua +++ b/Moose Development/Moose/Actions/Act_Pickup.lua @@ -61,7 +61,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function PROCESS_PICKUP:OnStart( Fsm, Event, From, To ) +function PROCESS_PICKUP:OnStart( Fsm, From, Event, To ) self:NextEvent( Fsm.Start ) end @@ -72,7 +72,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function PROCESS_PICKUP:OnNavigating( Fsm, Event, From, To ) +function PROCESS_PICKUP:OnNavigating( Fsm, From, Event, To ) local TaskGroup = self.ProcessUnit:GetGroup() if self.DisplayCount >= self.DisplayInterval then @@ -94,7 +94,7 @@ end -- @param #string From -- @param #string To -- @param Core.Event#EVENTDATA Event -function PROCESS_PICKUP:OnHitTarget( Fsm, Event, From, To, Event ) +function PROCESS_PICKUP:OnHitTarget( Fsm, From, Event, To, Event ) self.TargetSetUnit:Flush() @@ -119,7 +119,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function PROCESS_PICKUP:OnMoreTargets( Fsm, Event, From, To ) +function PROCESS_PICKUP:OnMoreTargets( Fsm, From, Event, To ) end @@ -131,7 +131,7 @@ end -- @param #string From -- @param #string To -- @param Core.Event#EVENTDATA DCSEvent -function PROCESS_PICKUP:OnKilled( Fsm, Event, From, To ) +function PROCESS_PICKUP:OnKilled( Fsm, From, Event, To ) self:NextEvent( Fsm.Restart ) @@ -143,7 +143,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function PROCESS_PICKUP:OnRestart( Fsm, Event, From, To ) +function PROCESS_PICKUP:OnRestart( Fsm, From, Event, To ) self:NextEvent( Fsm.Menu ) @@ -155,7 +155,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function PROCESS_PICKUP:OnDestroyed( Fsm, Event, From, To ) +function PROCESS_PICKUP:OnDestroyed( Fsm, From, Event, To ) end diff --git a/Moose Development/Moose/Actions/Act_Route.lua b/Moose Development/Moose/Actions/Act_Route.lua index 1ca28ca2c..1efef0ef8 100644 --- a/Moose Development/Moose/Actions/Act_Route.lua +++ b/Moose Development/Moose/Actions/Act_Route.lua @@ -123,7 +123,7 @@ do -- ACT_ROUTE -- @param #string Event -- @param #string From -- @param #string To - function ACT_ROUTE:onafterStart( ProcessUnit, Event, From, To ) + function ACT_ROUTE:onafterStart( ProcessUnit, From, Event, To ) self:__Route( 1 ) @@ -143,7 +143,7 @@ do -- ACT_ROUTE -- @param #string Event -- @param #string From -- @param #string To - function ACT_ROUTE:onbeforeRoute( ProcessUnit, Event, From, To ) + function ACT_ROUTE:onbeforeRoute( ProcessUnit, From, Event, To ) self:F( { "BeforeRoute 1", self.DisplayCount, self.DisplayInterval } ) if ProcessUnit:IsAlive() then @@ -239,7 +239,7 @@ do -- ACT_ROUTE_ZONE -- @param #string Event -- @param #string From -- @param #string To - function ACT_ROUTE_ZONE:onenterReporting( ProcessUnit, Event, From, To ) + function ACT_ROUTE_ZONE:onenterReporting( ProcessUnit, From, Event, To ) local ZoneVec2 = self.TargetZone:GetVec2() local ZonePointVec2 = POINT_VEC2:New( ZoneVec2.x, ZoneVec2.y ) diff --git a/Moose Development/Moose/Core/Fsm.lua b/Moose Development/Moose/Core/Fsm.lua index ac979ee6b..d6a4d2dc2 100644 --- a/Moose Development/Moose/Core/Fsm.lua +++ b/Moose Development/Moose/Core/Fsm.lua @@ -3,7 +3,7 @@ -- This development is based on a state machine implementation made by Conroy Kyle. -- The state machine can be found here: https://github.com/kyleconroy/lua-state-machine -- --- I've taken the development and enhanced it to make the state machine hierarchical... +-- I've taken the development and enhanced it (actually rewrote it) to make the state machine hierarchical... -- It is a fantastic development, this module. -- -- === @@ -271,7 +271,7 @@ do -- FSM if can then local from = self.current - local params = { EventName, from, to, ... } + local params = { from, EventName, to, ... } if self:_call_handler("onbefore" .. EventName, params) == false or self:_call_handler("onleave" .. from, params) == false then @@ -661,8 +661,8 @@ end -- @param #string Event -- @param #string From -- @param #string To - function FSM_PROCESS:onstatechange( ProcessUnit, Event, From, To, Dummy ) - self:E( { ProcessUnit, Event, From, To, Dummy, self:IsTrace() } ) + function FSM_PROCESS:onstatechange( ProcessUnit, From, Event, To, Dummy ) + self:E( { ProcessUnit, From, Event, To, Dummy, self:IsTrace() } ) if self:IsTrace() then MESSAGE:New( "@ Process " .. self:GetClassNameAndID() .. " : " .. Event .. " changed to state " .. To, 2 ):ToAll() diff --git a/Moose Development/Moose/Tasking/Mission.lua b/Moose Development/Moose/Tasking/Mission.lua index eaa4e789d..2566922a2 100644 --- a/Moose Development/Moose/Tasking/Mission.lua +++ b/Moose Development/Moose/Tasking/Mission.lua @@ -69,7 +69,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function MISSION:onbeforeComplete( Event, From, To ) +function MISSION:onbeforeComplete( From, Event, To ) for TaskID, Task in pairs( self:GetTasks() ) do local Task = Task -- Tasking.Task#TASK @@ -85,7 +85,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function MISSION:onenterCompleted( Event, From, To ) +function MISSION:onenterCompleted( From, Event, To ) self:GetCommandCenter():MessageToCoalition( "Mission " .. self:GetName() .. " has been completed! Good job guys!" ) end diff --git a/Moose Development/Moose/Tasking/Task.lua b/Moose Development/Moose/Tasking/Task.lua index 4f92b2680..75e1a1747 100644 --- a/Moose Development/Moose/Tasking/Task.lua +++ b/Moose Development/Moose/Tasking/Task.lua @@ -869,7 +869,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function TASK:onenterAssigned( Event, From, To ) +function TASK:onenterAssigned( From, Event, To ) self:E("Task Assigned") @@ -883,7 +883,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function TASK:onenterSuccess( Event, From, To ) +function TASK:onenterSuccess( From, Event, To ) self:E( "Task Success" ) @@ -900,7 +900,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function TASK:onenterAborted( Event, From, To ) +function TASK:onenterAborted( From, Event, To ) self:E( "Task Aborted" ) @@ -914,7 +914,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function TASK:onenterFailed( Event, From, To ) +function TASK:onenterFailed( From, Event, To ) self:E( "Task Failed" ) @@ -928,7 +928,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function TASK:onstatechange( Event, From, To ) +function TASK:onstatechange( From, Event, To ) if self:IsTrace() then MESSAGE:New( "@ Task " .. self.TaskName .. " : " .. Event .. " changed to state " .. To, 2 ):ToAll() diff --git a/Moose Development/Moose/Tasking/Task_Pickup.lua b/Moose Development/Moose/Tasking/Task_Pickup.lua index a227ab71d..a0c41eb02 100644 --- a/Moose Development/Moose/Tasking/Task_Pickup.lua +++ b/Moose Development/Moose/Tasking/Task_Pickup.lua @@ -103,7 +103,7 @@ do -- TASK_PICKUP -- @param #string From -- @param #string To -- @param Event#EVENTDATA Event - function TASK_PICKUP:OnNext( Fsm, Event, From, To, Event ) + function TASK_PICKUP:OnNext( Fsm, From, Event, To, Event ) self:SetState( self, "State", To ) diff --git a/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua b/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua index 0fcc139ec..ba4c7bc84 100644 --- a/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua +++ b/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua @@ -1,5 +1,5 @@ env.info( '*** MOOSE STATIC INCLUDE START *** ' ) -env.info( 'Moose Generation Timestamp: 20161218_1138' ) +env.info( 'Moose Generation Timestamp: 20161220_0922' ) local base = _G Include = {} @@ -2803,27 +2803,27 @@ end -- -- Note: Normally you would not use the BASE class unless you are extending the MOOSE framework with new classes. -- --- 1.1) BASE constructor --- --------------------- +-- ## 1.1) BASE constructor +-- -- Any class derived from BASE, must use the @{Core.Base#BASE.New) constructor within the @{Core.Base#BASE.Inherit) method. -- See an example at the @{Core.Base#BASE.New} method how this is done. -- --- 1.2) BASE Trace functionality --- ----------------------------- +-- ## 1.2) BASE Trace functionality +-- -- The BASE class contains trace methods to trace progress within a mission execution of a certain object. -- Note that these trace methods are inherited by each MOOSE class interiting BASE. -- As such, each object created from derived class from BASE can use the tracing functions to trace its execution. -- --- 1.2.1) Tracing functions --- ------------------------ +-- ### 1.2.1) Tracing functions +-- -- There are basically 3 types of tracing methods available within BASE: -- -- * @{#BASE.F}: Trace the beginning of a function and its given parameters. An F is indicated at column 44 in the DCS.log file. -- * @{#BASE.T}: Trace further logic within a function giving optional variables or parameters. A T is indicated at column 44 in the DCS.log file. -- * @{#BASE.E}: Trace an exception within a function giving optional variables or parameters. An E is indicated at column 44 in the DCS.log file. An exception will always be traced. -- --- 1.2.2) Tracing levels --- --------------------- +-- ### 1.2.2) Tracing levels +-- -- There are 3 tracing levels within MOOSE. -- These tracing levels were defined to avoid bulks of tracing to be generated by lots of objects. -- @@ -2834,20 +2834,111 @@ end -- * @{#BASE.T2}: Trace further logic within a function giving optional variables or parameters with tracing level 2. -- * @{#BASE.T3}: Trace further logic within a function giving optional variables or parameters with tracing level 3. -- --- 1.3) BASE Inheritance support --- =========================== +-- ### 1.2.3) Trace activation. +-- +-- Tracing can be activated in several ways: +-- +-- * Switch tracing on or off through the @{#BASE.TraceOnOff}() method. +-- * Activate all tracing through the @{#BASE.TraceAll}() method. +-- * Activate only the tracing of a certain class (name) through the @{#BASE.TraceClass}() method. +-- * Activate only the tracing of a certain method of a certain class through the @{#BASE.TraceClassMethod}() method. +-- * Activate only the tracing of a certain level through the @{#BASE.TraceLevel}() method. +-- ### 1.2.4) Check if tracing is on. +-- +-- The method @{#BASE.IsTrace}() will validate if tracing is activated or not. +-- +-- ## 1.3 DCS simulator Event Handling +-- +-- The BASE class provides methods to catch DCS Events. These are events that are triggered from within the DCS simulator, +-- and handled through lua scripting. MOOSE provides an encapsulation to handle these events more efficiently. +-- Therefore, the BASE class exposes the following event handling functions: +-- +-- * @{#BASE.EventOnBirth}(): Handle the birth of a new unit. +-- * @{#BASE.EventOnBaseCaptured}(): Handle the capturing of an airbase or a helipad. +-- * @{#BASE.EventOnCrash}(): Handle the crash of a unit. +-- * @{#BASE.EventOnDead}(): Handle the death of a unit. +-- * @{#BASE.EventOnEjection}(): Handle the ejection of a player out of an airplane. +-- * @{#BASE.EventOnEngineShutdown}(): Handle the shutdown of an engine. +-- * @{#BASE.EventOnEngineStartup}(): Handle the startup of an engine. +-- * @{#BASE.EventOnHit}(): Handle the hit of a shell to a unit. +-- * @{#BASE.EventOnHumanFailure}(): No a clue ... +-- * @{#BASE.EventOnLand}(): Handle the event when a unit lands. +-- * @{#BASE.EventOnMissionStart}(): Handle the start of the mission. +-- * @{#BASE.EventOnPilotDead}(): Handle the event when a pilot is dead. +-- * @{#BASE.EventOnPlayerComment}(): Handle the event when a player posts a comment. +-- * @{#BASE.EventOnPlayerEnterUnit}(): Handle the event when a player enters a unit. +-- * @{#BASE.EventOnPlayerLeaveUnit}(): Handle the event when a player leaves a unit. +-- * @{#BASE.EventOnBirthPlayerMissionEnd}(): Handle the event when a player ends the mission. (Not a clue what that does). +-- * @{#BASE.EventOnRefueling}(): Handle the event when a unit is refueling. +-- * @{#BASE.EventOnShootingEnd}(): Handle the event when a unit starts shooting (guns). +-- * @{#BASE.EventOnShootingStart}(): Handle the event when a unit ends shooting (guns). +-- * @{#BASE.EventOnShot}(): Handle the event when a unit shot a missile. +-- * @{#BASE.EventOnTakeOff}(): Handle the event when a unit takes off from a runway. +-- * @{#BASE.EventOnTookControl}(): Handle the event when a player takes control of a unit. +-- +-- The EventOn() methods provide the @{Core.Event#EVENTDATA} structure to the event handling function. +-- The @{Core.Event#EVENTDATA} structure contains an enriched data set of information about the event being handled. +-- +-- Find below an example of the prototype how to write an event handling function: +-- +-- CommandCenter:EventOnPlayerEnterUnit( +-- --- @param #COMMANDCENTER self +-- -- @param Core.Event#EVENTDATA EventData +-- function( self, EventData ) +-- local PlayerUnit = EventData.IniUnit +-- for MissionID, Mission in pairs( self:GetMissions() ) do +-- local Mission = Mission -- Tasking.Mission#MISSION +-- Mission:JoinUnit( PlayerUnit ) +-- Mission:ReportDetails() +-- end +-- end +-- ) +-- +-- Note the function( self, EventData ). It takes two parameters: +-- +-- * self = the object that is handling the EventOnPlayerEnterUnit. +-- * EventData = the @{Core.Event#EVENTDATA} structure, containing more information of the Event. +-- +-- ## 1.4) Class identification methods +-- +-- BASE provides methods to get more information of each object: +-- +-- * @{#BASE.GetClassID}(): Gets the ID (number) of the object. Each object created is assigned a number, that is incremented by one. +-- * @{#BASE.GetClassName}(): Gets the name of the object, which is the name of the class the object was instantiated from. +-- * @{#BASE.GetClassNameAndID}(): Gets the name and ID of the object. +-- +-- ## 1.10) BASE Inheritance (tree) support +-- -- The following methods are available to support inheritance: -- -- * @{#BASE.Inherit}: Inherits from a class. --- * @{#BASE.Inherited}: Returns the parent class from the class. --- --- Future --- ====== --- Further methods may be added to BASE whenever there is a need to make "overall" functions available within MOOSE. --- +-- * @{#BASE.GetParent}: Returns the parent object from the object it is handling, or nil if there is no parent object. +-- -- ==== -- --- ### Author: FlightControl +-- # **API CHANGE HISTORY** +-- +-- The underlying change log documents the API changes. Please read this carefully. The following notation is used: +-- +-- * **Added** parts are expressed in bold type face. +-- * _Removed_ parts are expressed in italic type face. +-- +-- YYYY-MM-DD: CLASS:**NewFunction**( Params ) replaces CLASS:_OldFunction_( Params ) +-- YYYY-MM-DD: CLASS:**NewFunction( Params )** added +-- +-- Hereby the change log: +-- +-- === +-- +-- # **AUTHORS and CONTRIBUTIONS** +-- +-- ### Contributions: +-- +-- * None. +-- +-- ### Authors: +-- +-- * **FlightControl**: Design & Programming -- -- @module Base @@ -3009,7 +3100,7 @@ function BASE:EventRemoveAll() return self end ---- Subscribe to a S_EVENT_SHOT event. +--- Subscribe to a S_EVENT\_SHOT event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3020,7 +3111,7 @@ function BASE:EventOnShot( EventFunction ) return self end ---- Subscribe to a S_EVENT_HIT event. +--- Subscribe to a S_EVENT\_HIT event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3031,7 +3122,7 @@ function BASE:EventOnHit( EventFunction ) return self end ---- Subscribe to a S_EVENT_TAKEOFF event. +--- Subscribe to a S_EVENT\_TAKEOFF event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3042,7 +3133,7 @@ function BASE:EventOnTakeOff( EventFunction ) return self end ---- Subscribe to a S_EVENT_LAND event. +--- Subscribe to a S_EVENT\_LAND event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3053,7 +3144,7 @@ function BASE:EventOnLand( EventFunction ) return self end ---- Subscribe to a S_EVENT_CRASH event. +--- Subscribe to a S_EVENT\_CRASH event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3064,7 +3155,7 @@ function BASE:EventOnCrash( EventFunction ) return self end ---- Subscribe to a S_EVENT_EJECTION event. +--- Subscribe to a S_EVENT\_EJECTION event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3076,7 +3167,7 @@ function BASE:EventOnEjection( EventFunction ) end ---- Subscribe to a S_EVENT_REFUELING event. +--- Subscribe to a S_EVENT\_REFUELING event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3087,7 +3178,7 @@ function BASE:EventOnRefueling( EventFunction ) return self end ---- Subscribe to a S_EVENT_DEAD event. +--- Subscribe to a S_EVENT\_DEAD event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3098,7 +3189,7 @@ function BASE:EventOnDead( EventFunction ) return self end ---- Subscribe to a S_EVENT_PILOT_DEAD event. +--- Subscribe to a S_EVENT_PILOT\_DEAD event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3109,7 +3200,7 @@ function BASE:EventOnPilotDead( EventFunction ) return self end ---- Subscribe to a S_EVENT_BASE_CAPTURED event. +--- Subscribe to a S_EVENT_BASE\_CAPTURED event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3120,7 +3211,7 @@ function BASE:EventOnBaseCaptured( EventFunction ) return self end ---- Subscribe to a S_EVENT_MISSION_START event. +--- Subscribe to a S_EVENT_MISSION\_START event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3131,7 +3222,7 @@ function BASE:EventOnMissionStart( EventFunction ) return self end ---- Subscribe to a S_EVENT_MISSION_END event. +--- Subscribe to a S_EVENT_MISSION\_END event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3142,7 +3233,7 @@ function BASE:EventOnPlayerMissionEnd( EventFunction ) return self end ---- Subscribe to a S_EVENT_TOOK_CONTROL event. +--- Subscribe to a S_EVENT_TOOK\_CONTROL event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3153,7 +3244,7 @@ function BASE:EventOnTookControl( EventFunction ) return self end ---- Subscribe to a S_EVENT_REFUELING_STOP event. +--- Subscribe to a S_EVENT_REFUELING\_STOP event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3164,7 +3255,7 @@ function BASE:EventOnRefuelingStop( EventFunction ) return self end ---- Subscribe to a S_EVENT_BIRTH event. +--- Subscribe to a S_EVENT\_BIRTH event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3175,7 +3266,7 @@ function BASE:EventOnBirth( EventFunction ) return self end ---- Subscribe to a S_EVENT_HUMAN_FAILURE event. +--- Subscribe to a S_EVENT_HUMAN\_FAILURE event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3186,7 +3277,7 @@ function BASE:EventOnHumanFailure( EventFunction ) return self end ---- Subscribe to a S_EVENT_ENGINE_STARTUP event. +--- Subscribe to a S_EVENT_ENGINE\_STARTUP event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3197,7 +3288,7 @@ function BASE:EventOnEngineStartup( EventFunction ) return self end ---- Subscribe to a S_EVENT_ENGINE_SHUTDOWN event. +--- Subscribe to a S_EVENT_ENGINE\_SHUTDOWN event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3208,7 +3299,7 @@ function BASE:EventOnEngineShutdown( EventFunction ) return self end ---- Subscribe to a S_EVENT_PLAYER_ENTER_UNIT event. +--- Subscribe to a S_EVENT_PLAYER_ENTER\_UNIT event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3219,7 +3310,7 @@ function BASE:EventOnPlayerEnterUnit( EventFunction ) return self end ---- Subscribe to a S_EVENT_PLAYER_LEAVE_UNIT event. +--- Subscribe to a S_EVENT_PLAYER_LEAVE\_UNIT event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3230,7 +3321,7 @@ function BASE:EventOnPlayerLeaveUnit( EventFunction ) return self end ---- Subscribe to a S_EVENT_PLAYER_COMMENT event. +--- Subscribe to a S_EVENT_PLAYER\_COMMENT event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3241,7 +3332,7 @@ function BASE:EventOnPlayerComment( EventFunction ) return self end ---- Subscribe to a S_EVENT_SHOOTING_START event. +--- Subscribe to a S_EVENT_SHOOTING\_START event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3252,7 +3343,7 @@ function BASE:EventOnShootingStart( EventFunction ) return self end ---- Subscribe to a S_EVENT_SHOOTING_END event. +--- Subscribe to a S_EVENT_SHOOTING\_END event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3453,10 +3544,10 @@ end -- @param #boolean TraceOnOff Switch the tracing on or off. -- @usage -- -- Switch the tracing On --- BASE:TraceOn( true ) +-- BASE:TraceOnOff( true ) -- -- -- Switch the tracing Off --- BASE:TraceOn( false ) +-- BASE:TraceOnOff( false ) function BASE:TraceOnOff( TraceOnOff ) _TraceOnOff = TraceOnOff end @@ -10608,22 +10699,55 @@ end ----- The _MessageQueue object is created when the MESSAGE class module is loaded. ----_MessageQueue = MESSAGEQUEUE:New( 0.5 ) -- ---- This module contains the FSM class. +--- This module contains the FSM class and derived FSM_ classes. +-- -- This development is based on a state machine implementation made by Conroy Kyle. -- The state machine can be found here: https://github.com/kyleconroy/lua-state-machine -- --- I've taken the development and enhanced it to make the state machine hierarchical... +-- I've taken the development and enhanced it (actually rewrote it) to make the state machine hierarchical... -- It is a fantastic development, this module. -- -- === -- --- 1) @{Workflow#FSM} class, extends @{Core.Base#BASE} --- ============================================== +-- # 1) @{Core.Fsm#FSM} class, extends @{Core.Base#BASE} -- +-- A Finite State Machine (FSM) defines the rules of transitioning between various States triggered by Events. +-- * A **State** defines a moment in the process. +-- * An **Event** describes an action, that can be triggered both internally as externally in the FSM. An Event can be triggered Embedded or Delayed over time. +-- +-- -- 1.1) Add or remove objects from the FSM -- -------------------------------------------- +-- +-- ==== +-- +-- # **API CHANGE HISTORY** +-- +-- The underlying change log documents the API changes. Please read this carefully. The following notation is used: +-- +-- * **Added** parts are expressed in bold type face. +-- * _Removed_ parts are expressed in italic type face. +-- +-- YYYY-MM-DD: CLASS:**NewFunction**( Params ) replaces CLASS:_OldFunction_( Params ) +-- YYYY-MM-DD: CLASS:**NewFunction( Params )** added +-- +-- Hereby the change log: +-- +-- * 2016-12-18: Released. +-- +-- === +-- +-- # **AUTHORS and CONTRIBUTIONS** +-- +-- ### Contributions: +-- +-- * None. +-- +-- ### Authors: +-- +-- * **FlightControl**: Design & Programming +-- -- @module Fsm --- @author FlightControl do -- FSM @@ -10848,7 +10972,7 @@ do -- FSM if can then local from = self.current - local params = { EventName, from, to, ... } + local params = { from, EventName, to, ... } if self:_call_handler("onbefore" .. EventName, params) == false or self:_call_handler("onleave" .. from, params) == false then @@ -11238,8 +11362,8 @@ end -- @param #string Event -- @param #string From -- @param #string To - function FSM_PROCESS:onstatechange( ProcessUnit, Event, From, To, Dummy ) - self:E( { ProcessUnit, Event, From, To, Dummy, self:IsTrace() } ) + function FSM_PROCESS:onstatechange( ProcessUnit, From, Event, To, Dummy ) + self:E( { ProcessUnit, From, Event, To, Dummy, self:IsTrace() } ) if self:IsTrace() then MESSAGE:New( "@ Process " .. self:GetClassNameAndID() .. " : " .. Event .. " changed to state " .. To, 2 ):ToAll() @@ -17788,8 +17912,8 @@ end --- This module contains the SPAWN class. -- --- 1) @{Functional.Spawn#SPAWN} class, extends @{Core.Base#BASE} --- ============================================= +-- # 1) @{Functional.Spawn#SPAWN} class, extends @{Core.Base#BASE} +-- -- The @{#SPAWN} class allows to spawn dynamically new groups, based on pre-defined initialization settings, modifying the behaviour when groups are spawned. -- For each group to be spawned, within the mission editor, a group has to be created with the "late activation flag" set. We call this group the *"Spawn Template"* of the SPAWN object. -- A reference to this Spawn Template needs to be provided when constructing the SPAWN object, by indicating the name of the group within the mission editor in the constructor methods. @@ -17812,8 +17936,8 @@ end -- * It is important to defined BEFORE you spawn new groups, a proper initialization of the SPAWN instance is done with the options you want to use. -- * When designing a mission, NEVER name groups using a "#" within the name of the group Spawn Template(s), or the SPAWN module logic won't work anymore. -- --- 1.1) SPAWN construction methods --- ------------------------------- +-- ## 1.1) SPAWN construction methods +-- -- Create a new SPAWN object with the @{#SPAWN.New}() or the @{#SPAWN.NewWithAlias}() methods: -- -- * @{#SPAWN.New}(): Creates a new SPAWN object taking the name of the group that represents the GROUP Template (definition). @@ -17823,8 +17947,8 @@ end -- The initialization methods will modify this list of groups so that when a group gets spawned, ALL information is already prepared when spawning. This is done for performance reasons. -- So in principle, the group list will contain all parameters and configurations after initialization, and when groups get actually spawned, this spawning can be done quickly and efficient. -- --- 1.2) SPAWN initialization methods --- --------------------------------- +-- ## 1.2) SPAWN initialization methods +-- -- A spawn object will behave differently based on the usage of **initialization** methods, which all start with the **Init** prefix: -- -- * @{#SPAWN.InitLimit}(): Limits the amount of groups that can be alive at the same time and that can be dynamically spawned. @@ -17836,8 +17960,8 @@ end -- * @{#SPAWN.InitRandomizeUnits}(): Randomizes the @{Unit}s in the @{Group} that is spawned within a **radius band**, given an Outer and Inner radius. -- * @{#SPAWN.InitRandomizeZones}(): Randomizes the spawning between a predefined list of @{Zone}s that are declared using this function. Each zone can be given a probability factor. -- --- 1.3) SPAWN spawning methods --- --------------------------- +-- ## 1.3) SPAWN spawning methods +-- -- Groups can be spawned at different times and methods: -- -- * @{#SPAWN.Spawn}(): Spawn one new group based on the last spawned index. @@ -17852,8 +17976,8 @@ end -- Note that @{#SPAWN.Spawn} and @{#SPAWN.ReSpawn} return a @{GROUP#GROUP.New} object, that contains a reference to the DCSGroup object. -- You can use the @{GROUP} object to do further actions with the DCSGroup. -- --- 1.4) Retrieve alive GROUPs spawned by the SPAWN object --- ------------------------------------------------------ +-- ## 1.4) Retrieve alive GROUPs spawned by the SPAWN object +-- -- The SPAWN class administers which GROUPS it has reserved (in stock) or has created during mission execution. -- Every time a SPAWN object spawns a new GROUP object, a reference to the GROUP object is added to an internal table of GROUPS. -- SPAWN provides methods to iterate through that internal GROUP object reference table: @@ -17865,8 +17989,8 @@ end -- You can use the methods @{#SPAWN.GetFirstAliveGroup}() and sequently @{#SPAWN.GetNextAliveGroup}() to iterate through the alive GROUPS within the SPAWN object, and to actions... See the respective methods for an example. -- The method @{#SPAWN.GetGroupFromIndex}() will return the GROUP object reference from the given Index, dead or alive... -- --- 1.5) SPAWN object cleaning --- -------------------------- +-- ## 1.5) SPAWN object cleaning +-- -- Sometimes, it will occur during a mission run-time, that ground or especially air objects get damaged, and will while being damged stop their activities, while remaining alive. -- In such cases, the SPAWN object will just sit there and wait until that group gets destroyed, but most of the time it won't, -- and it may occur that no new groups are or can be spawned as limits are reached. @@ -17877,8 +18001,8 @@ end -- This models AI that has succesfully returned to their airbase, to restart their combat activities. -- Check the @{#SPAWN.InitCleanUp}() for further info. -- --- 1.6) Catch the @{Group} spawn event in a callback function! --- ----------------------------------------------------------- +-- ## 1.6) Catch the @{Group} spawn event in a callback function! +-- -- When using the SpawnScheduled method, new @{Group}s are created following the schedule timing parameters. -- When a new @{Group} is spawned, you maybe want to execute actions with that group spawned at the spawn event. -- To SPAWN class supports this functionality through the @{#SPAWN.OnSpawnGroup}( **function( SpawnedGroup ) end ** ) method, which takes a function as a parameter that you can define locally. @@ -17888,8 +18012,7 @@ end -- -- ==== -- --- **API CHANGE HISTORY** --- ====================== +-- # **API CHANGE HISTORY** -- -- The underlying change log documents the API changes. Please read this carefully. The following notation is used: -- @@ -17965,8 +18088,7 @@ end -- -- === -- --- AUTHORS and CONTRIBUTIONS --- ========================= +-- # **AUTHORS and CONTRIBUTIONS** -- -- ### Contributions: -- @@ -17976,7 +18098,6 @@ end -- -- * **FlightControl**: Design & Programming -- --- -- @module Spawn @@ -23925,7 +24046,7 @@ end -- @param Core.Set#SET_GROUP SetGroup -- @param #string ClientName -- @param Wrapper.Group#GROUP AIGroup -function AI_BALANCER:onenterSpawning( SetGroup, Event, From, To, ClientName ) +function AI_BALANCER:onenterSpawning( SetGroup, From, Event, To, ClientName ) -- OK, Spawn a new group from the default SpawnAI object provided. local AIGroup = self.SpawnAI:Spawn() @@ -23942,7 +24063,7 @@ end --- @param #AI_BALANCER self -- @param Core.Set#SET_GROUP SetGroup -- @param Wrapper.Group#GROUP AIGroup -function AI_BALANCER:onenterDestroying( SetGroup, Event, From, To, AIGroup ) +function AI_BALANCER:onenterDestroying( SetGroup, From, Event, To, AIGroup ) AIGroup:Destroy() end @@ -23950,7 +24071,7 @@ end --- @param #AI_BALANCER self -- @param Core.Set#SET_GROUP SetGroup -- @param Wrapper.Group#GROUP AIGroup -function AI_BALANCER:onenterReturning( SetGroup, Event, From, To, AIGroup ) +function AI_BALANCER:onenterReturning( SetGroup, From, Event, To, AIGroup ) local AIGroupTemplate = AIGroup:GetTemplate() if self.ToHomeAirbase == true then @@ -24788,7 +24909,7 @@ end -- @param #string From -- @param #string To -- @param Core.Point#POINT_VEC2 ToPointVec2 -function AI_CARGO_UNIT:onenterUnBoarding( Event, From, To, ToPointVec2 ) +function AI_CARGO_UNIT:onenterUnBoarding( From, Event, To, ToPointVec2 ) self:F() local Angle = 180 @@ -24833,8 +24954,8 @@ end -- @param #string From -- @param #string To -- @param Core.Point#POINT_VEC2 ToPointVec2 -function AI_CARGO_UNIT:onleaveUnBoarding( Event, From, To, ToPointVec2 ) - self:F( { ToPointVec2, Event, From, To } ) +function AI_CARGO_UNIT:onleaveUnBoarding( From, Event, To, ToPointVec2 ) + self:F( { ToPointVec2, From, Event, To } ) local Angle = 180 local Speed = 10 @@ -24857,8 +24978,8 @@ end -- @param #string From -- @param #string To -- @param Core.Point#POINT_VEC2 ToPointVec2 -function AI_CARGO_UNIT:onafterUnBoarding( Event, From, To, ToPointVec2 ) - self:F( { ToPointVec2, Event, From, To } ) +function AI_CARGO_UNIT:onafterUnBoarding( From, Event, To, ToPointVec2 ) + self:F( { ToPointVec2, From, Event, To } ) self.CargoInAir = self.CargoObject:InAir() @@ -24882,8 +25003,8 @@ end -- @param #string From -- @param #string To -- @param Core.Point#POINT_VEC2 -function AI_CARGO_UNIT:onenterUnLoaded( Event, From, To, ToPointVec2 ) - self:F( { ToPointVec2, Event, From, To } ) +function AI_CARGO_UNIT:onenterUnLoaded( From, Event, To, ToPointVec2 ) + self:F( { ToPointVec2, From, Event, To } ) local Angle = 180 local Speed = 10 @@ -24920,8 +25041,8 @@ end -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function AI_CARGO_UNIT:onenterBoarding( Event, From, To, CargoCarrier ) - self:F( { CargoCarrier.UnitName, Event, From, To } ) +function AI_CARGO_UNIT:onenterBoarding( From, Event, To, CargoCarrier ) + self:F( { CargoCarrier.UnitName, From, Event, To } ) local Speed = 10 local Angle = 180 @@ -24952,8 +25073,8 @@ end -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function AI_CARGO_UNIT:onleaveBoarding( Event, From, To, CargoCarrier ) - self:F( { CargoCarrier.UnitName, Event, From, To } ) +function AI_CARGO_UNIT:onleaveBoarding( From, Event, To, CargoCarrier ) + self:F( { CargoCarrier.UnitName, From, Event, To } ) if self:IsNear( CargoCarrier:GetPointVec2() ) then self:__Load( 1, CargoCarrier ) @@ -24970,7 +25091,7 @@ end -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function AI_CARGO_UNIT:onenterLoaded( Event, From, To, CargoCarrier ) +function AI_CARGO_UNIT:onenterLoaded( From, Event, To, CargoCarrier ) self:F() self.CargoCarrier = CargoCarrier @@ -24988,7 +25109,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function AI_CARGO_UNIT:onafterBoard( Event, From, To, CargoCarrier ) +function AI_CARGO_UNIT:onafterBoard( From, Event, To, CargoCarrier ) self:F() self.CargoInAir = self.CargoObject:InAir() @@ -25041,7 +25162,7 @@ end -- @param #number Speed -- @param #number BoardDistance -- @param #number Angle -function AI_CARGO_PACKAGE:onafterOnBoard( Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle ) +function AI_CARGO_PACKAGE:onafterOnBoard( From, Event, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle ) self:F() self.CargoInAir = self.CargoCarrier:InAir() @@ -25095,7 +25216,7 @@ end -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function AI_CARGO_PACKAGE:onafterOnBoarded( Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle ) +function AI_CARGO_PACKAGE:onafterOnBoarded( From, Event, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle ) self:F() if self:IsNear( CargoCarrier ) then @@ -25115,7 +25236,7 @@ end -- @param #number UnBoardDistance -- @param #number Radius -- @param #number Angle -function AI_CARGO_PACKAGE:onafterUnBoard( Event, From, To, CargoCarrier, Speed, UnLoadDistance, UnBoardDistance, Radius, Angle ) +function AI_CARGO_PACKAGE:onafterUnBoard( From, Event, To, CargoCarrier, Speed, UnLoadDistance, UnBoardDistance, Radius, Angle ) self:F() self.CargoInAir = self.CargoCarrier:InAir() @@ -25153,7 +25274,7 @@ end -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function AI_CARGO_PACKAGE:onafterUnBoarded( Event, From, To, CargoCarrier, Speed ) +function AI_CARGO_PACKAGE:onafterUnBoarded( From, Event, To, CargoCarrier, Speed ) self:F() if self:IsNear( CargoCarrier ) then @@ -25172,7 +25293,7 @@ end -- @param #number Speed -- @param #number LoadDistance -- @param #number Angle -function AI_CARGO_PACKAGE:onafterLoad( Event, From, To, CargoCarrier, Speed, LoadDistance, Angle ) +function AI_CARGO_PACKAGE:onafterLoad( From, Event, To, CargoCarrier, Speed, LoadDistance, Angle ) self:F() self.CargoCarrier = CargoCarrier @@ -25198,7 +25319,7 @@ end -- @param #string To -- @param #number Distance -- @param #number Angle -function AI_CARGO_PACKAGE:onafterUnLoad( Event, From, To, CargoCarrier, Speed, Distance, Angle ) +function AI_CARGO_PACKAGE:onafterUnLoad( From, Event, To, CargoCarrier, Speed, Distance, Angle ) self:F() local StartPointVec2 = self.CargoCarrier:GetPointVec2() @@ -25281,8 +25402,8 @@ end -- @param #string Event -- @param #string From -- @param #string To -function AI_CARGO_GROUPED:onenterBoarding( Event, From, To, CargoCarrier ) - self:F( { CargoCarrier.UnitName, Event, From, To } ) +function AI_CARGO_GROUPED:onenterBoarding( From, Event, To, CargoCarrier ) + self:F( { CargoCarrier.UnitName, From, Event, To } ) if From == "UnLoaded" then @@ -25304,8 +25425,8 @@ end -- @param #string Event -- @param #string From -- @param #string To -function AI_CARGO_GROUPED:onenterLoaded( Event, From, To, CargoCarrier ) - self:F( { CargoCarrier.UnitName, Event, From, To } ) +function AI_CARGO_GROUPED:onenterLoaded( From, Event, To, CargoCarrier ) + self:F( { CargoCarrier.UnitName, From, Event, To } ) if From == "UnLoaded" then -- For each Cargo object within the AI_CARGO_GROUPED, load each cargo to the CargoCarrier. @@ -25321,8 +25442,8 @@ end -- @param #string Event -- @param #string From -- @param #string To -function AI_CARGO_GROUPED:onleaveBoarding( Event, From, To, CargoCarrier ) - self:F( { CargoCarrier.UnitName, Event, From, To } ) +function AI_CARGO_GROUPED:onleaveBoarding( From, Event, To, CargoCarrier ) + self:F( { CargoCarrier.UnitName, From, Event, To } ) local Boarded = true @@ -25348,7 +25469,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function AI_CARGO_GROUPED:onenterUnBoarding( Event, From, To, ToPointVec2 ) +function AI_CARGO_GROUPED:onenterUnBoarding( From, Event, To, ToPointVec2 ) self:F() local Timer = 1 @@ -25374,8 +25495,8 @@ end -- @param #string Event -- @param #string From -- @param #string To -function AI_CARGO_GROUPED:onleaveUnBoarding( Event, From, To, ToPointVec2 ) - self:F( { ToPointVec2, Event, From, To } ) +function AI_CARGO_GROUPED:onleaveUnBoarding( From, Event, To, ToPointVec2 ) + self:F( { ToPointVec2, From, Event, To } ) local Angle = 180 local Speed = 10 @@ -25409,8 +25530,8 @@ end -- @param #string Event -- @param #string From -- @param #string To -function AI_CARGO_GROUPED:onafterUnBoarding( Event, From, To, ToPointVec2 ) - self:F( { ToPointVec2, Event, From, To } ) +function AI_CARGO_GROUPED:onafterUnBoarding( From, Event, To, ToPointVec2 ) + self:F( { ToPointVec2, From, Event, To } ) self:__UnLoad( 1, ToPointVec2 ) end @@ -25423,8 +25544,8 @@ end -- @param #string Event -- @param #string From -- @param #string To -function AI_CARGO_GROUPED:onenterUnLoaded( Event, From, To, ToPointVec2 ) - self:F( { ToPointVec2, Event, From, To } ) +function AI_CARGO_GROUPED:onenterUnLoaded( From, Event, To, ToPointVec2 ) + self:F( { ToPointVec2, From, Event, To } ) if From == "Loaded" then @@ -25600,8 +25721,8 @@ do -- ACT_ASSIGN_ACCEPT -- @param #string Event -- @param #string From -- @param #string To - function ACT_ASSIGN_ACCEPT:onafterStart( ProcessUnit, Event, From, To ) - self:E( { ProcessUnit, Event, From, To } ) + function ACT_ASSIGN_ACCEPT:onafterStart( ProcessUnit, From, Event, To ) + self:E( { ProcessUnit, From, Event, To } ) self:__Assign( 1 ) end @@ -25612,9 +25733,9 @@ do -- ACT_ASSIGN_ACCEPT -- @param #string Event -- @param #string From -- @param #string To - function ACT_ASSIGN_ACCEPT:onenterAssigned( ProcessUnit, Event, From, To ) + function ACT_ASSIGN_ACCEPT:onenterAssigned( ProcessUnit, From, Event, To ) env.info( "in here" ) - self:E( { ProcessUnit, Event, From, To } ) + self:E( { ProcessUnit, From, Event, To } ) local ProcessGroup = ProcessUnit:GetGroup() @@ -25680,8 +25801,8 @@ do -- ACT_ASSIGN_MENU_ACCEPT -- @param #string Event -- @param #string From -- @param #string To - function ACT_ASSIGN_MENU_ACCEPT:onafterStart( ProcessUnit, Event, From, To ) - self:E( { ProcessUnit, Event, From, To } ) + function ACT_ASSIGN_MENU_ACCEPT:onafterStart( ProcessUnit, From, Event, To ) + self:E( { ProcessUnit, From, Event, To } ) self:Message( "Access the radio menu to accept the task. You have 30 seconds or the assignment will be cancelled." ) @@ -25714,8 +25835,8 @@ do -- ACT_ASSIGN_MENU_ACCEPT -- @param #string Event -- @param #string From -- @param #string To - function ACT_ASSIGN_MENU_ACCEPT:onafterAssign( ProcessUnit, Event, From, To ) - self:E( { ProcessUnit.UnitNameEvent, From, To } ) + function ACT_ASSIGN_MENU_ACCEPT:onafterAssign( ProcessUnit, From, Event, To ) + self:E( { ProcessUnit.UnitNameFrom, Event, To } ) self.Menu:Remove() end @@ -25726,8 +25847,8 @@ do -- ACT_ASSIGN_MENU_ACCEPT -- @param #string Event -- @param #string From -- @param #string To - function ACT_ASSIGN_MENU_ACCEPT:onafterReject( ProcessUnit, Event, From, To ) - self:E( { ProcessUnit.UnitName, Event, From, To } ) + function ACT_ASSIGN_MENU_ACCEPT:onafterReject( ProcessUnit, From, Event, To ) + self:E( { ProcessUnit.UnitName, From, Event, To } ) self.Menu:Remove() --TODO: need to resolve this problem ... it has to do with the events ... @@ -25861,7 +25982,7 @@ do -- ACT_ROUTE -- @param #string Event -- @param #string From -- @param #string To - function ACT_ROUTE:onafterStart( ProcessUnit, Event, From, To ) + function ACT_ROUTE:onafterStart( ProcessUnit, From, Event, To ) self:__Route( 1 ) @@ -25881,7 +26002,7 @@ do -- ACT_ROUTE -- @param #string Event -- @param #string From -- @param #string To - function ACT_ROUTE:onbeforeRoute( ProcessUnit, Event, From, To ) + function ACT_ROUTE:onbeforeRoute( ProcessUnit, From, Event, To ) self:F( { "BeforeRoute 1", self.DisplayCount, self.DisplayInterval } ) if ProcessUnit:IsAlive() then @@ -25977,7 +26098,7 @@ do -- ACT_ROUTE_ZONE -- @param #string Event -- @param #string From -- @param #string To - function ACT_ROUTE_ZONE:onenterReporting( ProcessUnit, Event, From, To ) + function ACT_ROUTE_ZONE:onenterReporting( ProcessUnit, From, Event, To ) local ZoneVec2 = self.TargetZone:GetVec2() local ZonePointVec2 = POINT_VEC2:New( ZoneVec2.x, ZoneVec2.y ) @@ -26105,7 +26226,7 @@ do -- ACT_ACCOUNT -- @param #string Event -- @param #string From -- @param #string To - function ACT_ACCOUNT:onafterStart( ProcessUnit, Event, From, To ) + function ACT_ACCOUNT:onafterStart( ProcessUnit, From, Event, To ) self:EventOnDead( self.onfuncEventDead ) @@ -26119,7 +26240,7 @@ do -- ACT_ACCOUNT -- @param #string Event -- @param #string From -- @param #string To - function ACT_ACCOUNT:onenterWaiting( ProcessUnit, Event, From, To ) + function ACT_ACCOUNT:onenterWaiting( ProcessUnit, From, Event, To ) if self.DisplayCount >= self.DisplayInterval then self:Report() @@ -26137,7 +26258,7 @@ do -- ACT_ACCOUNT -- @param #string Event -- @param #string From -- @param #string To - function ACT_ACCOUNT:onafterEvent( ProcessUnit, Event, From, To, Event ) + function ACT_ACCOUNT:onafterEvent( ProcessUnit, From, Event, To, Event ) self:__NoMore( 1 ) end @@ -26199,8 +26320,8 @@ do -- ACT_ACCOUNT_DEADS -- @param #string Event -- @param #string From -- @param #string To - function ACT_ACCOUNT_DEADS:onenterReport( ProcessUnit, Event, From, To ) - self:E( { ProcessUnit, Event, From, To } ) + function ACT_ACCOUNT_DEADS:onenterReport( ProcessUnit, From, Event, To ) + self:E( { ProcessUnit, From, Event, To } ) self:Message( "Your group with assigned " .. self.TaskName .. " task has " .. self.TargetSetUnit:GetUnitTypesText() .. " targets left to be destroyed." ) end @@ -26212,8 +26333,8 @@ do -- ACT_ACCOUNT_DEADS -- @param #string Event -- @param #string From -- @param #string To - function ACT_ACCOUNT_DEADS:onenterAccount( ProcessUnit, Event, From, To, EventData ) - self:T( { ProcessUnit, EventData, Event, From, To } ) + function ACT_ACCOUNT_DEADS:onenterAccount( ProcessUnit, From, Event, To, EventData ) + self:T( { ProcessUnit, EventData, From, Event, To } ) self:T({self.Controllable}) @@ -26232,7 +26353,7 @@ do -- ACT_ACCOUNT_DEADS -- @param #string Event -- @param #string From -- @param #string To - function ACT_ACCOUNT_DEADS:onafterEvent( ProcessUnit, Event, From, To, EventData ) + function ACT_ACCOUNT_DEADS:onafterEvent( ProcessUnit, From, Event, To, EventData ) if self.TargetSetUnit:Count() > 0 then self:__More( 1 ) @@ -26361,7 +26482,7 @@ do -- ACT_ASSIST -- @param #string Event -- @param #string From -- @param #string To - function ACT_ASSIST:onafterStart( ProcessUnit, Event, From, To ) + function ACT_ASSIST:onafterStart( ProcessUnit, From, Event, To ) local ProcessGroup = ProcessUnit:GetGroup() local MissionMenu = self:GetMission():GetMissionMenu( ProcessGroup ) @@ -26440,7 +26561,7 @@ do -- ACT_ASSIST_SMOKE_TARGETS_ZONE -- @param #string Event -- @param #string From -- @param #string To - function ACT_ASSIST_SMOKE_TARGETS_ZONE:onenterSmoking( ProcessUnit, Event, From, To ) + function ACT_ASSIST_SMOKE_TARGETS_ZONE:onenterSmoking( ProcessUnit, From, Event, To ) self.TargetSetUnit:ForEachUnit( --- @param Wrapper.Unit#UNIT SmokeUnit @@ -26808,7 +26929,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function MISSION:onbeforeComplete( Event, From, To ) +function MISSION:onbeforeComplete( From, Event, To ) for TaskID, Task in pairs( self:GetTasks() ) do local Task = Task -- Tasking.Task#TASK @@ -26824,7 +26945,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function MISSION:onenterCompleted( Event, From, To ) +function MISSION:onenterCompleted( From, Event, To ) self:GetCommandCenter():MessageToCoalition( "Mission " .. self:GetName() .. " has been completed! Good job guys!" ) end @@ -28562,7 +28683,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function TASK:onenterAssigned( Event, From, To ) +function TASK:onenterAssigned( From, Event, To ) self:E("Task Assigned") @@ -28576,7 +28697,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function TASK:onenterSuccess( Event, From, To ) +function TASK:onenterSuccess( From, Event, To ) self:E( "Task Success" ) @@ -28593,7 +28714,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function TASK:onenterAborted( Event, From, To ) +function TASK:onenterAborted( From, Event, To ) self:E( "Task Aborted" ) @@ -28607,7 +28728,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function TASK:onenterFailed( Event, From, To ) +function TASK:onenterFailed( From, Event, To ) self:E( "Task Failed" ) @@ -28621,7 +28742,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function TASK:onstatechange( Event, From, To ) +function TASK:onstatechange( From, Event, To ) if self:IsTrace() then MESSAGE:New( "@ Task " .. self.TaskName .. " : " .. Event .. " changed to state " .. To, 2 ):ToAll() diff --git a/Moose Mission Setup/Moose.lua b/Moose Mission Setup/Moose.lua index 0fcc139ec..ba4c7bc84 100644 --- a/Moose Mission Setup/Moose.lua +++ b/Moose Mission Setup/Moose.lua @@ -1,5 +1,5 @@ env.info( '*** MOOSE STATIC INCLUDE START *** ' ) -env.info( 'Moose Generation Timestamp: 20161218_1138' ) +env.info( 'Moose Generation Timestamp: 20161220_0922' ) local base = _G Include = {} @@ -2803,27 +2803,27 @@ end -- -- Note: Normally you would not use the BASE class unless you are extending the MOOSE framework with new classes. -- --- 1.1) BASE constructor --- --------------------- +-- ## 1.1) BASE constructor +-- -- Any class derived from BASE, must use the @{Core.Base#BASE.New) constructor within the @{Core.Base#BASE.Inherit) method. -- See an example at the @{Core.Base#BASE.New} method how this is done. -- --- 1.2) BASE Trace functionality --- ----------------------------- +-- ## 1.2) BASE Trace functionality +-- -- The BASE class contains trace methods to trace progress within a mission execution of a certain object. -- Note that these trace methods are inherited by each MOOSE class interiting BASE. -- As such, each object created from derived class from BASE can use the tracing functions to trace its execution. -- --- 1.2.1) Tracing functions --- ------------------------ +-- ### 1.2.1) Tracing functions +-- -- There are basically 3 types of tracing methods available within BASE: -- -- * @{#BASE.F}: Trace the beginning of a function and its given parameters. An F is indicated at column 44 in the DCS.log file. -- * @{#BASE.T}: Trace further logic within a function giving optional variables or parameters. A T is indicated at column 44 in the DCS.log file. -- * @{#BASE.E}: Trace an exception within a function giving optional variables or parameters. An E is indicated at column 44 in the DCS.log file. An exception will always be traced. -- --- 1.2.2) Tracing levels --- --------------------- +-- ### 1.2.2) Tracing levels +-- -- There are 3 tracing levels within MOOSE. -- These tracing levels were defined to avoid bulks of tracing to be generated by lots of objects. -- @@ -2834,20 +2834,111 @@ end -- * @{#BASE.T2}: Trace further logic within a function giving optional variables or parameters with tracing level 2. -- * @{#BASE.T3}: Trace further logic within a function giving optional variables or parameters with tracing level 3. -- --- 1.3) BASE Inheritance support --- =========================== +-- ### 1.2.3) Trace activation. +-- +-- Tracing can be activated in several ways: +-- +-- * Switch tracing on or off through the @{#BASE.TraceOnOff}() method. +-- * Activate all tracing through the @{#BASE.TraceAll}() method. +-- * Activate only the tracing of a certain class (name) through the @{#BASE.TraceClass}() method. +-- * Activate only the tracing of a certain method of a certain class through the @{#BASE.TraceClassMethod}() method. +-- * Activate only the tracing of a certain level through the @{#BASE.TraceLevel}() method. +-- ### 1.2.4) Check if tracing is on. +-- +-- The method @{#BASE.IsTrace}() will validate if tracing is activated or not. +-- +-- ## 1.3 DCS simulator Event Handling +-- +-- The BASE class provides methods to catch DCS Events. These are events that are triggered from within the DCS simulator, +-- and handled through lua scripting. MOOSE provides an encapsulation to handle these events more efficiently. +-- Therefore, the BASE class exposes the following event handling functions: +-- +-- * @{#BASE.EventOnBirth}(): Handle the birth of a new unit. +-- * @{#BASE.EventOnBaseCaptured}(): Handle the capturing of an airbase or a helipad. +-- * @{#BASE.EventOnCrash}(): Handle the crash of a unit. +-- * @{#BASE.EventOnDead}(): Handle the death of a unit. +-- * @{#BASE.EventOnEjection}(): Handle the ejection of a player out of an airplane. +-- * @{#BASE.EventOnEngineShutdown}(): Handle the shutdown of an engine. +-- * @{#BASE.EventOnEngineStartup}(): Handle the startup of an engine. +-- * @{#BASE.EventOnHit}(): Handle the hit of a shell to a unit. +-- * @{#BASE.EventOnHumanFailure}(): No a clue ... +-- * @{#BASE.EventOnLand}(): Handle the event when a unit lands. +-- * @{#BASE.EventOnMissionStart}(): Handle the start of the mission. +-- * @{#BASE.EventOnPilotDead}(): Handle the event when a pilot is dead. +-- * @{#BASE.EventOnPlayerComment}(): Handle the event when a player posts a comment. +-- * @{#BASE.EventOnPlayerEnterUnit}(): Handle the event when a player enters a unit. +-- * @{#BASE.EventOnPlayerLeaveUnit}(): Handle the event when a player leaves a unit. +-- * @{#BASE.EventOnBirthPlayerMissionEnd}(): Handle the event when a player ends the mission. (Not a clue what that does). +-- * @{#BASE.EventOnRefueling}(): Handle the event when a unit is refueling. +-- * @{#BASE.EventOnShootingEnd}(): Handle the event when a unit starts shooting (guns). +-- * @{#BASE.EventOnShootingStart}(): Handle the event when a unit ends shooting (guns). +-- * @{#BASE.EventOnShot}(): Handle the event when a unit shot a missile. +-- * @{#BASE.EventOnTakeOff}(): Handle the event when a unit takes off from a runway. +-- * @{#BASE.EventOnTookControl}(): Handle the event when a player takes control of a unit. +-- +-- The EventOn() methods provide the @{Core.Event#EVENTDATA} structure to the event handling function. +-- The @{Core.Event#EVENTDATA} structure contains an enriched data set of information about the event being handled. +-- +-- Find below an example of the prototype how to write an event handling function: +-- +-- CommandCenter:EventOnPlayerEnterUnit( +-- --- @param #COMMANDCENTER self +-- -- @param Core.Event#EVENTDATA EventData +-- function( self, EventData ) +-- local PlayerUnit = EventData.IniUnit +-- for MissionID, Mission in pairs( self:GetMissions() ) do +-- local Mission = Mission -- Tasking.Mission#MISSION +-- Mission:JoinUnit( PlayerUnit ) +-- Mission:ReportDetails() +-- end +-- end +-- ) +-- +-- Note the function( self, EventData ). It takes two parameters: +-- +-- * self = the object that is handling the EventOnPlayerEnterUnit. +-- * EventData = the @{Core.Event#EVENTDATA} structure, containing more information of the Event. +-- +-- ## 1.4) Class identification methods +-- +-- BASE provides methods to get more information of each object: +-- +-- * @{#BASE.GetClassID}(): Gets the ID (number) of the object. Each object created is assigned a number, that is incremented by one. +-- * @{#BASE.GetClassName}(): Gets the name of the object, which is the name of the class the object was instantiated from. +-- * @{#BASE.GetClassNameAndID}(): Gets the name and ID of the object. +-- +-- ## 1.10) BASE Inheritance (tree) support +-- -- The following methods are available to support inheritance: -- -- * @{#BASE.Inherit}: Inherits from a class. --- * @{#BASE.Inherited}: Returns the parent class from the class. --- --- Future --- ====== --- Further methods may be added to BASE whenever there is a need to make "overall" functions available within MOOSE. --- +-- * @{#BASE.GetParent}: Returns the parent object from the object it is handling, or nil if there is no parent object. +-- -- ==== -- --- ### Author: FlightControl +-- # **API CHANGE HISTORY** +-- +-- The underlying change log documents the API changes. Please read this carefully. The following notation is used: +-- +-- * **Added** parts are expressed in bold type face. +-- * _Removed_ parts are expressed in italic type face. +-- +-- YYYY-MM-DD: CLASS:**NewFunction**( Params ) replaces CLASS:_OldFunction_( Params ) +-- YYYY-MM-DD: CLASS:**NewFunction( Params )** added +-- +-- Hereby the change log: +-- +-- === +-- +-- # **AUTHORS and CONTRIBUTIONS** +-- +-- ### Contributions: +-- +-- * None. +-- +-- ### Authors: +-- +-- * **FlightControl**: Design & Programming -- -- @module Base @@ -3009,7 +3100,7 @@ function BASE:EventRemoveAll() return self end ---- Subscribe to a S_EVENT_SHOT event. +--- Subscribe to a S_EVENT\_SHOT event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3020,7 +3111,7 @@ function BASE:EventOnShot( EventFunction ) return self end ---- Subscribe to a S_EVENT_HIT event. +--- Subscribe to a S_EVENT\_HIT event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3031,7 +3122,7 @@ function BASE:EventOnHit( EventFunction ) return self end ---- Subscribe to a S_EVENT_TAKEOFF event. +--- Subscribe to a S_EVENT\_TAKEOFF event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3042,7 +3133,7 @@ function BASE:EventOnTakeOff( EventFunction ) return self end ---- Subscribe to a S_EVENT_LAND event. +--- Subscribe to a S_EVENT\_LAND event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3053,7 +3144,7 @@ function BASE:EventOnLand( EventFunction ) return self end ---- Subscribe to a S_EVENT_CRASH event. +--- Subscribe to a S_EVENT\_CRASH event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3064,7 +3155,7 @@ function BASE:EventOnCrash( EventFunction ) return self end ---- Subscribe to a S_EVENT_EJECTION event. +--- Subscribe to a S_EVENT\_EJECTION event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3076,7 +3167,7 @@ function BASE:EventOnEjection( EventFunction ) end ---- Subscribe to a S_EVENT_REFUELING event. +--- Subscribe to a S_EVENT\_REFUELING event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3087,7 +3178,7 @@ function BASE:EventOnRefueling( EventFunction ) return self end ---- Subscribe to a S_EVENT_DEAD event. +--- Subscribe to a S_EVENT\_DEAD event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3098,7 +3189,7 @@ function BASE:EventOnDead( EventFunction ) return self end ---- Subscribe to a S_EVENT_PILOT_DEAD event. +--- Subscribe to a S_EVENT_PILOT\_DEAD event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3109,7 +3200,7 @@ function BASE:EventOnPilotDead( EventFunction ) return self end ---- Subscribe to a S_EVENT_BASE_CAPTURED event. +--- Subscribe to a S_EVENT_BASE\_CAPTURED event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3120,7 +3211,7 @@ function BASE:EventOnBaseCaptured( EventFunction ) return self end ---- Subscribe to a S_EVENT_MISSION_START event. +--- Subscribe to a S_EVENT_MISSION\_START event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3131,7 +3222,7 @@ function BASE:EventOnMissionStart( EventFunction ) return self end ---- Subscribe to a S_EVENT_MISSION_END event. +--- Subscribe to a S_EVENT_MISSION\_END event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3142,7 +3233,7 @@ function BASE:EventOnPlayerMissionEnd( EventFunction ) return self end ---- Subscribe to a S_EVENT_TOOK_CONTROL event. +--- Subscribe to a S_EVENT_TOOK\_CONTROL event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3153,7 +3244,7 @@ function BASE:EventOnTookControl( EventFunction ) return self end ---- Subscribe to a S_EVENT_REFUELING_STOP event. +--- Subscribe to a S_EVENT_REFUELING\_STOP event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3164,7 +3255,7 @@ function BASE:EventOnRefuelingStop( EventFunction ) return self end ---- Subscribe to a S_EVENT_BIRTH event. +--- Subscribe to a S_EVENT\_BIRTH event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3175,7 +3266,7 @@ function BASE:EventOnBirth( EventFunction ) return self end ---- Subscribe to a S_EVENT_HUMAN_FAILURE event. +--- Subscribe to a S_EVENT_HUMAN\_FAILURE event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3186,7 +3277,7 @@ function BASE:EventOnHumanFailure( EventFunction ) return self end ---- Subscribe to a S_EVENT_ENGINE_STARTUP event. +--- Subscribe to a S_EVENT_ENGINE\_STARTUP event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3197,7 +3288,7 @@ function BASE:EventOnEngineStartup( EventFunction ) return self end ---- Subscribe to a S_EVENT_ENGINE_SHUTDOWN event. +--- Subscribe to a S_EVENT_ENGINE\_SHUTDOWN event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3208,7 +3299,7 @@ function BASE:EventOnEngineShutdown( EventFunction ) return self end ---- Subscribe to a S_EVENT_PLAYER_ENTER_UNIT event. +--- Subscribe to a S_EVENT_PLAYER_ENTER\_UNIT event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3219,7 +3310,7 @@ function BASE:EventOnPlayerEnterUnit( EventFunction ) return self end ---- Subscribe to a S_EVENT_PLAYER_LEAVE_UNIT event. +--- Subscribe to a S_EVENT_PLAYER_LEAVE\_UNIT event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3230,7 +3321,7 @@ function BASE:EventOnPlayerLeaveUnit( EventFunction ) return self end ---- Subscribe to a S_EVENT_PLAYER_COMMENT event. +--- Subscribe to a S_EVENT_PLAYER\_COMMENT event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3241,7 +3332,7 @@ function BASE:EventOnPlayerComment( EventFunction ) return self end ---- Subscribe to a S_EVENT_SHOOTING_START event. +--- Subscribe to a S_EVENT_SHOOTING\_START event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3252,7 +3343,7 @@ function BASE:EventOnShootingStart( EventFunction ) return self end ---- Subscribe to a S_EVENT_SHOOTING_END event. +--- Subscribe to a S_EVENT_SHOOTING\_END event. -- @param #BASE self -- @param #function EventFunction The function to be called when the event occurs for the unit. -- @return #BASE @@ -3453,10 +3544,10 @@ end -- @param #boolean TraceOnOff Switch the tracing on or off. -- @usage -- -- Switch the tracing On --- BASE:TraceOn( true ) +-- BASE:TraceOnOff( true ) -- -- -- Switch the tracing Off --- BASE:TraceOn( false ) +-- BASE:TraceOnOff( false ) function BASE:TraceOnOff( TraceOnOff ) _TraceOnOff = TraceOnOff end @@ -10608,22 +10699,55 @@ end ----- The _MessageQueue object is created when the MESSAGE class module is loaded. ----_MessageQueue = MESSAGEQUEUE:New( 0.5 ) -- ---- This module contains the FSM class. +--- This module contains the FSM class and derived FSM_ classes. +-- -- This development is based on a state machine implementation made by Conroy Kyle. -- The state machine can be found here: https://github.com/kyleconroy/lua-state-machine -- --- I've taken the development and enhanced it to make the state machine hierarchical... +-- I've taken the development and enhanced it (actually rewrote it) to make the state machine hierarchical... -- It is a fantastic development, this module. -- -- === -- --- 1) @{Workflow#FSM} class, extends @{Core.Base#BASE} --- ============================================== +-- # 1) @{Core.Fsm#FSM} class, extends @{Core.Base#BASE} -- +-- A Finite State Machine (FSM) defines the rules of transitioning between various States triggered by Events. +-- * A **State** defines a moment in the process. +-- * An **Event** describes an action, that can be triggered both internally as externally in the FSM. An Event can be triggered Embedded or Delayed over time. +-- +-- -- 1.1) Add or remove objects from the FSM -- -------------------------------------------- +-- +-- ==== +-- +-- # **API CHANGE HISTORY** +-- +-- The underlying change log documents the API changes. Please read this carefully. The following notation is used: +-- +-- * **Added** parts are expressed in bold type face. +-- * _Removed_ parts are expressed in italic type face. +-- +-- YYYY-MM-DD: CLASS:**NewFunction**( Params ) replaces CLASS:_OldFunction_( Params ) +-- YYYY-MM-DD: CLASS:**NewFunction( Params )** added +-- +-- Hereby the change log: +-- +-- * 2016-12-18: Released. +-- +-- === +-- +-- # **AUTHORS and CONTRIBUTIONS** +-- +-- ### Contributions: +-- +-- * None. +-- +-- ### Authors: +-- +-- * **FlightControl**: Design & Programming +-- -- @module Fsm --- @author FlightControl do -- FSM @@ -10848,7 +10972,7 @@ do -- FSM if can then local from = self.current - local params = { EventName, from, to, ... } + local params = { from, EventName, to, ... } if self:_call_handler("onbefore" .. EventName, params) == false or self:_call_handler("onleave" .. from, params) == false then @@ -11238,8 +11362,8 @@ end -- @param #string Event -- @param #string From -- @param #string To - function FSM_PROCESS:onstatechange( ProcessUnit, Event, From, To, Dummy ) - self:E( { ProcessUnit, Event, From, To, Dummy, self:IsTrace() } ) + function FSM_PROCESS:onstatechange( ProcessUnit, From, Event, To, Dummy ) + self:E( { ProcessUnit, From, Event, To, Dummy, self:IsTrace() } ) if self:IsTrace() then MESSAGE:New( "@ Process " .. self:GetClassNameAndID() .. " : " .. Event .. " changed to state " .. To, 2 ):ToAll() @@ -17788,8 +17912,8 @@ end --- This module contains the SPAWN class. -- --- 1) @{Functional.Spawn#SPAWN} class, extends @{Core.Base#BASE} --- ============================================= +-- # 1) @{Functional.Spawn#SPAWN} class, extends @{Core.Base#BASE} +-- -- The @{#SPAWN} class allows to spawn dynamically new groups, based on pre-defined initialization settings, modifying the behaviour when groups are spawned. -- For each group to be spawned, within the mission editor, a group has to be created with the "late activation flag" set. We call this group the *"Spawn Template"* of the SPAWN object. -- A reference to this Spawn Template needs to be provided when constructing the SPAWN object, by indicating the name of the group within the mission editor in the constructor methods. @@ -17812,8 +17936,8 @@ end -- * It is important to defined BEFORE you spawn new groups, a proper initialization of the SPAWN instance is done with the options you want to use. -- * When designing a mission, NEVER name groups using a "#" within the name of the group Spawn Template(s), or the SPAWN module logic won't work anymore. -- --- 1.1) SPAWN construction methods --- ------------------------------- +-- ## 1.1) SPAWN construction methods +-- -- Create a new SPAWN object with the @{#SPAWN.New}() or the @{#SPAWN.NewWithAlias}() methods: -- -- * @{#SPAWN.New}(): Creates a new SPAWN object taking the name of the group that represents the GROUP Template (definition). @@ -17823,8 +17947,8 @@ end -- The initialization methods will modify this list of groups so that when a group gets spawned, ALL information is already prepared when spawning. This is done for performance reasons. -- So in principle, the group list will contain all parameters and configurations after initialization, and when groups get actually spawned, this spawning can be done quickly and efficient. -- --- 1.2) SPAWN initialization methods --- --------------------------------- +-- ## 1.2) SPAWN initialization methods +-- -- A spawn object will behave differently based on the usage of **initialization** methods, which all start with the **Init** prefix: -- -- * @{#SPAWN.InitLimit}(): Limits the amount of groups that can be alive at the same time and that can be dynamically spawned. @@ -17836,8 +17960,8 @@ end -- * @{#SPAWN.InitRandomizeUnits}(): Randomizes the @{Unit}s in the @{Group} that is spawned within a **radius band**, given an Outer and Inner radius. -- * @{#SPAWN.InitRandomizeZones}(): Randomizes the spawning between a predefined list of @{Zone}s that are declared using this function. Each zone can be given a probability factor. -- --- 1.3) SPAWN spawning methods --- --------------------------- +-- ## 1.3) SPAWN spawning methods +-- -- Groups can be spawned at different times and methods: -- -- * @{#SPAWN.Spawn}(): Spawn one new group based on the last spawned index. @@ -17852,8 +17976,8 @@ end -- Note that @{#SPAWN.Spawn} and @{#SPAWN.ReSpawn} return a @{GROUP#GROUP.New} object, that contains a reference to the DCSGroup object. -- You can use the @{GROUP} object to do further actions with the DCSGroup. -- --- 1.4) Retrieve alive GROUPs spawned by the SPAWN object --- ------------------------------------------------------ +-- ## 1.4) Retrieve alive GROUPs spawned by the SPAWN object +-- -- The SPAWN class administers which GROUPS it has reserved (in stock) or has created during mission execution. -- Every time a SPAWN object spawns a new GROUP object, a reference to the GROUP object is added to an internal table of GROUPS. -- SPAWN provides methods to iterate through that internal GROUP object reference table: @@ -17865,8 +17989,8 @@ end -- You can use the methods @{#SPAWN.GetFirstAliveGroup}() and sequently @{#SPAWN.GetNextAliveGroup}() to iterate through the alive GROUPS within the SPAWN object, and to actions... See the respective methods for an example. -- The method @{#SPAWN.GetGroupFromIndex}() will return the GROUP object reference from the given Index, dead or alive... -- --- 1.5) SPAWN object cleaning --- -------------------------- +-- ## 1.5) SPAWN object cleaning +-- -- Sometimes, it will occur during a mission run-time, that ground or especially air objects get damaged, and will while being damged stop their activities, while remaining alive. -- In such cases, the SPAWN object will just sit there and wait until that group gets destroyed, but most of the time it won't, -- and it may occur that no new groups are or can be spawned as limits are reached. @@ -17877,8 +18001,8 @@ end -- This models AI that has succesfully returned to their airbase, to restart their combat activities. -- Check the @{#SPAWN.InitCleanUp}() for further info. -- --- 1.6) Catch the @{Group} spawn event in a callback function! --- ----------------------------------------------------------- +-- ## 1.6) Catch the @{Group} spawn event in a callback function! +-- -- When using the SpawnScheduled method, new @{Group}s are created following the schedule timing parameters. -- When a new @{Group} is spawned, you maybe want to execute actions with that group spawned at the spawn event. -- To SPAWN class supports this functionality through the @{#SPAWN.OnSpawnGroup}( **function( SpawnedGroup ) end ** ) method, which takes a function as a parameter that you can define locally. @@ -17888,8 +18012,7 @@ end -- -- ==== -- --- **API CHANGE HISTORY** --- ====================== +-- # **API CHANGE HISTORY** -- -- The underlying change log documents the API changes. Please read this carefully. The following notation is used: -- @@ -17965,8 +18088,7 @@ end -- -- === -- --- AUTHORS and CONTRIBUTIONS --- ========================= +-- # **AUTHORS and CONTRIBUTIONS** -- -- ### Contributions: -- @@ -17976,7 +18098,6 @@ end -- -- * **FlightControl**: Design & Programming -- --- -- @module Spawn @@ -23925,7 +24046,7 @@ end -- @param Core.Set#SET_GROUP SetGroup -- @param #string ClientName -- @param Wrapper.Group#GROUP AIGroup -function AI_BALANCER:onenterSpawning( SetGroup, Event, From, To, ClientName ) +function AI_BALANCER:onenterSpawning( SetGroup, From, Event, To, ClientName ) -- OK, Spawn a new group from the default SpawnAI object provided. local AIGroup = self.SpawnAI:Spawn() @@ -23942,7 +24063,7 @@ end --- @param #AI_BALANCER self -- @param Core.Set#SET_GROUP SetGroup -- @param Wrapper.Group#GROUP AIGroup -function AI_BALANCER:onenterDestroying( SetGroup, Event, From, To, AIGroup ) +function AI_BALANCER:onenterDestroying( SetGroup, From, Event, To, AIGroup ) AIGroup:Destroy() end @@ -23950,7 +24071,7 @@ end --- @param #AI_BALANCER self -- @param Core.Set#SET_GROUP SetGroup -- @param Wrapper.Group#GROUP AIGroup -function AI_BALANCER:onenterReturning( SetGroup, Event, From, To, AIGroup ) +function AI_BALANCER:onenterReturning( SetGroup, From, Event, To, AIGroup ) local AIGroupTemplate = AIGroup:GetTemplate() if self.ToHomeAirbase == true then @@ -24788,7 +24909,7 @@ end -- @param #string From -- @param #string To -- @param Core.Point#POINT_VEC2 ToPointVec2 -function AI_CARGO_UNIT:onenterUnBoarding( Event, From, To, ToPointVec2 ) +function AI_CARGO_UNIT:onenterUnBoarding( From, Event, To, ToPointVec2 ) self:F() local Angle = 180 @@ -24833,8 +24954,8 @@ end -- @param #string From -- @param #string To -- @param Core.Point#POINT_VEC2 ToPointVec2 -function AI_CARGO_UNIT:onleaveUnBoarding( Event, From, To, ToPointVec2 ) - self:F( { ToPointVec2, Event, From, To } ) +function AI_CARGO_UNIT:onleaveUnBoarding( From, Event, To, ToPointVec2 ) + self:F( { ToPointVec2, From, Event, To } ) local Angle = 180 local Speed = 10 @@ -24857,8 +24978,8 @@ end -- @param #string From -- @param #string To -- @param Core.Point#POINT_VEC2 ToPointVec2 -function AI_CARGO_UNIT:onafterUnBoarding( Event, From, To, ToPointVec2 ) - self:F( { ToPointVec2, Event, From, To } ) +function AI_CARGO_UNIT:onafterUnBoarding( From, Event, To, ToPointVec2 ) + self:F( { ToPointVec2, From, Event, To } ) self.CargoInAir = self.CargoObject:InAir() @@ -24882,8 +25003,8 @@ end -- @param #string From -- @param #string To -- @param Core.Point#POINT_VEC2 -function AI_CARGO_UNIT:onenterUnLoaded( Event, From, To, ToPointVec2 ) - self:F( { ToPointVec2, Event, From, To } ) +function AI_CARGO_UNIT:onenterUnLoaded( From, Event, To, ToPointVec2 ) + self:F( { ToPointVec2, From, Event, To } ) local Angle = 180 local Speed = 10 @@ -24920,8 +25041,8 @@ end -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function AI_CARGO_UNIT:onenterBoarding( Event, From, To, CargoCarrier ) - self:F( { CargoCarrier.UnitName, Event, From, To } ) +function AI_CARGO_UNIT:onenterBoarding( From, Event, To, CargoCarrier ) + self:F( { CargoCarrier.UnitName, From, Event, To } ) local Speed = 10 local Angle = 180 @@ -24952,8 +25073,8 @@ end -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function AI_CARGO_UNIT:onleaveBoarding( Event, From, To, CargoCarrier ) - self:F( { CargoCarrier.UnitName, Event, From, To } ) +function AI_CARGO_UNIT:onleaveBoarding( From, Event, To, CargoCarrier ) + self:F( { CargoCarrier.UnitName, From, Event, To } ) if self:IsNear( CargoCarrier:GetPointVec2() ) then self:__Load( 1, CargoCarrier ) @@ -24970,7 +25091,7 @@ end -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function AI_CARGO_UNIT:onenterLoaded( Event, From, To, CargoCarrier ) +function AI_CARGO_UNIT:onenterLoaded( From, Event, To, CargoCarrier ) self:F() self.CargoCarrier = CargoCarrier @@ -24988,7 +25109,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function AI_CARGO_UNIT:onafterBoard( Event, From, To, CargoCarrier ) +function AI_CARGO_UNIT:onafterBoard( From, Event, To, CargoCarrier ) self:F() self.CargoInAir = self.CargoObject:InAir() @@ -25041,7 +25162,7 @@ end -- @param #number Speed -- @param #number BoardDistance -- @param #number Angle -function AI_CARGO_PACKAGE:onafterOnBoard( Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle ) +function AI_CARGO_PACKAGE:onafterOnBoard( From, Event, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle ) self:F() self.CargoInAir = self.CargoCarrier:InAir() @@ -25095,7 +25216,7 @@ end -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function AI_CARGO_PACKAGE:onafterOnBoarded( Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle ) +function AI_CARGO_PACKAGE:onafterOnBoarded( From, Event, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle ) self:F() if self:IsNear( CargoCarrier ) then @@ -25115,7 +25236,7 @@ end -- @param #number UnBoardDistance -- @param #number Radius -- @param #number Angle -function AI_CARGO_PACKAGE:onafterUnBoard( Event, From, To, CargoCarrier, Speed, UnLoadDistance, UnBoardDistance, Radius, Angle ) +function AI_CARGO_PACKAGE:onafterUnBoard( From, Event, To, CargoCarrier, Speed, UnLoadDistance, UnBoardDistance, Radius, Angle ) self:F() self.CargoInAir = self.CargoCarrier:InAir() @@ -25153,7 +25274,7 @@ end -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function AI_CARGO_PACKAGE:onafterUnBoarded( Event, From, To, CargoCarrier, Speed ) +function AI_CARGO_PACKAGE:onafterUnBoarded( From, Event, To, CargoCarrier, Speed ) self:F() if self:IsNear( CargoCarrier ) then @@ -25172,7 +25293,7 @@ end -- @param #number Speed -- @param #number LoadDistance -- @param #number Angle -function AI_CARGO_PACKAGE:onafterLoad( Event, From, To, CargoCarrier, Speed, LoadDistance, Angle ) +function AI_CARGO_PACKAGE:onafterLoad( From, Event, To, CargoCarrier, Speed, LoadDistance, Angle ) self:F() self.CargoCarrier = CargoCarrier @@ -25198,7 +25319,7 @@ end -- @param #string To -- @param #number Distance -- @param #number Angle -function AI_CARGO_PACKAGE:onafterUnLoad( Event, From, To, CargoCarrier, Speed, Distance, Angle ) +function AI_CARGO_PACKAGE:onafterUnLoad( From, Event, To, CargoCarrier, Speed, Distance, Angle ) self:F() local StartPointVec2 = self.CargoCarrier:GetPointVec2() @@ -25281,8 +25402,8 @@ end -- @param #string Event -- @param #string From -- @param #string To -function AI_CARGO_GROUPED:onenterBoarding( Event, From, To, CargoCarrier ) - self:F( { CargoCarrier.UnitName, Event, From, To } ) +function AI_CARGO_GROUPED:onenterBoarding( From, Event, To, CargoCarrier ) + self:F( { CargoCarrier.UnitName, From, Event, To } ) if From == "UnLoaded" then @@ -25304,8 +25425,8 @@ end -- @param #string Event -- @param #string From -- @param #string To -function AI_CARGO_GROUPED:onenterLoaded( Event, From, To, CargoCarrier ) - self:F( { CargoCarrier.UnitName, Event, From, To } ) +function AI_CARGO_GROUPED:onenterLoaded( From, Event, To, CargoCarrier ) + self:F( { CargoCarrier.UnitName, From, Event, To } ) if From == "UnLoaded" then -- For each Cargo object within the AI_CARGO_GROUPED, load each cargo to the CargoCarrier. @@ -25321,8 +25442,8 @@ end -- @param #string Event -- @param #string From -- @param #string To -function AI_CARGO_GROUPED:onleaveBoarding( Event, From, To, CargoCarrier ) - self:F( { CargoCarrier.UnitName, Event, From, To } ) +function AI_CARGO_GROUPED:onleaveBoarding( From, Event, To, CargoCarrier ) + self:F( { CargoCarrier.UnitName, From, Event, To } ) local Boarded = true @@ -25348,7 +25469,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function AI_CARGO_GROUPED:onenterUnBoarding( Event, From, To, ToPointVec2 ) +function AI_CARGO_GROUPED:onenterUnBoarding( From, Event, To, ToPointVec2 ) self:F() local Timer = 1 @@ -25374,8 +25495,8 @@ end -- @param #string Event -- @param #string From -- @param #string To -function AI_CARGO_GROUPED:onleaveUnBoarding( Event, From, To, ToPointVec2 ) - self:F( { ToPointVec2, Event, From, To } ) +function AI_CARGO_GROUPED:onleaveUnBoarding( From, Event, To, ToPointVec2 ) + self:F( { ToPointVec2, From, Event, To } ) local Angle = 180 local Speed = 10 @@ -25409,8 +25530,8 @@ end -- @param #string Event -- @param #string From -- @param #string To -function AI_CARGO_GROUPED:onafterUnBoarding( Event, From, To, ToPointVec2 ) - self:F( { ToPointVec2, Event, From, To } ) +function AI_CARGO_GROUPED:onafterUnBoarding( From, Event, To, ToPointVec2 ) + self:F( { ToPointVec2, From, Event, To } ) self:__UnLoad( 1, ToPointVec2 ) end @@ -25423,8 +25544,8 @@ end -- @param #string Event -- @param #string From -- @param #string To -function AI_CARGO_GROUPED:onenterUnLoaded( Event, From, To, ToPointVec2 ) - self:F( { ToPointVec2, Event, From, To } ) +function AI_CARGO_GROUPED:onenterUnLoaded( From, Event, To, ToPointVec2 ) + self:F( { ToPointVec2, From, Event, To } ) if From == "Loaded" then @@ -25600,8 +25721,8 @@ do -- ACT_ASSIGN_ACCEPT -- @param #string Event -- @param #string From -- @param #string To - function ACT_ASSIGN_ACCEPT:onafterStart( ProcessUnit, Event, From, To ) - self:E( { ProcessUnit, Event, From, To } ) + function ACT_ASSIGN_ACCEPT:onafterStart( ProcessUnit, From, Event, To ) + self:E( { ProcessUnit, From, Event, To } ) self:__Assign( 1 ) end @@ -25612,9 +25733,9 @@ do -- ACT_ASSIGN_ACCEPT -- @param #string Event -- @param #string From -- @param #string To - function ACT_ASSIGN_ACCEPT:onenterAssigned( ProcessUnit, Event, From, To ) + function ACT_ASSIGN_ACCEPT:onenterAssigned( ProcessUnit, From, Event, To ) env.info( "in here" ) - self:E( { ProcessUnit, Event, From, To } ) + self:E( { ProcessUnit, From, Event, To } ) local ProcessGroup = ProcessUnit:GetGroup() @@ -25680,8 +25801,8 @@ do -- ACT_ASSIGN_MENU_ACCEPT -- @param #string Event -- @param #string From -- @param #string To - function ACT_ASSIGN_MENU_ACCEPT:onafterStart( ProcessUnit, Event, From, To ) - self:E( { ProcessUnit, Event, From, To } ) + function ACT_ASSIGN_MENU_ACCEPT:onafterStart( ProcessUnit, From, Event, To ) + self:E( { ProcessUnit, From, Event, To } ) self:Message( "Access the radio menu to accept the task. You have 30 seconds or the assignment will be cancelled." ) @@ -25714,8 +25835,8 @@ do -- ACT_ASSIGN_MENU_ACCEPT -- @param #string Event -- @param #string From -- @param #string To - function ACT_ASSIGN_MENU_ACCEPT:onafterAssign( ProcessUnit, Event, From, To ) - self:E( { ProcessUnit.UnitNameEvent, From, To } ) + function ACT_ASSIGN_MENU_ACCEPT:onafterAssign( ProcessUnit, From, Event, To ) + self:E( { ProcessUnit.UnitNameFrom, Event, To } ) self.Menu:Remove() end @@ -25726,8 +25847,8 @@ do -- ACT_ASSIGN_MENU_ACCEPT -- @param #string Event -- @param #string From -- @param #string To - function ACT_ASSIGN_MENU_ACCEPT:onafterReject( ProcessUnit, Event, From, To ) - self:E( { ProcessUnit.UnitName, Event, From, To } ) + function ACT_ASSIGN_MENU_ACCEPT:onafterReject( ProcessUnit, From, Event, To ) + self:E( { ProcessUnit.UnitName, From, Event, To } ) self.Menu:Remove() --TODO: need to resolve this problem ... it has to do with the events ... @@ -25861,7 +25982,7 @@ do -- ACT_ROUTE -- @param #string Event -- @param #string From -- @param #string To - function ACT_ROUTE:onafterStart( ProcessUnit, Event, From, To ) + function ACT_ROUTE:onafterStart( ProcessUnit, From, Event, To ) self:__Route( 1 ) @@ -25881,7 +26002,7 @@ do -- ACT_ROUTE -- @param #string Event -- @param #string From -- @param #string To - function ACT_ROUTE:onbeforeRoute( ProcessUnit, Event, From, To ) + function ACT_ROUTE:onbeforeRoute( ProcessUnit, From, Event, To ) self:F( { "BeforeRoute 1", self.DisplayCount, self.DisplayInterval } ) if ProcessUnit:IsAlive() then @@ -25977,7 +26098,7 @@ do -- ACT_ROUTE_ZONE -- @param #string Event -- @param #string From -- @param #string To - function ACT_ROUTE_ZONE:onenterReporting( ProcessUnit, Event, From, To ) + function ACT_ROUTE_ZONE:onenterReporting( ProcessUnit, From, Event, To ) local ZoneVec2 = self.TargetZone:GetVec2() local ZonePointVec2 = POINT_VEC2:New( ZoneVec2.x, ZoneVec2.y ) @@ -26105,7 +26226,7 @@ do -- ACT_ACCOUNT -- @param #string Event -- @param #string From -- @param #string To - function ACT_ACCOUNT:onafterStart( ProcessUnit, Event, From, To ) + function ACT_ACCOUNT:onafterStart( ProcessUnit, From, Event, To ) self:EventOnDead( self.onfuncEventDead ) @@ -26119,7 +26240,7 @@ do -- ACT_ACCOUNT -- @param #string Event -- @param #string From -- @param #string To - function ACT_ACCOUNT:onenterWaiting( ProcessUnit, Event, From, To ) + function ACT_ACCOUNT:onenterWaiting( ProcessUnit, From, Event, To ) if self.DisplayCount >= self.DisplayInterval then self:Report() @@ -26137,7 +26258,7 @@ do -- ACT_ACCOUNT -- @param #string Event -- @param #string From -- @param #string To - function ACT_ACCOUNT:onafterEvent( ProcessUnit, Event, From, To, Event ) + function ACT_ACCOUNT:onafterEvent( ProcessUnit, From, Event, To, Event ) self:__NoMore( 1 ) end @@ -26199,8 +26320,8 @@ do -- ACT_ACCOUNT_DEADS -- @param #string Event -- @param #string From -- @param #string To - function ACT_ACCOUNT_DEADS:onenterReport( ProcessUnit, Event, From, To ) - self:E( { ProcessUnit, Event, From, To } ) + function ACT_ACCOUNT_DEADS:onenterReport( ProcessUnit, From, Event, To ) + self:E( { ProcessUnit, From, Event, To } ) self:Message( "Your group with assigned " .. self.TaskName .. " task has " .. self.TargetSetUnit:GetUnitTypesText() .. " targets left to be destroyed." ) end @@ -26212,8 +26333,8 @@ do -- ACT_ACCOUNT_DEADS -- @param #string Event -- @param #string From -- @param #string To - function ACT_ACCOUNT_DEADS:onenterAccount( ProcessUnit, Event, From, To, EventData ) - self:T( { ProcessUnit, EventData, Event, From, To } ) + function ACT_ACCOUNT_DEADS:onenterAccount( ProcessUnit, From, Event, To, EventData ) + self:T( { ProcessUnit, EventData, From, Event, To } ) self:T({self.Controllable}) @@ -26232,7 +26353,7 @@ do -- ACT_ACCOUNT_DEADS -- @param #string Event -- @param #string From -- @param #string To - function ACT_ACCOUNT_DEADS:onafterEvent( ProcessUnit, Event, From, To, EventData ) + function ACT_ACCOUNT_DEADS:onafterEvent( ProcessUnit, From, Event, To, EventData ) if self.TargetSetUnit:Count() > 0 then self:__More( 1 ) @@ -26361,7 +26482,7 @@ do -- ACT_ASSIST -- @param #string Event -- @param #string From -- @param #string To - function ACT_ASSIST:onafterStart( ProcessUnit, Event, From, To ) + function ACT_ASSIST:onafterStart( ProcessUnit, From, Event, To ) local ProcessGroup = ProcessUnit:GetGroup() local MissionMenu = self:GetMission():GetMissionMenu( ProcessGroup ) @@ -26440,7 +26561,7 @@ do -- ACT_ASSIST_SMOKE_TARGETS_ZONE -- @param #string Event -- @param #string From -- @param #string To - function ACT_ASSIST_SMOKE_TARGETS_ZONE:onenterSmoking( ProcessUnit, Event, From, To ) + function ACT_ASSIST_SMOKE_TARGETS_ZONE:onenterSmoking( ProcessUnit, From, Event, To ) self.TargetSetUnit:ForEachUnit( --- @param Wrapper.Unit#UNIT SmokeUnit @@ -26808,7 +26929,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function MISSION:onbeforeComplete( Event, From, To ) +function MISSION:onbeforeComplete( From, Event, To ) for TaskID, Task in pairs( self:GetTasks() ) do local Task = Task -- Tasking.Task#TASK @@ -26824,7 +26945,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function MISSION:onenterCompleted( Event, From, To ) +function MISSION:onenterCompleted( From, Event, To ) self:GetCommandCenter():MessageToCoalition( "Mission " .. self:GetName() .. " has been completed! Good job guys!" ) end @@ -28562,7 +28683,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function TASK:onenterAssigned( Event, From, To ) +function TASK:onenterAssigned( From, Event, To ) self:E("Task Assigned") @@ -28576,7 +28697,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function TASK:onenterSuccess( Event, From, To ) +function TASK:onenterSuccess( From, Event, To ) self:E( "Task Success" ) @@ -28593,7 +28714,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function TASK:onenterAborted( Event, From, To ) +function TASK:onenterAborted( From, Event, To ) self:E( "Task Aborted" ) @@ -28607,7 +28728,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function TASK:onenterFailed( Event, From, To ) +function TASK:onenterFailed( From, Event, To ) self:E( "Task Failed" ) @@ -28621,7 +28742,7 @@ end -- @param #string Event -- @param #string From -- @param #string To -function TASK:onstatechange( Event, From, To ) +function TASK:onstatechange( From, Event, To ) if self:IsTrace() then MESSAGE:New( "@ Task " .. self.TaskName .. " : " .. Event .. " changed to state " .. To, 2 ):ToAll() diff --git a/Moose Test Missions/ABP - Airbase Police/APL-001 - Caucasus/APL-001 - Caucasus.miz b/Moose Test Missions/ABP - Airbase Police/APL-001 - Caucasus/APL-001 - Caucasus.miz index 6ea6d43bb..e85f53d6e 100644 Binary files a/Moose Test Missions/ABP - Airbase Police/APL-001 - Caucasus/APL-001 - Caucasus.miz and b/Moose Test Missions/ABP - Airbase Police/APL-001 - Caucasus/APL-001 - Caucasus.miz differ diff --git a/Moose Test Missions/ABP - Airbase Police/APL-002 - Nevada/APL-002 - Nevada.miz b/Moose Test Missions/ABP - Airbase Police/APL-002 - Nevada/APL-002 - Nevada.miz index 25f85f876..6306c8282 100644 Binary files a/Moose Test Missions/ABP - Airbase Police/APL-002 - Nevada/APL-002 - Nevada.miz and b/Moose Test Missions/ABP - Airbase Police/APL-002 - Nevada/APL-002 - Nevada.miz differ diff --git a/Moose Test Missions/ACL - Airbase Cleaner/ACL-001 - Airbase CleanUp/ACL-001 - Airbase CleanUp.miz b/Moose Test Missions/ACL - Airbase Cleaner/ACL-001 - Airbase CleanUp/ACL-001 - Airbase CleanUp.miz index 66d6b8a3a..58df8724f 100644 Binary files a/Moose Test Missions/ACL - Airbase Cleaner/ACL-001 - Airbase CleanUp/ACL-001 - Airbase CleanUp.miz and b/Moose Test Missions/ACL - Airbase Cleaner/ACL-001 - Airbase CleanUp/ACL-001 - Airbase CleanUp.miz differ diff --git a/Moose Test Missions/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 -Spawned AI.miz b/Moose Test Missions/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 -Spawned AI.miz index d9c679edf..a86afcc2b 100644 Binary files a/Moose Test Missions/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 -Spawned AI.miz and b/Moose Test Missions/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 -Spawned AI.miz differ diff --git a/Moose Test Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.lua b/Moose Test Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.lua index fa68376cb..a1347dbbe 100644 --- a/Moose Test Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.lua +++ b/Moose Test Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.lua @@ -35,7 +35,7 @@ local RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 ) -- Start the AI_BALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter. local RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn ) -function RU_AI_Balancer:OnAfterSpawned( SetGroup, Event, From, To, AIGroup ) +function RU_AI_Balancer:OnAfterSpawned( SetGroup, From, Event, To, AIGroup ) local PatrolZoneGroup = GROUP:FindByName( "PatrolZone" ) local PatrolZone = ZONE_POLYGON:New( "PatrolZone", PatrolZoneGroup ) diff --git a/Moose Test Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.miz b/Moose Test Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.miz index dd0df499e..0b7b96f78 100644 Binary files a/Moose Test Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.miz and b/Moose Test Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.miz differ diff --git a/Moose Test Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.miz b/Moose Test Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.miz index af8d1d26e..b9ecd95a0 100644 Binary files a/Moose Test Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.miz and b/Moose Test Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.miz differ diff --git a/Moose Test Missions/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.miz b/Moose Test Missions/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.miz index 69150c8b1..a1e8a1437 100644 Binary files a/Moose Test Missions/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.miz and b/Moose Test Missions/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.miz differ diff --git a/Moose Test Missions/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.miz b/Moose Test Missions/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.miz index f63a8ded8..0c7b6bce4 100644 Binary files a/Moose Test Missions/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.miz and b/Moose Test Missions/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.miz differ diff --git a/Moose Test Missions/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.miz b/Moose Test Missions/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.miz index ac3a03438..5d435eb1b 100644 Binary files a/Moose Test Missions/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.miz and b/Moose Test Missions/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.miz differ diff --git a/Moose Test Missions/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.miz b/Moose Test Missions/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.miz index ac4da4e09..cdbc269a3 100644 Binary files a/Moose Test Missions/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.miz and b/Moose Test Missions/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.miz differ diff --git a/Moose Test Missions/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.miz b/Moose Test Missions/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.miz index aaf37bc7d..849c51137 100644 Binary files a/Moose Test Missions/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.miz and b/Moose Test Missions/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.miz differ diff --git a/Moose Test Missions/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.miz b/Moose Test Missions/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.miz index 2d90f4bf4..c4e874f7d 100644 Binary files a/Moose Test Missions/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.miz and b/Moose Test Missions/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.miz differ diff --git a/Moose Test Missions/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.miz b/Moose Test Missions/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.miz index f56865945..5994238df 100644 Binary files a/Moose Test Missions/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.miz and b/Moose Test Missions/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.miz differ diff --git a/Moose Test Missions/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.miz b/Moose Test Missions/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.miz index 6877f21ff..e92136625 100644 Binary files a/Moose Test Missions/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.miz and b/Moose Test Missions/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.miz differ diff --git a/Moose Test Missions/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.miz b/Moose Test Missions/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.miz index 61d039bb2..d767e50c3 100644 Binary files a/Moose Test Missions/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.miz and b/Moose Test Missions/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.miz differ diff --git a/Moose Test Missions/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.miz b/Moose Test Missions/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.miz index 46fbb48d4..7392abc0c 100644 Binary files a/Moose Test Missions/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.miz and b/Moose Test Missions/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.miz differ diff --git a/Moose Test Missions/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.miz b/Moose Test Missions/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.miz index 9664e9bdc..a89c0d98c 100644 Binary files a/Moose Test Missions/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.miz and b/Moose Test Missions/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.miz differ diff --git a/Moose Test Missions/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.miz b/Moose Test Missions/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.miz index de71cd61c..77172f301 100644 Binary files a/Moose Test Missions/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.miz and b/Moose Test Missions/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.miz differ diff --git a/Moose Test Missions/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.miz b/Moose Test Missions/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.miz index dd611ce10..e06f0aae4 100644 Binary files a/Moose Test Missions/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.miz and b/Moose Test Missions/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.miz differ diff --git a/Moose Test Missions/GRP - Group Commands/Moose_Test_WRAPPER.miz b/Moose Test Missions/GRP - Group Commands/Moose_Test_WRAPPER.miz index 98d3d11f9..ea9005a8b 100644 Binary files a/Moose Test Missions/GRP - Group Commands/Moose_Test_WRAPPER.miz and b/Moose Test Missions/GRP - Group Commands/Moose_Test_WRAPPER.miz differ diff --git a/Moose Test Missions/MEN - Menu Options/MEN-001 - Menu Client/MEN-001 - Menu Client.miz b/Moose Test Missions/MEN - Menu Options/MEN-001 - Menu Client/MEN-001 - Menu Client.miz index 5ade71def..114f634d3 100644 Binary files a/Moose Test Missions/MEN - Menu Options/MEN-001 - Menu Client/MEN-001 - Menu Client.miz and b/Moose Test Missions/MEN - Menu Options/MEN-001 - Menu Client/MEN-001 - Menu Client.miz differ diff --git a/Moose Test Missions/MEN - Menu Options/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.miz b/Moose Test Missions/MEN - Menu Options/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.miz index bfe9b2a08..c45e0d943 100644 Binary files a/Moose Test Missions/MEN - Menu Options/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.miz and b/Moose Test Missions/MEN - Menu Options/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.miz differ diff --git a/Moose Test Missions/MEN - Menu Options/MEN-003 - Menu Group/MEN-003 - Menu Group.miz b/Moose Test Missions/MEN - Menu Options/MEN-003 - Menu Group/MEN-003 - Menu Group.miz index 3e4faf976..ad29f5372 100644 Binary files a/Moose Test Missions/MEN - Menu Options/MEN-003 - Menu Group/MEN-003 - Menu Group.miz and b/Moose Test Missions/MEN - Menu Options/MEN-003 - Menu Group/MEN-003 - Menu Group.miz differ diff --git a/Moose Test Missions/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.miz b/Moose Test Missions/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.miz index 661dd71bd..487ccffd0 100644 Binary files a/Moose Test Missions/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.miz and b/Moose Test Missions/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.miz differ diff --git a/Moose Test Missions/MOOSE_Test_Template.miz b/Moose Test Missions/MOOSE_Test_Template.miz index 2a79331a1..944d32add 100644 Binary files a/Moose Test Missions/MOOSE_Test_Template.miz and b/Moose Test Missions/MOOSE_Test_Template.miz differ diff --git a/Moose Test Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.miz b/Moose Test Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.miz index cab0a1e0f..da3feab14 100644 Binary files a/Moose Test Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.miz and b/Moose Test Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.miz differ diff --git a/Moose Test Missions/SCH - Scheduler/SCH-000 - Simple Scheduling/SCH-000 - Simple Scheduling.miz b/Moose Test Missions/SCH - Scheduler/SCH-000 - Simple Scheduling/SCH-000 - Simple Scheduling.miz index 0d2b04b03..590ae9efb 100644 Binary files a/Moose Test Missions/SCH - Scheduler/SCH-000 - Simple Scheduling/SCH-000 - Simple Scheduling.miz and b/Moose Test Missions/SCH - Scheduler/SCH-000 - Simple Scheduling/SCH-000 - Simple Scheduling.miz differ diff --git a/Moose Test Missions/SCH - Scheduler/SCH-001 - Simple Object Scheduling/SCH-001 - Simple Object Scheduling.miz b/Moose Test Missions/SCH - Scheduler/SCH-001 - Simple Object Scheduling/SCH-001 - Simple Object Scheduling.miz index 1f0f43bac..33d529508 100644 Binary files a/Moose Test Missions/SCH - Scheduler/SCH-001 - Simple Object Scheduling/SCH-001 - Simple Object Scheduling.miz and b/Moose Test Missions/SCH - Scheduler/SCH-001 - Simple Object Scheduling/SCH-001 - Simple Object Scheduling.miz differ diff --git a/Moose Test Missions/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/SCH-100 - Simple Repeat Scheduling.miz b/Moose Test Missions/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/SCH-100 - Simple Repeat Scheduling.miz index 5b0cb8dea..82550a19b 100644 Binary files a/Moose Test Missions/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/SCH-100 - Simple Repeat Scheduling.miz and b/Moose Test Missions/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/SCH-100 - Simple Repeat Scheduling.miz differ diff --git a/Moose Test Missions/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/SCH-110 - Object Repeat Scheduling.miz b/Moose Test Missions/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/SCH-110 - Object Repeat Scheduling.miz index dae1bcf35..0ffbc521d 100644 Binary files a/Moose Test Missions/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/SCH-110 - Object Repeat Scheduling.miz and b/Moose Test Missions/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/SCH-110 - Object Repeat Scheduling.miz differ diff --git a/Moose Test Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.miz b/Moose Test Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.miz index 1253fc910..49592a271 100644 Binary files a/Moose Test Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.miz and b/Moose Test Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.miz differ diff --git a/Moose Test Missions/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/SCH-300 - GC Simple Object Scheduling.miz b/Moose Test Missions/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/SCH-300 - GC Simple Object Scheduling.miz index 06231f13a..1d52732ce 100644 Binary files a/Moose Test Missions/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/SCH-300 - GC Simple Object Scheduling.miz and b/Moose Test Missions/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/SCH-300 - GC Simple Object Scheduling.miz differ diff --git a/Moose Test Missions/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/SCH-310 - GC Object Repeat Scheduling.miz b/Moose Test Missions/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/SCH-310 - GC Object Repeat Scheduling.miz index af0bf947e..292db3b6d 100644 Binary files a/Moose Test Missions/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/SCH-310 - GC Object Repeat Scheduling.miz and b/Moose Test Missions/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/SCH-310 - GC Object Repeat Scheduling.miz differ diff --git a/Moose Test Missions/SET - Data Sets/SET-001 - Airbase Sets/SET-001 - Airbase Sets.miz b/Moose Test Missions/SET - Data Sets/SET-001 - Airbase Sets/SET-001 - Airbase Sets.miz index d54836678..32b6ded3a 100644 Binary files a/Moose Test Missions/SET - Data Sets/SET-001 - Airbase Sets/SET-001 - Airbase Sets.miz and b/Moose Test Missions/SET - Data Sets/SET-001 - Airbase Sets/SET-001 - Airbase Sets.miz differ diff --git a/Moose Test Missions/SET - Data Sets/SET-101 - Group Sets/SET-101 - Group Sets.miz b/Moose Test Missions/SET - Data Sets/SET-101 - Group Sets/SET-101 - Group Sets.miz index b39eeb930..e485711d9 100644 Binary files a/Moose Test Missions/SET - Data Sets/SET-101 - Group Sets/SET-101 - Group Sets.miz and b/Moose Test Missions/SET - Data Sets/SET-101 - Group Sets/SET-101 - Group Sets.miz differ diff --git a/Moose Test Missions/SET - Data Sets/SET-201 - Client Sets/SET-201 - Client Sets.miz b/Moose Test Missions/SET - Data Sets/SET-201 - Client Sets/SET-201 - Client Sets.miz index d02f5684f..63b0fd473 100644 Binary files a/Moose Test Missions/SET - Data Sets/SET-201 - Client Sets/SET-201 - Client Sets.miz and b/Moose Test Missions/SET - Data Sets/SET-201 - Client Sets/SET-201 - Client Sets.miz differ diff --git a/Moose Test Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001 - SEAD Evasion.miz b/Moose Test Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001 - SEAD Evasion.miz index 36964a97f..a848bf9e0 100644 Binary files a/Moose Test Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001 - SEAD Evasion.miz and b/Moose Test Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001 - SEAD Evasion.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-010 - Spawn Demo/SPA-010 - Spawn Demo.miz b/Moose Test Missions/SPA - Spawning/SPA-010 - Spawn Demo/SPA-010 - Spawn Demo.miz index efc0ff631..e6794e1fb 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-010 - Spawn Demo/SPA-010 - Spawn Demo.miz and b/Moose Test Missions/SPA - Spawning/SPA-010 - Spawn Demo/SPA-010 - Spawn Demo.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-100 - CleanUp Inactive Units/SPA-100 - CleanUp Inactive Units.miz b/Moose Test Missions/SPA - Spawning/SPA-100 - CleanUp Inactive Units/SPA-100 - CleanUp Inactive Units.miz index 97fd5a422..a2b6ee4c5 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-100 - CleanUp Inactive Units/SPA-100 - CleanUp Inactive Units.miz and b/Moose Test Missions/SPA - Spawning/SPA-100 - CleanUp Inactive Units/SPA-100 - CleanUp Inactive Units.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.miz b/Moose Test Missions/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.miz index 39ff2bbfd..7d5c35e88 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.miz and b/Moose Test Missions/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-120 - Repeat Spawning/SPA-120 - Repeat Spawning.miz b/Moose Test Missions/SPA - Spawning/SPA-120 - Repeat Spawning/SPA-120 - Repeat Spawning.miz index 4a60e1874..4f2bd3530 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-120 - Repeat Spawning/SPA-120 - Repeat Spawning.miz and b/Moose Test Missions/SPA - Spawning/SPA-120 - Repeat Spawning/SPA-120 - Repeat Spawning.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.miz b/Moose Test Missions/SPA - Spawning/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.miz index e017756ac..12ce2ebe0 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.miz and b/Moose Test Missions/SPA - Spawning/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-220 - Randomize Zones/SPA-220 - Randomize Zones.miz b/Moose Test Missions/SPA - Spawning/SPA-220 - Randomize Zones/SPA-220 - Randomize Zones.miz index 968707a85..b1eef0f78 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-220 - Randomize Zones/SPA-220 - Randomize Zones.miz and b/Moose Test Missions/SPA - Spawning/SPA-220 - Randomize Zones/SPA-220 - Randomize Zones.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.miz b/Moose Test Missions/SPA - Spawning/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.miz index 3e3ed269d..eebda5a5f 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.miz and b/Moose Test Missions/SPA - Spawning/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.miz b/Moose Test Missions/SPA - Spawning/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.miz index a6cd39426..735167efb 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.miz and b/Moose Test Missions/SPA - Spawning/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.miz b/Moose Test Missions/SPA - Spawning/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.miz index 995f802dc..83a8611e1 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.miz and b/Moose Test Missions/SPA - Spawning/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.miz b/Moose Test Missions/SPA - Spawning/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.miz index 88ae8e6df..960d9afb5 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.miz and b/Moose Test Missions/SPA - Spawning/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.miz differ diff --git a/Moose Test Missions/TAD - Task Dispatching/TAD-010 - Task Dispatching Demo/TAD-010 - Task Dispatching Demo.miz b/Moose Test Missions/TAD - Task Dispatching/TAD-010 - Task Dispatching Demo/TAD-010 - Task Dispatching Demo.miz index 3a7091512..ac3d50219 100644 Binary files a/Moose Test Missions/TAD - Task Dispatching/TAD-010 - Task Dispatching Demo/TAD-010 - Task Dispatching Demo.miz and b/Moose Test Missions/TAD - Task Dispatching/TAD-010 - Task Dispatching Demo/TAD-010 - Task Dispatching Demo.miz differ diff --git a/Moose Test Missions/TSK - Task Modelling/TSK-010 - Task Modelling - SEAD/TSK-010 - Task Modelling - SEAD.lua b/Moose Test Missions/TSK - Task Modelling/TSK-010 - Task Modelling - SEAD/TSK-010 - Task Modelling - SEAD.lua index 060b7ad45..5759a0636 100644 --- a/Moose Test Missions/TSK - Task Modelling/TSK-010 - Task Modelling - SEAD/TSK-010 - Task Modelling - SEAD.lua +++ b/Moose Test Missions/TSK - Task Modelling/TSK-010 - Task Modelling - SEAD/TSK-010 - Task Modelling - SEAD.lua @@ -126,7 +126,7 @@ local SEADTask = TASK:New( -- The reason why this is done, is that each unit as a role within the Task, and can have different status. -- Therefore, the FsmSEAD is a TEMPLATE PROCESS of the TASK, and must be designed as a UNIT with a player is executing that PROCESS. -local SEADProcess = SEADTask:GetUnitProcess() +local SEADProcess = SEADTask:GetUnitProcess() -- #SEADProcess -- Adding a new sub-process to the Task Template. -- At first, the task needs to be accepted by a pilot. @@ -139,6 +139,7 @@ local SEADProcess = SEADTask:GetUnitProcess() -- 4.1 When the return state is Assigned, fire the event in the Task FsmSEAD:Route() -- 4.2 When the return state is Rejected, fire the event in the Task FsmSEAD:Eject() -- All other AddProcess calls are working in a similar manner. + SEADProcess:AddProcess ( "Planned", "Accept", ACT_ASSIGN_ACCEPT:New( "SEAD the Area" ), { Assigned = "Route", Rejected = "Eject" } ) -- Same, adding a process. diff --git a/Moose Test Missions/TSK - Task Modelling/TSK-010 - Task Modelling - SEAD/TSK-010 - Task Modelling - SEAD.miz b/Moose Test Missions/TSK - Task Modelling/TSK-010 - Task Modelling - SEAD/TSK-010 - Task Modelling - SEAD.miz index f446dd936..bcf555a28 100644 Binary files a/Moose Test Missions/TSK - Task Modelling/TSK-010 - Task Modelling - SEAD/TSK-010 - Task Modelling - SEAD.miz and b/Moose Test Missions/TSK - Task Modelling/TSK-010 - Task Modelling - SEAD/TSK-010 - Task Modelling - SEAD.miz differ diff --git a/Moose Test Missions/TSK - Task Modelling/TSK-020 - Task Modelling - Pickup/TSK-020 - Task Modelling - Pickup.miz b/Moose Test Missions/TSK - Task Modelling/TSK-020 - Task Modelling - Pickup/TSK-020 - Task Modelling - Pickup.miz index cc1930529..d1974db77 100644 Binary files a/Moose Test Missions/TSK - Task Modelling/TSK-020 - Task Modelling - Pickup/TSK-020 - Task Modelling - Pickup.miz and b/Moose Test Missions/TSK - Task Modelling/TSK-020 - Task Modelling - Pickup/TSK-020 - Task Modelling - Pickup.miz differ diff --git a/Moose Test Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.miz b/Moose Test Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.miz index 98d91c92f..8035e1325 100644 Binary files a/Moose Test Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.miz and b/Moose Test Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.miz differ diff --git a/Moose Test Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.miz b/Moose Test Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.miz index 52773d504..50fc4e4b0 100644 Binary files a/Moose Test Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.miz and b/Moose Test Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.miz differ diff --git a/Moose Test Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.miz b/Moose Test Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.miz index ee2b5acce..8c618cc05 100644 Binary files a/Moose Test Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.miz and b/Moose Test Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.miz differ diff --git a/Moose Test Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.miz b/Moose Test Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.miz index 15dbd6c41..fe22813df 100644 Binary files a/Moose Test Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.miz and b/Moose Test Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.miz differ diff --git a/Moose Test Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.miz b/Moose Test Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.miz index 9c928dca1..f9e559cd4 100644 Binary files a/Moose Test Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.miz and b/Moose Test Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.miz differ