This repository has been archived on 2024-05-14. You can view files and clone it, but cannot push or open issues or pull requests.
awesome-xlabs/clients/s1x/data/ui_scripts/patches/__init__.lua
2023-08-13 17:58:51 -04:00

20 lines
581 B
Lua

if (game:issingleplayer()) then
return
end
function GetGameModeName()
return Engine.Localize(Engine.TableLookup(GameTypesTable.File, GameTypesTable.Cols.Ref, GameX.GetGameMode(), GameTypesTable.Cols.Name))
end
-- Allow players to change teams in game.
function CanChangeTeam()
local f9_local0 = GameX.GetGameMode()
local f9_local1
if f9_local0 ~= "aliens" and Engine.TableLookup( GameTypesTable.File, GameTypesTable.Cols.Ref, f9_local0, GameTypesTable.Cols.TeamChoice ) == "1" then
f9_local1 = not MLG.IsMLGSpectator()
else
f9_local1 = false
end
return f9_local1
end