ExecutionNumber variable that counts how many times lua has been executed
This commit is contained in:
@@ -39,6 +39,8 @@ namespace Barotrauma
|
|||||||
public const bool IsClient = true;
|
public const bool IsClient = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
private static int ExecutionNumber = 0;
|
||||||
|
|
||||||
private Script lua;
|
private Script lua;
|
||||||
public CsScriptRunner CsScript { get; private set; }
|
public CsScriptRunner CsScript { get; private set; }
|
||||||
|
|
||||||
@@ -414,6 +416,8 @@ namespace Barotrauma
|
|||||||
lua.Globals["Networking"] = Networking;
|
lua.Globals["Networking"] = Networking;
|
||||||
lua.Globals["Steam"] = Steam;
|
lua.Globals["Steam"] = Steam;
|
||||||
|
|
||||||
|
lua.Globals["ExecutionNumber"] = ExecutionNumber;
|
||||||
|
|
||||||
lua.Globals["SERVER"] = IsServer;
|
lua.Globals["SERVER"] = IsServer;
|
||||||
lua.Globals["CLIENT"] = IsClient;
|
lua.Globals["CLIENT"] = IsClient;
|
||||||
|
|
||||||
@@ -499,6 +503,8 @@ modding needs.
|
|||||||
{
|
{
|
||||||
PrintError("LuaSetup.lua not found! Lua/LuaSetup.lua, no Lua scripts will be executed or work.");
|
PrintError("LuaSetup.lua not found! Lua/LuaSetup.lua, no Lua scripts will be executed or work.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ExecutionNumber++;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user