Scriptloading overhaul (#163)

* - Added option to RunConfig.cs for mods to compile with non-publicized assemblies.
- Added default values attrib to RunConfig.cs
- Added thread sleeping to CsPackageManager.Dispose() to give time before generating a strong-ref to check acl unload status.

* - Added PrintWarning to ModUtils.cs
- Made previously unloaded ACLs warning only.
- Made plugins unload after lua script disposal.
- Small code cleanups.
- Cleared acl record references on unloading.
- Made ACL unload run via event hook.

* Made non-pub asm compilation name the same long-a** name in XML, as per Evil's request.
This commit is contained in:
MapleWheels
2023-10-24 17:51:48 -04:00
committed by GitHub
parent e984633ca5
commit 9e48dda739
7 changed files with 80 additions and 32 deletions
@@ -9,6 +9,7 @@ using Barotrauma;
using Barotrauma.Items.Components;
using Barotrauma.Networking;
using Microsoft.CodeAnalysis;
using Microsoft.Xna.Framework;
namespace Barotrauma;
@@ -26,6 +27,15 @@ public static class ModUtils
LuaCsLogger.LogMessage($"[Client] {s}");
#endif
}
public static void PrintWarning(string s)
{
#if SERVER
LuaCsLogger.Log($"[Server] {s}", Color.Yellow);
#else
LuaCsLogger.Log($"[Client] {s}", Color.Yellow);
#endif
}
public static void PrintError(string s)
{