Merge branch 'master' into FC/Documentation-Release_2.3

This commit is contained in:
FlightControl_Master
2018-03-18 07:39:41 +01:00
7 changed files with 107 additions and 73 deletions

View File

@@ -456,13 +456,12 @@ end
-- @param #string Message The message text
-- @param #string Name (optional) The Name of the sender. If not provided, the Name is the type of the Positionable.
-- @return #string The message text
function POSITIONABLE:GetMessageText( Message, Name ) --R2.1 added
function POSITIONABLE:GetMessageText( Message, Name )
local DCSObject = self:GetDCSObject()
if DCSObject then
Name = Name and ( " (" .. Name .. ")" ) or ""
local Callsign = string.format( "%s", self:GetCallsign() ~= "" and self:GetCallsign() or self:GetName() )
local MessageText = string.format("[%s%s]: %s", Callsign, Name, Message )
local Callsign = string.format( "%s", ( ( Name ~= "" and Name ) or self:GetCallsign() ~= "" and self:GetCallsign() ) or self:GetName() )
local MessageText = string.format("%s - %s", Callsign, Message )
return MessageText
end