diff --git a/Moose Development/Moose/Actions/Act_Route.lua b/Moose Development/Moose/Actions/Act_Route.lua index 91574be2d..953a526fe 100644 --- a/Moose Development/Moose/Actions/Act_Route.lua +++ b/Moose Development/Moose/Actions/Act_Route.lua @@ -346,8 +346,7 @@ do -- ACT_ROUTE_POINT -- @param #string To function ACT_ROUTE_POINT:onafterReport( ProcessUnit, From, Event, To ) - local TaskUnitCoordinate = ProcessUnit:GetCoordinate() - local RouteText = self:GetRouteText( TaskUnitCoordinate ) + local RouteText = self:GetRouteText( ProcessUnit ) self:Message( RouteText ) end diff --git a/Moose Development/Moose/Core/Point.lua b/Moose Development/Moose/Core/Point.lua index d950c1bd7..ccf65dd4b 100644 --- a/Moose Development/Moose/Core/Point.lua +++ b/Moose Development/Moose/Core/Point.lua @@ -797,10 +797,12 @@ do -- COORDINATE -- @param Core.Settings#SETTINGS Settings -- @return #string The coordinate Text in the configured coordinate system. function COORDINATE:ToString( Controllable, Settings ) -- R2.2 + + self:E( { Controllable = Controllable } ) local Settings = Settings or _SETTINGS - local IsAir = Controllable and Controllable:IsAir() or false + local IsAir = Controllable and Controllable:IsAirPlane() or false if IsAir then local Coordinate = Controllable:GetCoordinate() diff --git a/Moose Development/Moose/Core/Settings.lua b/Moose Development/Moose/Core/Settings.lua index 3e71bdf47..c6066a17a 100644 --- a/Moose Development/Moose/Core/Settings.lua +++ b/Moose Development/Moose/Core/Settings.lua @@ -160,10 +160,11 @@ do -- SETTINGS self.SystemMenu = nil end - self.SystemMenu = MENU_MISSION:New( "Coordinate Settings" ) + self.SystemMenu = MENU_MISSION:New( "Settings" ) + local A2GCoordinateMenu = MENU_MISSION:New( "A2G Coordinate System", self.SystemMenu ) - if self:IsA2GLL() then + if self:IsA2G_LL() then MENU_MISSION_COMMAND:New( "Activate MGRS", A2GCoordinateMenu, self.A2GMenuSystem, self, "MGRS" ) MENU_MISSION_COMMAND:New( "LL Accuracy 1", A2GCoordinateMenu, self.MenuLL_Accuracy, self, 1 ) MENU_MISSION_COMMAND:New( "LL Accuracy 2", A2GCoordinateMenu, self.MenuLL_Accuracy, self, 2 ) @@ -172,7 +173,7 @@ do -- SETTINGS MENU_MISSION_COMMAND:New( "LL Decimal Off", A2GCoordinateMenu, self.MenuLL_DMS, self, false ) end - if self:IsA2GMGRS() then + if self:IsA2G_MGRS() then MENU_MISSION_COMMAND:New( "Activate LL", A2GCoordinateMenu, self.A2GMenuSystem, self, "LL" ) MENU_MISSION_COMMAND:New( "MGRS Accuracy 1", A2GCoordinateMenu, self.MenuMGRS_Accuracy, self, 1 ) MENU_MISSION_COMMAND:New( "MGRS Accuracy 2", A2GCoordinateMenu, self.MenuMGRS_Accuracy, self, 2 ) @@ -183,12 +184,12 @@ do -- SETTINGS local A2ACoordinateMenu = MENU_MISSION:New( "A2A Coordinate System", self.SystemMenu ) - if self:IsA2ABULLS() then - MENU_MISSION_COMMAND:New( "Activate BRA", A2GCoordinateMenu, self.A2AMenuSystem, self, "BRA" ) + if self:IsA2A_BULLS() then + MENU_MISSION_COMMAND:New( "Activate BRA", A2ACoordinateMenu, self.A2AMenuSystem, self, "BRA" ) end - if self:IsA2ABRA() then - MENU_MISSION_COMMAND:New( "Activate BULLS", A2GCoordinateMenu, self.A2AMenuSystem, self, "BULLS" ) + if self:IsA2A_BRA() then + MENU_MISSION_COMMAND:New( "Activate BULLS", A2ACoordinateMenu, self.A2AMenuSystem, self, "BULLS" ) end return self @@ -197,30 +198,30 @@ do -- SETTINGS --- @param #SETTINGS self function SETTINGS:A2GMenuSystem( A2GSystem ) self.A2GSystem = A2GSystem - self:CoordinateMenu() + self:SettingsMenu() end --- @param #SETTINGS self function SETTINGS:A2AMenuSystem( A2ASystem ) self.A2ASystem = A2ASystem - self:CoordinateMenu() + self:SettingsMenu() end --- @param #SETTINGS self function SETTINGS:MenuLL_Accuracy( LL_Accuracy ) self.LL_Accuracy = LL_Accuracy - self:CoordinateMenu() + self:SettingsMenu() end --- @param #SETTINGS self function SETTINGS:MenuLL_DMS( LL_DMS ) self.LL_DMS = LL_DMS - self:CoordinateMenu() + self:SettingsMenu() end --- @param #SETTINGS self function SETTINGS:MenuMGRS_Accuracy( MGRS_Accuracy ) self.MGRS_Accuracy = MGRS_Accuracy - self:CoordinateMenu() + self:SettingsMenu() end end diff --git a/Moose Development/Moose/Tasking/CommandCenter.lua b/Moose Development/Moose/Tasking/CommandCenter.lua index 93fd01162..a5a4fe6ed 100644 --- a/Moose Development/Moose/Tasking/CommandCenter.lua +++ b/Moose Development/Moose/Tasking/CommandCenter.lua @@ -116,13 +116,12 @@ function COMMANDCENTER:New( CommandCenterPositionable, CommandCenterName ) local MenuMissionsSummary = MENU_GROUP_COMMAND:New( EventGroup, "Missions Status Report", MenuReporting, self.ReportMissionsStatus, self, EventGroup ) local MenuMissionsDetails = MENU_GROUP_COMMAND:New( EventGroup, "Missions Players Report", MenuReporting, self.ReportMissionsPlayers, self, EventGroup ) self:ReportSummary( EventGroup ) - end - local PlayerUnit = EventData.IniUnit - for MissionID, Mission in pairs( self:GetMissions() ) do - local Mission = Mission -- Tasking.Mission#MISSION - local PlayerGroup = EventData.IniGroup -- The GROUP object should be filled! - Mission:JoinUnit( PlayerUnit, PlayerGroup ) - Mission:ReportDetails() + local PlayerUnit = EventData.IniUnit + for MissionID, Mission in pairs( self:GetMissions() ) do + local Mission = Mission -- Tasking.Mission#MISSION + local PlayerGroup = EventData.IniGroup -- The GROUP object should be filled! + Mission:JoinUnit( PlayerUnit, PlayerGroup ) + end end end diff --git a/Moose Development/Moose/Wrapper/Controllable.lua b/Moose Development/Moose/Wrapper/Controllable.lua index 5b84dd5c9..1160ef81d 100644 --- a/Moose Development/Moose/Wrapper/Controllable.lua +++ b/Moose Development/Moose/Wrapper/Controllable.lua @@ -2217,4 +2217,22 @@ function CONTROLLABLE:WayPointExecute( WayPoint, WaitTime ) return self end +--- Returns if the Controllable contains AirPlanes. +-- @param #CONTROLLABLE self +-- @return #boolean true if Controllable contains AirPlanes. +function CONTROLLABLE:IsAirPlane() + self:F2() + + local DCSObject = self:GetDCSObject() + + if DCSObject then + local Category = DCSObject:getCategory() + self:T2( Category ) + return Category == Unit.Category.AIRPLANE + end + + return nil +end + + -- Message APIs \ No newline at end of file