EvilFactory
6ab0e7bee4
Fixed IsRunningInsideWorkshop check being inverted
2024-10-29 18:18:19 -03:00
EvilFactory
3e4b649162
Update moonsharp and move extension methods to register Lua file
2024-10-07 19:22:24 -03:00
EvilFactory
757a7a1c37
Treat forced mods as normal is true by default
2024-05-23 13:07:58 -03:00
EvilFactory
3f014660cc
Pass in a copy of the config instead
2024-04-02 12:49:04 -03:00
EvilFactory
ee337e4f18
Fixed config not saving
2024-03-28 23:39:29 -03:00
EvilFactory
06a226a26e
Fixed wrong xml attribute name
2024-03-28 21:20:02 -03:00
EvilFactory
a55b165d9e
Added new assemblies to CI
2024-03-28 16:39:43 -03:00
EvilFactory
bf34934e9c
Merge fixes
2024-03-28 16:19:53 -03:00
EvilFactory
b3ac01cb22
Remove all uses of the Cs Package now that we don't need it anymore
...
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
2024-03-19 19:03:32 -03:00
EvilFactory
2043f6411c
Set TreatForcedModsAsNormal to true by default
2023-12-17 14:58:13 -03:00
EvilFactory
a0044d03c2
Fixed Lua dispose method not being called if you reload manually
2023-12-17 12:34:30 -03:00
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