mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#MESSAGE
* added to country * added a couple of countries to country.id. enumerator
This commit is contained in:
parent
fbad50973f
commit
ae2196585e
@ -217,6 +217,7 @@ end
|
|||||||
--- Sends a MESSAGE to a Group.
|
--- Sends a MESSAGE to a Group.
|
||||||
-- @param #MESSAGE self
|
-- @param #MESSAGE self
|
||||||
-- @param Wrapper.Group#GROUP Group to which the message is displayed.
|
-- @param Wrapper.Group#GROUP Group to which the message is displayed.
|
||||||
|
-- @param Core.Settings#Settings Settings (Optional) Settings for message display.
|
||||||
-- @return #MESSAGE Message object.
|
-- @return #MESSAGE Message object.
|
||||||
function MESSAGE:ToGroup( Group, Settings )
|
function MESSAGE:ToGroup( Group, Settings )
|
||||||
self:F( Group.GroupName )
|
self:F( Group.GroupName )
|
||||||
@ -241,6 +242,7 @@ end
|
|||||||
--- Sends a MESSAGE to a Unit.
|
--- Sends a MESSAGE to a Unit.
|
||||||
-- @param #MESSAGE self
|
-- @param #MESSAGE self
|
||||||
-- @param Wrapper.Unit#UNIT Unit to which the message is displayed.
|
-- @param Wrapper.Unit#UNIT Unit to which the message is displayed.
|
||||||
|
-- @param Core.Settings#Settings Settings (Optional) Settings for message display.
|
||||||
-- @return #MESSAGE Message object.
|
-- @return #MESSAGE Message object.
|
||||||
function MESSAGE:ToUnit( Unit, Settings )
|
function MESSAGE:ToUnit( Unit, Settings )
|
||||||
self:F( Unit.IdentifiableName )
|
self:F( Unit.IdentifiableName )
|
||||||
@ -262,6 +264,41 @@ function MESSAGE:ToUnit( Unit, Settings )
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Sends a MESSAGE to a Country.
|
||||||
|
-- @param #MESSAGE self
|
||||||
|
-- @param #number Country to which the message is displayed, e.g. country.id.GERMANY. For all country numbers see here: [Hoggit Wiki](https://wiki.hoggitworld.com/view/DCS_enum_country)
|
||||||
|
-- @param Core.Settings#Settings Settings (Optional) Settings for message display.
|
||||||
|
-- @return #MESSAGE Message object.
|
||||||
|
function MESSAGE:ToCountry( Country, Settings )
|
||||||
|
self:F(Country )
|
||||||
|
if Country then
|
||||||
|
if self.MessageType then
|
||||||
|
local Settings = Settings or _SETTINGS -- Core.Settings#SETTINGS
|
||||||
|
self.MessageDuration = Settings:GetMessageTime( self.MessageType )
|
||||||
|
self.MessageCategory = "" -- self.MessageType .. ": "
|
||||||
|
end
|
||||||
|
if self.MessageDuration ~= 0 then
|
||||||
|
self:T( self.MessageCategory .. self.MessageText:gsub("\n$",""):gsub("\n$","") .. " / " .. self.MessageDuration )
|
||||||
|
trigger.action.outTextForCountry( Country, self.MessageCategory .. self.MessageText:gsub("\n$",""):gsub("\n$",""), self.MessageDuration, self.ClearScreen )
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Sends a MESSAGE to a Country.
|
||||||
|
-- @param #MESSAGE self
|
||||||
|
-- @param #number Country to which the message is displayed, , e.g. country.id.GERMANY. For all country numbers see here: [Hoggit Wiki](https://wiki.hoggitworld.com/view/DCS_enum_country)
|
||||||
|
-- @param #boolean Condition Sends the message only if the condition is true.
|
||||||
|
-- @param Core.Settings#Settings Settings (Optional) Settings for message display.
|
||||||
|
-- @return #MESSAGE Message object.
|
||||||
|
function MESSAGE:ToCountryIf( Country, Condition, Settings )
|
||||||
|
self:F(Country )
|
||||||
|
if Country and Condition == true then
|
||||||
|
self:ToCountry( Country, Settings )
|
||||||
|
end
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
--- Sends a MESSAGE to the Blue coalition.
|
--- Sends a MESSAGE to the Blue coalition.
|
||||||
-- @param #MESSAGE self
|
-- @param #MESSAGE self
|
||||||
-- @return #MESSAGE
|
-- @return #MESSAGE
|
||||||
@ -386,6 +423,7 @@ end
|
|||||||
|
|
||||||
--- Sends a MESSAGE to all players if the given Condition is true.
|
--- Sends a MESSAGE to all players if the given Condition is true.
|
||||||
-- @param #MESSAGE self
|
-- @param #MESSAGE self
|
||||||
|
-- @param #boolean Condition
|
||||||
-- @return #MESSAGE
|
-- @return #MESSAGE
|
||||||
function MESSAGE:ToAllIf( Condition )
|
function MESSAGE:ToAllIf( Condition )
|
||||||
|
|
||||||
|
|||||||
@ -308,6 +308,11 @@ do -- country
|
|||||||
-- @field Argentinia
|
-- @field Argentinia
|
||||||
-- @field Cyprus
|
-- @field Cyprus
|
||||||
-- @field Slovenia
|
-- @field Slovenia
|
||||||
|
-- @field BOLIVIA
|
||||||
|
-- @field GHANA
|
||||||
|
-- @field NIGERIA
|
||||||
|
-- @field PERU
|
||||||
|
-- @field ECUADOR
|
||||||
|
|
||||||
country = {} --#country
|
country = {} --#country
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user