From f269684eedd894a0cc575f19adfb16e909cbbe32 Mon Sep 17 00:00:00 2001 From: SnipUndercover Date: Sat, 30 Nov 2024 20:02:02 +0100 Subject: [PATCH 1/2] Clarify OnLoadLevel and OnLoadingThread events' docs --- Celeste.Mod.mm/Mod/Everest/Everest.Events.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Celeste.Mod.mm/Mod/Everest/Everest.Events.cs b/Celeste.Mod.mm/Mod/Everest/Everest.Events.cs index 5c69db375..ba71587bc 100644 --- a/Celeste.Mod.mm/Mod/Everest/Everest.Events.cs +++ b/Celeste.Mod.mm/Mod/Everest/Everest.Events.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using _Decal = Celeste.Decal; using _EventTrigger = Celeste.EventTrigger; +using _LevelLoader = Celeste.LevelLoader; using _Level = Celeste.Level; using _Session = Celeste.Session; using _OuiJournal = Celeste.OuiJournal; @@ -96,8 +97,10 @@ internal static void CreateButtons(_OuiMainMenu menu, List buttons) public static class LevelLoader { public delegate void LoadingThreadHandler(_Level level); /// - /// Called at the end of the map loading thread. + /// Called at the end of the map loading thread, .
+ /// This event is invoked only once, when entering a map. ///
+ /// public static event LoadingThreadHandler OnLoadingThread; internal static void LoadingThread(_Level level) => OnLoadingThread?.Invoke(level); @@ -161,6 +164,11 @@ internal static Backdrop LoadBackdrop(MapData map, BinaryPacker.Element child, B => OnLoadBackdrop?.InvokeWhileNull(map, child, above); public delegate void LoadLevelHandler(_Level level, _Player.IntroTypes playerIntro, bool isFromLoader); + /// + /// Called after .
+ /// This event is invoked every time a room is entered - transition, respawn, teleport, etc. + ///
+ /// public static event LoadLevelHandler OnLoadLevel; internal static void LoadLevel(_Level level, _Player.IntroTypes playerIntro, bool isFromLoader) => OnLoadLevel?.Invoke(level, playerIntro, isFromLoader); From 63efa781efdc6a7154ec344b48928be79207d2f3 Mon Sep 17 00:00:00 2001 From: SnipUndercover Date: Mon, 30 Dec 2024 00:25:08 +0100 Subject: [PATCH 2/2] Further clarify the usage of OnLoadingThread --- Celeste.Mod.mm/Mod/Everest/Everest.Events.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Celeste.Mod.mm/Mod/Everest/Everest.Events.cs b/Celeste.Mod.mm/Mod/Everest/Everest.Events.cs index ba71587bc..0841384ed 100644 --- a/Celeste.Mod.mm/Mod/Everest/Everest.Events.cs +++ b/Celeste.Mod.mm/Mod/Everest/Everest.Events.cs @@ -98,7 +98,7 @@ public static class LevelLoader { public delegate void LoadingThreadHandler(_Level level); /// /// Called at the end of the map loading thread, .
- /// This event is invoked only once, when entering a map. + /// This event is invoked only once, when entering a map from the chapter select screen or from Save and Quit. ///
/// public static event LoadingThreadHandler OnLoadingThread;