Commit Graph

5242 Commits

Author SHA1 Message Date
peelz
8d40a106dc Fix docs ps1 script module errors 2022-08-14 18:03:56 -04:00
EvilFactory
53b92e3a44 added RespawnManager to Game 2022-08-14 10:54:50 -03:00
Evil Factory
52cb7ecfd7 Merge pull request #100 from notpeelz/fix-publish-sigil-dll
Fix missing Sigil.dll in patch zip releases
2022-08-12 21:10:22 -03:00
peelz
9ba466a455 Fix missing Sigil.dll in patch zip releases 2022-08-12 20:07:19 -04:00
Evil Factory
d73a8ac7e4 Merge pull request #98 from notpeelz/fix-report-test-results
Fix workflow not reporting test results when ran from a PR
2022-08-12 06:15:20 -03:00
Evil Factory
d8e2a52b0b Merge pull request #97 from notpeelz/generate-patch-zip-release
Create zip files to make deployment easier for existing installs
2022-08-12 06:15:09 -03:00
peelz
d34cea51cf Fix workflow not reporting test results when ran from a PR 2022-08-12 03:18:22 -04:00
peelz
3a6ce4c219 Update manual installation instructions 2022-08-11 22:26:58 -04:00
peelz
5c3274153e Fix markdown spacing for ul, ol and iframe 2022-08-11 22:26:58 -04:00
peelz
1049296705 Fix incorrect path to scripts/install.sh in lua docs build script 2022-08-11 22:26:58 -04:00
peelz
430dd9ae93 Change release workflow to create zip files for existing installs 2022-08-11 22:26:58 -04:00
EvilFactory
582d6a5c26 fix inverted check for SaveGame 2022-08-11 19:14:14 -03:00
EvilFactory
53c586b22f add save folder to whitelist 2022-08-11 12:59:20 -03:00
EvilFactory
6c7a93d53e docs: added Sigil.dll to "Adding Lua For Barotrauma to an existing client" 2022-08-11 06:29:45 -03:00
EvilFactory
4bccc33c4f added Game.ServerSettings for clients and Game.Client/Game.Server 2022-08-10 16:52:54 -03:00
EvilFactory
412a9e0055 register GameMain, BanList and BannedPlayer 2022-08-10 16:52:27 -03:00
EvilFactory
40814a1723 expose AccumulatorMax 2022-08-10 16:35:12 -03:00
Evil Factory
93737e27ba Merge pull request #96 from notpeelz/hook-api-il-patch
Improve Hook.Patch API
2022-08-10 16:30:12 -03:00
peelz
eabc611a63 Fix typo in cl_xxx commands 2022-08-10 05:59:41 -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
3de2d8e550 Change on-push workflow to run unit tests
This changes workflows to run unit tests for every new commit (including
PRs). A new release will only be published if all tests pass on the
master branch.
2022-08-10 05:55:43 -04:00
peelz
508f8d3dcd Fix dotnet-release workflow not cloning submodules 2022-08-10 05:36:17 -04:00
peelz
4f17a88781 Fix incorrect LuaXXX type converter used in overload disambiguation 2022-08-10 05:36:17 -04:00
peelz
267644695a Add Sigil.dll to the list of files to deploy/update 2022-08-10 05:36:17 -04:00
peelz
4e41d5c4fb Fix item.interact hook not passing the correct parameters 2022-08-10 05:36:17 -04:00
peelz
33a29741df Change DefaultHook.lua to use Hook.Patch 2022-08-10 05:36:17 -04:00
peelz
c25f4df6bc Add lua docs for new Hook.Patch API 2022-08-10 05:36:17 -04:00
peelz
014bddf5ee Add support [readonly] modifier to lua docs 2022-08-10 05:36:17 -04:00
peelz
987907bd05 Improve color constrast of headers in lua docs 2022-08-10 05:36:17 -04:00
peelz
e0defa82e2 Fix invalid @realm tags 2022-08-10 05:36:17 -04:00
peelz
7e99cdef29 Implement rudimentary cache busting for lua docs 2022-08-10 05:36:17 -04:00
peelz
97021f127c Add support for deprecation reason in lua docs 2022-08-10 05:36:17 -04:00
peelz
477cbeccc6 Fix paragraph spacing inconsistencies in lua docs 2022-08-10 05:36:16 -04:00
peelz
843055a5dc Update repo url in lua docs 2022-08-10 05:36:16 -04:00
peelz
4a6e13a0dc Refactor LuaDocs generator 2022-08-10 05:36:16 -04:00
peelz
545c38c26c Fix parameter mismatch errors in lua docs 2022-08-10 05:36:16 -04:00
peelz
b393a4e00f Add .editorconfig 2022-08-10 05:36:16 -04:00
peelz
2f5add1999 Don't conflate fields with tables 2022-08-10 05:36:16 -04:00
peelz
512b95d89c Fix lua docs sidebar items not being indexable 2022-08-10 05:36:16 -04:00
peelz
897466d295 Move hooks docs to their own section 2022-08-10 05:36:16 -04:00
peelz
1bb7843811 Move docs to luacs-docs/{lua,cs,landing-page}
luacs-docs/cs also has a proper http server for testing locally
2022-08-10 05:36:16 -04:00
peelz
53ea2b8973 Simplify github workflow for docs generation
This also fixes not being able to generate docs from other branches.
2022-08-10 05:36:16 -04:00
peelz
69c627b651 Deprecate Hook.HookMethod 2022-08-10 05:36:16 -04:00
peelz
ca51130517 Add @deprecated tag to lua docs 2022-08-10 05:36:16 -04:00
peelz
5d11c28db6 Clean up lua docs scripts
- ldoc is now a git submodule
- ldoc can be installed using scripts/install.{sh,ps1}
- lua docs can be build using scripts/build.{sh,ps1}
- all lua docs-related files now reside inside of the docs folder
2022-08-10 05:33:26 -04:00
peelz
9a621237f0 Add unit tests for LuaCsHook Patch API 2022-08-09 17:50:00 -04:00
peelz
d9dc84425d Make LuaCsSetup easier to integrate into unit tests 2022-08-09 17:50:00 -04:00
peelz
d98daf008e Add lua types for C# primitives 2022-08-09 17:50:00 -04:00
peelz
fb1005d255 Clean up dependencies 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