mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Final tests done, publishing
This commit is contained in:
parent
8ab12e5e9a
commit
599f31dfae
@ -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
|
||||
|
||||
@ -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 )
|
||||
|
||||
@ -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,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 )
|
||||
|
||||
@ -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 )
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user