FujiAPI / Fuji

Celeste 64 Mod Loader
30 stars 10 forks source link

Add MonoMod hook-gen + protection against hooking non-vanila methods #53

Closed psyGamer closed 6 months ago

psyGamer commented 6 months ago

This PR add HookGen for the methods inside the Celeste64 namespace. Only public method can be hooked and they may have a [DisallowHooks] attribute to prevent hooking. I only applied the attribute inside the player class so far, but it should be used for everything provided by Fuji, which is inside the Celeste64 namespace.

Additionally this adds protections against hooking non Celeste64 / Foster.Framework namespaces. This protection can be avoided with an intentioally dangerous looking list inside the GameMod.

This renamed the Source direcory to Celeste64, to better fit with the other projects. This is not a breaking change.