Commit Graph

20 Commits

Author SHA1 Message Date
EvilFactory
886fa9ed80 Prevent some types from being re-registered 2023-05-08 13:13:47 -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
675b4f349c Added LuaUserData.IsRegistered 2023-04-09 14:07:26 -03:00
EvilFactory
5fc25c2453 Added LuaUserData.MakePropertyAccessible 2023-03-22 14:09:10 -03:00
EvilFactory
505b6af2ee Fix LuaUserData.IsTargetType not behaving as originally due to it comparing types 2022-12-06 18:58:28 -03:00
EvilFactory
2931ef00ea Added TypeOf 2022-11-14 14:31:38 -03:00
EvilFactory
3ba75e5c44 You can now specify the types in LuaUserData.MakeMethodAccessible and cleaned the code up a bit 2022-11-14 14:20:52 -03:00
EvilFactory
5e29d1d8ba Fix mixed spaces and tabs 2022-10-28 12:29:35 -03:00
peelz
cd8316ea4c Fix NRE in LuaUserData.GetType 2022-09-17 00:11:09 -04:00
peelz
7ce7e6e763 Support resolving methods with ref/out parameters 2022-08-09 17:50:00 -04:00
Evil Factory
47e0351403 fix some of the formatting and remove usage of CsScriptFilter as it's pretty much useless 2022-06-29 12:12:47 -03:00
Evil Factory
efd1243754 Minor refactor for LuaUserData.lua 2022-06-14 13:09:52 -03:00
Cintique
c39bf9f800 Allow wrapping unregistered types.
`LuaUserData.CreateUserDataFromType` will instantiate a default `StandardUserDataDescriptor` to allow wrapping unregistered types. Whoops!
2022-06-02 21:34:34 +10:00
Cintique
62c0dc0580 Better doc 2022-06-01 19:46:40 +10:00
Cintique
ebcbcae46d Typo 2022-05-31 14:59:17 +10:00
Cintique
fb6c335f0f Add LuaUserData.CreateUserDataOfType.
Converts a Lua value to a desired CLR type and wraps it in a userdata to avoid automatic conversions.
Example: a Lua script needs to pass a List`1 to a CLR method expecting System.Object, MoonSharp gets
in the way by converting the List`1 to a MoonSharp.Interpreter.Table and breaking everything.
Wrapping the value in a userdata preserves the original type during conversions.
2022-05-31 14:54:09 +10:00
Evil Factory
ca0da04ad0 better LuaUserData error handling and add Steam.GetWorkshopCollection 2022-05-19 14:26:21 -03:00
zhurengong
7c4d7d374b some improves and fixes:
1. should get the last loadded aseembly by checking its version instead of reversing.
2. fixed throw an exception when CsScriptRunner run the second time.
3. an argument carried by an UnregisterType called somewhere have had been accidentally removed.
2022-04-20 14:56:32 +08:00
zhurengong
1b0c865459 should get the last assembly 2022-04-19 18:51:53 +08:00
Evil Factory
b7395bedea Refactor and fix #56 2022-04-15 19:08:27 -03:00