diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index db76436..693ecf5 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -12,16 +12,6 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Download Everest stripped lib - uses: robinraju/release-downloader@v1.4 - with: - repository: EverestAPI/Everest - latest: true - fileName: lib-stripped.zip - - - name: Extract lib-stripped.zip - run: unzip lib-stripped.zip - - name: Setup .NET Core uses: actions/setup-dotnet@v4 with: @@ -30,8 +20,6 @@ jobs: run: dotnet restore - name: Build run: dotnet build --configuration Release --no-restore - env: - CelestePrefix: ${{ github.workspace }}/lib-stripped - name: Unzip again (jank) run: | diff --git a/Source/TestModModule.cs b/Source/TestModModule.cs index 04ac410..f464472 100644 --- a/Source/TestModModule.cs +++ b/Source/TestModModule.cs @@ -1,4 +1,5 @@ using System; +using Monocle; namespace Celeste.Mod.TestMod; @@ -26,10 +27,23 @@ public TestModModule() { } public override void Load() { - // TODO: apply any hooks that should always be active + Everest.Events.Atlas.OnGetCustomFallback += (atlas, id) => { + Logger.Info(nameof(TestMod), $"missing texture {id}"); + return null; + }; + + Everest.Events.Level.OnEnd += (Level level, Scene nextScene, ref bool reloadPortraits, ref bool disassociate) => { + Logger.Info(nameof(TestMod), $"scene ending; {reloadPortraits}, {disassociate}"); + return; + }; + + Everest.Events.Player.OnPauseInGBJ += (player) => { + Logger.Info(nameof(TestMod), "suppressing softlock prevention"); + return true; + }; } public override void Unload() { - // TODO: unapply any hooks applied in Load() + // ehh can't be bothered } } diff --git a/Source/lib-stripped/Celeste.dll b/Source/lib-stripped/Celeste.dll new file mode 100644 index 0000000..34699ee Binary files /dev/null and b/Source/lib-stripped/Celeste.dll differ diff --git a/Source/lib-stripped/FNA.dll b/Source/lib-stripped/FNA.dll new file mode 100644 index 0000000..ed744eb Binary files /dev/null and b/Source/lib-stripped/FNA.dll differ diff --git a/Source/lib-stripped/MMHOOK_Celeste.dll b/Source/lib-stripped/MMHOOK_Celeste.dll new file mode 100644 index 0000000..033a6d7 Binary files /dev/null and b/Source/lib-stripped/MMHOOK_Celeste.dll differ diff --git a/justfile b/justfile new file mode 100644 index 0000000..d3696ae --- /dev/null +++ b/justfile @@ -0,0 +1,16 @@ +default: refresh_lib build + +build: + dotnet build + +_mkdir_lib: + mkdir -p lib-stripped + +_copy_and_strip filename: + cp ../../{{filename}} Source/lib-stripped + mono-cil-strip Source/lib-stripped/{{filename}} + +refresh_lib: _mkdir_lib + @just _copy_and_strip Celeste.dll + @just _copy_and_strip MMHOOK_Celeste.dll + @just _copy_and_strip FNA.dll