Skip to content

Commit 84c153d

Browse files
committed
fix WarningState not booting in ModConfigWarning
1 parent ca4beb4 commit 84c153d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

source/funkin/backend/system/MainState.hx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,19 +126,20 @@ class MainState extends FlxState {
126126
CoolUtil.safeAddAttributes('./.temp/', NativeAPI.FileAttribute.HIDDEN);
127127
#end
128128

129+
var startState = Flags.DISABLE_WARNING_SCREEN ? TitleState : funkin.menus.WarningState;
130+
129131
if (Options.devMode && Options.allowConfigWarning) {
130132
var lib:ModsFolderLibrary;
131133
for (e in Paths.assetsTree.libraries) if ((lib = cast AssetsLibraryList.getCleanLibrary(e)) is ModsFolderLibrary
132134
&& lib.modName == ModsFolder.currentModFolder)
133135
{
134136
if (lib.exists(Paths.ini("config/modpack"), lime.utils.AssetType.TEXT)) break;
135137

136-
FlxG.switchState(new ModConfigWarning(lib));
138+
FlxG.switchState(new ModConfigWarning(lib, startState));
137139
return;
138140
}
139141
}
140142

141-
if (!Flags.DISABLE_WARNING_SCREEN) FlxG.switchState(new funkin.menus.WarningState());
142-
else FlxG.switchState(new TitleState());
143+
FlxG.switchState(cast Type.createInstance(startState, []));
143144
}
144145
}

0 commit comments

Comments
 (0)