Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Download Everest stripped lib
uses: robinraju/[email protected]
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:
Expand All @@ -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: |
Expand Down
18 changes: 16 additions & 2 deletions Source/TestModModule.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using Monocle;

namespace Celeste.Mod.TestMod;

Expand Down Expand Up @@ -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
}
}
Binary file added Source/lib-stripped/Celeste.dll
Binary file not shown.
Binary file added Source/lib-stripped/FNA.dll
Binary file not shown.
Binary file added Source/lib-stripped/MMHOOK_Celeste.dll
Binary file not shown.
16 changes: 16 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -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