Skip to content

Commit ac8a069

Browse files
committed
Merge branch 'Archipelago' of https://github.com/Z11Coding/Mixtape-Engine-Rework into Archipelago
2 parents 42d3eda + 35b5379 commit ac8a069

File tree

5 files changed

+983
-219
lines changed

5 files changed

+983
-219
lines changed
-12.9 KB
Binary file not shown.

source/managers/FreeplayManager.hx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -357,24 +357,24 @@ class FreeplayManager {
357357
for (song in ["Beat Battle", "Beat Battle 2", "Small Argument"]) {
358358
try {metadataFile = cast Json.parse(Assets.getText(Paths.json(Paths.formatToSongPath(song.toLowerCase()) + '/meta')));}
359359
catch(e) {
360-
trace("can't.");
360+
//trace("can't.");
361361
metadataFile = null;
362362
}
363363

364364
try
365365
{
366366
metadata.set(song.toLowerCase(), cast metadataFile);
367-
trace("Found metadata for " + song.toLowerCase());
367+
//trace("Found metadata for " + song.toLowerCase());
368368
}
369369
catch (e)
370370
{
371371
try
372372
{
373-
trace("No metadata for " + song.toLowerCase());
373+
//trace("No metadata for " + song.toLowerCase());
374374
}
375375
catch (e)
376376
{
377-
trace("No metadata found. No song either apparently.");
377+
//trace("No metadata found. No song either apparently.");
378378
}
379379
}
380380
}

source/objects/HealthIcon.hx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class HealthIcon extends FlxSprite
4646
if(!Paths.fileExists('images/' + name + '.png', IMAGE)) name = 'icons/icon-face'; //Prevents crash from missing icon
4747
var file:Dynamic = Paths.image(name);
4848

49-
var jsonPath:String = name;
49+
var jsonPath:String = haxe.io.Path.directory(Paths.file('images/icons/icons/'));
5050
var jsonData:Dynamic = null;
5151

5252
// Try to load JSON file
@@ -74,7 +74,7 @@ class HealthIcon extends FlxSprite
7474
loadGraphic(file); // Load to guess size
7575
type = (width < 200 ? SINGLE : ((width > 199 && width < 301) ? DEFAULT : WINNING));
7676

77-
trace('No JSON file found, guessing type based on size: ' + type + ' (' + width + 'px)');
77+
//trace('No JSON file found, guessing type based on size: ' + type + ' (' + width + 'px)');
7878

7979
// Create or update JSON file with guessed type
8080
jsonData = { type: switch (type) {
@@ -83,11 +83,13 @@ class HealthIcon extends FlxSprite
8383
case WINNING: 'WINNING';
8484
}};
8585
if (!sys.FileSystem.exists(jsonPath)) {
86-
var file = sys.io.File.write(jsonPath, true); // ???
87-
file.close();
86+
try {
87+
var file = sys.io.File.write(jsonPath, true); // ???
88+
file.close();
89+
} catch(e) {trace("Failed to write JSON for " + char);}
8890
}
8991
sys.io.File.saveContent(jsonPath, haxe.Json.stringify(jsonData, null, '\t'));
90-
trace('Remembering this type for future use: ' + jsonPath);
92+
//trace('Remembering this type for future use: ' + jsonPath);
9193
}
9294

9395
loadGraphic(file, true, Math.floor(width / (type+1)), Math.floor(height));

0 commit comments

Comments
 (0)