diff --git a/Moose Development/Moose/Core/Radio.lua b/Moose Development/Moose/Core/Radio.lua index 90b60ccce..9d1226669 100644 --- a/Moose Development/Moose/Core/Radio.lua +++ b/Moose Development/Moose/Core/Radio.lua @@ -33,12 +33,11 @@ MESSAGE = { -- @TODO Manage Trace in all functions below --- Create a new RADIO Object. This doesn't broadcast a transmission, though, use @{Radio#RADIO.Broadcast} to actually broadcast --- @param self -- @param #POSITIONABLE Positionable -- @return self -- @usage -- -- If you want to create a RADIO, you probably should use @{Positionable#POSITIONABLE.GetRadio} -function RADIO:New(positionable) +function RADIO.New(positionable) local self = BASE:Inherit( self, BASE:New() ) -- self:F( { MessageText, MessageDuration, MessageCategory } ) diff --git a/Moose Development/Moose/Wrapper/Positionable.lua b/Moose Development/Moose/Wrapper/Positionable.lua index 9be429b8f..b9acd2e5a 100644 --- a/Moose Development/Moose/Wrapper/Positionable.lua +++ b/Moose Development/Moose/Wrapper/Positionable.lua @@ -432,7 +432,11 @@ function POSITIONABLE:Message( Message, Duration, Name ) return nil end - - - - +--- Create a @{Radio#RADIO}, to allow radio transmission for this POSITIONABLE +-- Set parameters with the methods provided, then use @{Radio#RADIO.Broadcast} to actually broadcast the message +-- @param self +-- @return #RADIO +function POSITIONABLE:GetRadio() + local Radio = RADIO.New(self) + return Radio +end \ No newline at end of file