Skip to content
This repository has been archived by the owner on Nov 9, 2024. It is now read-only.

Commit

Permalink
charter works again it think, also windows crash dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
RadiantCorium committed Sep 2, 2022
1 parent 81cf4f5 commit 677623f
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@
<assets path='example_mods' rename='mods' embed='false' unless="NO_MODDING"/>
<assets path='art/readme.txt' rename='do NOT readme.txt' />

<!-- windows only rn lolol -->
<assets path='crash-dialog' rename='crash-dialog' embed='false' if="windows"/>

<!-- <template path='mods' /> -->

Expand Down
Binary file added crash-dialog/Main.exe
Binary file not shown.
Binary file added crash-dialog/icon.ico
Binary file not shown.
Binary file added crash-dialog/lime.ndll
Binary file not shown.
1 change: 1 addition & 0 deletions crash-dialog/manifest/default.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":null,"assets":"aoy4:pathy19:assets%2Fbanner.pngy4:sizei1182105y4:typey5:IMAGEy2:idR1goR0y22:assets%2Fmain-view.xmlR2i1631R3y4:TEXTR5R6goR2i5794R3y5:SOUNDy9:classNamey31:__ASSET__flixel_sounds_beep_oggR5y26:flixel%2Fsounds%2Fbeep.ogggoR2i33629R3R8R9y33:__ASSET__flixel_sounds_flixel_oggR5y28:flixel%2Fsounds%2Fflixel.ogggoR2i15744R3y4:FONTR9y35:__ASSET__flixel_fonts_nokiafc22_ttfR5y30:flixel%2Ffonts%2Fnokiafc22.ttfgoR2i29724R3R14R9y36:__ASSET__flixel_fonts_monsterrat_ttfR5y31:flixel%2Ffonts%2Fmonsterrat.ttfgoR2i519R3R4R9y36:__ASSET__flixel_images_ui_button_pngR5y33:flixel%2Fimages%2Fui%2Fbutton.pnggoR2i3280R3R4R9y39:__ASSET__flixel_images_logo_default_pngR5y36:flixel%2Fimages%2Flogo%2Fdefault.pnggh","rootPath":"../","version":2,"libraryArgs":[],"libraryType":null}
21 changes: 20 additions & 1 deletion source/Main.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package;

import sys.io.Process;
import haxe.Exception;
import sys.io.File;
import sys.FileSystem;
Expand Down Expand Up @@ -29,7 +30,25 @@ class Main extends Sprite

public static function main():Void
{
Lib.current.addChild(new Main());
try {
Lib.current.addChild(new Main());
}
catch (e:Exception)
{
var fileStr:String = "";

fileStr += "CRASH REASON:" + e.message + "\n\n";

fileStr += e.stack.toString();

File.saveContent("./CRASHDUMP.txt", fileStr);
#if windows
var process = new Process('start .\\crash-dialog\\Main.exe ".\\CRASHDUMP.txt"');
#else
Application.current.window.alert("FNF# Crashed!\nCRASH REASON:" + e.message + "\nMORE INFO IN CRASHDUMP.TXT!", "FNF# Crashed!");
#end
Sys.exit(1);
}
}

public function new()
Expand Down
2 changes: 1 addition & 1 deletion source/states/debug/ChartingState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ class ChartingState extends MusicBeatState
chars = CoolUtil.coolTextFile(Paths.txt('characterList'));
for (mod in Modding.api.loaded)
{
var shit:CharJSON = Json.parse(Modding.api.txt("/chars.json", mod.meta.modID));
var shit:CharJSON = Json.parse(Modding.api.json("chars", mod.meta.modID));
for (char in shit.chars)
{
chars.push(char.name);
Expand Down

0 comments on commit 677623f

Please sign in to comment.