Commit Graph

130 Commits

Author SHA1 Message Date
Evil Factory 5dd44dacf3 added workshop update checker 2022-04-13 19:41:43 -03:00
Evil Factory e87e9341ef added Game.MyID 2022-04-13 15:46:52 -03:00
Evil Factory 96fdefb9ed lua now runs on sub editor, added Game.GetEnabledContentPackages back for compatibility and printerror 2022-04-10 18:58:25 -03:00
Evil Factory 55752b592f *actually* fix content packages 2022-04-10 14:06:13 -03:00
Evil Factory e625c88939 content package fixes 2022-04-10 12:39:02 -03:00
Evil Factory 454a0a22d1 fix file loading 2022-04-09 14:40:55 -03:00
Evil Factory e1e0fd6acf Bunch of fixes 2022-04-09 09:06:29 -03:00
Evil Factory b37fd8d9c9 Fixing stuff part 1 2022-04-08 16:08:59 -03:00
Evil Factory 34ffbea69d MakeMethodAccessible and MakeFieldAccessible now are recursive, so they include private members in inherit members 2022-04-02 20:54:54 -03:00
Evil Factory 2520fe7268 Most enums are now just tables, no need for registration 2022-04-02 16:55:43 -03:00
Evil Factory 4113b1ca2d improve HookMethod errors 2022-04-02 16:09:01 -03:00
zhurengong 97ed4cc9f3 try to prevent brain damage 2022-04-01 00:57:02 +08:00
zhurengong 246c84d5d1 implemented script to clr conversions for all gui event handlers 2022-03-31 23:57:59 +08:00
Evil Factory 11bf1ea294 added a way to decrease character updates 2022-03-28 18:16:52 -03:00
Evil Factory 5fe506b73a Automatically convert Lua types in HookMethod 2022-03-27 16:07:34 -03:00
Evil Factory fe03f56217 Oiltanker's special hook (adds hook gameSession.getSessionCrewCharacters) 2022-03-26 14:32:13 -03:00
Evil Factory 91106ef7bd fix brain fart in LuaUserData 2022-03-25 20:45:27 -03:00
zhurengong 9b2b47ec28 lowercase identifier 2022-03-22 20:52:16 +08:00
zhurengong a1ec0fc807 ability to tag the patch, and can overwrite and remove the tagged patch. 2022-03-22 18:09:18 +08:00
Evil Factory 9694895b71 fix client crash 2022-03-21 17:48:28 -03:00
Evil Factory 72cbbce35d added Game.Paused 2022-03-21 13:44:41 -03:00
Evil Factory a54c55004b Fix crash with some function hooks #49 from Qowyn/patch-1
Fix crash with some function hooks
2022-03-21 13:41:49 -03:00
Roland Firmont caac190a05 Add AddLinked to MapEntity
MapEntity.linkedTo is readonly and arrives as a table on lua side, making it impossible to add new Links.

Introducing AddLinked as an Addition makes it possible to link things.
2022-03-21 16:24:42 +01:00
Roland Firmont d80d4d91a3 Fix crash with some function hooks
Hooking functions that return float, ushort or byte causes a crash as the returned value will not match the expected type.
This fix will allow to return LuaFloat, LuaByte and LuaUShort instead.
Example hook that would crash without this: ItemComponent.DegreeOfSuccess
2022-03-21 16:12:29 +01:00
Evil Factory 7dfccab05d better distinguish better client and server Lua and fixed crash when force stopping the game via alt f4 2022-03-19 11:05:26 -03:00
Evil Factory f7155c4fcc fix IsSingleplayer with capital P 2022-03-17 14:42:03 -03:00
Evil Factory 1d1747a2ca remove unnecessary stuff 2022-03-17 12:53:37 -03:00
Evil Factory 86066282cc make my eyes happier: Random is now deprecated, moved lots of code around in a way that makes more sense and better LuaUserData error handling 2022-03-17 12:47:19 -03:00
Evil Factory 6026a0246d move InstallClientSideLua Function 2022-03-17 11:56:34 -03:00
Evil Factory 62c2769eb8 fix not being able to input parameter names with length 0 in HookMethod 2022-03-11 12:35:55 -03:00
Evil Factory a5228583d0 Updated Moonsharp Interpreter, added support for implicit conversions, new types: LuaByte, LuaUShort and LuaFloat added to solve method overload conflict, support for setting UserData metatables, remove LuaUserData.AddCallMetaMethod and moved GUI object to Lua 2022-03-09 13:35:11 -03:00
Qowyn 2237aaafb3 Dummy commands instead of dropping unknown cmds
AddCommand now replaces commands for connected players and saved perms
2022-03-08 18:00:30 +01:00
Evil Factory 245619ab72 added File.CreateDirectory 2022-03-07 16:29:32 -03:00
Evil Factory 9dbab36575 added IsSinglePlayer and IsMultiplayer to Game 2022-03-07 12:15:58 -03:00
Evil Factory e7ceaf9f78 Workaround: Hooks aren't called while in singlepalyer loading screen (fixes weird threading error) 2022-03-06 18:44:19 -03:00
Evil Factory abf329dd21 add Unregister functions to LuaUserData 2022-03-05 12:01:38 -03:00
Evil Factory a8fdc0f9c5 Improve Lua Networking 2022-03-03 19:34:52 -03:00
Evil Factory dd42269f31 visual studio is unable to delete this file via normal means 2022-03-03 13:58:43 -03:00
Evil Factory 7cfee859a1 fix massive brain damage in Timer.Wait (why did i choose to use async) 2022-03-03 13:54:46 -03:00
Evil Factory ffeef7a0d3 Fix #45: mapEntityUpdateInterval and gapUpdateInterval are preserved between sessions 2022-03-01 13:09:43 -03:00
Evil Factory 6d00e210f0 added GameSettings and ChatBox 2022-02-28 19:57:06 -03:00
Evil Factory 3d39a84850 Lua messages/errors message colours! 2022-02-24 16:06:27 -03:00
Evil Factory f31142b754 Fix Map Entity Updates 2022-02-24 16:06:08 -03:00
zhurengong 6a539be58e added script to clr conversion for TextGetterHandler and OnSelectedHandler 2022-02-14 18:26:04 +08:00
Evil Factory 21f314aed0 Revert "limit how many errors can be sent per second (prevents message queue from overflowing and stopping all commands from working) and removed useless semicolons that i added for some reason here"
This reverts commit 62cda52342.
2022-02-11 18:16:10 -03:00
Evil Factory 62cda52342 limit how many errors can be sent per second (prevents message queue from overflowing and stopping all commands from working) and removed useless semicolons that i added for some reason here 2022-02-10 12:59:32 -03:00
Evil Factory 7a575e9b55 add some type method to LuaUserData: Merge pull request #37 from zhu-rengong/add_type_method
add some type method to LuaUserData
2022-02-10 12:27:27 -03:00
zhurengong 8dca5fa491 allow make private static field/method accessiable 2022-02-10 15:16:41 +08:00
zhurengong 9d68458eb2 add some type method to LuaUserData
1. RegisterGenericType: solves some types that cannot be found directly by strings, such as MapEntity.SelectedList(HashSet<MapEntity>)
2. IsTargetType: can be used to know whether MapEntity is Item, Character, or Structure.
2022-02-10 15:03:24 +08:00
Evil Factory efc62387ff add an try catch to better see what might be causing this unknown crash, 2022-02-01 22:38:44 -03:00