Minor changes

This commit is contained in:
Applevangelist 2024-01-14 14:57:07 +01:00
parent b612c3a846
commit 601c8165d8
3 changed files with 10 additions and 4 deletions

View File

@ -3001,6 +3001,9 @@ function AWACS:_Picture(Group,IsGeneral)
if clustersAO == 0 and clustersEWR == 0 then if clustersAO == 0 and clustersEWR == 0 then
-- clean -- clean
local picclean = self.gettext:GetEntry("PICCLEAN",self.locale)
text = string.format(picclean,gcallsign,self.callsigntxt)
textScreen = text
self:_NewRadioEntry(text,text,GID,Outcome,true,true,false) self:_NewRadioEntry(text,text,GID,Outcome,true,true,false)
else else

View File

@ -7176,7 +7176,7 @@ function OPSGROUP:SetLaserTarget(Target)
-- Scenery as target. Treat it like a coordinate. Set offset to 1 meter above ground. -- Scenery as target. Treat it like a coordinate. Set offset to 1 meter above ground.
self.spot.TargetType=0 self.spot.TargetType=0
self.spot.offsetTarget={x=0, y=1, z=0} self.spot.offsetTarget={x=0, y=3, z=0}
elseif Target:IsInstanceOf("POSITIONABLE") then elseif Target:IsInstanceOf("POSITIONABLE") then

View File

@ -1965,6 +1965,7 @@ end
-- @param Ops.FlightGroup#FLIGHTGROUP FlightGroup The FlightGroup (e.g. drone) to be used for lasing (one unit in one group only). -- @param Ops.FlightGroup#FLIGHTGROUP FlightGroup The FlightGroup (e.g. drone) to be used for lasing (one unit in one group only).
-- Can optionally be handed as Ops.ArmyGroup#ARMYGROUP - **Note** might not find an LOS spot or get lost on the way. Cannot island-hop. -- Can optionally be handed as Ops.ArmyGroup#ARMYGROUP - **Note** might not find an LOS spot or get lost on the way. Cannot island-hop.
-- @param #number LaserCode The lasercode to be used. Defaults to 1688. -- @param #number LaserCode The lasercode to be used. Defaults to 1688.
-- @param Core.Point#COORDINATE HoldingPoint (Optional) Point where the drone should initially circle. If not set, defaults to BullsEye of the coalition.
-- @return #PLAYERTASKCONTROLLER self -- @return #PLAYERTASKCONTROLLER self
-- @usage -- @usage
-- -- Set up precision bombing, FlightGroup as lasing unit -- -- Set up precision bombing, FlightGroup as lasing unit
@ -1979,7 +1980,7 @@ end
-- ArmyGroup:Activate() -- ArmyGroup:Activate()
-- taskmanager:EnablePrecisionBombing(ArmyGroup,1688) -- taskmanager:EnablePrecisionBombing(ArmyGroup,1688)
-- --
function PLAYERTASKCONTROLLER:EnablePrecisionBombing(FlightGroup,LaserCode) function PLAYERTASKCONTROLLER:EnablePrecisionBombing(FlightGroup,LaserCode,HoldingPoint)
self:T(self.lid.."EnablePrecisionBombing") self:T(self.lid.."EnablePrecisionBombing")
if FlightGroup then if FlightGroup then
if FlightGroup.ClassName and (FlightGroup.ClassName == "FLIGHTGROUP" or FlightGroup.ClassName == "ARMYGROUP")then if FlightGroup.ClassName and (FlightGroup.ClassName == "FLIGHTGROUP" or FlightGroup.ClassName == "ARMYGROUP")then
@ -1995,6 +1996,7 @@ function PLAYERTASKCONTROLLER:EnablePrecisionBombing(FlightGroup,LaserCode)
-- let it orbit the BullsEye if FG -- let it orbit the BullsEye if FG
if self.LasingDrone:IsFlightgroup() then if self.LasingDrone:IsFlightgroup() then
local BullsCoordinate = COORDINATE:NewFromVec3( coalition.getMainRefPoint( self.Coalition )) local BullsCoordinate = COORDINATE:NewFromVec3( coalition.getMainRefPoint( self.Coalition ))
if HoldingPoint then BullsCoordinate = HoldingPoint end
local Orbit = AUFTRAG:NewORBIT_CIRCLE(BullsCoordinate,10000,120) local Orbit = AUFTRAG:NewORBIT_CIRCLE(BullsCoordinate,10000,120)
self.LasingDrone:AddMission(Orbit) self.LasingDrone:AddMission(Orbit)
end end
@ -2553,10 +2555,11 @@ function PLAYERTASKCONTROLLER:_CheckPrecisionTasks()
self.LasingDrone.playertask.reachmessage = false self.LasingDrone.playertask.reachmessage = false
-- move the drone to target -- move the drone to target
if self.LasingDrone:IsFlightgroup() then if self.LasingDrone:IsFlightgroup() then
self.LasingDrone:CancelAllMissions()
local auftrag = AUFTRAG:NewORBIT_CIRCLE(task.Target:GetCoordinate(),10000,120) local auftrag = AUFTRAG:NewORBIT_CIRCLE(task.Target:GetCoordinate(),10000,120)
local currmission = self.LasingDrone:GetMissionCurrent() --local currmission = self.LasingDrone:GetMissionCurrent()
self.LasingDrone:AddMission(auftrag) self.LasingDrone:AddMission(auftrag)
currmission:__Cancel(-2) --currmission:__Cancel(-2)
elseif self.LasingDrone:IsArmygroup() then elseif self.LasingDrone:IsArmygroup() then
local tgtcoord = task.Target:GetCoordinate() local tgtcoord = task.Target:GetCoordinate()
local tgtzone = ZONE_RADIUS:New("ArmyGroup-"..math.random(1,10000),tgtcoord:GetVec2(),3000) local tgtzone = ZONE_RADIUS:New("ArmyGroup-"..math.random(1,10000),tgtcoord:GetVec2(),3000)