Barotrauma Client Doc
Barotrauma.LuaGame Class Reference

Public Member Functions

void AddPriorityItem (Item item)
 
void RemovePriorityItem (Item item)
 
void ClearPriorityItem ()
 
void AddPriorityCharacter (Character character)
 
void RemovePriorityCharacter (Character character)
 
void ClearPriorityCharacter ()
 
 LuaGame ()
 
void OverrideTraitors (bool o)
 
void OverrideRespawnSub (bool o)
 
void AllowWifiChat (bool o)
 
void OverrideSignalRadio (bool o)
 
void DisableSpamFilter (bool o)
 
void DisableDisconnectCharacter (bool o)
 
void EnableControlHusk (bool o)
 
bool IsCustomCommandPermitted (Identifier command)
 
void RemoveCommand (string name)
 
void AddCommand (string name, string help, LuaCsAction onExecute, LuaCsFunc getValidArgs=null, bool isCheat=false)
 
void AssignOnExecute (string names, object onExecute)
 
void SaveGame (string path)
 
void LoadGame (string path)
 
void Stop ()
 

Static Public Member Functions

static void Explode (Vector2 pos, float range=100, float force=30, float damage=30, float structureDamage=30, float itemDamage=30, float empStrength=0, float ballastFloraStrength=0)
 
static string SpawnItem (string name, Vector2 pos, bool inventory=false, Character character=null)
 
static ContentPackage[] GetEnabledContentPackages ()
 
static ItemPrefab GetItemPrefab (string itemNameOrId)
 
static Submarine GetRespawnSub ()
 
static Items.Components.Steering GetSubmarineSteering (Submarine sub)
 
static WifiComponent GetWifiComponent (Item item)
 
static LightComponent GetLightComponent (Item item)
 
static CustomInterface GetCustomInterface (Item item)
 
static Fabricator GetFabricatorComponent (Item item)
 
static Holdable GetHoldableComponent (Item item)
 
static void ExecuteCommand (string command)
 
static Signal CreateSignal (string value, int stepsTaken=1, Character sender=null, Item source=null, float power=0, float strength=1)
 

Public Attributes

bool? ForceVoice = null
 
bool? ForceLocalVoice = null
 
DynValue Settings
 
bool allowWifiChat = false
 
bool overrideTraitors = false
 
bool overrideRespawnSub = false
 
bool overrideSignalRadio = false
 
bool disableSpamFilter = false
 
bool disableDisconnectCharacter = false
 
bool enableControlHusk = false
 
HashSet< ItemUpdatePriorityItems = new HashSet<Item>()
 
HashSet< CharacterUpdatePriorityCharacters = new HashSet<Character>()
 

Properties

bool IsSingleplayer [get]
 
bool IsMultiplayer [get]
 
string SaveFolder [get]
 
GameClient Client [get]
 
bool Paused [get]
 
byte SessionId [get]
 
byte MyID [get]
 
ChatMode ActiveChatMode [get]
 
ChatBox ChatBox [get]
 
Sounds.SoundManager SoundManager [get]
 
Lights.LightManager LightManager [get]
 
SubEditorScreen SubEditorScreen [get]
 
MainMenuScreen MainMenuScreen [get]
 
Particles.ParticleManager ParticleManager [get]
 
bool IsSubEditor [get]
 
ServerSettings ServerSettings [get]
 
RespawnManager RespawnManager [get]
 
int MapEntityUpdateInterval [get, set]
 
int GapUpdateInterval [get, set]
 
int PoweredUpdateInterval [get, set]
 
int CharacterUpdateInterval [get, set]
 
bool? RoundStarted [get]
 
GameSession GameSession [get]
 
NetLobbyScreen NetLobbyScreen [get]
 
GameScreen GameScreen [get]
 
World World [get]
 
ClientPeer Peer [get]
 
IEnumerable< DebugConsole.CommandLuaAddedCommand [get]
 
List< DebugConsole.CommandCommands [get]
 

Detailed Description

Definition at line 13 of file LuaGame.cs.

Constructor & Destructor Documentation

