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,26 @@
---@class SpectatorStruct
---@field Id integer Player ID.
---@field TeamId integer Team ID.
---@field Name string Player name.
---@field Faction string Faction name.
---@field PlayerWrapper table The FoC PlayerWrapper object.
SpectatorStruct = {}
SpectatorStruct.__index = SpectatorStruct
---Constructs a new Spectator object.
---@param wrapper table FoC PlayerWrapper
function SpectatorStruct:New(wrapper)
local self = setmetatable({}, SpectatorStruct)
self.Id = wrapper.Get_ID()
self.TeamId = wrapper.Get_Team()
self.Name = wrapper.Get_Name()
self.Faction = wrapper.Get_Faction_Name()
self.PlayerWrapper = wrapper
return self
end
function SpectatorStruct:Debug()
return string.format("Spectator %s (%d) on Faction %s, Team %d", self.Name, self.Id, self.Faction, self.TeamId)
end