Merge branch 'master' of https://github.com/KadeDev/Kade-Engine
This commit is contained in:
commit
15b3278514
@ -202,27 +202,20 @@ class FreeplayState extends MusicBeatState
|
|||||||
|
|
||||||
if (accepted)
|
if (accepted)
|
||||||
{
|
{
|
||||||
// pre lowercasing the song name (update)
|
// adjusting the song name to be compatible
|
||||||
var songLowercase = StringTools.replace(songs[curSelected].songName, " ", "-").toLowerCase();
|
var songFormat = StringTools.replace(songs[curSelected].songName, " ", "-");
|
||||||
switch (songLowercase) {
|
switch (songFormat) {
|
||||||
case 'dad-battle': songLowercase = 'dadbattle';
|
case 'Dad-Battle': songFormat = 'Dadbattle';
|
||||||
case 'philly-nice': songLowercase = 'philly';
|
case 'Philly-Nice': songFormat = 'Philly';
|
||||||
}
|
|
||||||
// adjusting the highscore song name to be compatible (update)
|
|
||||||
// would read original scores if we didn't change packages
|
|
||||||
var songHighscore = StringTools.replace(songs[curSelected].songName, " ", "-");
|
|
||||||
switch (songHighscore) {
|
|
||||||
case 'Dad-Battle': songHighscore = 'Dadbattle';
|
|
||||||
case 'Philly-Nice': songHighscore = 'Philly';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
trace(songLowercase);
|
trace(songs[curSelected].songName);
|
||||||
|
|
||||||
var poop:String = Highscore.formatSong(songHighscore, curDifficulty);
|
var poop:String = Highscore.formatSong(songFormat, curDifficulty);
|
||||||
|
|
||||||
trace(poop);
|
trace(poop);
|
||||||
|
|
||||||
PlayState.SONG = Song.loadFromJson(poop, songLowercase);
|
PlayState.SONG = Song.loadFromJson(poop, songs[curSelected].songName);
|
||||||
PlayState.isStoryMode = false;
|
PlayState.isStoryMode = false;
|
||||||
PlayState.storyDifficulty = curDifficulty;
|
PlayState.storyDifficulty = curDifficulty;
|
||||||
PlayState.storyWeek = songs[curSelected].week;
|
PlayState.storyWeek = songs[curSelected].week;
|
||||||
|
@ -81,6 +81,9 @@ class KadeEngineData
|
|||||||
if (FlxG.save.data.customStrumLine == null)
|
if (FlxG.save.data.customStrumLine == null)
|
||||||
FlxG.save.data.customStrumLine = 0;
|
FlxG.save.data.customStrumLine = 0;
|
||||||
|
|
||||||
|
if (FlxG.save.data.camzoom == null)
|
||||||
|
FlxG.save.data.camzoom = true;
|
||||||
|
|
||||||
Conductor.recalculateTimings();
|
Conductor.recalculateTimings();
|
||||||
PlayerSettings.player1.controls.loadKeyBinds();
|
PlayerSettings.player1.controls.loadKeyBinds();
|
||||||
KeyBinds.keyCheck();
|
KeyBinds.keyCheck();
|
||||||
|
@ -80,7 +80,7 @@ class LoadReplayState extends MusicBeatState
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
versionShit = new FlxText(5, FlxG.height - 34, 0, "Replay Loader (ESCAPE TO GO BACK)\nNOTICE!!!! Replays are in a beta stage, and they are probably not 100% correct. expect misses and other stuff that isn't there!", 12);
|
versionShit = new FlxText(5, FlxG.height - 34, 0, "Replay Loader (ESCAPE TO GO BACK)\nNOTICE!!!! Replays are in a beta stage, and they are probably not 100% correct. expect misses and other stuff that isn't there!\n", 12);
|
||||||
versionShit.scrollFactor.set();
|
versionShit.scrollFactor.set();
|
||||||
versionShit.setFormat("VCR OSD Mono", 16, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
|
versionShit.setFormat("VCR OSD Mono", 16, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
|
||||||
add(versionShit);
|
add(versionShit);
|
||||||
@ -102,7 +102,7 @@ class LoadReplayState extends MusicBeatState
|
|||||||
for (i in 0...songs.length)
|
for (i in 0...songs.length)
|
||||||
{
|
{
|
||||||
var pog:FreeplayState.SongMetadata = songs[i];
|
var pog:FreeplayState.SongMetadata = songs[i];
|
||||||
if (pog.songName.toLowerCase() == songName)
|
if (pog.songName == songName)
|
||||||
week = pog.week;
|
week = pog.week;
|
||||||
}
|
}
|
||||||
return week;
|
return week;
|
||||||
@ -148,9 +148,19 @@ class LoadReplayState extends MusicBeatState
|
|||||||
|
|
||||||
PlayState.loadRep = true;
|
PlayState.loadRep = true;
|
||||||
|
|
||||||
var poop:String = Highscore.formatSong(PlayState.rep.replay.songName.toLowerCase(), PlayState.rep.replay.songDiff);
|
// adjusting the song name to be compatible
|
||||||
|
var songFormat = StringTools.replace(PlayState.rep.replay.songName, " ", "-");
|
||||||
|
switch (songFormat) {
|
||||||
|
case 'Dad-Battle': songFormat = 'Dadbattle';
|
||||||
|
case 'Philly-Nice': songFormat = 'Philly';
|
||||||
|
// Replay v1.0 support
|
||||||
|
case 'dad-battle': songFormat = 'Dadbattle';
|
||||||
|
case 'philly-nice': songFormat = 'Philly';
|
||||||
|
}
|
||||||
|
|
||||||
PlayState.SONG = Song.loadFromJson(poop, PlayState.rep.replay.songName.toLowerCase());
|
var poop:String = Highscore.formatSong(songFormat, PlayState.rep.replay.songDiff);
|
||||||
|
|
||||||
|
PlayState.SONG = Song.loadFromJson(poop, PlayState.rep.replay.songName);
|
||||||
PlayState.isStoryMode = false;
|
PlayState.isStoryMode = false;
|
||||||
PlayState.storyDifficulty = PlayState.rep.replay.songDiff;
|
PlayState.storyDifficulty = PlayState.rep.replay.songDiff;
|
||||||
PlayState.storyWeek = getWeekNumbFromSong(PlayState.rep.replay.songName);
|
PlayState.storyWeek = getWeekNumbFromSong(PlayState.rep.replay.songName);
|
||||||
@ -177,7 +187,7 @@ class LoadReplayState extends MusicBeatState
|
|||||||
|
|
||||||
var rep:Replay = Replay.LoadReplay(actualNames[curSelected]);
|
var rep:Replay = Replay.LoadReplay(actualNames[curSelected]);
|
||||||
|
|
||||||
poggerDetails.text = "Replay Details - \nDate Created: " + rep.replay.timestamp + "\nSong: " + rep.replay.songName + "\nReplay Version: " + (rep.replay.replayGameVer != Replay.version ? "OUTDATED" : "Latest");
|
poggerDetails.text = "Replay Details - \nDate Created: " + rep.replay.timestamp + "\nSong: " + rep.replay.songName + "\nReplay Version: " + rep.replay.replayGameVer + ' (' + (rep.replay.replayGameVer != Replay.version ? "OUTDATED but still usable" : "Latest") + ')\n';
|
||||||
|
|
||||||
// selector.y = (70 * curSelected) + 30;
|
// selector.y = (70 * curSelected) + 30;
|
||||||
|
|
||||||
|
@ -256,11 +256,18 @@ class ModchartState
|
|||||||
function makeAnimatedLuaSprite(spritePath:String,names:Array<String>,prefixes:Array<String>,startAnim:String, id:String)
|
function makeAnimatedLuaSprite(spritePath:String,names:Array<String>,prefixes:Array<String>,startAnim:String, id:String)
|
||||||
{
|
{
|
||||||
#if sys
|
#if sys
|
||||||
var data:BitmapData = BitmapData.fromFile(Sys.getCwd() + "assets/data/" + PlayState.SONG.song.toLowerCase() + '/' + spritePath + ".png");
|
// pre lowercasing the song name (makeAnimatedLuaSprite)
|
||||||
|
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||||
|
switch (songLowercase) {
|
||||||
|
case 'dad-battle': songLowercase = 'dadbattle';
|
||||||
|
case 'philly-nice': songLowercase = 'philly';
|
||||||
|
}
|
||||||
|
|
||||||
|
var data:BitmapData = BitmapData.fromFile(Sys.getCwd() + "assets/data/" + songLowercase + '/' + spritePath + ".png");
|
||||||
|
|
||||||
var sprite:FlxSprite = new FlxSprite(0,0);
|
var sprite:FlxSprite = new FlxSprite(0,0);
|
||||||
|
|
||||||
sprite.frames = FlxAtlasFrames.fromSparrow(FlxGraphic.fromBitmapData(data), Sys.getCwd() + "assets/data/" + PlayState.SONG.song.toLowerCase() + "/" + spritePath + ".xml");
|
sprite.frames = FlxAtlasFrames.fromSparrow(FlxGraphic.fromBitmapData(data), Sys.getCwd() + "assets/data/" + songLowercase + "/" + spritePath + ".xml");
|
||||||
|
|
||||||
trace(sprite.frames.frames.length);
|
trace(sprite.frames.frames.length);
|
||||||
|
|
||||||
@ -283,7 +290,14 @@ class ModchartState
|
|||||||
function makeLuaSprite(spritePath:String,toBeCalled:String, drawBehind:Bool)
|
function makeLuaSprite(spritePath:String,toBeCalled:String, drawBehind:Bool)
|
||||||
{
|
{
|
||||||
#if sys
|
#if sys
|
||||||
var data:BitmapData = BitmapData.fromFile(Sys.getCwd() + "assets/data/" + PlayState.SONG.song.toLowerCase() + '/' + spritePath + ".png");
|
// pre lowercasing the song name (makeLuaSprite)
|
||||||
|
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||||
|
switch (songLowercase) {
|
||||||
|
case 'dad-battle': songLowercase = 'dadbattle';
|
||||||
|
case 'philly-nice': songLowercase = 'philly';
|
||||||
|
}
|
||||||
|
|
||||||
|
var data:BitmapData = BitmapData.fromFile(Sys.getCwd() + "assets/data/" + songLowercase + '/' + spritePath + ".png");
|
||||||
|
|
||||||
var sprite:FlxSprite = new FlxSprite(0,0);
|
var sprite:FlxSprite = new FlxSprite(0,0);
|
||||||
var imgWidth:Float = FlxG.width / data.width;
|
var imgWidth:Float = FlxG.width / data.width;
|
||||||
@ -346,7 +360,14 @@ class ModchartState
|
|||||||
|
|
||||||
//shaders = new Array<LuaShader>();
|
//shaders = new Array<LuaShader>();
|
||||||
|
|
||||||
var result = LuaL.dofile(lua, Paths.lua(PlayState.SONG.song.toLowerCase() + "/modchart")); // execute le file
|
// pre lowercasing the song name (new)
|
||||||
|
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||||
|
switch (songLowercase) {
|
||||||
|
case 'dad-battle': songLowercase = 'dadbattle';
|
||||||
|
case 'philly-nice': songLowercase = 'philly';
|
||||||
|
}
|
||||||
|
|
||||||
|
var result = LuaL.dofile(lua, Paths.lua(songLowercase + "/modchart")); // execute le file
|
||||||
|
|
||||||
if (result != 0)
|
if (result != 0)
|
||||||
{
|
{
|
||||||
@ -362,6 +383,8 @@ class ModchartState
|
|||||||
setVar("scrollspeed", FlxG.save.data.scrollSpeed != 1 ? FlxG.save.data.scrollSpeed : PlayState.SONG.speed);
|
setVar("scrollspeed", FlxG.save.data.scrollSpeed != 1 ? FlxG.save.data.scrollSpeed : PlayState.SONG.speed);
|
||||||
setVar("fpsCap", FlxG.save.data.fpsCap);
|
setVar("fpsCap", FlxG.save.data.fpsCap);
|
||||||
setVar("downscroll", FlxG.save.data.downscroll);
|
setVar("downscroll", FlxG.save.data.downscroll);
|
||||||
|
setVar("flashing", FlxG.save.data.flashing);
|
||||||
|
setVar("distractions", FlxG.save.data.distractions);
|
||||||
|
|
||||||
setVar("curStep", 0);
|
setVar("curStep", 0);
|
||||||
setVar("curBeat", 0);
|
setVar("curBeat", 0);
|
||||||
|
@ -59,7 +59,14 @@ class Note extends FlxSprite
|
|||||||
|
|
||||||
var daStage:String = PlayState.curStage;
|
var daStage:String = PlayState.curStage;
|
||||||
|
|
||||||
switch (PlayState.SONG.noteStyle)
|
//defaults if no noteStyle was found in chart
|
||||||
|
var noteTypeCheck:String = 'normal';
|
||||||
|
|
||||||
|
if (PlayState.SONG.noteStyle == null) {
|
||||||
|
switch(PlayState.storyWeek) {case 6: noteTypeCheck = 'pixel';}
|
||||||
|
} else {noteTypeCheck = PlayState.SONG.noteStyle;}
|
||||||
|
|
||||||
|
switch (noteTypeCheck)
|
||||||
{
|
{
|
||||||
case 'pixel':
|
case 'pixel':
|
||||||
loadGraphic(Paths.image('weeb/pixelUI/arrows-pixels','week6'), true, 17, 17);
|
loadGraphic(Paths.image('weeb/pixelUI/arrows-pixels','week6'), true, 17, 17);
|
||||||
|
@ -614,3 +614,23 @@ class BotPlay extends Option
|
|||||||
private override function updateDisplay():String
|
private override function updateDisplay():String
|
||||||
return "BotPlay " + (FlxG.save.data.botplay ? "on" : "off");
|
return "BotPlay " + (FlxG.save.data.botplay ? "on" : "off");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class CamZoomOption extends Option
|
||||||
|
{
|
||||||
|
public function new(desc:String)
|
||||||
|
{
|
||||||
|
super();
|
||||||
|
description = desc;
|
||||||
|
}
|
||||||
|
public override function press():Bool
|
||||||
|
{
|
||||||
|
FlxG.save.data.camzoom = !FlxG.save.data.camzoom;
|
||||||
|
display = updateDisplay();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private override function updateDisplay():String
|
||||||
|
{
|
||||||
|
return "Camera Zoom " + (!FlxG.save.data.camzoom ? "off" : "on");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -39,15 +39,14 @@ class OptionsMenu extends MusicBeatState
|
|||||||
new CustomizeGameplay("Drag'n'Drop Gameplay Modules around to your preference")
|
new CustomizeGameplay("Drag'n'Drop Gameplay Modules around to your preference")
|
||||||
]),
|
]),
|
||||||
new OptionCategory("Appearance", [
|
new OptionCategory("Appearance", [
|
||||||
#if desktop
|
|
||||||
new DistractionsAndEffectsOption("Toggle stage distractions that can hinder your gameplay."),
|
new DistractionsAndEffectsOption("Toggle stage distractions that can hinder your gameplay."),
|
||||||
|
new CamZoomOption("Toggle the camera zoom in-game."),
|
||||||
|
#if desktop
|
||||||
new RainbowFPSOption("Make the FPS Counter Rainbow"),
|
new RainbowFPSOption("Make the FPS Counter Rainbow"),
|
||||||
new AccuracyOption("Display accuracy information."),
|
new AccuracyOption("Display accuracy information."),
|
||||||
new NPSDisplayOption("Shows your current Notes Per Second."),
|
new NPSDisplayOption("Shows your current Notes Per Second."),
|
||||||
new SongPositionOption("Show the songs current position (as a bar)"),
|
new SongPositionOption("Show the songs current position (as a bar)"),
|
||||||
new CpuStrums("CPU's strumline lights up when a note hits it."),
|
new CpuStrums("CPU's strumline lights up when a note hits it."),
|
||||||
#else
|
|
||||||
new DistractionsAndEffectsOption("Toggle stage distractions that can hinder your gameplay.")
|
|
||||||
#end
|
#end
|
||||||
]),
|
]),
|
||||||
|
|
||||||
|
@ -104,7 +104,14 @@ class PauseSubState extends MusicBeatSubstate
|
|||||||
var rightP = controls.RIGHT_P;
|
var rightP = controls.RIGHT_P;
|
||||||
var accepted = controls.ACCEPT;
|
var accepted = controls.ACCEPT;
|
||||||
var oldOffset:Float = 0;
|
var oldOffset:Float = 0;
|
||||||
var songPath = 'assets/data/' + PlayState.SONG.song.toLowerCase() + '/';
|
|
||||||
|
// pre lowercasing the song name (update)
|
||||||
|
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||||
|
switch (songLowercase) {
|
||||||
|
case 'dad-battle': songLowercase = 'dadbattle';
|
||||||
|
case 'philly-nice': songLowercase = 'philly';
|
||||||
|
}
|
||||||
|
var songPath = 'assets/data/' + songLowercase + '/';
|
||||||
|
|
||||||
if (upP)
|
if (upP)
|
||||||
{
|
{
|
||||||
|
@ -310,7 +310,7 @@ class PlayState extends MusicBeatState
|
|||||||
persistentDraw = true;
|
persistentDraw = true;
|
||||||
|
|
||||||
if (SONG == null)
|
if (SONG == null)
|
||||||
SONG = Song.loadFromJson('tutorial');
|
SONG = Song.loadFromJson('tutorial', 'tutorial');
|
||||||
|
|
||||||
Conductor.mapBPMChanges(SONG);
|
Conductor.mapBPMChanges(SONG);
|
||||||
Conductor.changeBPM(SONG.bpm);
|
Conductor.changeBPM(SONG.bpm);
|
||||||
@ -345,7 +345,22 @@ class PlayState extends MusicBeatState
|
|||||||
dialogue = CoolUtil.coolTextFile(Paths.txt('thorns/thornsDialogue'));
|
dialogue = CoolUtil.coolTextFile(Paths.txt('thorns/thornsDialogue'));
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(SONG.stage)
|
//defaults if no stage was found in chart
|
||||||
|
var stageCheck:String = 'stage';
|
||||||
|
|
||||||
|
if (SONG.stage == null) {
|
||||||
|
switch(storyWeek)
|
||||||
|
{
|
||||||
|
case 2: stageCheck = 'halloween';
|
||||||
|
case 3: stageCheck = 'philly';
|
||||||
|
case 4: stageCheck = 'limo';
|
||||||
|
case 5: if (songLowercase == 'winter-horrorland') {stageCheck = 'mallEvil';} else {stageCheck = 'mall';}
|
||||||
|
case 6: if (songLowercase == 'thorns') {stageCheck = 'schoolEvil';} else {stageCheck = 'school';}
|
||||||
|
//i should check if its stage (but this is when none is found in chart anyway)
|
||||||
|
}
|
||||||
|
} else {stageCheck = SONG.stage;}
|
||||||
|
|
||||||
|
switch(stageCheck)
|
||||||
{
|
{
|
||||||
case 'halloween':
|
case 'halloween':
|
||||||
{
|
{
|
||||||
@ -724,21 +739,33 @@ class PlayState extends MusicBeatState
|
|||||||
add(stageCurtains);
|
add(stageCurtains);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var gfVersion:String = 'gf';
|
|
||||||
|
|
||||||
switch (SONG.gfVersion)
|
//defaults if no gf was found in chart
|
||||||
|
var gfCheck:String = 'gf';
|
||||||
|
|
||||||
|
if (SONG.gfVersion == null) {
|
||||||
|
switch(storyWeek)
|
||||||
|
{
|
||||||
|
case 4: gfCheck = 'gf-car';
|
||||||
|
case 5: gfCheck = 'gf-christmas';
|
||||||
|
case 6: gfCheck = 'gf-pixel';
|
||||||
|
}
|
||||||
|
} else {gfCheck = SONG.gfVersion;}
|
||||||
|
|
||||||
|
var curGf:String = '';
|
||||||
|
switch (gfCheck)
|
||||||
{
|
{
|
||||||
case 'gf-car':
|
case 'gf-car':
|
||||||
gfVersion = 'gf-car';
|
curGf = 'gf-car';
|
||||||
case 'gf-christmas':
|
case 'gf-christmas':
|
||||||
gfVersion = 'gf-christmas';
|
curGf = 'gf-christmas';
|
||||||
case 'gf-pixel':
|
case 'gf-pixel':
|
||||||
gfVersion = 'gf-pixel';
|
curGf = 'gf-pixel';
|
||||||
default:
|
default:
|
||||||
gfVersion = 'gf';
|
curGf = 'gf';
|
||||||
}
|
}
|
||||||
|
|
||||||
gf = new Character(400, 130, gfVersion);
|
gf = new Character(400, 130, curGf);
|
||||||
gf.scrollFactor.set(0.95, 0.95);
|
gf.scrollFactor.set(0.95, 0.95);
|
||||||
|
|
||||||
dad = new Character(100, 100, SONG.player2);
|
dad = new Character(100, 100, SONG.player2);
|
||||||
@ -1079,17 +1106,11 @@ class PlayState extends MusicBeatState
|
|||||||
senpaiEvil.updateHitbox();
|
senpaiEvil.updateHitbox();
|
||||||
senpaiEvil.screenCenter();
|
senpaiEvil.screenCenter();
|
||||||
|
|
||||||
// pre lowercasing the song name (schoolIntro)
|
if (StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase() == 'roses' || StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase() == 'thorns')
|
||||||
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
|
||||||
switch (songLowercase) {
|
|
||||||
case 'dad-battle': songLowercase = 'dadbattle';
|
|
||||||
case 'philly-nice': songLowercase = 'philly';
|
|
||||||
}
|
|
||||||
if (songLowercase == 'roses' || songLowercase == 'thorns')
|
|
||||||
{
|
{
|
||||||
remove(black);
|
remove(black);
|
||||||
|
|
||||||
if (songLowercase == 'thorns')
|
if (StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase() == 'thorns')
|
||||||
{
|
{
|
||||||
add(red);
|
add(red);
|
||||||
}
|
}
|
||||||
@ -1109,7 +1130,7 @@ class PlayState extends MusicBeatState
|
|||||||
{
|
{
|
||||||
inCutscene = true;
|
inCutscene = true;
|
||||||
|
|
||||||
if (songLowercase == 'thorns')
|
if (StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase() == 'thorns')
|
||||||
{
|
{
|
||||||
add(senpaiEvil);
|
add(senpaiEvil);
|
||||||
senpaiEvil.alpha = 0;
|
senpaiEvil.alpha = 0;
|
||||||
@ -1170,10 +1191,16 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
|
|
||||||
#if windows
|
#if windows
|
||||||
|
// pre lowercasing the song name (startCountdown)
|
||||||
|
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||||
|
switch (songLowercase) {
|
||||||
|
case 'dad-battle': songLowercase = 'dadbattle';
|
||||||
|
case 'philly-nice': songLowercase = 'philly';
|
||||||
|
}
|
||||||
if (executeModchart)
|
if (executeModchart)
|
||||||
{
|
{
|
||||||
luaModchart = ModchartState.createModchartState();
|
luaModchart = ModchartState.createModchartState();
|
||||||
luaModchart.executeState('start',[PlayState.SONG.song]);
|
luaModchart.executeState('start',[songLowercase]);
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
|
|
||||||
@ -1385,14 +1412,15 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
var playerCounter:Int = 0;
|
var playerCounter:Int = 0;
|
||||||
|
|
||||||
|
// Per song offset check
|
||||||
|
#if windows
|
||||||
// pre lowercasing the song name (generateSong)
|
// pre lowercasing the song name (generateSong)
|
||||||
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||||
switch (songLowercase) {
|
switch (songLowercase) {
|
||||||
case 'dad-battle': songLowercase = 'dadbattle';
|
case 'dad-battle': songLowercase = 'dadbattle';
|
||||||
case 'philly-nice': songLowercase = 'philly';
|
case 'philly-nice': songLowercase = 'philly';
|
||||||
}
|
}
|
||||||
// Per song offset check
|
|
||||||
#if windows
|
|
||||||
var songPath = 'assets/data/' + songLowercase + '/';
|
var songPath = 'assets/data/' + songLowercase + '/';
|
||||||
|
|
||||||
for(file in sys.FileSystem.readDirectory(songPath))
|
for(file in sys.FileSystem.readDirectory(songPath))
|
||||||
@ -1495,7 +1523,14 @@ class PlayState extends MusicBeatState
|
|||||||
// FlxG.log.add(i);
|
// FlxG.log.add(i);
|
||||||
var babyArrow:FlxSprite = new FlxSprite(0, strumLine.y);
|
var babyArrow:FlxSprite = new FlxSprite(0, strumLine.y);
|
||||||
|
|
||||||
switch (SONG.noteStyle)
|
//defaults if no noteStyle was found in chart
|
||||||
|
var noteTypeCheck:String = 'normal';
|
||||||
|
|
||||||
|
if (SONG.noteStyle == null) {
|
||||||
|
switch(storyWeek) {case 6: noteTypeCheck = 'pixel';}
|
||||||
|
} else {noteTypeCheck = SONG.noteStyle;}
|
||||||
|
|
||||||
|
switch (noteTypeCheck)
|
||||||
{
|
{
|
||||||
case 'pixel':
|
case 'pixel':
|
||||||
babyArrow.loadGraphic(Paths.image('weeb/pixelUI/arrows-pixels'), true, 17, 17);
|
babyArrow.loadGraphic(Paths.image('weeb/pixelUI/arrows-pixels'), true, 17, 17);
|
||||||
@ -2555,30 +2590,20 @@ class PlayState extends MusicBeatState
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var difficulty:String = "";
|
|
||||||
|
|
||||||
if (storyDifficulty == 0)
|
// adjusting the song name to be compatible
|
||||||
difficulty = '-easy';
|
var songFormat = StringTools.replace(PlayState.storyPlaylist[0], " ", "-");
|
||||||
|
switch (songFormat) {
|
||||||
|
case 'Dad-Battle': songFormat = 'Dadbattle';
|
||||||
|
case 'Philly-Nice': songFormat = 'Philly';
|
||||||
|
}
|
||||||
|
|
||||||
if (storyDifficulty == 2)
|
var poop:String = Highscore.formatSong(songFormat, storyDifficulty);
|
||||||
difficulty = '-hard';
|
|
||||||
|
|
||||||
trace('LOADING NEXT SONG');
|
trace('LOADING NEXT SONG');
|
||||||
// pre lowercasing the next story song name
|
trace(poop);
|
||||||
var nextSongLowercase = StringTools.replace(PlayState.storyPlaylist[0], " ", "-").toLowerCase();
|
|
||||||
switch (nextSongLowercase) {
|
|
||||||
case 'dad-battle': nextSongLowercase = 'dadbattle';
|
|
||||||
case 'philly-nice': nextSongLowercase = 'philly';
|
|
||||||
}
|
|
||||||
trace(nextSongLowercase + difficulty);
|
|
||||||
|
|
||||||
// pre lowercasing the song name (endSong)
|
if (StringTools.replace(PlayState.storyPlaylist[0], " ", "-").toLowerCase() == 'eggnog')
|
||||||
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
|
||||||
switch (songLowercase) {
|
|
||||||
case 'dad-battle': songLowercase = 'dadbattle';
|
|
||||||
case 'philly-nice': songLowercase = 'philly';
|
|
||||||
}
|
|
||||||
if (songLowercase == 'eggnog')
|
|
||||||
{
|
{
|
||||||
var blackShit:FlxSprite = new FlxSprite(-FlxG.width * FlxG.camera.zoom,
|
var blackShit:FlxSprite = new FlxSprite(-FlxG.width * FlxG.camera.zoom,
|
||||||
-FlxG.height * FlxG.camera.zoom).makeGraphic(FlxG.width * 3, FlxG.height * 3, FlxColor.BLACK);
|
-FlxG.height * FlxG.camera.zoom).makeGraphic(FlxG.width * 3, FlxG.height * 3, FlxColor.BLACK);
|
||||||
@ -2593,7 +2618,8 @@ class PlayState extends MusicBeatState
|
|||||||
FlxTransitionableState.skipNextTransOut = true;
|
FlxTransitionableState.skipNextTransOut = true;
|
||||||
prevCamFollow = camFollow;
|
prevCamFollow = camFollow;
|
||||||
|
|
||||||
PlayState.SONG = Song.loadFromJson(nextSongLowercase + difficulty, PlayState.storyPlaylist[0]);
|
|
||||||
|
PlayState.SONG = Song.loadFromJson(poop, PlayState.storyPlaylist[0]);
|
||||||
FlxG.sound.music.stop();
|
FlxG.sound.music.stop();
|
||||||
|
|
||||||
LoadingState.loadAndSwitchState(new PlayState());
|
LoadingState.loadAndSwitchState(new PlayState());
|
||||||
@ -3556,6 +3582,8 @@ class PlayState extends MusicBeatState
|
|||||||
// FlxG.log.add('change bpm' + SONG.notes[Std.int(curStep / 16)].changeBPM);
|
// FlxG.log.add('change bpm' + SONG.notes[Std.int(curStep / 16)].changeBPM);
|
||||||
wiggleShit.update(Conductor.crochet);
|
wiggleShit.update(Conductor.crochet);
|
||||||
|
|
||||||
|
if (FlxG.save.data.camzoom)
|
||||||
|
{
|
||||||
// HARDCODING FOR MILF ZOOMS!
|
// HARDCODING FOR MILF ZOOMS!
|
||||||
if (curSong.toLowerCase() == 'milf' && curBeat >= 168 && curBeat < 200 && camZooming && FlxG.camera.zoom < 1.35)
|
if (curSong.toLowerCase() == 'milf' && curBeat >= 168 && curBeat < 200 && camZooming && FlxG.camera.zoom < 1.35)
|
||||||
{
|
{
|
||||||
@ -3574,6 +3602,7 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
iconP1.updateHitbox();
|
iconP1.updateHitbox();
|
||||||
iconP2.updateHitbox();
|
iconP2.updateHitbox();
|
||||||
|
}
|
||||||
|
|
||||||
if (curBeat % gfSpeed == 0)
|
if (curBeat % gfSpeed == 0)
|
||||||
{
|
{
|
||||||
|
@ -24,7 +24,7 @@ typedef ReplayJSON =
|
|||||||
|
|
||||||
class Replay
|
class Replay
|
||||||
{
|
{
|
||||||
public static var version:String = "1.0"; // replay file version
|
public static var version:String = "1.1"; // replay file version
|
||||||
|
|
||||||
public var path:String = "";
|
public var path:String = "";
|
||||||
public var replay:ReplayJSON;
|
public var replay:ReplayJSON;
|
||||||
@ -32,7 +32,7 @@ class Replay
|
|||||||
{
|
{
|
||||||
this.path = path;
|
this.path = path;
|
||||||
replay = {
|
replay = {
|
||||||
songName: "Tutorial",
|
songName: "No Song Found",
|
||||||
songDiff: 1,
|
songDiff: 1,
|
||||||
noteSpeed: 1.5,
|
noteSpeed: 1.5,
|
||||||
isDownscroll: false,
|
isDownscroll: false,
|
||||||
@ -56,7 +56,7 @@ class Replay
|
|||||||
public function SaveReplay(notearray:Array<Float>)
|
public function SaveReplay(notearray:Array<Float>)
|
||||||
{
|
{
|
||||||
var json = {
|
var json = {
|
||||||
"songName": PlayState.SONG.song.toLowerCase(),
|
"songName": PlayState.SONG.song,
|
||||||
"songDiff": PlayState.storyDifficulty,
|
"songDiff": PlayState.storyDifficulty,
|
||||||
"noteSpeed": (FlxG.save.data.scrollSpeed > 1 ? FlxG.save.data.scrollSpeed : PlayState.SONG.speed),
|
"noteSpeed": (FlxG.save.data.scrollSpeed > 1 ? FlxG.save.data.scrollSpeed : PlayState.SONG.speed),
|
||||||
"isDownscroll": FlxG.save.data.downscroll,
|
"isDownscroll": FlxG.save.data.downscroll,
|
||||||
|
@ -33,9 +33,9 @@ class Song
|
|||||||
|
|
||||||
public var player1:String = 'bf';
|
public var player1:String = 'bf';
|
||||||
public var player2:String = 'dad';
|
public var player2:String = 'dad';
|
||||||
public var gfVersion:String = 'gf';
|
public var gfVersion:String = '';
|
||||||
public var noteStyle:String = 'normal';
|
public var noteStyle:String = '';
|
||||||
public var stage:String = 'stage';
|
public var stage:String = '';
|
||||||
|
|
||||||
public function new(song, notes, bpm)
|
public function new(song, notes, bpm)
|
||||||
{
|
{
|
||||||
@ -48,7 +48,7 @@ class Song
|
|||||||
{
|
{
|
||||||
trace(jsonInput);
|
trace(jsonInput);
|
||||||
|
|
||||||
// pre lowercasing the song name (update)
|
// pre lowercasing the folder name
|
||||||
var folderLowercase = StringTools.replace(folder, " ", "-").toLowerCase();
|
var folderLowercase = StringTools.replace(folder, " ", "-").toLowerCase();
|
||||||
switch (folderLowercase) {
|
switch (folderLowercase) {
|
||||||
case 'dad-battle': folderLowercase = 'dadbattle';
|
case 'dad-battle': folderLowercase = 'dadbattle';
|
||||||
|
@ -285,19 +285,19 @@ class StoryMenuState extends MusicBeatState
|
|||||||
PlayState.isStoryMode = true;
|
PlayState.isStoryMode = true;
|
||||||
selectedWeek = true;
|
selectedWeek = true;
|
||||||
|
|
||||||
var diffic = "";
|
|
||||||
|
|
||||||
switch (curDifficulty)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
diffic = '-easy';
|
|
||||||
case 2:
|
|
||||||
diffic = '-hard';
|
|
||||||
}
|
|
||||||
|
|
||||||
PlayState.storyDifficulty = curDifficulty;
|
PlayState.storyDifficulty = curDifficulty;
|
||||||
|
|
||||||
PlayState.SONG = Song.loadFromJson(StringTools.replace(PlayState.storyPlaylist[0]," ", "-").toLowerCase() + diffic, StringTools.replace(PlayState.storyPlaylist[0]," ", "-").toLowerCase());
|
// adjusting the song name to be compatible
|
||||||
|
var songFormat = StringTools.replace(PlayState.storyPlaylist[0], " ", "-");
|
||||||
|
switch (songFormat) {
|
||||||
|
case 'Dad-Battle': songFormat = 'Dadbattle';
|
||||||
|
case 'Philly-Nice': songFormat = 'Philly';
|
||||||
|
}
|
||||||
|
|
||||||
|
var poop:String = Highscore.formatSong(songFormat, curDifficulty);
|
||||||
|
|
||||||
|
PlayState.SONG = Song.loadFromJson(poop, PlayState.storyPlaylist[0]);
|
||||||
PlayState.storyWeek = curWeek;
|
PlayState.storyWeek = curWeek;
|
||||||
PlayState.campaignScore = 0;
|
PlayState.campaignScore = 0;
|
||||||
new FlxTimer().start(1, function(tmr:FlxTimer)
|
new FlxTimer().start(1, function(tmr:FlxTimer)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user