Tracify comments

This commit is contained in:
FlightControl_Master
2018-03-18 11:17:37 +01:00
parent 9d100e9bc1
commit 7c2c6daf3e
41 changed files with 261 additions and 279 deletions

View File

@@ -143,7 +143,7 @@ function CLIENT:Register( ClientName )
--self.AliveCheckScheduler = routines.scheduleFunction( self._AliveCheckScheduler, { self }, timer.getTime() + 1, 5 )
self.AliveCheckScheduler = SCHEDULER:New( self, self._AliveCheckScheduler, { "Client Alive " .. ClientName }, 1, 5 )
self:E( self )
self:F( self )
return self
end
@@ -296,7 +296,7 @@ function CLIENT:GetDCSGroup()
self:T3( { "UnitData:", UnitData } )
if UnitData and UnitData:isExist() then
--self:E(self.ClientName)
--self:F(self.ClientName)
if ClientUnit then
local ClientGroup = ClientUnit:getGroup()
if ClientGroup then
@@ -323,7 +323,7 @@ function CLIENT:GetDCSGroup()
-- error( "Client " .. self.ClientName .. " not found!" )
end
else
--self:E( { "Client not found!", self.ClientName } )
--self:F( { "Client not found!", self.ClientName } )
end
end
end
@@ -357,7 +357,7 @@ function CLIENT:GetClientGroupID()
local ClientGroup = self:GetDCSGroup()
--self:E( self.ClientGroupID ) -- Determined in GetDCSGroup()
--self:F( self.ClientGroupID ) -- Determined in GetDCSGroup()
return self.ClientGroupID
end

View File

