forked from ShadowMario/FNF-PsychEngine
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Fixed icons not showing properly if you had Opponent Chart turned on 2. Fixed winning icons not playing (because of the previous commit) 3. The guns ascension now accounts for if you're playing as the opponent or not
- Loading branch information
1 parent
209f739
commit f3c7b54
Showing
10 changed files
with
14,708 additions
and
14,671 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,148 +1,148 @@ | ||
package; | ||
|
||
import Section.SwagSection; | ||
import haxe.Json; | ||
import haxe.format.JsonParser; | ||
import lime.utils.Assets; | ||
|
||
#if sys | ||
import sys.io.File; | ||
import sys.FileSystem; | ||
#end | ||
|
||
using StringTools; | ||
|
||
typedef SwagSong = | ||
{ | ||
var song:String; | ||
var notes:Array<SwagSection>; | ||
var events:Array<Dynamic>; | ||
var bpm:Float; | ||
var needsVoices:Bool; | ||
var speed:Float; | ||
|
||
var player1:String; | ||
var player2:String; | ||
var gfVersion:String; | ||
var stage:String; | ||
|
||
var songCredit:String; | ||
|
||
var arrowSkin:String; | ||
var splashSkin:String; | ||
var validScore:Bool; | ||
} | ||
|
||
class Song | ||
{ | ||
public var song:String; | ||
public var notes:Array<SwagSection>; | ||
public var events:Array<Dynamic>; | ||
public var bpm:Float; | ||
public var needsVoices:Bool = true; | ||
public var arrowSkin:String; | ||
public var splashSkin:String; | ||
public var speed:Float = 1; | ||
public var stage:String; | ||
public var songCredit:String; | ||
public var player1:String = 'bf'; | ||
public var player2:String = 'dad'; | ||
public var gfVersion:String = 'gf'; | ||
public var gfVersion2:String = 'gf-bent'; | ||
|
||
private static function onLoadJson(songJson:Dynamic) // Convert old charts to newest format | ||
{ | ||
if(songJson.gfVersion == null) | ||
{ | ||
songJson.gfVersion = songJson.player3; | ||
songJson.player3 = null; | ||
} | ||
|
||
if(songJson.events == null) | ||
{ | ||
songJson.events = []; | ||
for (secNum in 0...songJson.notes.length) | ||
{ | ||
var sec:SwagSection = songJson.notes[secNum]; | ||
|
||
var i:Int = 0; | ||
var notes:Array<Dynamic> = sec.sectionNotes; | ||
var len:Int = notes.length; | ||
while(i < len) | ||
{ | ||
var note:Array<Dynamic> = notes[i]; | ||
if(note[1] < 0) | ||
{ | ||
songJson.events.push([note[0], [[note[2], note[3], note[4]]]]); | ||
notes.remove(note); | ||
len = notes.length; | ||
} | ||
else i++; | ||
} | ||
} | ||
} | ||
} | ||
|
||
public function new(song, notes, bpm) | ||
{ | ||
this.song = song; | ||
this.notes = notes; | ||
this.bpm = bpm; | ||
} | ||
|
||
public static function loadFromJson(jsonInput:String, ?folder:String):SwagSong | ||
{ | ||
var rawJson = null; | ||
|
||
var formattedFolder:String = Paths.formatToSongPath(folder); | ||
var formattedSong:String = Paths.formatToSongPath(jsonInput); | ||
#if MODS_ALLOWED | ||
var moddyFile:String = Paths.modsJson(formattedFolder + '/' + formattedSong); | ||
if(FileSystem.exists(moddyFile)) { | ||
rawJson = File.getContent(moddyFile).trim(); | ||
} | ||
#end | ||
|
||
if(rawJson == null) { | ||
#if sys | ||
rawJson = File.getContent(SUtil.getPath() + Paths.json(formattedFolder + '/' + formattedSong)).trim(); | ||
#else | ||
rawJson = Assets.getText(Paths.json(formattedFolder + '/' + formattedSong)).trim(); | ||
#end | ||
} | ||
|
||
while (!rawJson.endsWith("}")) | ||
{ | ||
rawJson = rawJson.substr(0, rawJson.length - 1); | ||
// LOL GOING THROUGH THE BULLSHIT TO CLEAN IDK WHATS STRANGE | ||
} | ||
|
||
// FIX THE CASTING ON WINDOWS/NATIVE | ||
// Windows??? | ||
// trace(songData); | ||
|
||
// trace('LOADED FROM JSON: ' + songData.notes); | ||
/* | ||
for (i in 0...songData.notes.length) | ||
{ | ||
trace('LOADED FROM JSON: ' + songData.notes[i].sectionNotes); | ||
// songData.notes[i].sectionNotes = songData.notes[i].sectionNotes | ||
} | ||
daNotes = songData.notes; | ||
daSong = songData.song; | ||
daBpm = songData.bpm; */ | ||
|
||
var songJson:Dynamic = parseJSONshit(rawJson); | ||
if(jsonInput != 'events') StageData.loadDirectory(songJson); | ||
onLoadJson(songJson); | ||
return songJson; | ||
} | ||
|
||
public static function parseJSONshit(rawJson:String):SwagSong | ||
{ | ||
var swagShit:SwagSong = cast Json.parse(rawJson).song; | ||
swagShit.validScore = true; | ||
return swagShit; | ||
} | ||
} | ||
package; | ||
|
||
import Section.SwagSection; | ||
import haxe.Json; | ||
import haxe.format.JsonParser; | ||
import lime.utils.Assets; | ||
|
||
#if sys | ||
import sys.io.File; | ||
import sys.FileSystem; | ||
#end | ||
|
||
using StringTools; | ||
|
||
typedef SwagSong = | ||
{ | ||
var song:String; | ||
var notes:Array<SwagSection>; | ||
var events:Array<Dynamic>; | ||
var bpm:Float; | ||
var needsVoices:Bool; | ||
var speed:Float; | ||
|
||
var player1:String; | ||
var player2:String; | ||
var gfVersion:String; | ||
var stage:String; | ||
|
||
var songCredit:String; | ||
|
||
var arrowSkin:String; | ||
var splashSkin:String; | ||
var validScore:Bool; | ||
} | ||
|
||
class Song | ||
{ | ||
public var song:String; | ||
public var notes:Array<SwagSection>; | ||
public var events:Array<Dynamic>; | ||
public var bpm:Float; | ||
public var needsVoices:Bool = true; | ||
public var arrowSkin:String; | ||
public var splashSkin:String; | ||
public var speed:Float = 1; | ||
public var stage:String; | ||
public var songCredit:String; | ||
public var player1:String = 'bf'; | ||
public var player2:String = 'dad'; | ||
public var gfVersion:String = 'gf'; | ||
public var gfVersion2:String = 'gf-bent'; | ||
|
||
private static function onLoadJson(songJson:Dynamic) // Convert old charts to newest format | ||
{ | ||
if(songJson.gfVersion == null) | ||
{ | ||
songJson.gfVersion = songJson.player3; | ||
songJson.player3 = null; | ||
} | ||
|
||
if(songJson.events == null) | ||
{ | ||
songJson.events = []; | ||
for (secNum in 0...songJson.notes.length) | ||
{ | ||
var sec:SwagSection = songJson.notes[secNum]; | ||
|
||
var i:Int = 0; | ||
var notes:Array<Dynamic> = sec.sectionNotes; | ||
var len:Int = notes.length; | ||
while(i < len) | ||
{ | ||
var note:Array<Dynamic> = notes[i]; | ||
if(note[1] < 0) | ||
{ | ||
songJson.events.push([note[0], [[note[2], note[3], note[4]]]]); | ||
notes.remove(note); | ||
len = notes.length; | ||
} | ||
else i++; | ||
} | ||
} | ||
} | ||
} | ||
|
||
public function new(song, notes, bpm) | ||
{ | ||
this.song = song; | ||
this.notes = notes; | ||
this.bpm = bpm; | ||
} | ||
|
||
public static function loadFromJson(jsonInput:String, ?folder:String):SwagSong | ||
{ | ||
var rawJson = null; | ||
|
||
var formattedFolder:String = Paths.formatToSongPath(folder); | ||
var formattedSong:String = Paths.formatToSongPath(jsonInput); | ||
#if MODS_ALLOWED | ||
var moddyFile:String = Paths.modsJson(formattedFolder + '/' + formattedSong); | ||
if(FileSystem.exists(moddyFile)) { | ||
rawJson = File.getContent(moddyFile).trim(); | ||
} | ||
#end | ||
|
||
if(rawJson == null) { | ||
#if sys | ||
rawJson = File.getContent(SUtil.getPath() + Paths.json(formattedFolder + '/' + formattedSong)).trim(); | ||
#else | ||
rawJson = Assets.getText(Paths.json(formattedFolder + '/' + formattedSong)).trim(); | ||
#end | ||
} | ||
|
||
while (!rawJson.endsWith("}")) | ||
{ | ||
rawJson = rawJson.substr(0, rawJson.length - 1); | ||
// LOL GOING THROUGH THE BULLSHIT TO CLEAN IDK WHATS STRANGE | ||
} | ||
|
||
// FIX THE CASTING ON WINDOWS/NATIVE | ||
// Windows??? | ||
// trace(songData); | ||
|
||
// trace('LOADED FROM JSON: ' + songData.notes); | ||
/* | ||
for (i in 0...songData.notes.length) | ||
{ | ||
trace('LOADED FROM JSON: ' + songData.notes[i].sectionNotes); | ||
// songData.notes[i].sectionNotes = songData.notes[i].sectionNotes | ||
} | ||
daNotes = songData.notes; | ||
daSong = songData.song; | ||
daBpm = songData.bpm; */ | ||
|
||
var songJson:Dynamic = parseJSONshit(rawJson); | ||
if(jsonInput != 'events') StageData.loadDirectory(songJson); | ||
onLoadJson(songJson); | ||
return songJson; | ||
} | ||
|
||
public static function parseJSONshit(rawJson:String):SwagSong | ||
{ | ||
var swagShit:SwagSong = cast Json.parse(rawJson).song; | ||
swagShit.validScore = true; | ||
return swagShit; | ||
} | ||
} |
Oops, something went wrong.