summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Dubé <serprex@users.noreply.github.com>2025-12-04 16:14:58 +0000
committerGitHub <noreply@github.com>2025-12-04 09:14:58 -0700
commitf83f73d6710dfe4e8ea5e7ea9c1c82c02dae8f6f (patch)
tree1286febdefd3f588e28683dc81697c779e7dd787
parent7e829a078048700f0746b73cc681353f4934e147 (diff)
Fix miss in previous `hookify cosmetics editor` PR (#6006)
-rw-r--r--soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp b/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp
index 202fef039..94222b0b7 100644
--- a/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp
+++ b/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp
@@ -2573,15 +2573,6 @@ void CosmeticsEditorWindow::DrawElement() {
UIWidgets::PopStyleTabs();
}
-void RegisterOnLoadGameHook() {
- GameInteractor::Instance->RegisterGameHook<GameInteractor::OnLoadGame>(
- [](int32_t fileNum) { ApplyOrResetCustomGfxPatches(); });
-}
-
-void RegisterOnGameFrameUpdateHook() {
- GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([]() { CosmeticsUpdateTick(); });
-}
-
void CosmeticsEditorWindow::InitElement() {
// Convert the `current color` into the format that the ImGui color picker expects
for (auto& [id, cosmeticOption] : cosmeticOptions) {
@@ -2653,6 +2644,8 @@ void RegisterCosmeticHooks() {
COND_HOOK(OnGenerationCompletion, CVarGetInteger(CVAR_COSMETIC("RandomizeAllOnRandoGen"), 0),
[]() { CosmeticsEditor_RandomizeAll(); });
+ COND_HOOK(OnLoadGame, true, [](int32_t fileNum) { ApplyOrResetCustomGfxPatches(); });
+
COND_HOOK(OnGameFrameUpdate, true, CosmeticsUpdateTick);
}