EvilFactory
c7b8cda902
Hide host machine UserName when displaying error logs
2023-12-10 12:26:38 -03:00
EvilFactory
eeb7e3080f
Potential fix for #158
2023-11-10 10:59:03 -03:00
EvilFactory
46a841b5c1
Potential fix for the wrong publicized folder being loaded
2023-11-02 19:40:36 -03:00
MapleWheels
09ed9d60fb
- saving changes before repo reset.
2023-10-26 17:43:37 -04:00
MapleWheels
9e48dda739
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.
2023-10-24 18:51:48 -03:00
MapleWheels
414d46b33e
Assembly and Script Loading Overhauled.
2023-10-06 12:06:42 -03:00
EvilFactory
8e6f8cc5e6
Added support for workshop install for other platforms (MacOS is likely still borked, but I don't have a Mac to test it)
2023-05-03 12:38:29 -03:00
EvilFactory
8df9f7798e
Implemented a custom PlatformAccessor and re-added the rest of the io and os libraries
2023-05-01 13:24:18 -03:00
EvilFactory
5de8d0293f
Registered MathUtils and XMLExtensions as extension types, moved GetType to a better place
2023-04-25 21:27:11 -03:00
EvilFactory
4303cf3111
Added support for MoonSharp's VsCodeDebugger
2023-03-27 15:20:14 -03:00
EvilFactory
9dc87c34f3
Fixed error "Attempt to perform operations with resources owned by different script" that would sometimes happen when reloading lua
2023-03-23 12:30:20 -03:00
EvilFactory
ba543aef2c
Improved Networking
...
Network messages are now sent through a 2-byte Id to minimize overhead of using strings.
2023-01-29 13:21:19 -03:00
EvilFactory
8fcf0f7c8c
Removed CsScriptRunner since its useless
2023-01-18 22:53:55 -03:00
EvilFactory
94c68b9fe6
Added error overlay which is used to display errors in a more user friendly way, currently only used if the CSharp compilation fails
2023-01-06 19:58:15 -03:00
EvilFactory
6de4a1bd09
Expose logger to Lua
2022-12-29 15:58:51 -03:00
EvilFactory
82934cf9ed
Added popups telling you to run CSharp when joining a server with CSharp mods enabled but without the Cs package
2022-12-29 15:58:51 -03:00
EvilFactory
c665d3e9c7
Added settings that allow you to force turn on CSharp, treat forced mods as normal and allow for the workshop lua setup to be the preferred one
2022-12-29 15:58:51 -03:00
EvilFactory
8fdf2156dc
Introduce the LuaCsLogger class and make everything use that instead
2022-12-29 15:58:51 -03:00
EvilFactory
2b871c8c48
Fix think hook getting called twice on the client
2022-12-15 09:12:03 -03:00
EvilFactory
0853357300
Move think hook to a better place
2022-11-13 15:56:37 -03:00
EvilFactory
ba1157b07d
Make init logs nicer
2022-10-30 16:34:01 -03:00
EvilFactory
e7d98dc887
Update Moonsharp for the new pcall exception handling
2022-10-29 20:30:02 -03:00
EvilFactory
d88a6b5ef0
Move logging stuff to a separate file
2022-10-28 13:19:23 -03:00
EvilFactory
9502d70290
Rename field and remove unnecessary usings
2022-10-28 12:42:35 -03:00
EvilFactory
43810a3509
Use WorkshopId instead and minor cleanup
2022-10-28 12:26:47 -03:00
peelz
8774a33914
Fix possible NRE when stopping while a patched method is running
2022-09-15 19:31:47 -04:00
peelz
13d0510d37
Make lua converters private
2022-08-20 11:32:18 -04:00
peelz
dd1b404c9b
Refactor error/exception/message handling
...
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
2022-08-10 05:59:41 -04:00
peelz
d9dc84425d
Make LuaCsSetup easier to integrate into unit tests
2022-08-09 17:50:00 -04:00
peelz
08836088fb
Refactor hooking API
...
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
2022-08-09 17:50:00 -04:00
peelz
768abd5ce1
Remove LuaResult
2022-08-09 17:50:00 -04:00
EvilFactory
1b020ff99e
don't prevent further cs mods from being executed if one of them has a runtime error
2022-07-25 09:25:06 -03:00
Evil Factory
8153e4af0c
print out to the console if the content package Lua folder is being used or not
2022-07-08 19:44:23 -03:00
Evil Factory
e73cd0f398
fix crash if a cs mod errors in the dispose method
2022-07-07 09:52:29 -03:00
Evil Factory
e5d4a38fd7
minor refactor to CsScriptLoader plus fixed source category regex not working as expected with some paths
2022-07-05 17:47:52 -03:00
Evil Factory
4a706c504a
debug check for weird timer crash
2022-06-29 20:22:33 -03:00
Evil Factory
3418132b90
fix compile error
2022-06-29 17:08:33 -03:00
Evil Factory
20dabf502a
cleanup
2022-06-29 16:48:34 -03:00
Evil Factory
64c81146fb
added PerformanceCounter
2022-06-19 11:50:51 -03:00
Evil Factory
a2f8d0019f
fix threading issues with initialization
2022-06-17 14:29:10 -03:00
Evil Factory
ed1fbdbe5e
Potential fix for threading issues and added CSActive var
2022-06-09 16:02:18 -03:00
Evil Factory
7ee81aca24
fix formatting
2022-05-21 12:48:35 -03:00
Evil Factory
4078fe024b
ExecutionNumber variable that counts how many times lua has been executed
2022-05-19 16:45:00 -03:00
Evil Factory
74bf5d12ca
added Steam.DownloadWorkshopItem and Steam.GetWorkshopItem
2022-05-17 19:15:44 -03:00
Evil Factory
11220bcff2
why are we manually collecting GC in cs
2022-05-07 14:20:16 -03:00
Evil Factory
64f0e2f137
Fixes for PR #80
2022-05-06 13:10:50 -03:00
Cintique
d244869377
Fix blocking issue in LuaCsTimer
...
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.
2022-05-06 15:43:17 +10:00
Jacobin
87550af37d
lua.LoadFile -> lua.LoadString
2022-05-05 10:23:17 +10:00
Evil Factory
bbea195e7d
fix formatting in lua require and better error handling with dofile,loadfile,etc
2022-05-04 08:50:17 -03:00
Evil Factory
95a9c618e6
fix naming
2022-05-04 08:45:05 -03:00