Upgraded the Note Color System to the 0.7 System (YOU WILL NEED TO ENTER THE VISUALS & UI MENU TO RESET YOUR NOTESKIN AND SPLASH SKINS TO DEFAULT!) however, this will slow down rendering speeds a bit. if you don't want to use the RGB Shaders, the Classic noteskin is also available! (almost) All of the num1 sprites (and their pixel variants) have been updated to their 0.3.X version Fixed Blammed Erect having the incorrect events Fixed bf-christmas having funky offsets for the Left & Down animations ive been testing this commit for several days, and i'm sure it's READY!! enjoy :)
94 lines
2.1 KiB
Haxe
94 lines
2.1 KiB
Haxe
package;
|
|
|
|
#if MODS_ALLOWED
|
|
import sys.io.File;
|
|
import sys.FileSystem;
|
|
#else
|
|
import openfl.utils.Assets;
|
|
#end
|
|
import haxe.Json;
|
|
import haxe.format.JsonParser;
|
|
import Song;
|
|
|
|
using StringTools;
|
|
|
|
typedef StageFile = {
|
|
var directory:String;
|
|
var defaultZoom:Float;
|
|
var isPixelStage:Bool;
|
|
var stageUI:String;
|
|
|
|
var boyfriend:Array<Dynamic>;
|
|
var girlfriend:Array<Dynamic>;
|
|
var opponent:Array<Dynamic>;
|
|
var hide_girlfriend:Bool;
|
|
|
|
var camera_boyfriend:Array<Float>;
|
|
var camera_opponent:Array<Float>;
|
|
var camera_girlfriend:Array<Float>;
|
|
var camera_speed:Null<Float>;
|
|
}
|
|
|
|
class StageData {
|
|
public static var forceNextDirectory:String = null;
|
|
public static function loadDirectory(SONG:SwagSong) {
|
|
var stage:String = '';
|
|
if(SONG.stage != null) {
|
|
stage = SONG.stage;
|
|
} else if(SONG.song != null) {
|
|
switch (SONG.song.toLowerCase().replace(' ', '-'))
|
|
{
|
|
case 'spookeez' | 'south' | 'monster':
|
|
stage = 'spooky';
|
|
case 'pico' | 'blammed' | 'philly' | 'philly-nice':
|
|
stage = 'philly';
|
|
case 'milf' | 'satin-panties' | 'high':
|
|
stage = 'limo';
|
|
case 'cocoa' | 'eggnog':
|
|
stage = 'mall';
|
|
case 'winter-horrorland':
|
|
stage = 'mallEvil';
|
|
case 'senpai' | 'roses':
|
|
stage = 'school';
|
|
case 'thorns':
|
|
stage = 'schoolEvil';
|
|
case 'ugh' | 'guns' | 'stress':
|
|
stage = 'tank';
|
|
default:
|
|
stage = 'stage';
|
|
}
|
|
} else {
|
|
stage = 'stage';
|
|
}
|
|
|
|
var stageFile:StageFile = getStageFile(stage);
|
|
if(stageFile == null) { //preventing crashes
|
|
forceNextDirectory = '';
|
|
} else {
|
|
forceNextDirectory = stageFile.directory;
|
|
}
|
|
}
|
|
|
|
public static function getStageFile(stage:String):StageFile {
|
|
var rawJson:String = null;
|
|
var path:String = Paths.getPreloadPath('stages/' + stage + '.json');
|
|
|
|
#if MODS_ALLOWED
|
|
var modPath:String = Paths.modFolders('stages/' + stage + '.json');
|
|
if(FileSystem.exists(modPath)) {
|
|
rawJson = File.getContent(modPath);
|
|
} else if(FileSystem.exists(path)) {
|
|
rawJson = File.getContent(path);
|
|
}
|
|
#else
|
|
if(Assets.exists(path)) {
|
|
rawJson = Assets.getText(path);
|
|
}
|
|
#end
|
|
else
|
|
{
|
|
return null;
|
|
}
|
|
return cast Json.parse(rawJson);
|
|
}
|
|
} |