Skip to content

Commit

Permalink
remove Stage references
Browse files Browse the repository at this point in the history
  • Loading branch information
LazyDuchess committed Mar 3, 2024
1 parent 01e4dae commit 0e42557
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion MapStation.Common/Runtime/AGameMapStationPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public abstract class AGameMapStationPlugin {
public virtual void OnAddMapToDatabase(ZipArchive archive, string path, string mapName) {
}

public virtual void OnReload(Stage stage) {
public virtual void OnReload() {

}
}
Expand Down
6 changes: 2 additions & 4 deletions MapStation.Common/Runtime/GamePluginManager.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#if BEPINEX
using BepInEx.Logging;
using Reptile;

#endif
using System;
using System.Collections.Generic;
Expand Down Expand Up @@ -55,10 +53,10 @@ public static void OnAddMapToDatabase(ZipArchive archive, string path, string ma
}
}

public static void OnReload(Stage stage) {
public static void OnReload() {
var plugins = GetPlugins();
foreach(var plugin in plugins) {
plugin.OnReload(stage);
plugin.OnReload();
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions MapStation.Plugin/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
using MapStation.API;
using MapStation.Plugin.API;
using MapStation.Plugin.Tools;
using MapStation.Common.Runtime;

namespace MapStation.Plugin
{
Expand Down Expand Up @@ -135,6 +136,7 @@ private static void QuickReloadUpdate() {
// Only allow if the game is currently in a stage
if(CanSwitchStagesWithoutCrashing()) {
if(Input.GetKeyDown(MapStationConfig.Instance.QuickReloadKeyValue)) {
GamePluginManager.OnReload();
Core.Instance.BaseModule.StageManager.ExitCurrentStage(Core.Instance.SaveManager.CurrentSaveSlot.currentStageProgress.stageID);
}
}
Expand Down

0 comments on commit 0e42557

Please sign in to comment.