Files
LuaCsForBarotraumaEP/Barotrauma/BarotraumaShared/SharedSource
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
..
2022-04-08 00:34:17 +09:00
2022-07-01 12:16:36 +09:00
2022-02-26 02:43:01 +09:00
2022-05-19 23:43:21 +09:00
2022-08-09 17:50:00 -04:00
2022-07-14 12:33:31 -03:00
2022-07-01 12:16:36 +09:00
2022-05-19 23:43:21 +09:00
2022-01-27 00:30:32 +09:00
2022-06-14 04:14:47 +09:00
2022-07-14 16:54:36 +03:00
2022-02-26 02:43:01 +09:00
2022-07-14 16:54:36 +03:00
2022-07-01 12:16:36 +09:00
2022-02-26 02:43:01 +09:00
2022-05-19 23:43:21 +09:00
2022-06-14 04:14:47 +09:00
2021-06-17 17:58:09 +03:00
2020-10-01 12:19:24 -03:00
2022-06-03 22:29:04 +09:00
2021-09-09 07:42:25 -03:00
2022-07-14 16:54:36 +03:00
2020-03-04 13:04:10 +01:00
2022-06-03 22:29:04 +09:00
2022-02-26 02:43:01 +09:00
2022-03-30 01:20:59 +09:00
2022-02-26 02:43:01 +09:00