Initial commit

This commit is contained in:
2026-03-08 14:18:29 -05:00
parent c360c027e1
commit 77490ae8df
18 changed files with 2037 additions and 1 deletions

View File

@@ -0,0 +1,105 @@
require("FactionStruct")
-- ==================================================
-- 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)
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)
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)
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)
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)
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()
-- ==================================================
-- Define UI Constants
-- ==================================================
---GUI Component to display game time.
UI_GameTime = "s_select_41"
---GUI Components to display Team 1 credits.
UI_IconT1 = "s_health_42"
UI_CreditsT1 = "s_health_41"
---GUI Component to display Team 2 credits.
UI_IconT2 = "s_shield_42"
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"
---Gets the specator marker for the game mode.
---@param gameMode string Game mode.
---@return string|nil
function GetSpectatorMarkerName(gameMode)
if StringCompare(gameMode, "Space") then
return "Spectator_Reveal_Marker"
elseif StringCompare(gameMode, "Land") then
return "Spectator_Reveal_Marker_Land"
end
return nil
end