* Added USERFLAG class to manage user flags
* Added USERSOUND class to manage sounds
* Added SET_BASE:GetSetNames() to return an array of the object names of
a Set. (Created dynamic lists based on mission editor groups defined).
* Added SET_BASE:GetSetObjects()
* Revised the Messages
* Optimized the code for GetScannedCoalition
* Markings text optimized for ZONE_CAPTURE_COALITION. Now the owning
coalition is also shown.
* Removed the stupid naming of messages to coalitions.
This commit is contained in:
FlightControl_Master
2017-10-10 11:06:05 +02:00
parent 9bfca83804
commit 6f151a6c5d
8 changed files with 287 additions and 40 deletions

View File

@@ -415,7 +415,7 @@ function POSITIONABLE:GetMessageText( Message, Name ) --R2.1 added
local DCSObject = self:GetDCSObject()
if DCSObject then
Name = Name and ( " => " .. Name ) or ""
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 )
return MessageText
@@ -489,12 +489,6 @@ function POSITIONABLE:MessageToCoalition( Message, Duration, MessageCoalition )
local DCSObject = self:GetDCSObject()
if DCSObject then
if MessageCoalition == coalition.side.BLUE then
Name = "Blue coalition"
end
if MessageCoalition == coalition.side.RED then
Name = "Red coalition"
end
self:GetMessage( Message, Duration, Name ):ToCoalition( MessageCoalition )
end
@@ -515,12 +509,6 @@ function POSITIONABLE:MessageTypeToCoalition( Message, MessageType, MessageCoali
local DCSObject = self:GetDCSObject()
if DCSObject then
if MessageCoalition == coalition.side.BLUE then
Name = "Blue coalition"
end
if MessageCoalition == coalition.side.RED then
Name = "Red coalition"
end
self:GetMessageType( Message, MessageType, Name ):ToCoalition( MessageCoalition )
end