@@ -1647,7 +1647,7 @@ do -- Patrol methods
PatrolGroup = self:GetGroup() -- Wrapper.Group#GROUP
end
self:E( { PatrolGroup = PatrolGroup:GetName() } )
self:F( { PatrolGroup = PatrolGroup:GetName() } )
if PatrolGroup:IsGround() or PatrolGroup:IsShip() then
@@ -1661,7 +1661,7 @@ do -- Patrol methods
local TaskRoute = PatrolGroup:TaskFunction( "CONTROLLABLE.PatrolRoute" )
self:E({Waypoints = Waypoints})
self:F({Waypoints = Waypoints})
local Waypoint = Waypoints[#Waypoints]
PatrolGroup:SetTaskWaypoint( Waypoint, TaskRoute ) -- Set for the given Route at Waypoint 2 the TaskRouteToZone.
@@ -1681,7 +1681,7 @@ do -- Patrol methods
PatrolGroup = self:GetGroup() -- Wrapper.Group#GROUP
end
self:E( { PatrolGroup = PatrolGroup:GetName() } )
self:F( { PatrolGroup = PatrolGroup:GetName() } )
if PatrolGroup:IsGround() or PatrolGroup:IsShip() then
@@ -1702,7 +1702,7 @@ do -- Patrol methods
-- Select a random waypoint and check if it is not the same waypoint as where the object is about.
ToWaypoint = math.random( 1, #Waypoints )
until( ToWaypoint ~= FromWaypoint )
self:E( { FromWaypoint = FromWaypoint, ToWaypoint = ToWaypoint } )
self:F( { FromWaypoint = FromWaypoint, ToWaypoint = ToWaypoint } )
local Waypoint = Waypoints[ToWaypoint] -- Select random waypoint.
local ToCoord = COORDINATE:NewFromVec2( { x = Waypoint.x, y = Waypoint.y } )
@@ -1736,7 +1736,7 @@ do -- Patrol methods
PatrolGroup = self:GetGroup() -- Wrapper.Group#GROUP
end
self:E( { PatrolGroup = PatrolGroup:GetName() } )
self:F( { PatrolGroup = PatrolGroup:GetName() } )
if PatrolGroup:IsGround() or PatrolGroup:IsShip() then

View File

@@ -1063,13 +1063,13 @@ function GROUP:Respawn( Template, Reset )
--Template.x = nil
--Template.y = nil
self:E( #Template.units )
self:F( #Template.units )
if Reset == true then
for UnitID, UnitData in pairs( self:GetUnits() ) do
local GroupUnit = UnitData -- Wrapper.Unit#UNIT
self:E( GroupUnit:GetName() )
self:F( GroupUnit:GetName() )
if GroupUnit:IsAlive() then
self:E( "Alive" )
self:F( "Alive" )
local GroupUnitVec3 = GroupUnit:GetVec3()
if Zone then
if self.InitRespawnRandomizePositionZone then
@@ -1087,12 +1087,12 @@ function GROUP:Respawn( Template, Reset )
Template.units[UnitID].x = ( Template.units[UnitID].x - From.x ) + GroupUnitVec3.x -- Keep the original x position of the template and translate to the new position.
Template.units[UnitID].y = ( Template.units[UnitID].y - From.y ) + GroupUnitVec3.z -- Keep the original z position of the template and translate to the new position.
Template.units[UnitID].heading = self.InitRespawnHeading and self.InitRespawnHeading or GroupUnit:GetHeading()
self:E( { UnitID, Template.units[UnitID], Template.units[UnitID] } )
self:F( { UnitID, Template.units[UnitID], Template.units[UnitID] } )
end
end
else
for UnitID, TemplateUnitData in pairs( Template.units ) do
self:E( "Reset" )
self:F( "Reset" )
local GroupUnitVec3 = { x = TemplateUnitData.x, y = TemplateUnitData.alt, z = TemplateUnitData.z }
if Zone then
if self.InitRespawnRandomizePositionZone then
@@ -1110,7 +1110,7 @@ function GROUP:Respawn( Template, Reset )
Template.units[UnitID].x = ( Template.units[UnitID].x - From.x ) + GroupUnitVec3.x -- Keep the original x position of the template and translate to the new position.
Template.units[UnitID].y = ( Template.units[UnitID].y - From.y ) + GroupUnitVec3.z -- Keep the original z position of the template and translate to the new position.
Template.units[UnitID].heading = self.InitRespawnHeading and self.InitRespawnHeading or TemplateUnitData.heading
self:E( { UnitID, Template.units[UnitID], Template.units[UnitID] } )
self:F( { UnitID, Template.units[UnitID], Template.units[UnitID] } )
end
end
@@ -1281,7 +1281,7 @@ do -- Route methods
AirbaseAirPoint["airdromeId"] = RTBAirbase:GetID()
AirbaseAirPoint["speed_locked"] = true,
self:E(AirbaseAirPoint )
self:F(AirbaseAirPoint )
local Points = { PointFrom, AirbaseAirPoint }

View File

@@ -103,7 +103,7 @@ function IDENTIFIABLE:GetTypeName()
return IdentifiableTypeName
end
self:E( self.ClassName .. " " .. self.IdentifiableName .. " not found!" )
self:F( self.ClassName .. " " .. self.IdentifiableName .. " not found!" )
return nil
end
@@ -136,7 +136,7 @@ function IDENTIFIABLE:GetCategoryName()
return IdentifiableCategoryName
end
self:E( self.ClassName .. " " .. self.IdentifiableName .. " not found!" )
self:F( self.ClassName .. " " .. self.IdentifiableName .. " not found!" )
return nil
end
@@ -155,7 +155,7 @@ function IDENTIFIABLE:GetCoalition()
return IdentifiableCoalition
end
self:E( self.ClassName .. " " .. self.IdentifiableName .. " not found!" )
self:F( self.ClassName .. " " .. self.IdentifiableName .. " not found!" )
return nil
end
@@ -185,7 +185,7 @@ function IDENTIFIABLE:GetCoalitionName()
end
end
self:E( self.ClassName .. " " .. self.IdentifiableName .. " not found!" )
self:F( self.ClassName .. " " .. self.IdentifiableName .. " not found!" )
return nil
end
@@ -204,7 +204,7 @@ function IDENTIFIABLE:GetCountry()
return IdentifiableCountry
end
self:E( self.ClassName .. " " .. self.IdentifiableName .. " not found!" )
self:F( self.ClassName .. " " .. self.IdentifiableName .. " not found!" )
return nil
end
@@ -225,7 +225,7 @@ function IDENTIFIABLE:GetDesc()
return IdentifiableDesc
end
self:E( self.ClassName .. " " .. self.IdentifiableName .. " not found!" )
self:F( self.ClassName .. " " .. self.IdentifiableName .. " not found!" )
return nil
end

View File

@@ -211,7 +211,7 @@ function POSITIONABLE:GetRandomVec3( Radius )
self:T3( PositionableRandomVec3 )
return PositionableRandomVec3
else
self:E("Radius is nil, returning the PointVec3 of the POSITIONABLE", PositionablePointVec3)
self:F("Radius is nil, returning the PointVec3 of the POSITIONABLE", PositionablePointVec3)
return PositionablePointVec3
end
end
@@ -731,7 +731,7 @@ function POSITIONABLE:LaseUnit( Target, LaserCode, Duration ) --R2.1
local RecceDcsUnit = self:GetDCSObject()
local TargetVec3 = Target:GetVec3()
self:E("bulding spot")
self:F("bulding spot")
self.Spot = SPOT:New( self ) -- Core.Spot#SPOT
self.Spot:LaseOn( Target, LaserCode, Duration)
self.LaserCode = LaserCode

View File

@@ -204,10 +204,10 @@ function UNIT:ReSpawn( SpawnVec3, Heading )
SpawnGroupTemplate.x = SpawnVec3.x
SpawnGroupTemplate.y = SpawnVec3.z
self:E( #SpawnGroupTemplate.units )
self:F( #SpawnGroupTemplate.units )
for UnitID, UnitData in pairs( SpawnGroup:GetUnits() ) do
local GroupUnit = UnitData -- #UNIT
self:E( GroupUnit:GetName() )
self:F( GroupUnit:GetName() )
if GroupUnit:IsAlive() then
local GroupUnitVec3 = GroupUnit:GetVec3()
local GroupUnitHeading = GroupUnit:GetHeading()
@@ -215,7 +215,7 @@ function UNIT:ReSpawn( SpawnVec3, Heading )
SpawnGroupTemplate.units[UnitID].x = GroupUnitVec3.x
SpawnGroupTemplate.units[UnitID].y = GroupUnitVec3.z
SpawnGroupTemplate.units[UnitID].heading = GroupUnitHeading
self:E( { UnitID, SpawnGroupTemplate.units[UnitID], SpawnGroupTemplate.units[UnitID] } )
self:F( { UnitID, SpawnGroupTemplate.units[UnitID], SpawnGroupTemplate.units[UnitID] } )
end
end
end
@@ -228,9 +228,9 @@ function UNIT:ReSpawn( SpawnVec3, Heading )
SpawnGroupTemplate.units[UnitTemplateID].x = SpawnVec3.x
SpawnGroupTemplate.units[UnitTemplateID].y = SpawnVec3.z
SpawnGroupTemplate.units[UnitTemplateID].heading = Heading
self:E( { UnitTemplateID, SpawnGroupTemplate.units[UnitTemplateID], SpawnGroupTemplate.units[UnitTemplateID] } )
self:F( { UnitTemplateID, SpawnGroupTemplate.units[UnitTemplateID], SpawnGroupTemplate.units[UnitTemplateID] } )
else
self:E( SpawnGroupTemplate.units[UnitTemplateID].name )
self:F( SpawnGroupTemplate.units[UnitTemplateID].name )
local GroupUnit = UNIT:FindByName( SpawnGroupTemplate.units[UnitTemplateID].name ) -- #UNIT
if GroupUnit and GroupUnit:IsAlive() then
local GroupUnitVec3 = GroupUnit:GetVec3()
@@ -322,7 +322,7 @@ function UNIT:GetCallsign()
return UnitCallSign
end
self:E( self.ClassName .. " " .. self.UnitName .. " not found!" )
self:F( self.ClassName .. " " .. self.UnitName .. " not found!" )
return nil
end
@@ -875,7 +875,7 @@ function UNIT:IsFriendly( FriendlyCoalition )
local IsFriendlyResult = ( UnitCoalition == FriendlyCoalition )
self:E( IsFriendlyResult )
self:F( IsFriendlyResult )
return IsFriendlyResult
end