◆ LuaGame()

Barotrauma.LuaGame.LuaGame ( )

Definition at line 272 of file LuaGame.cs.

Member Function Documentation

◆ AddCommand()

void Barotrauma.LuaGame.AddCommand ( string  name,
string  help,
LuaCsAction  onExecute,
LuaCsFunc  getValidArgs = null,
bool  isCheat = false 
)

Definition at line 448 of file LuaGame.cs.

◆ AddPriorityCharacter()

void Barotrauma.LuaGame.AddPriorityCharacter ( Character  character)

Definition at line 193 of file LuaGame.cs.

◆ AddPriorityItem()

void Barotrauma.LuaGame.AddPriorityItem ( Item  item)

Definition at line 178 of file LuaGame.cs.

◆ AllowWifiChat()

void Barotrauma.LuaGame.AllowWifiChat ( bool  o)

Definition at line 288 of file LuaGame.cs.

◆ AssignOnExecute()

void Barotrauma.LuaGame.AssignOnExecute ( string  names,
object  onExecute 
)

◆ ClearPriorityCharacter()

void Barotrauma.LuaGame.ClearPriorityCharacter ( )

Definition at line 203 of file LuaGame.cs.

◆ ClearPriorityItem()

void Barotrauma.LuaGame.ClearPriorityItem ( )

Definition at line 188 of file LuaGame.cs.

◆ CreateSignal()

static Signal Barotrauma.LuaGame.CreateSignal ( string  value,
int  stepsTaken = 1,
Character  sender = null,
Item  source = null,
float  power = 0,
float  strength = 1 
)
static

Definition at line 404 of file LuaGame.cs.

◆ DisableDisconnectCharacter()

void Barotrauma.LuaGame.DisableDisconnectCharacter ( bool  o)

Definition at line 303 of file LuaGame.cs.

◆ DisableSpamFilter()

void Barotrauma.LuaGame.DisableSpamFilter ( bool  o)

Definition at line 298 of file LuaGame.cs.

◆ EnableControlHusk()

void Barotrauma.LuaGame.EnableControlHusk ( bool  o)

Definition at line 309 of file LuaGame.cs.

◆ ExecuteCommand()

static void Barotrauma.LuaGame.ExecuteCommand ( string  command)
static

Definition at line 399 of file LuaGame.cs.

◆ Explode()

static void Barotrauma.LuaGame.Explode ( Vector2  pos,
float  range = 100,
float  force = 30,
float  damage = 30,
float  structureDamage = 30,
float  itemDamage = 30,
float  empStrength = 0,
float  ballastFloraStrength = 0 
)
static

Definition at line 314 of file LuaGame.cs.

◆ GetCustomInterface()

static CustomInterface Barotrauma.LuaGame.GetCustomInterface ( Item  item)
static

Definition at line 381 of file LuaGame.cs.

◆ GetEnabledContentPackages()

static ContentPackage [] Barotrauma.LuaGame.GetEnabledContentPackages ( )
static

Definition at line 326 of file LuaGame.cs.

◆ GetFabricatorComponent()

static Fabricator Barotrauma.LuaGame.GetFabricatorComponent ( Item  item)
static

Definition at line 387 of file LuaGame.cs.

◆ GetHoldableComponent()

static Holdable Barotrauma.LuaGame.GetHoldableComponent ( Item  item)
static

Definition at line 393 of file LuaGame.cs.

◆ GetItemPrefab()

static ItemPrefab Barotrauma.LuaGame.GetItemPrefab ( string  itemNameOrId)
static

Definition at line 331 of file LuaGame.cs.

◆ GetLightComponent()

static LightComponent Barotrauma.LuaGame.GetLightComponent ( Item  item)
static

Definition at line 375 of file LuaGame.cs.

◆ GetRespawnSub()

static Submarine Barotrauma.LuaGame.GetRespawnSub ( )
static

Definition at line 340 of file LuaGame.cs.

◆ GetSubmarineSteering()

static Items.Components.Steering Barotrauma.LuaGame.GetSubmarineSteering ( Submarine  sub)
static

