Reduce noise

This commit is contained in:
Applevangelist
2023-12-28 13:32:53 +01:00
parent 501ab70992
commit 6ffe69484c
3 changed files with 54 additions and 54 deletions

View File

@@ -370,7 +370,7 @@ CARGOS = {}
do -- CARGO
--- @type CARGO
-- @type CARGO
-- @extends Core.Fsm#FSM_PROCESS
-- @field #string Type A string defining the type of the cargo. eg. Engineers, Equipment, Screwdrivers.
-- @field #string Name A string defining the name of the cargo. The name is the unique identifier of the cargo.
@@ -433,7 +433,7 @@ do -- CARGO
Reported = {},
}
--- @type CARGO.CargoObjects
-- @type CARGO.CargoObjects
-- @map < #string, Wrapper.Positionable#POSITIONABLE > The alive POSITIONABLE objects representing the the cargo.
--- CARGO Constructor. This class is an abstract class and should not be instantiated.
@@ -447,7 +447,7 @@ do -- CARGO
function CARGO:New( Type, Name, Weight, LoadRadius, NearRadius ) --R2.1
local self = BASE:Inherit( self, FSM:New() ) -- #CARGO
self:F( { Type, Name, Weight, LoadRadius, NearRadius } )
self:T( { Type, Name, Weight, LoadRadius, NearRadius } )
self:SetStartState( "UnLoaded" )
self:AddTransition( { "UnLoaded", "Boarding" }, "Board", "Boarding" )
@@ -711,7 +711,7 @@ do -- CARGO
-- @param #CARGO self
-- @return #CARGO
function CARGO:Spawn( PointVec2 )
self:F()
self:T()
end
@@ -812,7 +812,7 @@ do -- CARGO
-- @param Core.Point#COORDINATE Coordinate
-- @return #boolean true if the CargoGroup is within the loading radius.
function CARGO:IsInLoadRadius( Coordinate )
self:F( { Coordinate, LoadRadius = self.LoadRadius } )
self:T( { Coordinate, LoadRadius = self.LoadRadius } )
local Distance = 0
if self:IsUnLoaded() then
@@ -832,7 +832,7 @@ do -- CARGO
-- @param Core.Point#COORDINATE Coordinate
-- @return #boolean true if the Cargo can report itself.
function CARGO:IsInReportRadius( Coordinate )
self:F( { Coordinate } )
self:T( { Coordinate } )
local Distance = 0
if self:IsUnLoaded() then
@@ -853,23 +853,23 @@ do -- CARGO
-- @param #number NearRadius The radius when the cargo will board the Carrier (to avoid collision).
-- @return #boolean
function CARGO:IsNear( Coordinate, NearRadius )
--self:F( { PointVec2 = PointVec2, NearRadius = NearRadius } )
--self:T( { PointVec2 = PointVec2, NearRadius = NearRadius } )
if self.CargoObject:IsAlive() then
--local Distance = PointVec2:Get2DDistance( self.CargoObject:GetPointVec2() )
--self:F( { CargoObjectName = self.CargoObject:GetName() } )
--self:F( { CargoObjectVec2 = self.CargoObject:GetVec2() } )
--self:F( { PointVec2 = PointVec2:GetVec2() } )
--self:T( { CargoObjectName = self.CargoObject:GetName() } )
--self:T( { CargoObjectVec2 = self.CargoObject:GetVec2() } )
--self:T( { PointVec2 = PointVec2:GetVec2() } )
local Distance = Coordinate:Get2DDistance( self.CargoObject:GetCoordinate() )
--self:F( { Distance = Distance, NearRadius = NearRadius or "nil" } )
--self:T( { Distance = Distance, NearRadius = NearRadius or "nil" } )
if Distance <= NearRadius then
--self:F( { PointVec2 = PointVec2, NearRadius = NearRadius, IsNear = true } )
--self:T( { PointVec2 = PointVec2, NearRadius = NearRadius, IsNear = true } )
return true
end
end
--self:F( { PointVec2 = PointVec2, NearRadius = NearRadius, IsNear = false } )
--self:T( { PointVec2 = PointVec2, NearRadius = NearRadius, IsNear = false } )
return false
end
@@ -878,12 +878,12 @@ do -- CARGO
-- @param Core.Zone#ZONE_BASE Zone
-- @return #boolean **true** if cargo is in the Zone, **false** if cargo is not in the Zone.
function CARGO:IsInZone( Zone )
--self:F( { Zone } )
--self:T( { Zone } )
if self:IsLoaded() then
return Zone:IsPointVec2InZone( self.CargoCarrier:GetPointVec2() )
else
--self:F( { Size = self.CargoObject:GetSize(), Units = self.CargoObject:GetUnits() } )
--self:T( { Size = self.CargoObject:GetSize(), Units = self.CargoObject:GetUnits() } )
if self.CargoObject:GetSize() ~= 0 then
return Zone:IsPointVec2InZone( self.CargoObject:GetPointVec2() )
else
@@ -1034,7 +1034,7 @@ end -- CARGO
do -- CARGO_REPRESENTABLE
--- @type CARGO_REPRESENTABLE
-- @type CARGO_REPRESENTABLE
-- @extends #CARGO
-- @field test
@@ -1056,7 +1056,7 @@ do -- CARGO_REPRESENTABLE
-- Inherit CARGO.
local self = BASE:Inherit( self, CARGO:New( Type, Name, 0, LoadRadius, NearRadius ) ) -- #CARGO_REPRESENTABLE
self:F( { Type, Name, LoadRadius, NearRadius } )
self:T( { Type, Name, LoadRadius, NearRadius } )
-- Descriptors.
local Desc=CargoObject:GetDesc()
@@ -1086,7 +1086,7 @@ do -- CARGO_REPRESENTABLE
function CARGO_REPRESENTABLE:Destroy()
-- Cargo objects are deleted from the _DATABASE and SET_CARGO objects.
self:F( { CargoName = self:GetName() } )
self:T( { CargoName = self:GetName() } )
--_EVENTDISPATCHER:CreateEventDeleteCargo( self )
return self
@@ -1123,12 +1123,12 @@ do -- CARGO_REPRESENTABLE
CoordinateZone:Scan( { Object.Category.UNIT } )
for _, DCSUnit in pairs( CoordinateZone:GetScannedUnits() ) do
local NearUnit = UNIT:Find( DCSUnit )
self:F({NearUnit=NearUnit})
self:T({NearUnit=NearUnit})
local NearUnitCoalition = NearUnit:GetCoalition()
local CargoCoalition = self:GetCoalition()
if NearUnitCoalition == CargoCoalition then
local Attributes = NearUnit:GetDesc()
self:F({Desc=Attributes})
self:T({Desc=Attributes})
if NearUnit:HasAttribute( "Trucks" ) then
MESSAGE:New( Message, 20, NearUnit:GetCallsign() .. " reporting - Cargo " .. self:GetName() ):ToGroup( TaskGroup )
break
@@ -1142,7 +1142,7 @@ end -- CARGO_REPRESENTABLE
do -- CARGO_REPORTABLE
--- @type CARGO_REPORTABLE
-- @type CARGO_REPORTABLE
-- @extends #CARGO
CARGO_REPORTABLE = {
ClassName = "CARGO_REPORTABLE"
@@ -1158,7 +1158,7 @@ do -- CARGO_REPORTABLE
-- @return #CARGO_REPORTABLE
function CARGO_REPORTABLE:New( Type, Name, Weight, LoadRadius, NearRadius )
local self = BASE:Inherit( self, CARGO:New( Type, Name, Weight, LoadRadius, NearRadius ) ) -- #CARGO_REPORTABLE
self:F( { Type, Name, Weight, LoadRadius, NearRadius } )
self:T( { Type, Name, Weight, LoadRadius, NearRadius } )
return self
end
@@ -1178,7 +1178,7 @@ end
do -- CARGO_PACKAGE
--- @type CARGO_PACKAGE
-- @type CARGO_PACKAGE
-- @extends #CARGO_REPRESENTABLE
CARGO_PACKAGE = {
ClassName = "CARGO_PACKAGE"
@@ -1195,7 +1195,7 @@ do -- CARGO_PACKAGE
-- @return #CARGO_PACKAGE
function CARGO_PACKAGE:New( CargoCarrier, Type, Name, Weight, LoadRadius, NearRadius )
local self = BASE:Inherit( self, CARGO_REPRESENTABLE:New( CargoCarrier, Type, Name, Weight, LoadRadius, NearRadius ) ) -- #CARGO_PACKAGE
self:F( { Type, Name, Weight, LoadRadius, NearRadius } )
self:T( { Type, Name, Weight, LoadRadius, NearRadius } )
self:T( CargoCarrier )
self.CargoCarrier = CargoCarrier
@@ -1213,7 +1213,7 @@ end
-- @param #number BoardDistance
-- @param #number Angle
function CARGO_PACKAGE:onafterOnBoard( From, Event, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle )
self:F()
self:T()
self.CargoInAir = self.CargoCarrier:InAir()
@@ -1246,7 +1246,7 @@ end
-- @param Wrapper.Unit#UNIT CargoCarrier
-- @return #boolean
function CARGO_PACKAGE:IsNear( CargoCarrier )
self:F()
self:T()
local CargoCarrierPoint = CargoCarrier:GetCoordinate()
@@ -1271,7 +1271,7 @@ end
-- @param #number LoadDistance
-- @param #number Angle
function CARGO_PACKAGE:onafterOnBoarded( From, Event, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle )
self:F()
self:T()
if self:IsNear( CargoCarrier ) then
self:__Load( 1, CargoCarrier, Speed, LoadDistance, Angle )
@@ -1292,7 +1292,7 @@ end
-- @param #number Radius
-- @param #number Angle
function CARGO_PACKAGE:onafterUnBoard( From, Event, To, CargoCarrier, Speed, UnLoadDistance, UnBoardDistance, Radius, Angle )
self:F()
self:T()
self.CargoInAir = self.CargoCarrier:InAir()
@@ -1331,7 +1331,7 @@ end
-- @param Wrapper.Unit#UNIT CargoCarrier
-- @param #number Speed
function CARGO_PACKAGE:onafterUnBoarded( From, Event, To, CargoCarrier, Speed )
self:F()
self:T()
if self:IsNear( CargoCarrier ) then
self:__UnLoad( 1, CargoCarrier, Speed )
@@ -1350,7 +1350,7 @@ end
-- @param #number LoadDistance
-- @param #number Angle
function CARGO_PACKAGE:onafterLoad( From, Event, To, CargoCarrier, Speed, LoadDistance, Angle )
self:F()
self:T()
self.CargoCarrier = CargoCarrier
@@ -1378,7 +1378,7 @@ end
-- @param #number Distance
-- @param #number Angle
function CARGO_PACKAGE:onafterUnLoad( From, Event, To, CargoCarrier, Speed, Distance, Angle )
self:F()
self:T()
local StartPointVec2 = self.CargoCarrier:GetPointVec2()
local CargoCarrierHeading = self.CargoCarrier:GetHeading() -- Get Heading of object in degrees.