Files
2026-03-20 09:49:44 -05:00

156 lines
5.4 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_Infantry_Squad"
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 = "Imperial_Stormtrooper_Squad"
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_Squad"
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_Squad"
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_Soldier_Squad"
PirateFaction.SpaceStartUnitName = "Pirate_Fighter_Squadron"
factions[PirateFaction.Name] = PirateFaction
return factions
end
---Constant Global of all Tactical Factions
---@type FactionStruct[]
Factions = DefineFactions()
---Faction Title Rank table. Rebel at 2, Empire at 3
---@type table
FactionTitleTable = {
{ 145000, "TEXT_REBEL_TITLE19", "TEXT_EMPIRE_TITLE19" },
{ 125000, "TEXT_REBEL_TITLE18", "TEXT_EMPIRE_TITLE18" },
{ 115000, "TEXT_REBEL_TITLE17", "TEXT_EMPIRE_TITLE17" },
{ 100000, "TEXT_REBEL_TITLE16", "TEXT_EMPIRE_TITLE16" },
{ 90000, "TEXT_REBEL_TITLE15", "TEXT_EMPIRE_TITLE15" },
{ 85000, "TEXT_REBEL_TITLE14", "TEXT_EMPIRE_TITLE14" },
{ 80000, "TEXT_REBEL_TITLE13", "TEXT_EMPIRE_TITLE13" },
{ 75000, "TEXT_REBEL_TITLE12", "TEXT_EMPIRE_TITLE12" },
{ 70000, "TEXT_REBEL_TITLE11", "TEXT_EMPIRE_TITLE11" },
{ 60000, "TEXT_REBEL_TITLE10", "TEXT_EMPIRE_TITLE10" },
{ 55000, "TEXT_REBEL_TITLE9", "TEXT_EMPIRE_TITLE9" },
{ 50000, "TEXT_REBEL_TITLE8", "TEXT_EMPIRE_TITLE8" },
{ 45000, "TEXT_REBEL_TITLE7", "TEXT_EMPIRE_TITLE7" },
{ 40000, "TEXT_REBEL_TITLE6", "TEXT_EMPIRE_TITLE6" },
{ 25000, "TEXT_REBEL_TITLE5", "TEXT_EMPIRE_TITLE5" },
{ 20000, "TEXT_REBEL_TITLE4", "TEXT_EMPIRE_TITLE4" },
{ 15000, "TEXT_REBEL_TITLE3", "TEXT_EMPIRE_TITLE3" },
{ 10000, "TEXT_REBEL_TITLE2", "TEXT_EMPIRE_TITLE2" },
{ 5000, "TEXT_REBEL_TITLE1", "TEXT_EMPIRE_TITLE1" },
{ 0, "TEXT_REBEL_TITLE0", "TEXT_EMPIRE_TITLE0" }
}
-- ==================================================
-- 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"