Skip to content

Commit

Permalink
feat: publicize some field
Browse files Browse the repository at this point in the history
  • Loading branch information
Clazex committed Mar 6, 2023
1 parent c465373 commit 731dcc5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions GodSeekerPlus/Modules/BossChallenge/InfiniteChallenge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ public sealed class InfiniteChallenge : Module {
[BoolOption]
public static bool restartFightOnSuccess = false;

public static readonly List<string> returnScenes = new() {
"GG_Workshop"
};

private static BossSceneController.SetupEventDelegate? setupEvent;

public override ToggleableLevel ToggleableLevel => ToggleableLevel.ChangeScene;
Expand Down Expand Up @@ -35,7 +39,7 @@ private static void RecordSetupEvent(On.BossSceneController.orig_Awake orig, Bos
private static void RestartFight(On.GameManager.orig_BeginSceneTransition orig, GameManager self, GameManager.SceneLoadInfo info) {
string currentSceneName = self.sceneName;
if (
info.SceneName == "GG_Workshop"
returnScenes.Contains(info.SceneName)
&& setupEvent != null
&& (
Ref.HC.heroDeathPrefab.activeSelf // Death returning
Expand Down Expand Up @@ -69,7 +73,7 @@ private static IEnumerator DelayedEnableRenderer() {
}

private static void Cleanup(Scene prev, Scene next) {
if (next.name == "GG_Workshop" || BossSequenceController.IsInSequence) {
if (BossSequenceController.IsInSequence || returnScenes.Contains(next.name)) {
setupEvent = null;
}
}
Expand Down
2 changes: 1 addition & 1 deletion GodSeekerPlus/Modules/QoL/FastDash.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace GodSeekerPlus.Modules.QoL;

public sealed class FastDash : Module {
private static readonly string[] sceneNames = new[] {
public static readonly List<string> sceneNames = new() {
"GG_Workshop",
"GG_Atrium",
"GG_Atrium_Roof"
Expand Down

0 comments on commit 731dcc5

Please sign in to comment.