mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Updates
- MESSAGE class finished and now properly documented. Changed New() function API. - Reworked Include.File lines. No Include.File line anymore in the Modules. All included in Moose.lua for dynamic loading.
This commit is contained in:
parent
5211f06cba
commit
be8e76e7f1
@ -41,9 +41,9 @@
|
|||||||
-- @module Airbase
|
-- @module Airbase
|
||||||
-- @author FlightControl
|
-- @author FlightControl
|
||||||
|
|
||||||
Include.File( "Routines" )
|
|
||||||
Include.File( "Base" )
|
|
||||||
Include.File( "Message" )
|
|
||||||
|
|
||||||
--- The AIRBASE class
|
--- The AIRBASE class
|
||||||
-- @type AIRBASE
|
-- @type AIRBASE
|
||||||
|
|||||||
@ -53,7 +53,7 @@
|
|||||||
-- @module Base
|
-- @module Base
|
||||||
-- @author FlightControl
|
-- @author FlightControl
|
||||||
|
|
||||||
Include.File( "Routines" )
|
|
||||||
|
|
||||||
local _TraceOn = true
|
local _TraceOn = true
|
||||||
local _TraceLevel = 1
|
local _TraceLevel = 1
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
--- CARGO Classes
|
--- CARGO Classes
|
||||||
-- @module CARGO
|
-- @module CARGO
|
||||||
|
|
||||||
Include.File( "Routines" )
|
|
||||||
Include.File( "Base" )
|
|
||||||
Include.File( "Message" )
|
|
||||||
Include.File( "Scheduler" )
|
|
||||||
|
|
||||||
|
|
||||||
--- Clients are those Groups defined within the Mission Editor that have the skillset defined as "Client" or "Player".
|
--- Clients are those Groups defined within the Mission Editor that have the skillset defined as "Client" or "Player".
|
||||||
|
|||||||
@ -2,11 +2,11 @@
|
|||||||
-- @module CleanUp
|
-- @module CleanUp
|
||||||
-- @author Flightcontrol
|
-- @author Flightcontrol
|
||||||
|
|
||||||
Include.File( "Routines" )
|
|
||||||
Include.File( "Base" )
|
|
||||||
Include.File( "Mission" )
|
|
||||||
Include.File( "Client" )
|
|
||||||
Include.File( "Task" )
|
|
||||||
|
|
||||||
--- The CLEANUP class.
|
--- The CLEANUP class.
|
||||||
-- @type CLEANUP
|
-- @type CLEANUP
|
||||||
@ -58,7 +58,6 @@ function CLEANUP:_DestroyGroup( GroupObject, CleanUpGroupName )
|
|||||||
self:F( { GroupObject, CleanUpGroupName } )
|
self:F( { GroupObject, CleanUpGroupName } )
|
||||||
|
|
||||||
if GroupObject then -- and GroupObject:isExist() then
|
if GroupObject then -- and GroupObject:isExist() then
|
||||||
--MESSAGE:New( "Destroy Group " .. CleanUpGroupName, CleanUpGroupName, 1, CleanUpGroupName ):ToAll()
|
|
||||||
trigger.action.deactivateGroup(GroupObject)
|
trigger.action.deactivateGroup(GroupObject)
|
||||||
self:T( { "GroupObject Destroyed", GroupObject } )
|
self:T( { "GroupObject Destroyed", GroupObject } )
|
||||||
end
|
end
|
||||||
@ -72,7 +71,6 @@ function CLEANUP:_DestroyUnit( CleanUpUnit, CleanUpUnitName )
|
|||||||
self:F( { CleanUpUnit, CleanUpUnitName } )
|
self:F( { CleanUpUnit, CleanUpUnitName } )
|
||||||
|
|
||||||
if CleanUpUnit then
|
if CleanUpUnit then
|
||||||
--MESSAGE:New( "Destroy " .. CleanUpUnitName, CleanUpUnitName, 1, CleanUpUnitName ):ToAll()
|
|
||||||
local CleanUpGroup = Unit.getGroup(CleanUpUnit)
|
local CleanUpGroup = Unit.getGroup(CleanUpUnit)
|
||||||
-- TODO Client bug in 1.5.3
|
-- TODO Client bug in 1.5.3
|
||||||
if CleanUpGroup and CleanUpGroup:isExist() then
|
if CleanUpGroup and CleanUpGroup:isExist() then
|
||||||
@ -142,7 +140,6 @@ function CLEANUP:_EventCrash( Event )
|
|||||||
self:F( { Event } )
|
self:F( { Event } )
|
||||||
|
|
||||||
--TODO: This stuff is not working due to a DCS bug. Burning units cannot be destroyed.
|
--TODO: This stuff is not working due to a DCS bug. Burning units cannot be destroyed.
|
||||||
--MESSAGE:New( "Crash ", "Crash", 10, "Crash" ):ToAll()
|
|
||||||
-- self:T("before getGroup")
|
-- self:T("before getGroup")
|
||||||
-- local _grp = Unit.getGroup(event.initiator)-- Identify the group that fired
|
-- local _grp = Unit.getGroup(event.initiator)-- Identify the group that fired
|
||||||
-- self:T("after getGroup")
|
-- self:T("after getGroup")
|
||||||
@ -277,7 +274,6 @@ function CLEANUP:_CleanUpScheduler()
|
|||||||
--self:T( CleanUpUnitVec2 )
|
--self:T( CleanUpUnitVec2 )
|
||||||
local CleanUpSurfaceType = land.getSurfaceType(CleanUpUnitVec2)
|
local CleanUpSurfaceType = land.getSurfaceType(CleanUpUnitVec2)
|
||||||
--self:T( CleanUpSurfaceType )
|
--self:T( CleanUpSurfaceType )
|
||||||
--MESSAGE:New( "Surface " .. CleanUpUnitName .. " = " .. CleanUpSurfaceTypeText[CleanUpSurfaceType], CleanUpUnitName, 10, CleanUpUnitName ):ToAll()
|
|
||||||
|
|
||||||
if CleanUpUnit and CleanUpUnit:getLife() <= CleanUpUnit:getLife0() * 0.95 then
|
if CleanUpUnit and CleanUpUnit:getLife() <= CleanUpUnit:getLife0() * 0.95 then
|
||||||
if CleanUpSurfaceType == land.SurfaceType.RUNWAY then
|
if CleanUpSurfaceType == land.SurfaceType.RUNWAY then
|
||||||
@ -309,7 +305,6 @@ function CLEANUP:_CleanUpScheduler()
|
|||||||
else
|
else
|
||||||
UnitData.CleanUpTime = timer.getTime()
|
UnitData.CleanUpTime = timer.getTime()
|
||||||
UnitData.CleanUpMoved = true
|
UnitData.CleanUpMoved = true
|
||||||
--MESSAGE:New( "Moved " .. CleanUpUnitName, CleanUpUnitName, 10, CleanUpUnitName ):ToAll()
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -37,10 +37,10 @@
|
|||||||
-- @module Client
|
-- @module Client
|
||||||
-- @author FlightControl
|
-- @author FlightControl
|
||||||
|
|
||||||
Include.File( "Routines" )
|
|
||||||
Include.File( "Base" )
|
|
||||||
Include.File( "Cargo" )
|
|
||||||
Include.File( "Message" )
|
|
||||||
|
|
||||||
|
|
||||||
--- The CLIENT class
|
--- The CLIENT class
|
||||||
@ -462,16 +462,16 @@ function CLIENT:Message( Message, MessageDuration, MessageId, MessageCategory, M
|
|||||||
else
|
else
|
||||||
self.Messages[MessageId].MessageInterval = MessageInterval
|
self.Messages[MessageId].MessageInterval = MessageInterval
|
||||||
end
|
end
|
||||||
MESSAGE:New( Message, MessageCategory, MessageDuration, MessageId ):ToClient( self )
|
MESSAGE:New( Message, MessageDuration, MessageCategory ):ToClient( self )
|
||||||
else
|
else
|
||||||
if self:GetClientGroupDCSUnit() and not self:GetClientGroupDCSUnit():inAir() then
|
if self:GetClientGroupDCSUnit() and not self:GetClientGroupDCSUnit():inAir() then
|
||||||
if timer.getTime() - self.Messages[MessageId].MessageTime >= self.Messages[MessageId].MessageDuration + 10 then
|
if timer.getTime() - self.Messages[MessageId].MessageTime >= self.Messages[MessageId].MessageDuration + 10 then
|
||||||
MESSAGE:New( Message, MessageCategory, MessageDuration, MessageId ):ToClient( self )
|
MESSAGE:New( Message, MessageDuration , MessageCategory):ToClient( self )
|
||||||
self.Messages[MessageId].MessageTime = timer.getTime()
|
self.Messages[MessageId].MessageTime = timer.getTime()
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if timer.getTime() - self.Messages[MessageId].MessageTime >= self.Messages[MessageId].MessageDuration + self.Messages[MessageId].MessageInterval then
|
if timer.getTime() - self.Messages[MessageId].MessageTime >= self.Messages[MessageId].MessageDuration + self.Messages[MessageId].MessageInterval then
|
||||||
MESSAGE:New( Message, MessageCategory, MessageDuration, MessageId ):ToClient( self )
|
MESSAGE:New( Message, MessageDuration, MessageCategory ):ToClient( self )
|
||||||
self.Messages[MessageId].MessageTime = timer.getTime()
|
self.Messages[MessageId].MessageTime = timer.getTime()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -32,15 +32,15 @@
|
|||||||
-- @module Database
|
-- @module Database
|
||||||
-- @author FlightControl
|
-- @author FlightControl
|
||||||
|
|
||||||
Include.File( "Routines" )
|
|
||||||
Include.File( "Base" )
|
|
||||||
Include.File( "Menu" )
|
|
||||||
Include.File( "Group" )
|
|
||||||
Include.File( "Static" )
|
|
||||||
Include.File( "Unit" )
|
|
||||||
Include.File( "Event" )
|
|
||||||
Include.File( "Client" )
|
|
||||||
Include.File( "Scheduler" )
|
|
||||||
|
|
||||||
|
|
||||||
--- DATABASE class
|
--- DATABASE class
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
--- A DEPLOYTASK orchestrates the deployment of CARGO within a specific landing zone.
|
--- A DEPLOYTASK orchestrates the deployment of CARGO within a specific landing zone.
|
||||||
-- @module DEPLOYTASK
|
-- @module DEPLOYTASK
|
||||||
|
|
||||||
Include.File( "Task" )
|
|
||||||
|
|
||||||
--- A DeployTask
|
--- A DeployTask
|
||||||
-- @type DEPLOYTASK
|
-- @type DEPLOYTASK
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
-- @see DESTROYUNITTYPESTASK
|
-- @see DESTROYUNITTYPESTASK
|
||||||
-- @see DESTROY_RADARS_TASK
|
-- @see DESTROY_RADARS_TASK
|
||||||
|
|
||||||
Include.File("Task")
|
|
||||||
|
|
||||||
--- The DESTROYBASETASK class
|
--- The DESTROYBASETASK class
|
||||||
-- @type DESTROYBASETASK
|
-- @type DESTROYBASETASK
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
--- DESTROYGROUPSTASK
|
--- DESTROYGROUPSTASK
|
||||||
-- @module DESTROYGROUPSTASK
|
-- @module DESTROYGROUPSTASK
|
||||||
|
|
||||||
Include.File("DestroyBaseTask")
|
|
||||||
|
|
||||||
--- The DESTROYGROUPSTASK class
|
--- The DESTROYGROUPSTASK class
|
||||||
-- @type
|
-- @type
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
--- Task class to destroy radar installations.
|
--- Task class to destroy radar installations.
|
||||||
-- @module DESTROYRADARSTASK
|
-- @module DESTROYRADARSTASK
|
||||||
|
|
||||||
Include.File("DestroyBaseTask")
|
|
||||||
|
|
||||||
--- The DESTROYRADARS class
|
--- The DESTROYRADARS class
|
||||||
-- @type
|
-- @type
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
--- Set TASK to destroy certain unit types.
|
--- Set TASK to destroy certain unit types.
|
||||||
-- @module DESTROYUNITTYPESTASK
|
-- @module DESTROYUNITTYPESTASK
|
||||||
|
|
||||||
Include.File("DestroyBaseTask")
|
|
||||||
|
|
||||||
--- The DESTROYUNITTYPESTASK class
|
--- The DESTROYUNITTYPESTASK class
|
||||||
-- @type
|
-- @type
|
||||||
|
|||||||
@ -102,11 +102,11 @@
|
|||||||
-- @module Escort
|
-- @module Escort
|
||||||
-- @author FlightControl
|
-- @author FlightControl
|
||||||
|
|
||||||
Include.File( "Routines" )
|
|
||||||
Include.File( "Base" )
|
|
||||||
Include.File( "Database" )
|
|
||||||
Include.File( "Group" )
|
|
||||||
Include.File( "Zone" )
|
|
||||||
|
|
||||||
---
|
---
|
||||||
-- @type ESCORT
|
-- @type ESCORT
|
||||||
|
|||||||
@ -2,9 +2,6 @@
|
|||||||
-- @module Event
|
-- @module Event
|
||||||
-- @author FlightControl
|
-- @author FlightControl
|
||||||
|
|
||||||
Include.File( "Routines" )
|
|
||||||
Include.File( "Base" )
|
|
||||||
|
|
||||||
--- The EVENT structure
|
--- The EVENT structure
|
||||||
-- @type EVENT
|
-- @type EVENT
|
||||||
-- @field #EVENT.Events Events
|
-- @field #EVENT.Events Events
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
--- A GOHOMETASK orchestrates the travel back to the home base, which is a specific zone defined within the ME.
|
--- A GOHOMETASK orchestrates the travel back to the home base, which is a specific zone defined within the ME.
|
||||||
-- @module GOHOMETASK
|
-- @module GOHOMETASK
|
||||||
|
|
||||||
Include.File("Task")
|
|
||||||
|
|
||||||
--- The GOHOMETASK class
|
--- The GOHOMETASK class
|
||||||
-- @type
|
-- @type
|
||||||
GOHOMETASK = {
|
GOHOMETASK = {
|
||||||
|
|||||||
@ -146,11 +146,6 @@
|
|||||||
-- @module Group
|
-- @module Group
|
||||||
-- @author FlightControl
|
-- @author FlightControl
|
||||||
|
|
||||||
Include.File( "Routines" )
|
|
||||||
Include.File( "Base" )
|
|
||||||
Include.File( "Message" )
|
|
||||||
Include.File( "Unit" )
|
|
||||||
|
|
||||||
--- The GROUP class
|
--- The GROUP class
|
||||||
-- @type GROUP
|
-- @type GROUP
|
||||||
-- @extends Base#BASE
|
-- @extends Base#BASE
|
||||||
@ -2672,7 +2667,7 @@ function GROUP:Message( Message, Duration )
|
|||||||
|
|
||||||
local DCSGroup = self:GetDCSGroup()
|
local DCSGroup = self:GetDCSGroup()
|
||||||
if DCSGroup then
|
if DCSGroup then
|
||||||
return MESSAGE:New( Message, self:GetCallsign() .. " (" .. self:GetTypeName() .. ")", Duration, self:GetClassNameAndID() )
|
return MESSAGE:New( Message, Duration, self:GetCallsign() .. " (" .. self:GetTypeName() .. ")" )
|
||||||
end
|
end
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@ -1,9 +1,6 @@
|
|||||||
--- Encapsulation of DCS World Menu system in a set of MENU classes.
|
--- Encapsulation of DCS World Menu system in a set of MENU classes.
|
||||||
-- @module Menu
|
-- @module Menu
|
||||||
|
|
||||||
Include.File( "Routines" )
|
|
||||||
Include.File( "Base" )
|
|
||||||
|
|
||||||
--- The MENU class
|
--- The MENU class
|
||||||
-- @type MENU
|
-- @type MENU
|
||||||
-- @extends Base#BASE
|
-- @extends Base#BASE
|
||||||
|
|||||||
@ -1,17 +1,29 @@
|
|||||||
--- Message System to display Messages for Clients and Coalitions or All.
|
--- This module contains the MESSAGE class.
|
||||||
-- Messages are grouped on the display panel per Category to improve readability for the players.
|
--
|
||||||
|
-- 1) @{Message#MESSAGE} class, extends @{Base#BASE}
|
||||||
|
-- =================================================
|
||||||
|
-- Message System to display Messages to Clients, Coalitions or All.
|
||||||
-- Messages are shown on the display panel for an amount of seconds, and will then disappear.
|
-- Messages are shown on the display panel for an amount of seconds, and will then disappear.
|
||||||
-- Messages are identified by an ID. The messages with the same ID belonging to the same category will be overwritten if they were still being displayed on the display panel.
|
-- Messages can contain a category which is indicating the category of the message.
|
||||||
-- Messages are created with MESSAGE:@{New}().
|
--
|
||||||
-- Messages are sent to Clients with MESSAGE:@{ToClient}().
|
-- 1.1) MESSAGE construction methods
|
||||||
-- Messages are sent to Coalitions with MESSAGE:@{ToCoalition}().
|
-- ---------------------------------
|
||||||
-- Messages are sent to All Players with MESSAGE:@{ToAll}().
|
-- Messages are created with MESSAGE:@{New}. Note that when the MESSAGE object is created, no message is sent yet.
|
||||||
|
-- To send messages, you need to use the To functions.
|
||||||
|
--
|
||||||
|
-- 1.2) Send messages with MESSAGE To methods
|
||||||
|
-- ------------------------------------------
|
||||||
|
-- Messages are sent to:
|
||||||
|
-- * Clients with MESSAGE:@{ToClient}().
|
||||||
|
-- * Coalitions with MESSAGE:@{ToCoalition}().
|
||||||
|
-- * All Players with MESSAGE:@{ToAll}().
|
||||||
|
--
|
||||||
-- @module Message
|
-- @module Message
|
||||||
|
-- @author FlightControl
|
||||||
Include.File( "Base" )
|
|
||||||
|
|
||||||
--- The MESSAGE class
|
--- The MESSAGE class
|
||||||
-- @type MESSAGE
|
-- @type MESSAGE
|
||||||
|
-- @extends Base#BASE
|
||||||
MESSAGE = {
|
MESSAGE = {
|
||||||
ClassName = "MESSAGE",
|
ClassName = "MESSAGE",
|
||||||
MessageCategory = 0,
|
MessageCategory = 0,
|
||||||
@ -22,9 +34,8 @@ MESSAGE = {
|
|||||||
--- Creates a new MESSAGE object. Note that these MESSAGE objects are not yet displayed on the display panel. You must use the functions @{ToClient} or @{ToCoalition} or @{ToAll} to send these Messages to the respective recipients.
|
--- Creates a new MESSAGE object. Note that these MESSAGE objects are not yet displayed on the display panel. You must use the functions @{ToClient} or @{ToCoalition} or @{ToAll} to send these Messages to the respective recipients.
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #string MessageText is the text of the Message.
|
-- @param #string MessageText is the text of the Message.
|
||||||
-- @param #string MessageCategory is a string expressing the Category of the Message. Messages are grouped on the display panel per Category to improve readability.
|
|
||||||
-- @param #number MessageDuration is a number in seconds of how long the MESSAGE should be shown on the display panel.
|
-- @param #number MessageDuration is a number in seconds of how long the MESSAGE should be shown on the display panel.
|
||||||
-- @param #string MessageID is a string expressing the ID of the Message.
|
-- @param #string MessageCategory (optional) is a string expressing the "category" of the Message. The category will be shown as the first text in the message followed by a ": ".
|
||||||
-- @return #MESSAGE
|
-- @return #MESSAGE
|
||||||
-- @usage
|
-- @usage
|
||||||
-- -- Create a series of new Messages.
|
-- -- Create a series of new Messages.
|
||||||
@ -32,15 +43,15 @@ MESSAGE = {
|
|||||||
-- -- MessageRED is meant to be sent to the RED players only, for 10 seconds, and is classified as "End of Mission", with ID "Win".
|
-- -- MessageRED is meant to be sent to the RED players only, for 10 seconds, and is classified as "End of Mission", with ID "Win".
|
||||||
-- -- MessageClient1 is meant to be sent to a Client, for 25 seconds, and is classified as "Score", with ID "Score".
|
-- -- MessageClient1 is meant to be sent to a Client, for 25 seconds, and is classified as "Score", with ID "Score".
|
||||||
-- -- MessageClient1 is meant to be sent to a Client, for 25 seconds, and is classified as "Score", with ID "Score".
|
-- -- MessageClient1 is meant to be sent to a Client, for 25 seconds, and is classified as "Score", with ID "Score".
|
||||||
-- MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25, "Win" )
|
-- MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", 25, "End of Mission" )
|
||||||
-- MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" )
|
-- MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", 25, "Penalty" )
|
||||||
-- MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25, "Score" )
|
-- MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", 25, "Score" )
|
||||||
-- MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25, "Score" )
|
-- MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", 25, "Score")
|
||||||
function MESSAGE:New( MessageText, MessageCategory, MessageDuration, MessageID )
|
function MESSAGE:New( MessageText, MessageDuration, MessageCategory )
|
||||||
local self = BASE:Inherit( self, BASE:New() )
|
local self = BASE:Inherit( self, BASE:New() )
|
||||||
self:F( { MessageText, MessageCategory, MessageDuration, MessageID } )
|
self:F( { MessageText, MessageDuration, MessageCategory } )
|
||||||
|
|
||||||
-- When no messagecategory is given, we don't show it as a title...
|
-- When no MessageCategory is given, we don't show it as a title...
|
||||||
if MessageCategory and MessageCategory ~= "" then
|
if MessageCategory and MessageCategory ~= "" then
|
||||||
self.MessageCategory = MessageCategory .. ": "
|
self.MessageCategory = MessageCategory .. ": "
|
||||||
else
|
else
|
||||||
@ -48,7 +59,6 @@ function MESSAGE:New( MessageText, MessageCategory, MessageDuration, MessageID )
|
|||||||
end
|
end
|
||||||
|
|
||||||
self.MessageDuration = MessageDuration
|
self.MessageDuration = MessageDuration
|
||||||
self.MessageID = MessageID
|
|
||||||
self.MessageTime = timer.getTime()
|
self.MessageTime = timer.getTime()
|
||||||
self.MessageText = MessageText
|
self.MessageText = MessageText
|
||||||
|
|
||||||
@ -174,77 +184,77 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
--- The MESSAGEQUEUE class
|
----- The MESSAGEQUEUE class
|
||||||
-- @type MESSAGEQUEUE
|
---- @type MESSAGEQUEUE
|
||||||
MESSAGEQUEUE = {
|
--MESSAGEQUEUE = {
|
||||||
ClientGroups = {},
|
-- ClientGroups = {},
|
||||||
CoalitionSides = {}
|
-- CoalitionSides = {}
|
||||||
}
|
--}
|
||||||
|
--
|
||||||
function MESSAGEQUEUE:New( RefreshInterval )
|
--function MESSAGEQUEUE:New( RefreshInterval )
|
||||||
local self = BASE:Inherit( self, BASE:New() )
|
-- local self = BASE:Inherit( self, BASE:New() )
|
||||||
self:F( { RefreshInterval } )
|
-- self:F( { RefreshInterval } )
|
||||||
|
--
|
||||||
self.RefreshInterval = RefreshInterval
|
-- self.RefreshInterval = RefreshInterval
|
||||||
|
--
|
||||||
--self.DisplayFunction = routines.scheduleFunction( self._DisplayMessages, { self }, 0, RefreshInterval )
|
-- --self.DisplayFunction = routines.scheduleFunction( self._DisplayMessages, { self }, 0, RefreshInterval )
|
||||||
self.DisplayFunction = SCHEDULER:New( self, self._DisplayMessages, {}, 0, RefreshInterval )
|
-- self.DisplayFunction = SCHEDULER:New( self, self._DisplayMessages, {}, 0, RefreshInterval )
|
||||||
|
--
|
||||||
return self
|
-- return self
|
||||||
end
|
--end
|
||||||
|
--
|
||||||
--- This function is called automatically by the MESSAGEQUEUE scheduler.
|
----- This function is called automatically by the MESSAGEQUEUE scheduler.
|
||||||
function MESSAGEQUEUE:_DisplayMessages()
|
--function MESSAGEQUEUE:_DisplayMessages()
|
||||||
|
--
|
||||||
-- First we display all messages that a coalition needs to receive... Also those who are not in a client (CA module clients...).
|
-- -- First we display all messages that a coalition needs to receive... Also those who are not in a client (CA module clients...).
|
||||||
for CoalitionSideID, CoalitionSideData in pairs( self.CoalitionSides ) do
|
-- for CoalitionSideID, CoalitionSideData in pairs( self.CoalitionSides ) do
|
||||||
for MessageID, MessageData in pairs( CoalitionSideData.Messages ) do
|
-- for MessageID, MessageData in pairs( CoalitionSideData.Messages ) do
|
||||||
if MessageData.MessageSent == false then
|
-- if MessageData.MessageSent == false then
|
||||||
--trigger.action.outTextForCoalition( CoalitionSideID, MessageData.MessageCategory .. '\n' .. MessageData.MessageText:gsub("\n$",""):gsub("\n$",""), MessageData.MessageDuration )
|
-- --trigger.action.outTextForCoalition( CoalitionSideID, MessageData.MessageCategory .. '\n' .. MessageData.MessageText:gsub("\n$",""):gsub("\n$",""), MessageData.MessageDuration )
|
||||||
MessageData.MessageSent = true
|
-- MessageData.MessageSent = true
|
||||||
end
|
-- end
|
||||||
local MessageTimeLeft = ( MessageData.MessageTime + MessageData.MessageDuration ) - timer.getTime()
|
-- local MessageTimeLeft = ( MessageData.MessageTime + MessageData.MessageDuration ) - timer.getTime()
|
||||||
if MessageTimeLeft <= 0 then
|
-- if MessageTimeLeft <= 0 then
|
||||||
MessageData = nil
|
-- MessageData = nil
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
|
--
|
||||||
-- Then we send the messages for each individual client, but also to be included are those Coalition messages for the Clients who belong to a coalition.
|
-- -- Then we send the messages for each individual client, but also to be included are those Coalition messages for the Clients who belong to a coalition.
|
||||||
-- Because the Client messages will overwrite the Coalition messages (for that Client).
|
-- -- Because the Client messages will overwrite the Coalition messages (for that Client).
|
||||||
for ClientGroupName, ClientGroupData in pairs( self.ClientGroups ) do
|
-- for ClientGroupName, ClientGroupData in pairs( self.ClientGroups ) do
|
||||||
for MessageID, MessageData in pairs( ClientGroupData.Messages ) do
|
-- for MessageID, MessageData in pairs( ClientGroupData.Messages ) do
|
||||||
if MessageData.MessageGroup == false then
|
-- if MessageData.MessageGroup == false then
|
||||||
trigger.action.outTextForGroup( Group.getByName(ClientGroupName):getID(), MessageData.MessageCategory .. '\n' .. MessageData.MessageText:gsub("\n$",""):gsub("\n$",""), MessageData.MessageDuration )
|
-- trigger.action.outTextForGroup( Group.getByName(ClientGroupName):getID(), MessageData.MessageCategory .. '\n' .. MessageData.MessageText:gsub("\n$",""):gsub("\n$",""), MessageData.MessageDuration )
|
||||||
MessageData.MessageGroup = true
|
-- MessageData.MessageGroup = true
|
||||||
end
|
-- end
|
||||||
local MessageTimeLeft = ( MessageData.MessageTime + MessageData.MessageDuration ) - timer.getTime()
|
-- local MessageTimeLeft = ( MessageData.MessageTime + MessageData.MessageDuration ) - timer.getTime()
|
||||||
if MessageTimeLeft <= 0 then
|
-- if MessageTimeLeft <= 0 then
|
||||||
MessageData = nil
|
-- MessageData = nil
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
|
--
|
||||||
-- Now check if the Client also has messages that belong to the Coalition of the Client...
|
-- -- Now check if the Client also has messages that belong to the Coalition of the Client...
|
||||||
for CoalitionSideID, CoalitionSideData in pairs( self.CoalitionSides ) do
|
-- for CoalitionSideID, CoalitionSideData in pairs( self.CoalitionSides ) do
|
||||||
for MessageID, MessageData in pairs( CoalitionSideData.Messages ) do
|
-- for MessageID, MessageData in pairs( CoalitionSideData.Messages ) do
|
||||||
local CoalitionGroup = Group.getByName( ClientGroupName )
|
-- local CoalitionGroup = Group.getByName( ClientGroupName )
|
||||||
if CoalitionGroup and CoalitionGroup:getCoalition() == CoalitionSideID then
|
-- if CoalitionGroup and CoalitionGroup:getCoalition() == CoalitionSideID then
|
||||||
if MessageData.MessageCoalition == false then
|
-- if MessageData.MessageCoalition == false then
|
||||||
trigger.action.outTextForGroup( Group.getByName(ClientGroupName):getID(), MessageData.MessageCategory .. '\n' .. MessageData.MessageText:gsub("\n$",""):gsub("\n$",""), MessageData.MessageDuration )
|
-- trigger.action.outTextForGroup( Group.getByName(ClientGroupName):getID(), MessageData.MessageCategory .. '\n' .. MessageData.MessageText:gsub("\n$",""):gsub("\n$",""), MessageData.MessageDuration )
|
||||||
MessageData.MessageCoalition = true
|
-- MessageData.MessageCoalition = true
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
local MessageTimeLeft = ( MessageData.MessageTime + MessageData.MessageDuration ) - timer.getTime()
|
-- local MessageTimeLeft = ( MessageData.MessageTime + MessageData.MessageDuration ) - timer.getTime()
|
||||||
if MessageTimeLeft <= 0 then
|
-- if MessageTimeLeft <= 0 then
|
||||||
MessageData = nil
|
-- MessageData = nil
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
|
--
|
||||||
return true
|
-- return true
|
||||||
end
|
--end
|
||||||
|
--
|
||||||
--- The _MessageQueue object is created when the MESSAGE class module is loaded.
|
----- The _MessageQueue object is created when the MESSAGE class module is loaded.
|
||||||
--_MessageQueue = MESSAGEQUEUE:New( 0.5 )
|
----_MessageQueue = MESSAGEQUEUE:New( 0.5 )
|
||||||
|
--
|
||||||
|
|||||||
@ -70,9 +70,6 @@
|
|||||||
-- @author FlightControl
|
-- @author FlightControl
|
||||||
|
|
||||||
|
|
||||||
Include.File( "Client" )
|
|
||||||
Include.File( "Scheduler" )
|
|
||||||
|
|
||||||
--- The MISSILETRAINER class
|
--- The MISSILETRAINER class
|
||||||
-- @type MISSILETRAINER
|
-- @type MISSILETRAINER
|
||||||
-- @extends Base#BASE
|
-- @extends Base#BASE
|
||||||
@ -217,9 +214,9 @@ function MISSILETRAINER:InitMessagesOnOff( MessagesOnOff )
|
|||||||
|
|
||||||
self.MessagesOnOff = MessagesOnOff
|
self.MessagesOnOff = MessagesOnOff
|
||||||
if self.MessagesOnOff == true then
|
if self.MessagesOnOff == true then
|
||||||
MESSAGE:New( "Messages ON", "Menu", 15, "ID" ):ToAll()
|
MESSAGE:New( "Messages ON", 15, "Menu" ):ToAll()
|
||||||
else
|
else
|
||||||
MESSAGE:New( "Messages OFF", "Menu", 15, "ID" ):ToAll()
|
MESSAGE:New( "Messages OFF", 15, "Menu" ):ToAll()
|
||||||
end
|
end
|
||||||
|
|
||||||
return self
|
return self
|
||||||
@ -234,9 +231,9 @@ function MISSILETRAINER:InitTrackingToAll( TrackingToAll )
|
|||||||
|
|
||||||
self.TrackingToAll = TrackingToAll
|
self.TrackingToAll = TrackingToAll
|
||||||
if self.TrackingToAll == true then
|
if self.TrackingToAll == true then
|
||||||
MESSAGE:New( "Missile tracking to all players ON", "Menu", 15, "ID" ):ToAll()
|
MESSAGE:New( "Missile tracking to all players ON", 15, "Menu" ):ToAll()
|
||||||
else
|
else
|
||||||
MESSAGE:New( "Missile tracking to all players OFF", "Menu", 15, "ID" ):ToAll()
|
MESSAGE:New( "Missile tracking to all players OFF", 15, "Menu" ):ToAll()
|
||||||
end
|
end
|
||||||
|
|
||||||
return self
|
return self
|
||||||
@ -251,9 +248,9 @@ function MISSILETRAINER:InitTrackingOnOff( TrackingOnOff )
|
|||||||
|
|
||||||
self.TrackingOnOff = TrackingOnOff
|
self.TrackingOnOff = TrackingOnOff
|
||||||
if self.TrackingOnOff == true then
|
if self.TrackingOnOff == true then
|
||||||
MESSAGE:New( "Missile tracking ON", "Menu", 15, "ID" ):ToAll()
|
MESSAGE:New( "Missile tracking ON", 15, "Menu" ):ToAll()
|
||||||
else
|
else
|
||||||
MESSAGE:New( "Missile tracking OFF", "Menu", 15, "ID" ):ToAll()
|
MESSAGE:New( "Missile tracking OFF", 15, "Menu" ):ToAll()
|
||||||
end
|
end
|
||||||
|
|
||||||
return self
|
return self
|
||||||
@ -272,7 +269,7 @@ function MISSILETRAINER:InitTrackingFrequency( TrackingFrequency )
|
|||||||
self.TrackingFrequency = 0.5
|
self.TrackingFrequency = 0.5
|
||||||
end
|
end
|
||||||
if self.TrackingFrequency then
|
if self.TrackingFrequency then
|
||||||
MESSAGE:New( "Missile tracking frequency is " .. self.TrackingFrequency .. " seconds.", "Menu", 15, "ID" ):ToAll()
|
MESSAGE:New( "Missile tracking frequency is " .. self.TrackingFrequency .. " seconds.", 15, "Menu" ):ToAll()
|
||||||
end
|
end
|
||||||
|
|
||||||
return self
|
return self
|
||||||
@ -287,9 +284,9 @@ function MISSILETRAINER:InitAlertsToAll( AlertsToAll )
|
|||||||
|
|
||||||
self.AlertsToAll = AlertsToAll
|
self.AlertsToAll = AlertsToAll
|
||||||
if self.AlertsToAll == true then
|
if self.AlertsToAll == true then
|
||||||
MESSAGE:New( "Alerts to all players ON", "Menu", 15, "ID" ):ToAll()
|
MESSAGE:New( "Alerts to all players ON", 15, "Menu" ):ToAll()
|
||||||
else
|
else
|
||||||
MESSAGE:New( "Alerts to all players OFF", "Menu", 15, "ID" ):ToAll()
|
MESSAGE:New( "Alerts to all players OFF", 15, "Menu" ):ToAll()
|
||||||
end
|
end
|
||||||
|
|
||||||
return self
|
return self
|
||||||
@ -304,9 +301,9 @@ function MISSILETRAINER:InitAlertsHitsOnOff( AlertsHitsOnOff )
|
|||||||
|
|
||||||
self.AlertsHitsOnOff = AlertsHitsOnOff
|
self.AlertsHitsOnOff = AlertsHitsOnOff
|
||||||
if self.AlertsHitsOnOff == true then
|
if self.AlertsHitsOnOff == true then
|
||||||
MESSAGE:New( "Alerts Hits ON", "Menu", 15, "ID" ):ToAll()
|
MESSAGE:New( "Alerts Hits ON", 15, "Menu" ):ToAll()
|
||||||
else
|
else
|
||||||
MESSAGE:New( "Alerts Hits OFF", "Menu", 15, "ID" ):ToAll()
|
MESSAGE:New( "Alerts Hits OFF", 15, "Menu" ):ToAll()
|
||||||
end
|
end
|
||||||
|
|
||||||
return self
|
return self
|
||||||
@ -321,9 +318,9 @@ function MISSILETRAINER:InitAlertsLaunchesOnOff( AlertsLaunchesOnOff )
|
|||||||
|
|
||||||
self.AlertsLaunchesOnOff = AlertsLaunchesOnOff
|
self.AlertsLaunchesOnOff = AlertsLaunchesOnOff
|
||||||
if self.AlertsLaunchesOnOff == true then
|
if self.AlertsLaunchesOnOff == true then
|
||||||
MESSAGE:New( "Alerts Launches ON", "Menu", 15, "ID" ):ToAll()
|
MESSAGE:New( "Alerts Launches ON", 15, "Menu" ):ToAll()
|
||||||
else
|
else
|
||||||
MESSAGE:New( "Alerts Launches OFF", "Menu", 15, "ID" ):ToAll()
|
MESSAGE:New( "Alerts Launches OFF", 15, "Menu" ):ToAll()
|
||||||
end
|
end
|
||||||
|
|
||||||
return self
|
return self
|
||||||
@ -338,9 +335,9 @@ function MISSILETRAINER:InitRangeOnOff( DetailsRangeOnOff )
|
|||||||
|
|
||||||
self.DetailsRangeOnOff = DetailsRangeOnOff
|
self.DetailsRangeOnOff = DetailsRangeOnOff
|
||||||
if self.DetailsRangeOnOff == true then
|
if self.DetailsRangeOnOff == true then
|
||||||
MESSAGE:New( "Range display ON", "Menu", 15, "ID" ):ToAll()
|
MESSAGE:New( "Range display ON", 15, "Menu" ):ToAll()
|
||||||
else
|
else
|
||||||
MESSAGE:New( "Range display OFF", "Menu", 15, "ID" ):ToAll()
|
MESSAGE:New( "Range display OFF", 15, "Menu" ):ToAll()
|
||||||
end
|
end
|
||||||
|
|
||||||
return self
|
return self
|
||||||
@ -355,9 +352,9 @@ function MISSILETRAINER:InitBearingOnOff( DetailsBearingOnOff )
|
|||||||
|
|
||||||
self.DetailsBearingOnOff = DetailsBearingOnOff
|
self.DetailsBearingOnOff = DetailsBearingOnOff
|
||||||
if self.DetailsBearingOnOff == true then
|
if self.DetailsBearingOnOff == true then
|
||||||
MESSAGE:New( "Bearing display OFF", "Menu", 15, "ID" ):ToAll()
|
MESSAGE:New( "Bearing display OFF", 15, "Menu" ):ToAll()
|
||||||
else
|
else
|
||||||
MESSAGE:New( "Bearing display OFF", "Menu", 15, "ID" ):ToAll()
|
MESSAGE:New( "Bearing display OFF", 15, "Menu" ):ToAll()
|
||||||
end
|
end
|
||||||
|
|
||||||
return self
|
return self
|
||||||
@ -372,9 +369,9 @@ function MISSILETRAINER:InitMenusOnOff( MenusOnOff )
|
|||||||
|
|
||||||
self.MenusOnOff = MenusOnOff
|
self.MenusOnOff = MenusOnOff
|
||||||
if self.MenusOnOff == true then
|
if self.MenusOnOff == true then
|
||||||
MESSAGE:New( "Menus are ENABLED (only when a player rejoins a slot)", "Menu", 15, "ID" ):ToAll()
|
MESSAGE:New( "Menus are ENABLED (only when a player rejoins a slot)", 15, "Menu" ):ToAll()
|
||||||
else
|
else
|
||||||
MESSAGE:New( "Menus are DISABLED", "Menu", 15, "ID" ):ToAll()
|
MESSAGE:New( "Menus are DISABLED", 15, "Menu" ):ToAll()
|
||||||
end
|
end
|
||||||
|
|
||||||
return self
|
return self
|
||||||
@ -425,7 +422,7 @@ function MISSILETRAINER._MenuMessages( MenuParameters )
|
|||||||
|
|
||||||
if MenuParameters.Distance ~= nil then
|
if MenuParameters.Distance ~= nil then
|
||||||
self.Distance = MenuParameters.Distance
|
self.Distance = MenuParameters.Distance
|
||||||
MESSAGE:New( "Hit detection distance set to " .. self.Distance .. " meters", "Menu", 15, "ID" ):ToAll()
|
MESSAGE:New( "Hit detection distance set to " .. self.Distance .. " meters", 15, "Menu" ):ToAll()
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@ -461,7 +458,7 @@ function MISSILETRAINER:_EventShot( Event )
|
|||||||
string.format( "%s launched a %s",
|
string.format( "%s launched a %s",
|
||||||
TrainerSourceUnit:GetTypeName(),
|
TrainerSourceUnit:GetTypeName(),
|
||||||
TrainerWeaponName
|
TrainerWeaponName
|
||||||
) .. self:_AddRange( Client, TrainerWeapon ) .. self:_AddBearing( Client, TrainerWeapon ),"Launch Alert", 5, "ID" )
|
) .. self:_AddRange( Client, TrainerWeapon ) .. self:_AddBearing( Client, TrainerWeapon ), 5, "Launch Alert" )
|
||||||
|
|
||||||
if self.AlertsToAll then
|
if self.AlertsToAll then
|
||||||
Message:ToAll()
|
Message:ToAll()
|
||||||
@ -576,7 +573,7 @@ function MISSILETRAINER:_TrackMissiles()
|
|||||||
TrainerWeapon:getTypeName(),
|
TrainerWeapon:getTypeName(),
|
||||||
TrainerSourceUnit:GetTypeName(),
|
TrainerSourceUnit:GetTypeName(),
|
||||||
TrainerTargetUnit:GetPlayerName()
|
TrainerTargetUnit:GetPlayerName()
|
||||||
),"Hit Alert", 15, "ID" )
|
), 15, "Hit Alert" )
|
||||||
|
|
||||||
if self.AlertsToAll == true then
|
if self.AlertsToAll == true then
|
||||||
Message:ToAll()
|
Message:ToAll()
|
||||||
@ -597,7 +594,7 @@ function MISSILETRAINER:_TrackMissiles()
|
|||||||
string.format( "%s launched by %s self destructed!",
|
string.format( "%s launched by %s self destructed!",
|
||||||
TrainerWeaponTypeName,
|
TrainerWeaponTypeName,
|
||||||
TrainerSourceUnit:GetTypeName()
|
TrainerSourceUnit:GetTypeName()
|
||||||
),"Tracking", 5, "ID" )
|
), 5, "Tracking" )
|
||||||
|
|
||||||
if self.AlertsToAll == true then
|
if self.AlertsToAll == true then
|
||||||
Message:ToAll()
|
Message:ToAll()
|
||||||
@ -671,7 +668,7 @@ function MISSILETRAINER:_TrackMissiles()
|
|||||||
|
|
||||||
-- Once the Player Client and the Other Player Client tracking messages are prepared, show them.
|
-- Once the Player Client and the Other Player Client tracking messages are prepared, show them.
|
||||||
if ClientData.MessageToClient ~= "" or ClientData.MessageToAll ~= "" then
|
if ClientData.MessageToClient ~= "" or ClientData.MessageToAll ~= "" then
|
||||||
local Message = MESSAGE:New( ClientData.MessageToClient .. ClientData.MessageToAll, "Tracking", 1, "ID" ):ToClient( Client )
|
local Message = MESSAGE:New( ClientData.MessageToClient .. ClientData.MessageToAll, 1, "Tracking" ):ToClient( Client )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -2,11 +2,6 @@
|
|||||||
-- A @{CLIENT} needs to be registered within the @{MISSION} through the function @{AddClient}. A @{TASK} needs to be registered within the @{MISSION} through the function @{AddTask}.
|
-- A @{CLIENT} needs to be registered within the @{MISSION} through the function @{AddClient}. A @{TASK} needs to be registered within the @{MISSION} through the function @{AddTask}.
|
||||||
-- @module Mission
|
-- @module Mission
|
||||||
|
|
||||||
Include.File( "Routines" )
|
|
||||||
Include.File( "Base" )
|
|
||||||
Include.File( "Client" )
|
|
||||||
Include.File( "Task" )
|
|
||||||
|
|
||||||
--- The MISSION class
|
--- The MISSION class
|
||||||
-- @type MISSION
|
-- @type MISSION
|
||||||
-- @extends Base#BASE
|
-- @extends Base#BASE
|
||||||
@ -191,7 +186,7 @@ function MISSION:ReportToAll()
|
|||||||
for TaskID, TaskData in pairs( Tasks ) do
|
for TaskID, TaskData in pairs( Tasks ) do
|
||||||
TaskText = TaskText .. " - Task " .. TaskID .. ": " .. TaskData.Name .. ": " .. TaskData:GetGoalProgress() .. "\n"
|
TaskText = TaskText .. " - Task " .. TaskID .. ": " .. TaskData.Name .. ": " .. TaskData:GetGoalProgress() .. "\n"
|
||||||
end
|
end
|
||||||
MESSAGE:New( self.MissionCoalition .. ' "' .. self.Name .. '": ' .. self.MissionStatus .. ' ( ' .. self.MissionPriority .. ' mission )' .. AlivePlayers .. "\n" .. TaskText:gsub("\n$",""), "Mission Command: Mission Report", 10, self.Name .. '/Status'):ToAll()
|
MESSAGE:New( self.MissionCoalition .. ' "' .. self.Name .. '": ' .. self.MissionStatus .. ' ( ' .. self.MissionPriority .. ' mission )' .. AlivePlayers .. "\n" .. TaskText:gsub("\n$",""), 10, "Mission Command: Mission Report" ):ToAll()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -650,7 +645,7 @@ function MISSIONSCHEDULER:TimeShow()
|
|||||||
self.TimeIntervalCount = self.TimeIntervalCount + 1
|
self.TimeIntervalCount = self.TimeIntervalCount + 1
|
||||||
if self.TimeIntervalCount >= self.TimeTriggerShow then
|
if self.TimeIntervalCount >= self.TimeTriggerShow then
|
||||||
local TimeMsg = string.format("%00d", ( self.TimeSeconds / 60 ) - ( timer.getTime() / 60 )) .. ' minutes left until mission reload.'
|
local TimeMsg = string.format("%00d", ( self.TimeSeconds / 60 ) - ( timer.getTime() / 60 )) .. ' minutes left until mission reload.'
|
||||||
MESSAGE:New( TimeMsg, "Mission time", self.TimeShow, '/TimeMsg' ):ToAll()
|
MESSAGE:New( TimeMsg, self.TimeShow, "Mission time" ):ToAll()
|
||||||
self.TimeIntervalCount = 0
|
self.TimeIntervalCount = 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -2,8 +2,73 @@
|
|||||||
|
|
||||||
Include.File( "Routines" )
|
Include.File( "Routines" )
|
||||||
Include.File( "Base" )
|
Include.File( "Base" )
|
||||||
Include.File( "Database" )
|
Include.File( "Scheduler" )
|
||||||
Include.File( "Event" )
|
Include.File( "Event" )
|
||||||
|
Include.File( "Menu" )
|
||||||
|
Include.File( "Group" )
|
||||||
|
Include.File( "Unit" )
|
||||||
|
Include.File( "Zone" )
|
||||||
|
Include.File( "Client" )
|
||||||
|
Include.File( "Static" )
|
||||||
|
Include.File( "Database" )
|
||||||
|
Include.File( "Set" )
|
||||||
|
Include.File( "Point" )
|
||||||
|
Include.File( "Moose" )
|
||||||
|
Include.File( "Scoring" )
|
||||||
|
Include.File( "Cargo" )
|
||||||
|
Include.File( "Message" )
|
||||||
|
Include.File( "Stage" )
|
||||||
|
Include.File( "Task" )
|
||||||
|
Include.File( "GoHomeTask" )
|
||||||
|
Include.File( "DestroyBaseTask" )
|
||||||
|
Include.File( "DestroyGroupsTask" )
|
||||||
|
Include.File( "DestroyRadarsTask" )
|
||||||
|
Include.File( "DestroyUnitTypesTask" )
|
||||||
|
Include.File( "PickupTask" )
|
||||||
|
Include.File( "DeployTask" )
|
||||||
|
Include.File( "NoTask" )
|
||||||
|
Include.File( "RouteTask" )
|
||||||
|
Include.File( "Mission" )
|
||||||
|
Include.File( "CleanUp" )
|
||||||
|
Include.File( "Spawn" )
|
||||||
|
Include.File( "Movement" )
|
||||||
|
Include.File( "Sead" )
|
||||||
|
Include.File( "Escort" )
|
||||||
|
Include.File( "MissileTrainer" )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- The order of the declarations is important here. Don't touch it.
|
-- The order of the declarations is important here. Don't touch it.
|
||||||
|
|
||||||
|
|||||||
@ -5,8 +5,6 @@
|
|||||||
-- on defined intervals (currently every minute).
|
-- on defined intervals (currently every minute).
|
||||||
-- @module MOVEMENT
|
-- @module MOVEMENT
|
||||||
|
|
||||||
Include.File( "Routines" )
|
|
||||||
|
|
||||||
--- the MOVEMENT class
|
--- the MOVEMENT class
|
||||||
-- @type
|
-- @type
|
||||||
MOVEMENT = {
|
MOVEMENT = {
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
--- A NOTASK is a dummy activity... But it will show a Mission Briefing...
|
--- A NOTASK is a dummy activity... But it will show a Mission Briefing...
|
||||||
-- @module NOTASK
|
-- @module NOTASK
|
||||||
|
|
||||||
Include.File("Task")
|
|
||||||
|
|
||||||
--- The NOTASK class
|
--- The NOTASK class
|
||||||
-- @type
|
-- @type
|
||||||
NOTASK = {
|
NOTASK = {
|
||||||
|
|||||||
@ -2,9 +2,6 @@
|
|||||||
-- @module PICKUPTASK
|
-- @module PICKUPTASK
|
||||||
-- @parent TASK
|
-- @parent TASK
|
||||||
|
|
||||||
Include.File("Task")
|
|
||||||
Include.File("Cargo")
|
|
||||||
|
|
||||||
--- The PICKUPTASK class
|
--- The PICKUPTASK class
|
||||||
-- @type
|
-- @type
|
||||||
PICKUPTASK = {
|
PICKUPTASK = {
|
||||||
|
|||||||
@ -25,10 +25,6 @@
|
|||||||
-- @module Point
|
-- @module Point
|
||||||
-- @author FlightControl
|
-- @author FlightControl
|
||||||
|
|
||||||
Include.File( "Routines" )
|
|
||||||
Include.File( "Base" )
|
|
||||||
Include.File( "Point" )
|
|
||||||
|
|
||||||
--- The POINT_VEC3 class
|
--- The POINT_VEC3 class
|
||||||
-- @type POINT_VEC3
|
-- @type POINT_VEC3
|
||||||
-- @extends Base#BASE
|
-- @extends Base#BASE
|
||||||
|
|||||||
@ -2,10 +2,6 @@
|
|||||||
-- @module routines
|
-- @module routines
|
||||||
-- @author Flightcontrol
|
-- @author Flightcontrol
|
||||||
|
|
||||||
--Include.File( "Trace" )
|
|
||||||
--Include.File( "Message" )
|
|
||||||
|
|
||||||
|
|
||||||
env.setErrorMessageBoxEnabled(false)
|
env.setErrorMessageBoxEnabled(false)
|
||||||
|
|
||||||
--- Extract of MIST functions.
|
--- Extract of MIST functions.
|
||||||
@ -2310,19 +2306,19 @@ end
|
|||||||
function MessageToAll( MsgText, MsgTime, MsgName )
|
function MessageToAll( MsgText, MsgTime, MsgName )
|
||||||
--trace.f()
|
--trace.f()
|
||||||
|
|
||||||
MESSAGE:New( MsgText, "Message", MsgTime, MsgName ):ToCoalition( coalition.side.RED ):ToCoalition( coalition.side.BLUE )
|
MESSAGE:New( MsgText, MsgTime, "Message" ):ToCoalition( coalition.side.RED ):ToCoalition( coalition.side.BLUE )
|
||||||
end
|
end
|
||||||
|
|
||||||
function MessageToRed( MsgText, MsgTime, MsgName )
|
function MessageToRed( MsgText, MsgTime, MsgName )
|
||||||
--trace.f()
|
--trace.f()
|
||||||
|
|
||||||
MESSAGE:New( MsgText, "To Red Coalition", MsgTime, MsgName ):ToCoalition( coalition.side.RED )
|
MESSAGE:New( MsgText, MsgTime, "To Red Coalition" ):ToCoalition( coalition.side.RED )
|
||||||
end
|
end
|
||||||
|
|
||||||
function MessageToBlue( MsgText, MsgTime, MsgName )
|
function MessageToBlue( MsgText, MsgTime, MsgName )
|
||||||
--trace.f()
|
--trace.f()
|
||||||
|
|
||||||
MESSAGE:New( MsgText, "To Blue Coalition", MsgTime, MsgName ):ToCoalition( coalition.side.RED )
|
MESSAGE:New( MsgText, MsgTime, "To Blue Coalition" ):ToCoalition( coalition.side.RED )
|
||||||
end
|
end
|
||||||
|
|
||||||
function getCarrierHeight( CarrierGroup )
|
function getCarrierHeight( CarrierGroup )
|
||||||
|
|||||||
@ -20,10 +20,6 @@
|
|||||||
-- @module Scheduler
|
-- @module Scheduler
|
||||||
-- @author FlightControl
|
-- @author FlightControl
|
||||||
|
|
||||||
Include.File( "Routines" )
|
|
||||||
Include.File( "Base" )
|
|
||||||
|
|
||||||
|
|
||||||
--- The SCHEDULER class
|
--- The SCHEDULER class
|
||||||
-- @type SCHEDULER
|
-- @type SCHEDULER
|
||||||
-- @extends Base#BASE
|
-- @extends Base#BASE
|
||||||
|
|||||||
@ -7,13 +7,6 @@
|
|||||||
-- @author FlightControl
|
-- @author FlightControl
|
||||||
|
|
||||||
|
|
||||||
Include.File( "Routines" )
|
|
||||||
Include.File( "Base" )
|
|
||||||
Include.File( "Menu" )
|
|
||||||
Include.File( "Group" )
|
|
||||||
Include.File( "Event" )
|
|
||||||
|
|
||||||
|
|
||||||
--- The Scoring class
|
--- The Scoring class
|
||||||
-- @type SCORING
|
-- @type SCORING
|
||||||
-- @field Players A collection of the current players that have joined the game.
|
-- @field Players A collection of the current players that have joined the game.
|
||||||
@ -176,7 +169,7 @@ function SCORING:_EventOnDeadOrCrash( Event )
|
|||||||
MESSAGE:New( "Player '" .. PlayerName .. "' killed a friendly " .. TargetUnitCategory .. " ( " .. TargetType .. " ) " ..
|
MESSAGE:New( "Player '" .. PlayerName .. "' killed a friendly " .. TargetUnitCategory .. " ( " .. TargetType .. " ) " ..
|
||||||
PlayerData.Kill[TargetCategory][TargetType].PenaltyKill .. " times. Penalty: -" .. PlayerData.Kill[TargetCategory][TargetType].Penalty ..
|
PlayerData.Kill[TargetCategory][TargetType].PenaltyKill .. " times. Penalty: -" .. PlayerData.Kill[TargetCategory][TargetType].Penalty ..
|
||||||
". Score Total:" .. PlayerData.Score - PlayerData.Penalty,
|
". Score Total:" .. PlayerData.Score - PlayerData.Penalty,
|
||||||
"", 5, "/PENALTY" .. PlayerName .. "/" .. InitUnitName ):ToAll()
|
5 ):ToAll()
|
||||||
self:ScoreCSV( PlayerName, "KILL_PENALTY", 1, -125, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
|
self:ScoreCSV( PlayerName, "KILL_PENALTY", 1, -125, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
|
||||||
else
|
else
|
||||||
PlayerData.Score = PlayerData.Score + 10
|
PlayerData.Score = PlayerData.Score + 10
|
||||||
@ -185,7 +178,7 @@ function SCORING:_EventOnDeadOrCrash( Event )
|
|||||||
MESSAGE:New( "Player '" .. PlayerName .. "' killed an enemy " .. TargetUnitCategory .. " ( " .. TargetType .. " ) " ..
|
MESSAGE:New( "Player '" .. PlayerName .. "' killed an enemy " .. TargetUnitCategory .. " ( " .. TargetType .. " ) " ..
|
||||||
PlayerData.Kill[TargetCategory][TargetType].ScoreKill .. " times. Score: " .. PlayerData.Kill[TargetCategory][TargetType].Score ..
|
PlayerData.Kill[TargetCategory][TargetType].ScoreKill .. " times. Score: " .. PlayerData.Kill[TargetCategory][TargetType].Score ..
|
||||||
". Score Total:" .. PlayerData.Score - PlayerData.Penalty,
|
". Score Total:" .. PlayerData.Score - PlayerData.Penalty,
|
||||||
"", 5, "/SCORE" .. PlayerName .. "/" .. InitUnitName ):ToAll()
|
5 ):ToAll()
|
||||||
self:ScoreCSV( PlayerName, "KILL_SCORE", 1, 10, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
|
self:ScoreCSV( PlayerName, "KILL_SCORE", 1, 10, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -236,9 +229,7 @@ function SCORING:_AddPlayerFromUnit( UnitData )
|
|||||||
self.Players[PlayerName].PenaltyCoalition = self.Players[PlayerName].PenaltyCoalition + 1
|
self.Players[PlayerName].PenaltyCoalition = self.Players[PlayerName].PenaltyCoalition + 1
|
||||||
MESSAGE:New( "Player '" .. PlayerName .. "' changed coalition from " .. _SCORINGCoalition[self.Players[PlayerName].UnitCoalition] .. " to " .. _SCORINGCoalition[UnitCoalition] ..
|
MESSAGE:New( "Player '" .. PlayerName .. "' changed coalition from " .. _SCORINGCoalition[self.Players[PlayerName].UnitCoalition] .. " to " .. _SCORINGCoalition[UnitCoalition] ..
|
||||||
"(changed " .. self.Players[PlayerName].PenaltyCoalition .. " times the coalition). 50 Penalty points added.",
|
"(changed " .. self.Players[PlayerName].PenaltyCoalition .. " times the coalition). 50 Penalty points added.",
|
||||||
"",
|
2
|
||||||
2,
|
|
||||||
"/PENALTYCOALITION" .. PlayerName
|
|
||||||
):ToAll()
|
):ToAll()
|
||||||
self:ScoreCSV( PlayerName, "COALITION_PENALTY", 1, -50, self.Players[PlayerName].UnitName, _SCORINGCoalition[self.Players[PlayerName].UnitCoalition], _SCORINGCategory[self.Players[PlayerName].UnitCategory], self.Players[PlayerName].UnitType,
|
self:ScoreCSV( PlayerName, "COALITION_PENALTY", 1, -50, self.Players[PlayerName].UnitName, _SCORINGCoalition[self.Players[PlayerName].UnitCoalition], _SCORINGCategory[self.Players[PlayerName].UnitCategory], self.Players[PlayerName].UnitType,
|
||||||
UnitName, _SCORINGCoalition[UnitCoalition], _SCORINGCategory[UnitCategory], UnitData:getTypeName() )
|
UnitName, _SCORINGCoalition[UnitCoalition], _SCORINGCategory[UnitCategory], UnitData:getTypeName() )
|
||||||
@ -252,9 +243,7 @@ function SCORING:_AddPlayerFromUnit( UnitData )
|
|||||||
if self.Players[PlayerName].Penalty > 100 then
|
if self.Players[PlayerName].Penalty > 100 then
|
||||||
if self.Players[PlayerName].PenaltyWarning < 1 then
|
if self.Players[PlayerName].PenaltyWarning < 1 then
|
||||||
MESSAGE:New( "Player '" .. PlayerName .. "': WARNING! If you continue to commit FRATRICIDE and have a PENALTY score higher than 150, you will be COURT MARTIALED and DISMISSED from this mission! \nYour total penalty is: " .. self.Players[PlayerName].Penalty,
|
MESSAGE:New( "Player '" .. PlayerName .. "': WARNING! If you continue to commit FRATRICIDE and have a PENALTY score higher than 150, you will be COURT MARTIALED and DISMISSED from this mission! \nYour total penalty is: " .. self.Players[PlayerName].Penalty,
|
||||||
"",
|
30
|
||||||
30,
|
|
||||||
"/PENALTYCOALITION" .. PlayerName
|
|
||||||
):ToAll()
|
):ToAll()
|
||||||
self.Players[PlayerName].PenaltyWarning = self.Players[PlayerName].PenaltyWarning + 1
|
self.Players[PlayerName].PenaltyWarning = self.Players[PlayerName].PenaltyWarning + 1
|
||||||
end
|
end
|
||||||
@ -264,9 +253,7 @@ function SCORING:_AddPlayerFromUnit( UnitData )
|
|||||||
ClientGroup = GROUP:NewFromDCSUnit( UnitData )
|
ClientGroup = GROUP:NewFromDCSUnit( UnitData )
|
||||||
ClientGroup:Destroy()
|
ClientGroup:Destroy()
|
||||||
MESSAGE:New( "Player '" .. PlayerName .. "' committed FRATRICIDE, he will be COURT MARTIALED and is DISMISSED from this mission!",
|
MESSAGE:New( "Player '" .. PlayerName .. "' committed FRATRICIDE, he will be COURT MARTIALED and is DISMISSED from this mission!",
|
||||||
"",
|
10
|
||||||
10,
|
|
||||||
"/PENALTYCOALITION" .. PlayerName
|
|
||||||
):ToAll()
|
):ToAll()
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -294,7 +281,7 @@ function SCORING:_AddMissionTaskScore( PlayerUnit, MissionName, Score )
|
|||||||
|
|
||||||
MESSAGE:New( "Player '" .. PlayerName .. "' has finished another Task in Mission '" .. MissionName .. "'. " ..
|
MESSAGE:New( "Player '" .. PlayerName .. "' has finished another Task in Mission '" .. MissionName .. "'. " ..
|
||||||
Score .. " Score points added.",
|
Score .. " Score points added.",
|
||||||
"", 20, "/SCORETASK" .. PlayerName ):ToAll()
|
20 ):ToAll()
|
||||||
|
|
||||||
self:ScoreCSV( PlayerName, "TASK_" .. MissionName:gsub( ' ', '_' ), 1, Score, PlayerUnit:getName() )
|
self:ScoreCSV( PlayerName, "TASK_" .. MissionName:gsub( ' ', '_' ), 1, Score, PlayerUnit:getName() )
|
||||||
end
|
end
|
||||||
@ -311,7 +298,7 @@ function SCORING:_AddMissionScore( MissionName, Score )
|
|||||||
PlayerData.Mission[MissionName].ScoreMission = PlayerData.Mission[MissionName].ScoreMission + Score
|
PlayerData.Mission[MissionName].ScoreMission = PlayerData.Mission[MissionName].ScoreMission + Score
|
||||||
MESSAGE:New( "Player '" .. PlayerName .. "' has finished Mission '" .. MissionName .. "'. " ..
|
MESSAGE:New( "Player '" .. PlayerName .. "' has finished Mission '" .. MissionName .. "'. " ..
|
||||||
Score .. " Score points added.",
|
Score .. " Score points added.",
|
||||||
"", 20, "/SCOREMISSION" .. PlayerName ):ToAll()
|
20 ):ToAll()
|
||||||
self:ScoreCSV( PlayerName, "MISSION_" .. MissionName:gsub( ' ', '_' ), 1, Score )
|
self:ScoreCSV( PlayerName, "MISSION_" .. MissionName:gsub( ' ', '_' ), 1, Score )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -421,9 +408,7 @@ function SCORING:_EventOnHit( Event )
|
|||||||
MESSAGE:New( "Player '" .. InitPlayerName .. "' hit a friendly " .. TargetUnitCategory .. " ( " .. TargetType .. " ) " ..
|
MESSAGE:New( "Player '" .. InitPlayerName .. "' hit a friendly " .. TargetUnitCategory .. " ( " .. TargetType .. " ) " ..
|
||||||
self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].PenaltyHit .. " times. Penalty: -" .. self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].Penalty ..
|
self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].PenaltyHit .. " times. Penalty: -" .. self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].Penalty ..
|
||||||
". Score Total:" .. self.Players[InitPlayerName].Score - self.Players[InitPlayerName].Penalty,
|
". Score Total:" .. self.Players[InitPlayerName].Score - self.Players[InitPlayerName].Penalty,
|
||||||
"",
|
2
|
||||||
2,
|
|
||||||
"/PENALTY" .. InitPlayerName .. "/" .. InitUnitName
|
|
||||||
):ToAll()
|
):ToAll()
|
||||||
self:ScoreCSV( InitPlayerName, "HIT_PENALTY", 1, -25, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
|
self:ScoreCSV( InitPlayerName, "HIT_PENALTY", 1, -25, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
|
||||||
else
|
else
|
||||||
@ -433,9 +418,7 @@ function SCORING:_EventOnHit( Event )
|
|||||||
MESSAGE:New( "Player '" .. InitPlayerName .. "' hit a target " .. TargetUnitCategory .. " ( " .. TargetType .. " ) " ..
|
MESSAGE:New( "Player '" .. InitPlayerName .. "' hit a target " .. TargetUnitCategory .. " ( " .. TargetType .. " ) " ..
|
||||||
self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].ScoreHit .. " times. Score: " .. self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].Score ..
|
self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].ScoreHit .. " times. Score: " .. self.Players[InitPlayerName].Hit[TargetCategory][TargetUnitName].Score ..
|
||||||
". Score Total:" .. self.Players[InitPlayerName].Score - self.Players[InitPlayerName].Penalty,
|
". Score Total:" .. self.Players[InitPlayerName].Score - self.Players[InitPlayerName].Penalty,
|
||||||
"",
|
2
|
||||||
2,
|
|
||||||
"/SCORE" .. InitPlayerName .. "/" .. InitUnitName
|
|
||||||
):ToAll()
|
):ToAll()
|
||||||
self:ScoreCSV( InitPlayerName, "HIT_SCORE", 1, 1, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
|
self:ScoreCSV( InitPlayerName, "HIT_SCORE", 1, 1, InitUnitName, InitUnitCoalition, InitUnitCategory, InitUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType )
|
||||||
end
|
end
|
||||||
@ -556,7 +539,7 @@ function SCORING:ReportScoreAll()
|
|||||||
PlayerMessage = PlayerMessage .. string.format( "Player '%s' Score:%d (%d Score -%d Penalties)%s", PlayerName, PlayerScore - PlayerPenalty, PlayerScore, PlayerPenalty, ScoreMessage )
|
PlayerMessage = PlayerMessage .. string.format( "Player '%s' Score:%d (%d Score -%d Penalties)%s", PlayerName, PlayerScore - PlayerPenalty, PlayerScore, PlayerPenalty, ScoreMessage )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
MESSAGE:New( PlayerMessage, "Player Scores", 30, "AllPlayerScores"):ToAll()
|
MESSAGE:New( PlayerMessage, 30, "Player Scores" ):ToAll()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -669,7 +652,7 @@ function SCORING:ReportScorePlayer()
|
|||||||
PlayerMessage = PlayerMessage .. string.format( "Player '%s' Score = %d ( %d Score, -%d Penalties ):%s", PlayerName, PlayerScore - PlayerPenalty, PlayerScore, PlayerPenalty, ScoreMessage )
|
PlayerMessage = PlayerMessage .. string.format( "Player '%s' Score = %d ( %d Score, -%d Penalties ):%s", PlayerName, PlayerScore - PlayerPenalty, PlayerScore, PlayerPenalty, ScoreMessage )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
MESSAGE:New( PlayerMessage, "Player Scores", 30, "AllPlayerScores"):ToAll()
|
MESSAGE:New( PlayerMessage, 30, "Player Scores" ):ToAll()
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -3,13 +3,6 @@
|
|||||||
-- @author to be searched on the forum
|
-- @author to be searched on the forum
|
||||||
-- @author (co) Flightcontrol (Modified and enriched with functionality)
|
-- @author (co) Flightcontrol (Modified and enriched with functionality)
|
||||||
|
|
||||||
Include.File( "Routines" )
|
|
||||||
Include.File( "Event" )
|
|
||||||
Include.File( "Base" )
|
|
||||||
Include.File( "Mission" )
|
|
||||||
Include.File( "Client" )
|
|
||||||
Include.File( "Task" )
|
|
||||||
|
|
||||||
--- The SEAD class
|
--- The SEAD class
|
||||||
-- @type SEAD
|
-- @type SEAD
|
||||||
-- @extends Base#BASE
|
-- @extends Base#BASE
|
||||||
|
|||||||
@ -127,14 +127,6 @@
|
|||||||
-- @module Set
|
-- @module Set
|
||||||
-- @author FlightControl
|
-- @author FlightControl
|
||||||
|
|
||||||
Include.File( "Routines" )
|
|
||||||
Include.File( "Base" )
|
|
||||||
Include.File( "Menu" )
|
|
||||||
Include.File( "Group" )
|
|
||||||
Include.File( "Unit" )
|
|
||||||
Include.File( "Event" )
|
|
||||||
Include.File( "Client" )
|
|
||||||
|
|
||||||
--- SET_BASE class
|
--- SET_BASE class
|
||||||
-- @type SET_BASE
|
-- @type SET_BASE
|
||||||
-- @extends Base#BASE
|
-- @extends Base#BASE
|
||||||
|
|||||||
@ -74,14 +74,6 @@
|
|||||||
-- @module Spawn
|
-- @module Spawn
|
||||||
-- @author FlightControl
|
-- @author FlightControl
|
||||||
|
|
||||||
Include.File( "Routines" )
|
|
||||||
Include.File( "Base" )
|
|
||||||
Include.File( "Database" )
|
|
||||||
Include.File( "Group" )
|
|
||||||
Include.File( "Zone" )
|
|
||||||
Include.File( "Event" )
|
|
||||||
Include.File( "Scheduler" )
|
|
||||||
|
|
||||||
--- SPAWN Class
|
--- SPAWN Class
|
||||||
-- @type SPAWN
|
-- @type SPAWN
|
||||||
-- @extends Base#BASE
|
-- @extends Base#BASE
|
||||||
@ -783,7 +775,7 @@ end
|
|||||||
-- If no index is given, it will return the first group in the list.
|
-- If no index is given, it will return the first group in the list.
|
||||||
-- @param #SPAWN self
|
-- @param #SPAWN self
|
||||||
-- @param #number SpawnIndex The index of the group to return.
|
-- @param #number SpawnIndex The index of the group to return.
|
||||||
-- @return Group#GROUP
|
-- @return Group#GROUP self
|
||||||
function SPAWN:GetGroupFromIndex( SpawnIndex )
|
function SPAWN:GetGroupFromIndex( SpawnIndex )
|
||||||
self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnIndex } )
|
self:F( { self.SpawnTemplatePrefix, self.SpawnAliasPrefix, SpawnIndex } )
|
||||||
|
|
||||||
|
|||||||
@ -2,11 +2,11 @@
|
|||||||
-- @module STAGE
|
-- @module STAGE
|
||||||
-- @author Flightcontrol
|
-- @author Flightcontrol
|
||||||
|
|
||||||
Include.File( "Routines" )
|
|
||||||
Include.File( "Base" )
|
|
||||||
Include.File( "Mission" )
|
|
||||||
Include.File( "Client" )
|
|
||||||
Include.File( "Task" )
|
|
||||||
|
|
||||||
--- The STAGE class
|
--- The STAGE class
|
||||||
-- @type
|
-- @type
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
--- Provides a logging of statistics in a running DCS Mission.
|
--- Provides a logging of statistics in a running DCS Mission.
|
||||||
-- @script eStatHandler
|
-- @script eStatHandler
|
||||||
|
|
||||||
Include.File( "Routines" )
|
|
||||||
|
|
||||||
|
|
||||||
--Handler table
|
--Handler table
|
||||||
|
|||||||
@ -31,9 +31,9 @@
|
|||||||
-- @module Static
|
-- @module Static
|
||||||
-- @author FlightControl
|
-- @author FlightControl
|
||||||
|
|
||||||
Include.File( "Routines" )
|
|
||||||
Include.File( "Base" )
|
|
||||||
Include.File( "Message" )
|
|
||||||
|
|
||||||
|
|
||||||
--- The STATIC class
|
--- The STATIC class
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
--- The TASK Classes define major end-to-end activities within a MISSION. The TASK Class is the Master Class to orchestrate these activities. From this class, many concrete TASK classes are inherited.
|
--- The TASK Classes define major end-to-end activities within a MISSION. The TASK Class is the Master Class to orchestrate these activities. From this class, many concrete TASK classes are inherited.
|
||||||
-- @module TASK
|
-- @module TASK
|
||||||
|
|
||||||
Include.File( "Routines" )
|
|
||||||
Include.File( "Base" )
|
|
||||||
Include.File( "Mission" )
|
|
||||||
Include.File( "Client" )
|
|
||||||
Include.File( "Stage" )
|
|
||||||
|
|
||||||
--- The TASK class
|
--- The TASK class
|
||||||
-- @type TASK
|
-- @type TASK
|
||||||
|
|||||||
@ -68,9 +68,9 @@
|
|||||||
-- @module Unit
|
-- @module Unit
|
||||||
-- @author FlightControl
|
-- @author FlightControl
|
||||||
|
|
||||||
Include.File( "Routines" )
|
|
||||||
Include.File( "Base" )
|
|
||||||
Include.File( "Message" )
|
|
||||||
|
|
||||||
--- The UNIT class
|
--- The UNIT class
|
||||||
-- @type UNIT
|
-- @type UNIT
|
||||||
|
|||||||
@ -62,10 +62,10 @@
|
|||||||
-- @author FlightControl
|
-- @author FlightControl
|
||||||
|
|
||||||
|
|
||||||
Include.File( "Routines" )
|
|
||||||
Include.File( "Base" )
|
|
||||||
Include.File( "Message" )
|
|
||||||
Include.File( "Point" )
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
Include.File( 'Cleanup' )
|
|
||||||
Include.File( 'Spawn' )
|
|
||||||
Include.File( 'Event')
|
|
||||||
|
|
||||||
Clean = CLEANUP:New( 'CLEAN_BATUMI', 180 )
|
Clean = CLEANUP:New( 'CLEAN_BATUMI', 180 )
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -1,108 +0,0 @@
|
|||||||
|
|
||||||
Include.File( 'UnitSet' )
|
|
||||||
Include.File( 'GroupSet' )
|
|
||||||
Include.File( 'Spawn' )
|
|
||||||
|
|
||||||
DBBluePlanes = UNITSET:New()
|
|
||||||
:FilterCoalitions( "blue" )
|
|
||||||
:FilterCategories( "plane" )
|
|
||||||
:FilterStart()
|
|
||||||
|
|
||||||
DBRedVehicles = UNITSET:New()
|
|
||||||
:FilterCoalitions( "red" )
|
|
||||||
:FilterCategories( "ground" )
|
|
||||||
:FilterStart()
|
|
||||||
|
|
||||||
DBShips = UNITSET:New()
|
|
||||||
:FilterCategories( "ship" )
|
|
||||||
:FilterStart()
|
|
||||||
|
|
||||||
DBBelgium = UNITSET:New()
|
|
||||||
:FilterCategories( "helicopter" )
|
|
||||||
:FilterCountries( "BELGIUM" )
|
|
||||||
:FilterStart()
|
|
||||||
|
|
||||||
DBNorthKorea = UNITSET:New()
|
|
||||||
:FilterCountries( "NORTH_KOREA" )
|
|
||||||
:FilterStart()
|
|
||||||
|
|
||||||
DBKA50Vinson = UNITSET:New()
|
|
||||||
:FilterTypes( { "Ka-50", "VINSON" } )
|
|
||||||
:FilterStart()
|
|
||||||
|
|
||||||
DBBluePlanesGroup = GROUPSET:New()
|
|
||||||
:FilterCoalitions( "blue" )
|
|
||||||
:FilterCategories( "plane" )
|
|
||||||
:FilterStart()
|
|
||||||
|
|
||||||
DBNorthKoreaGroup = GROUPSET:New()
|
|
||||||
:FilterCountries( "NORTH_KOREA" )
|
|
||||||
:FilterStart()
|
|
||||||
|
|
||||||
DBBluePlanes:Flush()
|
|
||||||
DBRedVehicles:Flush()
|
|
||||||
DBShips:Flush()
|
|
||||||
DBBelgium:Flush()
|
|
||||||
DBNorthKorea:Flush()
|
|
||||||
DBKA50Vinson:Flush()
|
|
||||||
DBBluePlanesGroup:Flush()
|
|
||||||
DBNorthKoreaGroup:Flush()
|
|
||||||
|
|
||||||
|
|
||||||
SpawnUS_Plane = SPAWN:New( 'Database Spawn Test USA Plane')
|
|
||||||
GroupUS_Plane = SpawnUS_Plane:Spawn()
|
|
||||||
|
|
||||||
SpawnUS_Vehicle = SPAWN:New( 'Database Spawn Test USA Vehicle')
|
|
||||||
GroupUS_Vehicle = SpawnUS_Vehicle:Spawn()
|
|
||||||
|
|
||||||
SpawnUS_Ship = SPAWN:New( 'Database Spawn Test USA Ship')
|
|
||||||
GroupUS_Ship = SpawnUS_Ship:Spawn()
|
|
||||||
|
|
||||||
SpawnRU_Vehicle = SPAWN:New( 'Database Spawn Test RUSSIA Vehicle')
|
|
||||||
GroupRU_Vehicle = SpawnRU_Vehicle:Spawn()
|
|
||||||
|
|
||||||
SpawnRU_Ship = SPAWN:New( 'Database Spawn Test RUSSIA Ship')
|
|
||||||
GroupRU_Ship = SpawnRU_Ship:Spawn()
|
|
||||||
|
|
||||||
SpawnUS_AttackVehicle = SPAWN:New( 'Database Spawn Test USA Attack Vehicle' )
|
|
||||||
SpawnRU_AttackVehicle = SPAWN:New( 'Database Spawn Test RUSSIA Attack Vehicle' )
|
|
||||||
|
|
||||||
for i = 1, 2 do
|
|
||||||
GroupRU_AttackVehicle = SpawnRU_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone RU"), true)
|
|
||||||
GroupUS_AttackVehicle = SpawnUS_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone US"), true)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
--DBBlue:TraceDatabase()
|
|
||||||
SCHEDULER:New( DBBluePlanes, DBBluePlanes.Flush, { }, 1 )
|
|
||||||
SCHEDULER:New( DBRedVehicles, DBRedVehicles.Flush, { }, 1 )
|
|
||||||
SCHEDULER:New( DBShips, DBShips.Flush, { }, 1 )
|
|
||||||
SCHEDULER:New( DBBelgium, DBBelgium.Flush, { }, 1 )
|
|
||||||
SCHEDULER:New( DBNorthKorea, DBNorthKorea.Flush, { }, 1 )
|
|
||||||
SCHEDULER:New( DBKA50Vinson, DBKA50Vinson.Flush, { }, 1 )
|
|
||||||
|
|
||||||
SCHEDULER:New( DBBluePlanesGroup, DBBluePlanesGroup.Flush, { }, 1 )
|
|
||||||
SCHEDULER:New( DBNorthKoreaGroup, DBNorthKoreaGroup.Flush, { }, 1 )
|
|
||||||
|
|
||||||
DBRedVehicles
|
|
||||||
:ForEachUnit( function( MooseUnit )
|
|
||||||
DBRedVehicles:T( MooseUnit:GetName() )
|
|
||||||
end )
|
|
||||||
|
|
||||||
local function FlushPlayers()
|
|
||||||
|
|
||||||
_DATABASE:E( "FlushPlayers" )
|
|
||||||
_DATABASE
|
|
||||||
:ForEachPlayerAlive( function( Player )
|
|
||||||
_DATABASE:E( Player )
|
|
||||||
MESSAGE:New( Player, "Test", 5, "Player Test" ):ToAll()
|
|
||||||
return true
|
|
||||||
end )
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
_DATABASE:E( "Schedule" )
|
|
||||||
local PlayerShow = SCHEDULER:New( nil, FlushPlayers, {}, 1, 10 )
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Binary file not shown.
Binary file not shown.
@ -1,13 +1,3 @@
|
|||||||
-- MOOSE include files.
|
|
||||||
Include.File( "Mission" )
|
|
||||||
Include.File( "Client" )
|
|
||||||
Include.File( "DestroyGroupsTask" )
|
|
||||||
Include.File( "DestroyRadarsTask" )
|
|
||||||
Include.File( "DestroyUnitTypesTask" )
|
|
||||||
Include.File( "Group" )
|
|
||||||
Include.File( "Unit" )
|
|
||||||
Include.File( "Zone" )
|
|
||||||
Include.File( "Event" )
|
|
||||||
|
|
||||||
do
|
do
|
||||||
local Mission = MISSION:New( 'Destroy Gound', 'Ground', 'Briefing', 'CCCP' )
|
local Mission = MISSION:New( 'Destroy Gound', 'Ground', 'Briefing', 'CCCP' )
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
Include.File( "Mission" )
|
|
||||||
Include.File( "Client" )
|
|
||||||
Include.File( "Spawn" )
|
|
||||||
Include.File( "Escort" )
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -2,7 +2,7 @@
|
|||||||
-- Only use Include.File when developing new MOOSE classes.
|
-- Only use Include.File when developing new MOOSE classes.
|
||||||
-- When using Moose.lua in the DO SCIPTS FILE initialization box,
|
-- When using Moose.lua in the DO SCIPTS FILE initialization box,
|
||||||
-- these Include.File statements are not needed, because all classes within Moose will be loaded.
|
-- these Include.File statements are not needed, because all classes within Moose will be loaded.
|
||||||
Include.File("MissileTrainer")
|
|
||||||
|
|
||||||
-- This is an example of a global
|
-- This is an example of a global
|
||||||
local Trainer = MISSILETRAINER
|
local Trainer = MISSILETRAINER
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@ -1,4 +1,4 @@
|
|||||||
Include.File( "Sead" )
|
|
||||||
|
|
||||||
|
|
||||||
-- CCCP SEAD Defenses
|
-- CCCP SEAD Defenses
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
Include.File( 'Set' )
|
|
||||||
Include.File( 'Spawn' )
|
|
||||||
|
|
||||||
SetVehicles = SET_GROUP:New()
|
SetVehicles = SET_GROUP:New()
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -1,4 +1,4 @@
|
|||||||
Include.File( "Spawn" )
|
|
||||||
|
|
||||||
|
|
||||||
-- Tests Anapa: Spawn Basics
|
-- Tests Anapa: Spawn Basics
|
||||||
|
|||||||
Binary file not shown.
@ -10,7 +10,7 @@
|
|||||||
-- @author FlightControl
|
-- @author FlightControl
|
||||||
|
|
||||||
|
|
||||||
Include.File("Spawn")
|
|
||||||
|
|
||||||
do
|
do
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -1,15 +1,15 @@
|
|||||||
Include.File( "Mission" )
|
|
||||||
Include.File( "Client" )
|
|
||||||
Include.File( "DeployTask" )
|
|
||||||
Include.File( "PickupTask" )
|
|
||||||
Include.File( "DestroyGroupsTask" )
|
|
||||||
Include.File( "DestroyRadarsTask" )
|
|
||||||
Include.File( "DestroyUnitTypesTask" )
|
|
||||||
Include.File( "GoHomeTask" )
|
|
||||||
Include.File( "Spawn" )
|
|
||||||
Include.File( "Movement" )
|
|
||||||
Include.File( "Sead" )
|
|
||||||
Include.File( "CleanUp" )
|
|
||||||
|
|
||||||
do
|
do
|
||||||
local Mission = MISSION:New( 'Pickup', 'Operational', 'Pickup Troops', 'NATO' )
|
local Mission = MISSION:New( 'Pickup', 'Operational', 'Pickup Troops', 'NATO' )
|
||||||
|
|||||||
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
Include.File( "Group" )
|
|
||||||
Include.File( "Unit" )
|
|
||||||
Include.File( "Client" )
|
|
||||||
|
|
||||||
BASE:TraceClass( "UNIT" )
|
BASE:TraceClass( "UNIT" )
|
||||||
BASE:TraceClass( "GROUP" )
|
BASE:TraceClass( "GROUP" )
|
||||||
|
|||||||
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
Include.File( "Zone" )
|
|
||||||
Include.File( "Group" )
|
|
||||||
Include.File( "Scheduler" )
|
|
||||||
|
|
||||||
local GroupInside = GROUP:FindByName( "Test Inside Polygon" )
|
local GroupInside = GROUP:FindByName( "Test Inside Polygon" )
|
||||||
local GroupOutside = GROUP:FindByName( "Test Outside Polygon" )
|
local GroupOutside = GROUP:FindByName( "Test Outside Polygon" )
|
||||||
|
|||||||
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
Include.File( "Zone" )
|
|
||||||
Include.File( "Group" )
|
|
||||||
Include.File( "Scheduler" )
|
|
||||||
|
|
||||||
local GroupInside = GROUP:FindByName( "Test Inside Polygon" )
|
local GroupInside = GROUP:FindByName( "Test Inside Polygon" )
|
||||||
local GroupOutside = GROUP:FindByName( "Test Outside Polygon" )
|
local GroupOutside = GROUP:FindByName( "Test Outside Polygon" )
|
||||||
|
|||||||
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
Include.File( "Zone" )
|
|
||||||
Include.File( "Group" )
|
|
||||||
Include.File( "Scheduler" )
|
|
||||||
|
|
||||||
local GroupInside = GROUP:FindByName( "Test Inside Polygon" )
|
local GroupInside = GROUP:FindByName( "Test Inside Polygon" )
|
||||||
local GroupOutside = GROUP:FindByName( "Test Outside Polygon" )
|
local GroupOutside = GROUP:FindByName( "Test Outside Polygon" )
|
||||||
|
|||||||
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
Include.File( "Zone" )
|
|
||||||
Include.File( "Group" )
|
|
||||||
Include.File( "Scheduler" )
|
|
||||||
|
|
||||||
local GroupInside = GROUP:FindByName( "Test Inside Polygon" )
|
local GroupInside = GROUP:FindByName( "Test Inside Polygon" )
|
||||||
local GroupOutside = GROUP:FindByName( "Test Outside Polygon" )
|
local GroupOutside = GROUP:FindByName( "Test Outside Polygon" )
|
||||||
|
|||||||
Binary file not shown.
@ -71,16 +71,25 @@
|
|||||||
<div id="content">
|
<div id="content">
|
||||||
<h1>Module <code>Message</code></h1>
|
<h1>Module <code>Message</code></h1>
|
||||||
|
|
||||||
<p>Message System to display Messages for Clients and Coalitions or All.</p>
|
<p>This module contains the MESSAGE class.</p>
|
||||||
|
|
||||||
|
|
||||||
<p>Messages are grouped on the display panel per Category to improve readability for the players.
|
|
||||||
|
<h1>1) <a href="Message.html##(MESSAGE)">Message#MESSAGE</a> class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
|
||||||
|
<p>Message System to display Messages to Clients, Coalitions or All.
|
||||||
Messages are shown on the display panel for an amount of seconds, and will then disappear.
|
Messages are shown on the display panel for an amount of seconds, and will then disappear.
|
||||||
Messages are identified by an ID. The messages with the same ID belonging to the same category will be overwritten if they were still being displayed on the display panel.
|
Messages can contain a category which is indicating the category of the message.</p>
|
||||||
Messages are created with MESSAGE:<a href="New.html">New</a>().
|
|
||||||
Messages are sent to Clients with MESSAGE:<a href="ToClient.html">ToClient</a>().
|
<h2>1.1) MESSAGE construction methods</h2>
|
||||||
Messages are sent to Coalitions with MESSAGE:<a href="ToCoalition.html">ToCoalition</a>().
|
<p>Messages are created with MESSAGE:<a href="New.html">New</a>. Note that when the MESSAGE object is created, no message is sent yet.
|
||||||
Messages are sent to All Players with MESSAGE:<a href="ToAll.html">ToAll</a>().</p>
|
To send messages, you need to use the To functions.</p>
|
||||||
|
|
||||||
|
<h2>1.2) Send messages with MESSAGE To methods</h2>
|
||||||
|
<p>Messages are sent to:
|
||||||
|
* Clients with MESSAGE:<a href="ToClient.html">ToClient</a>().
|
||||||
|
* Coalitions with MESSAGE:<a href="ToCoalition.html">ToCoalition</a>().
|
||||||
|
* All Players with MESSAGE:<a href="ToAll.html">ToAll</a>().
|
||||||
|
</p>
|
||||||
|
|
||||||
<h2>Global(s)</h2>
|
<h2>Global(s)</h2>
|
||||||
<table class="function_list">
|
<table class="function_list">
|
||||||
@ -88,12 +97,6 @@ Messages are sent to All Players with MESSAGE:<a href="ToAll.html">ToAll</a>().<
|
|||||||
<td class="name" nowrap="nowrap"><a href="#MESSAGE">MESSAGE</a></td>
|
<td class="name" nowrap="nowrap"><a href="#MESSAGE">MESSAGE</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap="nowrap"><a href="#MESSAGEQUEUE">MESSAGEQUEUE</a></td>
|
|
||||||
<td class="summary">
|
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -118,7 +121,7 @@ Messages are sent to All Players with MESSAGE:<a href="ToAll.html">ToAll</a>().<
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap="nowrap"><a href="##(MESSAGE).New">MESSAGE:New(MessageText, MessageCategory, MessageDuration, MessageID)</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(MESSAGE).New">MESSAGE:New(MessageText, MessageDuration, MessageCategory)</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
<p>Creates a new MESSAGE object.</p>
|
<p>Creates a new MESSAGE object.</p>
|
||||||
</td>
|
</td>
|
||||||
@ -151,34 +154,6 @@ Messages are sent to All Players with MESSAGE:<a href="ToAll.html">ToAll</a>().<
|
|||||||
<td class="name" nowrap="nowrap"><a href="##(MESSAGE).ToRed">MESSAGE:ToRed()</a></td>
|
<td class="name" nowrap="nowrap"><a href="##(MESSAGE).ToRed">MESSAGE:ToRed()</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
<p>Sends a MESSAGE to the Red Coalition. </p>
|
<p>Sends a MESSAGE to the Red Coalition. </p>
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<h2><a id="#(MESSAGEQUEUE)">Type <code>MESSAGEQUEUE</code></a></h2>
|
|
||||||
<table class="function_list">
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap="nowrap"><a href="##(MESSAGEQUEUE).ClientGroups">MESSAGEQUEUE.ClientGroups</a></td>
|
|
||||||
<td class="summary">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap="nowrap"><a href="##(MESSAGEQUEUE).CoalitionSides">MESSAGEQUEUE.CoalitionSides</a></td>
|
|
||||||
<td class="summary">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap="nowrap"><a href="##(MESSAGEQUEUE).New">MESSAGEQUEUE:New(RefreshInterval)</a></td>
|
|
||||||
<td class="summary">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="name" nowrap="nowrap"><a href="##(MESSAGEQUEUE)._DisplayMessages">MESSAGEQUEUE:_DisplayMessages()</a></td>
|
|
||||||
<td class="summary">
|
|
||||||
<p>This function is called automatically by the MESSAGEQUEUE scheduler.</p>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -196,20 +171,6 @@ Messages are sent to All Players with MESSAGE:<a href="ToAll.html">ToAll</a>().<
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
|
|
||||||
<em><a href="##(MESSAGEQUEUE)">#MESSAGEQUEUE</a></em>
|
|
||||||
<a id="MESSAGEQUEUE" >
|
|
||||||
<strong>MESSAGEQUEUE</strong>
|
|
||||||
</a>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<h2><a id="#(Message)" >Type <code>Message</code></a></h2>
|
<h2><a id="#(Message)" >Type <code>Message</code></a></h2>
|
||||||
@ -265,7 +226,7 @@ Messages are sent to All Players with MESSAGE:<a href="ToAll.html">ToAll</a>().<
|
|||||||
<dt>
|
<dt>
|
||||||
|
|
||||||
<a id="#(MESSAGE).New" >
|
<a id="#(MESSAGE).New" >
|
||||||
<strong>MESSAGE:New(MessageText, MessageCategory, MessageDuration, MessageID)</strong>
|
<strong>MESSAGE:New(MessageText, MessageDuration, MessageCategory)</strong>
|
||||||
</a>
|
</a>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
@ -285,20 +246,14 @@ is the text of the Message.</p>
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
|
||||||
<p><code><em>#string MessageCategory </em></code>:
|
|
||||||
is a string expressing the Category of the Message. Messages are grouped on the display panel per Category to improve readability.</p>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
|
|
||||||
<p><code><em>#number MessageDuration </em></code>:
|
<p><code><em>#number MessageDuration </em></code>:
|
||||||
is a number in seconds of how long the MESSAGE should be shown on the display panel.</p>
|
is a number in seconds of how long the MESSAGE should be shown on the display panel.</p>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
|
||||||
<p><code><em>#string MessageID </em></code>:
|
<p><code><em>#string MessageCategory </em></code>:
|
||||||
is a string expressing the ID of the Message.</p>
|
(optional) is a string expressing the "category" of the Message. The category will be shown as the first text in the message followed by a ": ".</p>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -313,10 +268,10 @@ is a string expressing the ID of the Message.</p>
|
|||||||
-- MessageRED is meant to be sent to the RED players only, for 10 seconds, and is classified as "End of Mission", with ID "Win".
|
-- MessageRED is meant to be sent to the RED players only, for 10 seconds, and is classified as "End of Mission", with ID "Win".
|
||||||
-- MessageClient1 is meant to be sent to a Client, for 25 seconds, and is classified as "Score", with ID "Score".
|
-- MessageClient1 is meant to be sent to a Client, for 25 seconds, and is classified as "Score", with ID "Score".
|
||||||
-- MessageClient1 is meant to be sent to a Client, for 25 seconds, and is classified as "Score", with ID "Score".
|
-- MessageClient1 is meant to be sent to a Client, for 25 seconds, and is classified as "Score", with ID "Score".
|
||||||
MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25, "Win" )
|
MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", 25, "End of Mission" )
|
||||||
MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" )
|
MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", 25, "Penalty" )
|
||||||
MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25, "Score" )
|
MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", 25, "Score" )
|
||||||
MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25, "Score" )</code></pre>
|
MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", 25, "Score")</code></pre>
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
@ -481,74 +436,6 @@ or
|
|||||||
MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" )
|
MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" )
|
||||||
MessageRED:ToRed()</code></pre>
|
MessageRED:ToRed()</code></pre>
|
||||||
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<h2><a id="#(MESSAGEQUEUE)" >Type <code>MESSAGEQUEUE</code></a></h2>
|
|
||||||
|
|
||||||
<p>The MESSAGEQUEUE class</p>
|
|
||||||
|
|
||||||
<h3>Field(s)</h3>
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
|
|
||||||
<em></em>
|
|
||||||
<a id="#(MESSAGEQUEUE).ClientGroups" >
|
|
||||||
<strong>MESSAGEQUEUE.ClientGroups</strong>
|
|
||||||
</a>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
|
|
||||||
<em></em>
|
|
||||||
<a id="#(MESSAGEQUEUE).CoalitionSides" >
|
|
||||||
<strong>MESSAGEQUEUE.CoalitionSides</strong>
|
|
||||||
</a>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
|
|
||||||
<a id="#(MESSAGEQUEUE).New" >
|
|
||||||
<strong>MESSAGEQUEUE:New(RefreshInterval)</strong>
|
|
||||||
</a>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Parameter</h3>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
|
|
||||||
<p><code><em> RefreshInterval </em></code>: </p>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<dl class="function">
|
|
||||||
<dt>
|
|
||||||
|
|
||||||
<a id="#(MESSAGEQUEUE)._DisplayMessages" >
|
|
||||||
<strong>MESSAGEQUEUE:_DisplayMessages()</strong>
|
|
||||||
</a>
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
|
|
||||||
<p>This function is called automatically by the MESSAGEQUEUE scheduler.</p>
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
|||||||
@ -777,8 +777,8 @@ The index of the group to return.</p>
|
|||||||
</ul>
|
</ul>
|
||||||
<h3>Return value</h3>
|
<h3>Return value</h3>
|
||||||
|
|
||||||
<p><em><a href="Group.html##(GROUP)">Group#GROUP</a>:</em></p>
|
<p><em><a href="Group.html##(GROUP)">Group#GROUP</a>:</em>
|
||||||
|
self</p>
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|||||||
@ -249,7 +249,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="name" nowrap="nowrap"><a href="Message.html">Message</a></td>
|
<td class="name" nowrap="nowrap"><a href="Message.html">Message</a></td>
|
||||||
<td class="summary">
|
<td class="summary">
|
||||||
<p>Message System to display Messages for Clients and Coalitions or All.</p>
|
<p>This module contains the MESSAGE class.</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user