This commit is contained in:
Applevangelist 2023-01-05 10:46:06 +01:00
parent 24cc5ca32d
commit 16af086cc5

View File

@ -1088,7 +1088,7 @@ CTLD.UnitTypes = {
--- CTLD class version. --- CTLD class version.
-- @field #string version -- @field #string version
CTLD.version="1.0.24" CTLD.version="1.0.25"
--- Instantiate a new CTLD. --- Instantiate a new CTLD.
-- @param #CTLD self -- @param #CTLD self
@ -3758,19 +3758,17 @@ function CTLD:_AddRadioBeacon(Name, Sound, Mhz, Modulation, IsShip, IsDropped)
if IsDropped then if IsDropped then
local ZoneCoord = Zone local ZoneCoord = Zone
local ZoneVec3 = ZoneCoord:GetVec3() or {x=0,y=0,z=0} local ZoneVec3 = ZoneCoord:GetVec3() or {x=0,y=0,z=0}
-- local Frequency = string.format("%09d",Mhz * 1000000) -- Freq in Hertz
local Frequency = Mhz * 1000000 -- Freq in Hertz local Frequency = Mhz * 1000000 -- Freq in Hertz
local Sound = self.RadioPath..Sound local Sound = self.RadioPath..Sound
trigger.action.radioTransmission(Sound, ZoneVec3, Modulation, false, Frequency, 1000, Name..math.random(1,10000)) -- Beacon in MP only runs for 30secs straight trigger.action.radioTransmission(Sound, ZoneVec3, Modulation, false, Frequency, 1000, Name..math.random(1,10000)) -- Beacon in MP only runs for 30secs straight
self:I(string.format("Beacon added | Name = %s | Sound = %s | Vec3 = %d %d %d | Freq = %f | Modulation = %d (0=AM/1=FM)",Name,Sound,ZoneVec3.x,ZoneVec3.y,ZoneVec3.z,MhZ,Modulation)) self:T2(string.format("Beacon added | Name = %s | Sound = %s | Vec3 = %d %d %d | Freq = %f | Modulation = %d (0=AM/1=FM)",Name,Sound,ZoneVec3.x,ZoneVec3.y,ZoneVec3.z,Mhz,Modulation))
else else
local ZoneCoord = Zone:GetCoordinate() local ZoneCoord = Zone:GetCoordinate()
local ZoneVec3 = ZoneCoord:GetVec3() or {x=0,y=0,z=0} local ZoneVec3 = ZoneCoord:GetVec3() or {x=0,y=0,z=0}
--local Frequency = string.format("%09d",Mhz * 1000000) -- Freq in Hertz
local Frequency = Mhz * 1000000 -- Freq in Hert local Frequency = Mhz * 1000000 -- Freq in Hert
local Sound = self.RadioPath..Sound local Sound = self.RadioPath..Sound
trigger.action.radioTransmission(Sound, ZoneVec3, Modulation, false, Frequency, 1000, Name..math.random(1,10000)) -- Beacon in MP only runs for 30secs straight trigger.action.radioTransmission(Sound, ZoneVec3, Modulation, false, Frequency, 1000, Name..math.random(1,10000)) -- Beacon in MP only runs for 30secs straightt
self:I(string.format("Beacon added | Name = %s | Sound = %s | Vec3 = {x=%d, y=%d, z=%d} | Freq = %f | Modulation = %d (0=AM/1=FM)",Name,Sound,ZoneVec3.x,ZoneVec3.y,ZoneVec3.z,MhZ,Modulation)) self:T2(string.format("Beacon added | Name = %s | Sound = %s | Vec3 = {x=%d, y=%d, z=%d} | Freq = %f | Modulation = %d (0=AM/1=FM)",Name,Sound,ZoneVec3.x,ZoneVec3.y,ZoneVec3.z,Mhz,Modulation))
end end
else else
self:E(self.lid.."***** _AddRadioBeacon: Zone does not exist: "..Name) self:E(self.lid.."***** _AddRadioBeacon: Zone does not exist: "..Name)