Definition at line 353 of file LuaGame.cs.

◆ GetWifiComponent()

static WifiComponent Barotrauma.LuaGame.GetWifiComponent ( Item  item)
static

Definition at line 369 of file LuaGame.cs.

◆ IsCustomCommandPermitted()

bool Barotrauma.LuaGame.IsCustomCommandPermitted ( Identifier  command)

Definition at line 412 of file LuaGame.cs.

◆ LoadGame()

void Barotrauma.LuaGame.LoadGame ( string  path)

Definition at line 476 of file LuaGame.cs.

◆ OverrideRespawnSub()

void Barotrauma.LuaGame.OverrideRespawnSub ( bool  o)

Definition at line 283 of file LuaGame.cs.

◆ OverrideSignalRadio()

void Barotrauma.LuaGame.OverrideSignalRadio ( bool  o)

Definition at line 293 of file LuaGame.cs.

◆ OverrideTraitors()

void Barotrauma.LuaGame.OverrideTraitors ( bool  o)

Definition at line 278 of file LuaGame.cs.

◆ RemoveCommand()

void Barotrauma.LuaGame.RemoveCommand ( string  name)

Definition at line 432 of file LuaGame.cs.

◆ RemovePriorityCharacter()

void Barotrauma.LuaGame.RemovePriorityCharacter ( Character  character)

Definition at line 198 of file LuaGame.cs.

◆ RemovePriorityItem()

void Barotrauma.LuaGame.RemovePriorityItem ( Item  item)

Definition at line 183 of file LuaGame.cs.

◆ SaveGame()

void Barotrauma.LuaGame.SaveGame ( string  path)

Definition at line 470 of file LuaGame.cs.

◆ SpawnItem()

static string Barotrauma.LuaGame.SpawnItem ( string  name,
Vector2  pos,
bool  inventory = false,
Character  character = null 
)
static

Definition at line 319 of file LuaGame.cs.

◆ Stop()

void Barotrauma.LuaGame.Stop ( )

Definition at line 533 of file LuaGame.cs.

Member Data Documentation

◆ allowWifiChat

bool Barotrauma.LuaGame.allowWifiChat = false

Definition at line 142 of file LuaGame.cs.

◆ disableDisconnectCharacter

bool Barotrauma.LuaGame.disableDisconnectCharacter = false

Definition at line 147 of file LuaGame.cs.

◆ disableSpamFilter

bool Barotrauma.LuaGame.disableSpamFilter = false

Definition at line 146 of file LuaGame.cs.

◆ enableControlHusk

bool Barotrauma.LuaGame.enableControlHusk = false

Definition at line 148 of file LuaGame.cs.

◆ ForceLocalVoice

bool? Barotrauma.LuaGame.ForceLocalVoice = null

Definition at line 138 of file LuaGame.cs.

◆ ForceVoice

bool? Barotrauma.LuaGame.ForceVoice = null

Definition at line 137 of file LuaGame.cs.

◆ overrideRespawnSub

bool Barotrauma.LuaGame.overrideRespawnSub = false

Definition at line 144 of file LuaGame.cs.

◆ overrideSignalRadio

bool Barotrauma.LuaGame.overrideSignalRadio = false

Definition at line 145 of file LuaGame.cs.

◆ overrideTraitors

bool Barotrauma.LuaGame.overrideTraitors = false

Definition at line 143 of file LuaGame.cs.

◆ Settings

DynValue Barotrauma.LuaGame.Settings

Definition at line 140 of file LuaGame.cs.

◆ UpdatePriorityCharacters

HashSet<Character> Barotrauma.LuaGame.UpdatePriorityCharacters = new HashSet<Character>()

Definition at line 176 of file LuaGame.cs.

◆ UpdatePriorityItems

HashSet<Item> Barotrauma.LuaGame.UpdatePriorityItems = new HashSet<Item>()

Definition at line 175 of file LuaGame.cs.

Property Documentation

◆ ActiveChatMode

ChatMode Barotrauma.LuaGame.ActiveChatMode
get

Definition at line 32 of file LuaGame.cs.

