LuaCs Settings no longer uses LuaCsConfig
Cs Package is no longer is used for enabling CSharp Scripting (except for dedicated server, to not make those people confused)
Added popups for when you have CSharp mods enabled but don't have CSharp enabled when going to singleplayer/multiplayer
* - 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 adds:
- LuaCsSetup.ExceptionHandler so we can decide how we want to handle
exceptions for unit tests
- LuaCsSetup.MessageHandler so we can redirect logs to the XUnit output
helper
This completely changes how method patching works under the hood. Unlike
the previous API (`Hook.HookMethod`), the new API (`Hook.Patch`)
generates a Harmony patch method at runtime, using IL generation.
This fixes methods with ByRef (out/ref) parameters getting silently corrupted
due to the ByRef semantics being lost when passed through the `object[] __args`
parameter.
This new API also makes it possible to:
- modify parameters (including ByRef params)
- change the return value to `null` (old API would use `return nil`
for Harmony control flow)
- prevent execution of the original method (and other harmony
patches), independently of modifying the return value
Logic for scheduling actions in `LuaCsHook` (see `Enqueue()` and `Update()`) caused tasks with long delays to block the execution of tasks with shorter delays.
Moved logic for `Timer.Wait()` from `LuaCsHook` to `LuaCsTimer` and corrected the blocking issue.