diff --git a/Moose Development/Moose/Core/Database.lua b/Moose Development/Moose/Core/Database.lua index 049673c59..94a7f43b4 100644 --- a/Moose Development/Moose/Core/Database.lua +++ b/Moose Development/Moose/Core/Database.lua @@ -101,7 +101,7 @@ function DATABASE:New() self:HandleEvent( EVENTS.DeleteCargo ) -- Follow alive players and clients --- self:HandleEvent( EVENTS.PlayerEnterUnit, self._EventOnPlayerEnterUnit ) + self:HandleEvent( EVENTS.PlayerEnterUnit, self._EventOnPlayerEnterUnit ) self:HandleEvent( EVENTS.PlayerLeaveUnit, self._EventOnPlayerLeaveUnit ) self:_RegisterTemplates() @@ -118,7 +118,7 @@ function DATABASE:New() local CoalitionsData = { AlivePlayersRed = coalition.getPlayers( coalition.side.RED ), AlivePlayersBlue = coalition.getPlayers( coalition.side.BLUE ) } for CoalitionId, CoalitionData in pairs( CoalitionsData ) do - self:T( { "CoalitionData:", CoalitionData } ) + self:E( { "CoalitionData:", CoalitionData } ) for UnitId, UnitData in pairs( CoalitionData ) do if UnitData and UnitData:isExist() then @@ -715,6 +715,8 @@ function DATABASE:_EventOnPlayerEnterUnit( Event ) if not self.PLAYERS[PlayerName] then self:AddPlayer( Event.IniUnitName, PlayerName ) end + local Settings = SETTINGS:Set( PlayerName ) + Settings:SetPlayerMenu( Event.IniUnit ) end end end diff --git a/Moose Development/Moose/Core/Point.lua b/Moose Development/Moose/Core/Point.lua index 0695b16a0..9c6628980 100644 --- a/Moose Development/Moose/Core/Point.lua +++ b/Moose Development/Moose/Core/Point.lua @@ -458,7 +458,7 @@ do -- COORDINATE local Settings = Settings or _SETTINGS if Altitude ~= 0 then if Settings:IsMetric() then - return " at" .. UTILS.Round( self.y, -3 ) .. " meters" + return " at " .. UTILS.Round( self.y, -3 ) .. " meters" else return " at " .. UTILS.Round( UTILS.MetersToFeet( self.y ), -3 ) .. " feet" end @@ -759,7 +759,7 @@ do -- COORDINATE -- @param #COORDINATE TargetCoordinate The target COORDINATE. -- @return #string The BR text. function COORDINATE:ToStringBR( FromCoordinate, Settings ) - local DirectionVec3 = self:GetDirectionVec3( FromCoordinate ) + local DirectionVec3 = FromCoordinate:GetDirectionVec3( self ) local AngleRadians = self:GetAngleRadians( DirectionVec3 ) local Distance = self:Get2DDistance( FromCoordinate ) return "BR, " .. self:GetBRText( AngleRadians, Distance, Settings ) @@ -769,7 +769,7 @@ do -- COORDINATE -- @param #COORDINATE self -- @param #COORDINATE TargetCoordinate The target COORDINATE. -- @return #string The BR text. - function COORDINATE:ToStringBRAA( FromCoordinate, Settings ) + function COORDINATE:ToStringBRA( FromCoordinate, Settings ) local DirectionVec3 = FromCoordinate:GetDirectionVec3( self ) local AngleRadians = self:GetAngleRadians( DirectionVec3 ) local Distance = FromCoordinate:Get2DDistance( self ) @@ -860,7 +860,7 @@ do -- COORDINATE if Settings:IsA2A_BRA() then local Coordinate = Controllable:GetCoordinate() Coordinate:SetModeA2A() - return self:ToStringBRAA( Coordinate, Settings ) + return self:ToStringBRA( Coordinate, Settings ) end if Settings:IsA2A_BULLS() then @@ -872,7 +872,7 @@ do -- COORDINATE if Settings:IsA2G_BRA() then local Coordinate = Controllable:GetCoordinate() Coordinate:SetModeA2A() - return Controllable and self:ToStringBRAA( Coordinate, Settings ) or self:ToStringMGRS( Settings ) + return Controllable and self:ToStringBR( Coordinate, Settings ) or self:ToStringMGRS( Settings ) end if Settings:IsA2G_LL() then return self:ToStringLL( Settings ) diff --git a/Moose Development/Moose/Functional/Detection.lua b/Moose Development/Moose/Functional/Detection.lua index 6e7cb4df6..05eb19aa0 100644 --- a/Moose Development/Moose/Functional/Detection.lua +++ b/Moose Development/Moose/Functional/Detection.lua @@ -335,7 +335,7 @@ do -- DETECTION_BASE Unit.Category.STRUCTURE } ) - self:SetFriendlesRange( 6000 ) + self:SetFriendliesRange( 6000 ) -- Create FSM transitions. @@ -893,7 +893,7 @@ do -- DETECTION_BASE -- @param #DETECTION_BASE self -- @param #number FriendliesRange Radius to use when checking if Friendlies are nearby. -- @return #DETECTION_BASE self - function DETECTION_BASE:SetFriendlesRange( FriendliesRange ) --R2.2 Friendlies range + function DETECTION_BASE:SetFriendliesRange( FriendliesRange ) --R2.2 Friendlies range self:F2() self.FriendliesRange = FriendliesRange @@ -1094,7 +1094,7 @@ do -- DETECTION_BASE id = world.VolumeType.SPHERE, params = { point = DetectedUnit:GetVec3(), - radius = self.FriendliesRadius, + radius = self.FriendliesRange, } } diff --git a/Moose Development/Moose/Tasking/Task.lua b/Moose Development/Moose/Tasking/Task.lua index 7b584a559..921919f50 100644 --- a/Moose Development/Moose/Tasking/Task.lua +++ b/Moose Development/Moose/Tasking/Task.lua @@ -1405,7 +1405,7 @@ function TASK:ReportDetails( TaskGroup ) --R2.1 fixed report. Now nicely formatt local FromCoordinate = TaskGroup:GetUnit(1):GetCoordinate() local ToCoordinate = TaskInfo -- Core.Point#COORDINATE Report:Add( TaskInfoIDText ) - Report:AddIndent( ToCoordinate:ToStringBRAA( FromCoordinate ) .. ", " .. TaskInfo:ToStringAspect( FromCoordinate ) ) + Report:AddIndent( ToCoordinate:ToStringBRA( FromCoordinate ) .. ", " .. TaskInfo:ToStringAspect( FromCoordinate ) ) Report:AddIndent( ToCoordinate:ToStringBULLS( TaskGroup:GetCoalition() ) ) else end diff --git a/Moose Development/Moose/Tasking/Task_A2G.lua b/Moose Development/Moose/Tasking/Task_A2G.lua index 501186ea7..56c43d091 100644 --- a/Moose Development/Moose/Tasking/Task_A2G.lua +++ b/Moose Development/Moose/Tasking/Task_A2G.lua @@ -174,7 +174,7 @@ do -- TASK_A2G local TargetUnit = Task.TargetSetUnit:GetFirst() -- Wrapper.Unit#UNIT if TargetUnit then local Coordinate = TargetUnit:GetCoordinate() - self:T( { TargetCoordinate = Coordinate, Coordinate:GetX(), Coordinate:GetAlt(), Coordinate:GetZ() } ) + self:T( { TargetCoordinate = Coordinate, Coordinate:GetX(), Coordinate:GetY(), Coordinate:GetZ() } ) Task:SetTargetCoordinate( TargetUnit:GetCoordinate(), TaskUnit ) end self:__RouteToTargetPoint( 0.1 ) diff --git a/Moose Development/Moose/Wrapper/Positionable.lua b/Moose Development/Moose/Wrapper/Positionable.lua index e33a9c392..85965c8d6 100644 --- a/Moose Development/Moose/Wrapper/Positionable.lua +++ b/Moose Development/Moose/Wrapper/Positionable.lua @@ -148,7 +148,7 @@ function POSITIONABLE:GetCoordinate() if DCSPositionable then local PositionableVec3 = self:GetPositionVec3() - local PositionableCoordinate = COORDINATE:NewFromVec3( PositionableVec3 ) + local PositionableCoordinate = POINT_VEC3:NewFromVec3( PositionableVec3 ) PositionableCoordinate:SetHeading( self:GetHeading() ) self:T2( PositionableCoordinate ) diff --git a/Moose Mission Setup/Moose.lua b/Moose Mission Setup/Moose.lua index 087866245..0e64ca6af 100644 --- a/Moose Mission Setup/Moose.lua +++ b/Moose Mission Setup/Moose.lua @@ -1,5 +1,5 @@ env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' ) -env.info( 'Moose Generation Timestamp: 20170520_0827' ) +env.info( 'Moose Generation Timestamp: 20170522_1100' ) local base = _G