Small fixes

This commit is contained in:
Applevangelist 2022-12-03 14:36:14 +01:00
parent d011c8e72f
commit 60d91cb2fb
2 changed files with 11 additions and 3 deletions

View File

@ -3522,8 +3522,12 @@ function CTLD:AddCTLDZone(Name, Type, Color, Active, HasBeacon, Shiplength, Ship
ctldzone.name = Name or "NONE"
ctldzone.type = Type or CTLD.CargoZoneType.MOVE -- #CTLD.CargoZoneType
ctldzone.hasbeacon = HasBeacon or false
ctldzone.timestamp = timer.getTime()
if Type == CTLD.CargoZoneType.BEACON then
self.droppedbeaconref[ctldzone.name] = zone:GetCoordinate()
ctldzone.timestamp = timer.getTime()
end
if HasBeacon then
ctldzone.fmbeacon = self:_GetFMBeacon(Name)
ctldzone.uhfbeacon = self:_GetUHFBeacon(Name)
@ -3690,12 +3694,16 @@ function CTLD:_AddRadioBeacon(Name, Sound, Mhz, Modulation, IsShip, IsDropped)
local Frequency = string.format("%09d",Mhz * 1000000) -- Freq in Hertz
local Sound = "l10n/DEFAULT/"..Sound
trigger.action.radioTransmission(Sound, ZoneVec3, Modulation, false, Frequency, 1000) -- Beacon in MP only runs for 30secs straight
--local status = string.format("***** Beacon added Freq %s Mod %s", Mhz, UTILS.GetModulationName(Modulation))
--MESSAGE:New(status,10,"Debug"):ToLogIf(self.debug)
elseif Zone then
local ZoneCoord = Zone:GetCoordinate(2)
local ZoneVec3 = ZoneCoord:GetVec3()
local Frequency = string.format("%09d",Mhz * 1000000) -- Freq in Hertz
local Sound = "l10n/DEFAULT/"..Sound
trigger.action.radioTransmission(Sound, ZoneVec3, Modulation, false, Frequency, 1000) -- Beacon in MP only runs for 30secs straight
--local status = string.format("***** Beacon added Freq %s Mod %s", Mhz, UTILS.GetModulationName(Modulation))
--MESSAGE:New(status,10,"Debug"):ToLogIf(self.debug)
end
return self
end

View File

@ -1394,7 +1394,7 @@ end
-- @param #string To
-- @return #PLAYERRECCE self
function PLAYERRECCE:onafterStatus(From, Event, To)
self:I({From, Event, To})
self:T({From, Event, To})
if not self.timestamp then
self.timestamp = timer.getTime()