Class PersistentGlobalVars
Stores global variables for PlayerEntity. Could have just used a bool[64] array but this design conveys more information.
Namespace: DaggerfallWorkshop.Game.Player
Assembly: Assembly-CSharp.dll
Syntax
public class PersistentGlobalVars
Methods
| Improve this Doc View SourceDeserializeGlobalVars(GlobalVar[])
Restore global variables from deserialized list.
Declaration
public void DeserializeGlobalVars(GlobalVar[] globalVarsList)
Parameters
| Type | Name | Description |
|---|---|---|
| GlobalVar[] | globalVarsList |
GetGlobalVar(Int32)
Get current value of global variable.
Declaration
public bool GetGlobalVar(int key)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | key |
Returns
| Type | Description |
|---|---|
| Boolean |
GetGlobalVarDetails(Int32)
Gets full details of a global variable.
Declaration
public GlobalVar GetGlobalVarDetails(int key)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | key |
Returns
| Type | Description |
|---|---|
| GlobalVar |
ImportClassicGlobalVars(SaveVars)
Import global variables from classic save.
Declaration
public void ImportClassicGlobalVars(SaveVars saveVars)
Parameters
| Type | Name | Description |
|---|---|---|
| SaveVars | saveVars |
Reset()
Resets global vars back to starting point. Must call this at least once before using global vars.
Declaration
public void Reset()
SerializeGlobalVars()
Get global variables as a flat array for serialization.
Declaration
public GlobalVar[] SerializeGlobalVars()
Returns
| Type | Description |
|---|---|
| GlobalVar[] |
SetGlobalVar(Int32, Boolean)
Sets a global variable value.
Declaration
public void SetGlobalVar(int key, bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | key | |
| Boolean | value |
ZeroAllGlobalVars()
Set all global variables to false.
Declaration
public void ZeroAllGlobalVars()