134 lines
4.2 KiB
Lua
134 lines
4.2 KiB
Lua
require("GameManager/FactionStruct")
|
|
require("GameManager/GUIManager")
|
|
require("GameManager/TutorialTextManager")
|
|
|
|
-- ==================================================
|
|
-- Define Manager constants
|
|
-- ==================================================
|
|
|
|
---The singleton GUI Manager.
|
|
---@type GUIManager
|
|
GUIManager = GUIManager:New()
|
|
|
|
---The singleton Tutorial Text Manager.
|
|
---@type TutorialTextManager
|
|
TextManager = TutorialTextManager:New()
|
|
|
|
---The local player.
|
|
---@type PlayerObject|nil
|
|
LocalPlayer = nil
|
|
|
|
---Frag Index of Kill Stat Tables
|
|
FragIndex = 1
|
|
|
|
---Death Index of Kill Stat Tables
|
|
DeathIndex = 2
|
|
|
|
-- ==================================================
|
|
-- Define Faction constants
|
|
-- ==================================================
|
|
|
|
---Defines tactical factions.
|
|
---@return FactionStruct[]
|
|
function DefineFactions()
|
|
---@type FactionStruct[]
|
|
local factions = {}
|
|
|
|
---Rebel Faction
|
|
---@type FactionStruct
|
|
local RebelFaction = FactionStruct:New("REBEL")
|
|
|
|
RebelFaction.DisplayName = "Rebellion"
|
|
RebelFaction.Color = ColorStruct:New(1, 0, 0, 1)
|
|
RebelFaction.Icon = "I_ICON_SPECTATOR_REBEL.TGA"
|
|
RebelFaction.LandStartUnitName = "Rebel_Trooper_Team"
|
|
RebelFaction.SpaceStartUnitName = "Rebel_X-Wing_Squadron"
|
|
factions[RebelFaction.Name] = RebelFaction
|
|
|
|
---Empire Faction
|
|
---@type FactionStruct
|
|
local EmpireFaction = FactionStruct:New("EMPIRE")
|
|
|
|
EmpireFaction.DisplayName = "Empire"
|
|
EmpireFaction.Color = ColorStruct:New(0, 1, 1, 1)
|
|
EmpireFaction.Icon = "I_ICON_SPECTATOR_EMPIRE.TGA"
|
|
EmpireFaction.LandStartUnitName = "Stormtrooper_Team"
|
|
EmpireFaction.SpaceStartUnitName = "TIE_Interceptor_Squadron_Container"
|
|
factions[EmpireFaction.Name] = EmpireFaction
|
|
|
|
---Underworld Faction
|
|
---@type FactionStruct
|
|
local UnderworldFaction = FactionStruct:New("UNDERWORLD")
|
|
|
|
UnderworldFaction.DisplayName = "Zann Consortium"
|
|
UnderworldFaction.Color = ColorStruct:New(1, 1, 0, 1)
|
|
UnderworldFaction.Icon = "I_ICON_SPECTATOR_UNDERWORLD.TGA"
|
|
UnderworldFaction.LandStartUnitName = "Underworld_Merc_Team"
|
|
UnderworldFaction.SpaceStartUnitName = "StarViper_Team"
|
|
factions[UnderworldFaction.Name] = UnderworldFaction
|
|
|
|
---Hutts Faction
|
|
local HuttFaction = FactionStruct:New("HUTTS")
|
|
|
|
HuttFaction.DisplayName = "Hutt Cartel"
|
|
HuttFaction.Color = ColorStruct:New(1, 0, 1, 1)
|
|
HuttFaction.Icon = "I_ICON_SPECTATOR_HUTTS.TGA"
|
|
HuttFaction.LandStartUnitName = "Hutt_Soldier_Team"
|
|
HuttFaction.SpaceStartUnitName = "V_Wing_Squadron_Container"
|
|
factions[HuttFaction.Name] = HuttFaction
|
|
|
|
---Pirates Faction
|
|
local PirateFaction = FactionStruct:New("PIRATES")
|
|
|
|
PirateFaction.DisplayName = "Pirates"
|
|
PirateFaction.Color = ColorStruct:New(0, 1, 0, 1)
|
|
PirateFaction.Icon = "I_ICON_SPECTATOR_PIRATES.TGA"
|
|
PirateFaction.LandStartUnitName = "Pirate_Trooper_Team"
|
|
PirateFaction.SpaceStartUnitName = "Pirate_Fighter_Squadron"
|
|
factions[PirateFaction.Name] = PirateFaction
|
|
|
|
return factions
|
|
end
|
|
|
|
---Constant Global of all Tactical Factions
|
|
---@type FactionStruct[]
|
|
Factions = DefineFactions()
|
|
|
|
-- ==================================================
|
|
-- Define Spectator Constants
|
|
-- ==================================================
|
|
|
|
---Space marker used to identify the spectator player.
|
|
Spectator_Marker_Space = "Spectator_Reveal_Marker"
|
|
|
|
---Land marker used to identify the spectator player.
|
|
Spectator_Marker_Land = "Spectator_Reveal_Marker_Land"
|
|
|
|
-- ==================================================
|
|
-- Define UI Constants
|
|
-- ==================================================
|
|
|
|
---GUI Component to display game time.
|
|
UI_GameTime = "s_select_41"
|
|
|
|
---GUI Component to display Team 1 faction icon.
|
|
UI_IconT1 = "s_health_42"
|
|
|
|
--- GUI Component to display Team 1 credits text.
|
|
UI_CreditsT1 = "s_health_41"
|
|
|
|
---GUI Component to display Team 2 faction icon.
|
|
UI_IconT2 = "s_shield_42"
|
|
|
|
---GUI Component to display Team 2 credits text.
|
|
UI_CreditsT2 = "s_shield_41"
|
|
|
|
---GUI Component to enable/disable population.
|
|
UI_PlanetaryPop = "text_planetary_pop"
|
|
|
|
---GUI Component to enable/disable tactical credits.
|
|
UI_CreditsTactical = "text_credits_tactical"
|
|
|
|
---GUI Component to enable/disable tactical tech.
|
|
UI_TechTactical = "text_tactical_tech"
|