fix formatting
This commit is contained in:
@@ -225,7 +225,8 @@ namespace Barotrauma
|
|||||||
|
|
||||||
private static readonly string[] prohibitedHooks = {
|
private static readonly string[] prohibitedHooks = {
|
||||||
"Barotrauma.Lua",
|
"Barotrauma.Lua",
|
||||||
"Barotrauma.Cs"
|
"Barotrauma.Cs",
|
||||||
|
"ContentPackageManager",
|
||||||
};
|
};
|
||||||
public void HookMethod(string identifier, MethodInfo method, LuaCsPatch patch, HookMethodType hookType = HookMethodType.Before, ACsMod owner = null)
|
public void HookMethod(string identifier, MethodInfo method, LuaCsPatch patch, HookMethodType hookType = HookMethodType.Before, ACsMod owner = null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ namespace Barotrauma
|
|||||||
public const bool IsClient = true;
|
public const bool IsClient = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
private static int ExecutionNumber = 0;
|
private static int executionNumber = 0;
|
||||||
|
|
||||||
private Script lua;
|
private Script lua;
|
||||||
public CsScriptRunner CsScript { get; private set; }
|
public CsScriptRunner CsScript { get; private set; }
|
||||||
@@ -416,7 +416,7 @@ namespace Barotrauma
|
|||||||
lua.Globals["Networking"] = Networking;
|
lua.Globals["Networking"] = Networking;
|
||||||
lua.Globals["Steam"] = Steam;
|
lua.Globals["Steam"] = Steam;
|
||||||
|
|
||||||
lua.Globals["ExecutionNumber"] = ExecutionNumber;
|
lua.Globals["ExecutionNumber"] = executionNumber;
|
||||||
|
|
||||||
lua.Globals["SERVER"] = IsServer;
|
lua.Globals["SERVER"] = IsServer;
|
||||||
lua.Globals["CLIENT"] = IsClient;
|
lua.Globals["CLIENT"] = IsClient;
|
||||||
@@ -458,8 +458,6 @@ modding needs.
|
|||||||
var modTypes = CsScriptLoader.Compile();
|
var modTypes = CsScriptLoader.Compile();
|
||||||
modTypes.ForEach(t =>
|
modTypes.ForEach(t =>
|
||||||
{
|
{
|
||||||
//Please register `t` in lua-side
|
|
||||||
//UserData.RegisterType(t);
|
|
||||||
t.GetConstructor(new Type[] { })?.Invoke(null);
|
t.GetConstructor(new Type[] { })?.Invoke(null);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -504,7 +502,7 @@ 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++;
|
executionNumber++;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user