#PLAYERRECCE - allow add'l position to be displayed

This commit is contained in:
Applevangelist 2025-01-02 15:46:42 +01:00
parent 2cb58bd351
commit f67706044a

View File

@ -80,6 +80,7 @@
-- @field #boolean smokeownposition
-- @field #table SmokeOwn
-- @field #boolean smokeaveragetargetpos
-- @field #boolean reporttostringbullsonly
-- @extends Core.Fsm#FSM
---
@ -133,7 +134,8 @@ PLAYERRECCE = {
TargetCache = nil,
smokeownposition = false,
SmokeOwn = {},
smokeaveragetargetpos = false,
smokeaveragetargetpos = true,
reporttostringbullsonly = true,
}
---
@ -236,6 +238,8 @@ function PLAYERRECCE:New(Name, Coalition, PlayerSet)
self.minthreatlevel = 0
self.reporttostringbullsonly = true
self.TForget = 600
self.TargetCache = FIFO:New()
@ -1274,6 +1278,9 @@ self:T(self.lid.."_ReportLaserTargets")
report:Add("Threat Level: "..ThreatGraph.." ("..ThreatLevelText..")")
if not self.ReferencePoint then
report:Add("Location: "..client:GetCoordinate():ToStringBULLS(self.Coalition,Settings))
if self.reporttostringbullsonly ~= true then
report:Add("Location: "..client:GetCoordinate():ToStringA2G(nil,Settings))
end
else
report:Add("Location: "..client:GetCoordinate():ToStringFromRPShort(self.ReferencePoint,self.RPName,client,Settings))
end
@ -1317,8 +1324,14 @@ function PLAYERRECCE:_ReportVisualTargets(client,group,playername)
report:Add("Threat Level: "..ThreatGraph.." ("..ThreatLevelText..")")
if not self.ReferencePoint then
report:Add("Location: "..client:GetCoordinate():ToStringBULLS(self.Coalition,Settings))
if self.reporttostringbullsonly ~= true then
report:Add("Location: "..client:GetCoordinate():ToStringA2G(nil,Settings))
end
else
report:Add("Location: "..client:GetCoordinate():ToStringFromRPShort(self.ReferencePoint,self.RPName,client,Settings))
if self.reporttostringbullsonly ~= true then
report:Add("Location: "..client:GetCoordinate():ToStringA2G(nil,Settings))
end
end
report:Add(string.rep("-",15))
local text = report:Text()
@ -1552,6 +1565,16 @@ function PLAYERRECCE:SetMenuName(Name)
return self
end
--- [User] Set reporting to be BULLS only or BULLS plus playersettings based coordinate.
-- @param #PLAYERRECCE self
-- @param #boolean OnOff
-- @return #PLAYERRECCE self
function PLAYERRECCE:SetReportBullsOnly(OnOff)
self:T(self.lid.."SetReportBullsOnly: "..tostring(OnOff))
self.reporttostringbullsonly = OnOff
return self
end
--- [User] Enable smoking of own position
-- @param #PLAYERRECCE self
-- @return #PLAYERRECCE self