mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Revert "Embedded"
This reverts commit 6a06632a5e9aeba3af8b3eb96e74560f3cfae979.
This commit is contained in:
parent
6a06632a5e
commit
62d04113d3
@ -15340,7 +15340,6 @@ end
|
||||
-- * @{#MISSILETRAINER.InitBearingOnOff}: Sets by default the display of bearing information of missiles ON of OFF.
|
||||
-- * @{#MISSILETRAINER.InitMenusOnOff}: Allows to configure the options through the radio menu.
|
||||
--
|
||||
--
|
||||
-- @module MissileTrainer
|
||||
-- @author FlightControl
|
||||
|
||||
@ -15358,9 +15357,8 @@ MISSILETRAINER = {
|
||||
-- When a missile is fired a SCHEDULER is set off that follows the missile. When near a certain a client player, the missile will be destroyed.
|
||||
-- @param #MISSILETRAINER
|
||||
-- @param #number Distance The distance in meters when a tracked missile needs to be destroyed when close to a player.
|
||||
-- @param #string MissileTrainerBriefing (Optional) Parameter to provide players with a briefing text for the training.
|
||||
-- @return #MISSILETRAINER
|
||||
function MISSILETRAINER:New( Distance, MissileTrainerBriefing )
|
||||
function MISSILETRAINER:New( Distance )
|
||||
local self = BASE:Inherit( self, BASE:New() )
|
||||
self:F( Distance )
|
||||
|
||||
@ -15371,10 +15369,6 @@ function MISSILETRAINER:New( Distance, MissileTrainerBriefing )
|
||||
self.MessageLastTime = timer.getTime()
|
||||
|
||||
self.Distance = Distance / 1000
|
||||
|
||||
if MissileTrainerBriefing then
|
||||
self.MissileTrainerBriefing = MissileTrainerBriefing
|
||||
end
|
||||
|
||||
_EVENTDISPATCHER:OnShot( self._EventShot, self )
|
||||
|
||||
@ -15386,14 +15380,14 @@ function MISSILETRAINER:New( Distance, MissileTrainerBriefing )
|
||||
|
||||
local function _Alive( Client )
|
||||
|
||||
if self.MissileTrainerBriefing then
|
||||
Client:Message( self.MissileTrainerBriefing, 15, "HELLO WORLD", "Trainer" )
|
||||
end
|
||||
Client:Message( "Hello trainee, welcome to the Missile Trainer.\nGood luck!", 15, "HELLO WORLD", "Trainer" )
|
||||
|
||||
|
||||
|
||||
if self.MenusOnOff == true then
|
||||
Client:Message( "Missile Trainer: Use the 'Radio Menu' -> 'Other (F10)' -> 'Missile Trainer' menu options to change the Missile Trainer settings (for all players).", 15, "MENU", "Trainer" )
|
||||
Client:Message( "Use the 'Radio Menu' -> 'Other (F10)' -> 'Missile Trainer' menu options to change the Missile Trainer settings (for all players).", 15, "MENU", "Trainer" )
|
||||
|
||||
Client.MainMenu = MENU_CLIENT:New( Client, "Missile Trainer", nil )
|
||||
Client.MainMenu = MENU_CLIENT:New( Client, "Missile Trainer", nil ) -- Menu#MENU_CLIENT
|
||||
|
||||
Client.MenuMessages = MENU_CLIENT:New( Client, "Messages", Client.MainMenu )
|
||||
Client.MenuOn = MENU_CLIENT_COMMAND:New( Client, "Messages On", Client.MenuMessages, self._MenuMessages, { MenuSelf = self, MessagesOnOff = true } )
|
||||
|
||||
@ -82,9 +82,8 @@ MISSILETRAINER = {
|
||||
-- When a missile is fired a SCHEDULER is set off that follows the missile. When near a certain a client player, the missile will be destroyed.
|
||||
-- @param #MISSILETRAINER
|
||||
-- @param #number Distance The distance in meters when a tracked missile needs to be destroyed when close to a player.
|
||||
-- @param #string MissileTrainerBriefing (Optional) Parameter to provide players with a briefing text for the training.
|
||||
-- @return #MISSILETRAINER
|
||||
function MISSILETRAINER:New( Distance, MissileTrainerBriefing )
|
||||
function MISSILETRAINER:New( Distance )
|
||||
local self = BASE:Inherit( self, BASE:New() )
|
||||
self:F( Distance )
|
||||
|
||||
@ -95,10 +94,6 @@ function MISSILETRAINER:New( Distance, MissileTrainerBriefing )
|
||||
self.MessageLastTime = timer.getTime()
|
||||
|
||||
self.Distance = Distance / 1000
|
||||
|
||||
if MissileTrainerBriefing then
|
||||
self.MissileTrainerBriefing = MissileTrainerBriefing
|
||||
end
|
||||
|
||||
_EVENTDISPATCHER:OnShot( self._EventShot, self )
|
||||
|
||||
@ -110,14 +105,14 @@ function MISSILETRAINER:New( Distance, MissileTrainerBriefing )
|
||||
|
||||
local function _Alive( Client )
|
||||
|
||||
if self.MissileTrainerBriefing then
|
||||
Client:Message( self.MissileTrainerBriefing, 15, "HELLO WORLD", "Trainer" )
|
||||
end
|
||||
Client:Message( "Hello trainee, welcome to the Missile Trainer.\nGood luck!", 15, "HELLO WORLD", "Trainer" )
|
||||
|
||||
|
||||
|
||||
if self.MenusOnOff == true then
|
||||
Client:Message( "Missile Trainer: Use the 'Radio Menu' -> 'Other (F10)' -> 'Missile Trainer' menu options to change the Missile Trainer settings (for all players).", 15, "MENU", "Trainer" )
|
||||
Client:Message( "Use the 'Radio Menu' -> 'Other (F10)' -> 'Missile Trainer' menu options to change the Missile Trainer settings (for all players).", 15, "MENU", "Trainer" )
|
||||
|
||||
Client.MainMenu = MENU_CLIENT:New( Client, "Missile Trainer", nil )
|
||||
Client.MainMenu = MENU_CLIENT:New( Client, "Missile Trainer", nil ) -- Menu#MENU_CLIENT
|
||||
|
||||
Client.MenuMessages = MENU_CLIENT:New( Client, "Messages", Client.MainMenu )
|
||||
Client.MenuOn = MENU_CLIENT_COMMAND:New( Client, "Messages On", Client.MenuMessages, self._MenuMessages, { MenuSelf = self, MessagesOnOff = true } )
|
||||
|
||||
@ -6,15 +6,15 @@ Include.File("MissileTrainer")
|
||||
|
||||
-- This is an example of a global
|
||||
local Trainer = MISSILETRAINER
|
||||
:New( 200, "Trainer: Welcome to the missile training, trainee! Missiles will be fired at you. Try to evade them. Good luck!" )
|
||||
:New( 200 )
|
||||
:InitMessagesOnOff(true)
|
||||
:InitAlertsToAll(true)
|
||||
:InitAlertsToAll(true) -- I'll correct it below ...
|
||||
:InitAlertsHitsOnOff(true)
|
||||
:InitAlertsLaunchesOnOff(false) -- I'll put it on below ...
|
||||
:InitAlertsLaunchesOnOff(false)
|
||||
:InitBearingOnOff(true)
|
||||
:InitRangeOnOff(true)
|
||||
:InitTrackingOnOff(true)
|
||||
:InitTrackingToAll(true)
|
||||
:InitMenusOnOff(false)
|
||||
|
||||
Trainer:InitAlertsToAll(true) -- Now alerts are also on
|
||||
--Trainer:InitAlertsToAll(true) -- Now alerts are also on
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user