Files
LuaCsForBarotraumaEP/Barotrauma/BarotraumaClient
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
..
2021-10-27 18:50:57 +03:00
2022-02-26 02:43:01 +09:00
2021-10-27 18:50:57 +03:00
2019-12-19 17:44:45 -03:00
2019-03-18 21:42:26 +02:00
2021-03-05 17:00:56 +02:00
2021-04-07 15:24:22 +03:00
2019-03-18 22:50:18 +02:00
2021-03-05 17:00:56 +02:00
2020-03-04 13:04:10 +01:00
2022-08-09 17:50:00 -04:00
2022-08-09 17:50:00 -04:00
2021-02-10 17:08:21 +02:00
2020-03-04 13:04:10 +01:00
2021-04-07 15:24:22 +03:00
2022-08-09 17:50:00 -04:00