◆ CharacterUpdateInterval

int Barotrauma.LuaGame.CharacterUpdateInterval
getset

Definition at line 168 of file LuaGame.cs.

◆ ChatBox

ChatBox Barotrauma.LuaGame.ChatBox
get

Definition at line 34 of file LuaGame.cs.

◆ Client

GameClient Barotrauma.LuaGame.Client
get

Definition at line 20 of file LuaGame.cs.

◆ Commands

List<DebugConsole.Command> Barotrauma.LuaGame.Commands
get

Definition at line 466 of file LuaGame.cs.

◆ GameScreen

GameScreen Barotrauma.LuaGame.GameScreen
get

Definition at line 238 of file LuaGame.cs.

◆ GameSession

GameSession Barotrauma.LuaGame.GameSession
get

Definition at line 222 of file LuaGame.cs.

◆ GapUpdateInterval

int Barotrauma.LuaGame.GapUpdateInterval
getset

Definition at line 156 of file LuaGame.cs.

◆ IsMultiplayer

bool Barotrauma.LuaGame.IsMultiplayer
get

Definition at line 16 of file LuaGame.cs.

◆ IsSingleplayer

bool Barotrauma.LuaGame.IsSingleplayer
get

Definition at line 15 of file LuaGame.cs.

◆ IsSubEditor

bool Barotrauma.LuaGame.IsSubEditor
get

Definition at line 85 of file LuaGame.cs.

◆ LightManager

Lights.LightManager Barotrauma.LuaGame.LightManager
get

Definition at line 53 of file LuaGame.cs.

◆ LuaAddedCommand

IEnumerable<DebugConsole.Command> Barotrauma.LuaGame.LuaAddedCommand
get

Definition at line 410 of file LuaGame.cs.

◆ MainMenuScreen

MainMenuScreen Barotrauma.LuaGame.MainMenuScreen
get

Definition at line 69 of file LuaGame.cs.

◆ MapEntityUpdateInterval

int Barotrauma.LuaGame.MapEntityUpdateInterval
getset

Definition at line 150 of file LuaGame.cs.

◆ MyID

byte Barotrauma.LuaGame.MyID
get

Definition at line 30 of file LuaGame.cs.

◆ NetLobbyScreen

NetLobbyScreen Barotrauma.LuaGame.NetLobbyScreen
get

Definition at line 230 of file LuaGame.cs.

◆ ParticleManager

Particles.ParticleManager Barotrauma.LuaGame.ParticleManager
get

Definition at line 77 of file LuaGame.cs.

◆ Paused

bool Barotrauma.LuaGame.Paused
get

Definition at line 28 of file LuaGame.cs.

◆ Peer

ClientPeer Barotrauma.LuaGame.Peer
get

Definition at line 263 of file LuaGame.cs.

◆ PoweredUpdateInterval

int Barotrauma.LuaGame.PoweredUpdateInterval
getset

Definition at line 162 of file LuaGame.cs.

◆ RespawnManager

RespawnManager Barotrauma.LuaGame.RespawnManager
get

Definition at line 125 of file LuaGame.cs.

◆ RoundStarted

bool? Barotrauma.LuaGame.RoundStarted
get

Definition at line 208 of file LuaGame.cs.

◆ SaveFolder

string Barotrauma.LuaGame.SaveFolder
get

Definition at line 17 of file LuaGame.cs.

◆ ServerSettings

ServerSettings Barotrauma.LuaGame.ServerSettings
get

Definition at line 113 of file LuaGame.cs.

◆ SessionId

byte Barotrauma.LuaGame.SessionId
get

Definition at line 29 of file LuaGame.cs.

◆ SoundManager

Sounds.SoundManager Barotrauma.LuaGame.SoundManager
get

Definition at line 45 of file LuaGame.cs.

◆ SubEditorScreen

SubEditorScreen Barotrauma.LuaGame.SubEditorScreen
get

Definition at line 61 of file LuaGame.cs.

◆ World

World Barotrauma.LuaGame.World
get

Definition at line 246 of file LuaGame.cs.