mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Fixes in RADIO Class.
Every method implemented is now functionnal and tested
This commit is contained in:
parent
3754ea6c27
commit
f35269936f
@ -23,7 +23,7 @@ RADIO = {
|
|||||||
Positionable,
|
Positionable,
|
||||||
FileName = "",
|
FileName = "",
|
||||||
Frequency = 0,
|
Frequency = 0,
|
||||||
Modulation = 0,
|
Modulation = radio.modulation.AM,
|
||||||
Subtitle = "",
|
Subtitle = "",
|
||||||
SubtitleDuration = 10,
|
SubtitleDuration = 10,
|
||||||
Power = 100,
|
Power = 100,
|
||||||
@ -74,7 +74,7 @@ function RADIO:NewGenericTransmission(...)
|
|||||||
self:F2(arg)
|
self:F2(arg)
|
||||||
self.FileName = RADIO:VerifyFileName(arg[1])
|
self.FileName = RADIO:VerifyFileName(arg[1])
|
||||||
if arg[2] ~= nil then
|
if arg[2] ~= nil then
|
||||||
self.Frequecy = arg[2] * 1000 -- Convert to Hz
|
self.Frequency = arg[2] * 1000 -- Convert to Hz
|
||||||
end
|
end
|
||||||
if arg[3] ~= nil then
|
if arg[3] ~= nil then
|
||||||
self.Modulation = arg[3]
|
self.Modulation = arg[3]
|
||||||
@ -158,7 +158,7 @@ function RADIO:Broadcast()
|
|||||||
})
|
})
|
||||||
else
|
else
|
||||||
-- If the POSITIONABLE is anything else, we revert to the general function
|
-- If the POSITIONABLE is anything else, we revert to the general function
|
||||||
trigger.action.radioTransmission(self.FileName, self.Positionable:PositionVec3(), self.Modulation, 1, self.Frequency, self.Power)
|
trigger.action.radioTransmission(self.FileName, self.Positionable:GetPositionVec3(), self.Modulation, false, self.Frequency, self.Power)
|
||||||
end
|
end
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,18 +1,10 @@
|
|||||||
BASE:TraceAll(1)
|
BASE:TraceAll(1)
|
||||||
BASE:TraceLevel(3)
|
BASE:TraceLevel(1)
|
||||||
local Player = UNIT:FindByName("Player")
|
local Player = UNIT:FindByName("Player")
|
||||||
Player:MessageToAll("MainScript Started 2", 10, "")
|
Player:MessageToAll("MainScript Started 2", 10, "")
|
||||||
|
|
||||||
local Transmiter = UNIT:FindByName("Transmiter")
|
local Static = STATIC:FindByName("CommandCenter")
|
||||||
|
|
||||||
local TransmiterRadio = Transmiter:GetRadio()
|
local StaticRadio = Static:GetRadio()
|
||||||
TransmiterRadio:NewUnitTransmission("Noise.ogg", "Subtitle", 10, 251000, 0, 0)
|
StaticRadio:NewGenericTransmission("Test Voice.ogg", 251000, radio.modulation.AM, 1000)
|
||||||
TransmiterRadio:E({
|
StaticRadio:Broadcast()
|
||||||
TransmiterRadio.Positionable,
|
|
||||||
TransmiterRadio.FileName,
|
|
||||||
TransmiterRadio.Subtitle,
|
|
||||||
TransmiterRadio.SubtitleDuration,
|
|
||||||
TransmiterRadio.Frequency,
|
|
||||||
TransmiterRadio.Modulation,
|
|
||||||
})
|
|
||||||
TransmiterRadio:Broadcast()
|
|
||||||
|
|||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user