commit
3a3bea696d
@ -6,7 +6,7 @@ Spookeez:spooky:2
|
|||||||
South:spooky:2
|
South:spooky:2
|
||||||
Monster:monster:2
|
Monster:monster:2
|
||||||
Pico:pico:3
|
Pico:pico:3
|
||||||
Philly:pico:3
|
Philly Nice:pico:3
|
||||||
Blammed:pico:3
|
Blammed:pico:3
|
||||||
Satin Panties:mom:4
|
Satin Panties:mom:4
|
||||||
High:mom:4
|
High:mom:4
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -109,6 +109,30 @@ for i = 4, 7 do -- go to the center
|
|||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Jumping Arrows Example
|
||||||
|
```lua
|
||||||
|
function stepHit (step)
|
||||||
|
if step == 1 then
|
||||||
|
setActorAccelerationY(100, 4)
|
||||||
|
end
|
||||||
|
if step == 3 then
|
||||||
|
setActorAccelerationY(100, 5)
|
||||||
|
end
|
||||||
|
if step == 5 then
|
||||||
|
setActorAccelerationY(100, 6)
|
||||||
|
end
|
||||||
|
if step == 7 then
|
||||||
|
setActorAccelerationY(100, 7)
|
||||||
|
end
|
||||||
|
for i=4,7 do
|
||||||
|
if getActorY(i) >= 100 then
|
||||||
|
setActorY(100, i)
|
||||||
|
setActorVelocityY(-100, i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### Available Hooks
|
### Available Hooks
|
||||||
|
|
||||||
@ -376,10 +400,34 @@ Returns the angle for the sprite id
|
|||||||
|
|
||||||
Set's the x position for the sprite id
|
Set's the x position for the sprite id
|
||||||
|
|
||||||
|
##### setActorAccelerationX(int x, string/int id)
|
||||||
|
|
||||||
|
Sets the x acceleration for the sprite id
|
||||||
|
|
||||||
|
##### setActorDragX(int x, string/int id)
|
||||||
|
|
||||||
|
Sets the x drag for the sprite id
|
||||||
|
|
||||||
|
##### setActorVelocityX(int x, string/int id)
|
||||||
|
|
||||||
|
Sets the x velocity for the sprite id
|
||||||
|
|
||||||
##### setActorY(int y, string/int id)
|
##### setActorY(int y, string/int id)
|
||||||
|
|
||||||
Set's the y position for the sprite id
|
Set's the y position for the sprite id
|
||||||
|
|
||||||
|
##### setActorAccelerationY(int y, string/int id)
|
||||||
|
|
||||||
|
Sets the y acceleration for the sprite id
|
||||||
|
|
||||||
|
##### setActorDragY(int y, string/int id)
|
||||||
|
|
||||||
|
Sets the y drag for the sprite id
|
||||||
|
|
||||||
|
##### setActorVelocityY(int y, string/int id)
|
||||||
|
|
||||||
|
Sets the y velocity for the sprite id
|
||||||
|
|
||||||
##### setActorAlpha(float alpha, string/int id)
|
##### setActorAlpha(float alpha, string/int id)
|
||||||
|
|
||||||
Set's the alpha for the sprite id
|
Set's the alpha for the sprite id
|
||||||
|
@ -202,13 +202,27 @@ class FreeplayState extends MusicBeatState
|
|||||||
|
|
||||||
if (accepted)
|
if (accepted)
|
||||||
{
|
{
|
||||||
trace(StringTools.replace(songs[curSelected].songName," ", "-").toLowerCase());
|
// pre lowercasing the song name (update)
|
||||||
|
var songLowercase = StringTools.replace(songs[curSelected].songName, " ", "-").toLowerCase();
|
||||||
|
switch (songLowercase) {
|
||||||
|
case 'dad-battle': songLowercase = 'dadbattle';
|
||||||
|
case 'philly-nice': songLowercase = '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);
|
||||||
|
|
||||||
var poop:String = Highscore.formatSong(StringTools.replace(songs[curSelected].songName," ", "-").toLowerCase(), curDifficulty);
|
var poop:String = Highscore.formatSong(songHighscore, curDifficulty);
|
||||||
|
|
||||||
trace(poop);
|
trace(poop);
|
||||||
|
|
||||||
PlayState.SONG = Song.loadFromJson(poop, StringTools.replace(songs[curSelected].songName," ", "-").toLowerCase());
|
PlayState.SONG = Song.loadFromJson(poop, songLowercase);
|
||||||
PlayState.isStoryMode = false;
|
PlayState.isStoryMode = false;
|
||||||
PlayState.storyDifficulty = curDifficulty;
|
PlayState.storyDifficulty = curDifficulty;
|
||||||
PlayState.storyWeek = songs[curSelected].week;
|
PlayState.storyWeek = songs[curSelected].week;
|
||||||
@ -226,8 +240,15 @@ class FreeplayState extends MusicBeatState
|
|||||||
if (curDifficulty > 2)
|
if (curDifficulty > 2)
|
||||||
curDifficulty = 0;
|
curDifficulty = 0;
|
||||||
|
|
||||||
|
// adjusting the highscore song name to be compatible (changeDiff)
|
||||||
|
var songHighscore = StringTools.replace(songs[curSelected].songName, " ", "-");
|
||||||
|
switch (songHighscore) {
|
||||||
|
case 'Dad-Battle': songHighscore = 'Dadbattle';
|
||||||
|
case 'Philly-Nice': songHighscore = 'Philly';
|
||||||
|
}
|
||||||
|
|
||||||
#if !switch
|
#if !switch
|
||||||
intendedScore = Highscore.getScore(songs[curSelected].songName, curDifficulty);
|
intendedScore = Highscore.getScore(songHighscore, curDifficulty);
|
||||||
#end
|
#end
|
||||||
|
|
||||||
switch (curDifficulty)
|
switch (curDifficulty)
|
||||||
@ -258,9 +279,17 @@ class FreeplayState extends MusicBeatState
|
|||||||
curSelected = 0;
|
curSelected = 0;
|
||||||
|
|
||||||
// selector.y = (70 * curSelected) + 30;
|
// selector.y = (70 * curSelected) + 30;
|
||||||
|
|
||||||
|
// adjusting the highscore song name to be compatible (changeSelection)
|
||||||
|
// 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';
|
||||||
|
}
|
||||||
|
|
||||||
#if !switch
|
#if !switch
|
||||||
intendedScore = Highscore.getScore(songs[curSelected].songName, curDifficulty);
|
intendedScore = Highscore.getScore(songHighscore, curDifficulty);
|
||||||
// lerpScore = 0;
|
// lerpScore = 0;
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
@ -564,6 +564,18 @@ class ModchartState
|
|||||||
getActorByName(id).x = x;
|
getActorByName(id).x = x;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Lua_helper.add_callback(lua,"setActorAccelerationX", function(x:Int,id:String) {
|
||||||
|
getActorByName(id).acceleration.x = x;
|
||||||
|
});
|
||||||
|
|
||||||
|
Lua_helper.add_callback(lua,"setActorDragX", function(x:Int,id:String) {
|
||||||
|
getActorByName(id).drag.x = x;
|
||||||
|
});
|
||||||
|
|
||||||
|
Lua_helper.add_callback(lua,"setActorVelocityX", function(x:Int,id:String) {
|
||||||
|
getActorByName(id).velocity.x = x;
|
||||||
|
});
|
||||||
|
|
||||||
Lua_helper.add_callback(lua,"playActorAnimation", function(id:String,anim:String,force:Bool = false,reverse:Bool = false) {
|
Lua_helper.add_callback(lua,"playActorAnimation", function(id:String,anim:String,force:Bool = false,reverse:Bool = false) {
|
||||||
getActorByName(id).playAnim(anim, force, reverse);
|
getActorByName(id).playAnim(anim, force, reverse);
|
||||||
});
|
});
|
||||||
@ -575,7 +587,19 @@ class ModchartState
|
|||||||
Lua_helper.add_callback(lua,"setActorY", function(y:Int,id:String) {
|
Lua_helper.add_callback(lua,"setActorY", function(y:Int,id:String) {
|
||||||
getActorByName(id).y = y;
|
getActorByName(id).y = y;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Lua_helper.add_callback(lua,"setActorAccelerationY", function(y:Int,id:String) {
|
||||||
|
getActorByName(id).acceleration.y = y;
|
||||||
|
});
|
||||||
|
|
||||||
|
Lua_helper.add_callback(lua,"setActorDragY", function(y:Int,id:String) {
|
||||||
|
getActorByName(id).drag.y = y;
|
||||||
|
});
|
||||||
|
|
||||||
|
Lua_helper.add_callback(lua,"setActorVelocityY", function(y:Int,id:String) {
|
||||||
|
getActorByName(id).velocity.y = y;
|
||||||
|
});
|
||||||
|
|
||||||
Lua_helper.add_callback(lua,"setActorAngle", function(angle:Int,id:String) {
|
Lua_helper.add_callback(lua,"setActorAngle", function(angle:Int,id:String) {
|
||||||
getActorByName(id).angle = angle;
|
getActorByName(id).angle = angle;
|
||||||
});
|
});
|
||||||
|
@ -97,14 +97,22 @@ class Paths
|
|||||||
|
|
||||||
inline static public function voices(song:String)
|
inline static public function voices(song:String)
|
||||||
{
|
{
|
||||||
song = StringTools.replace(song," ", "-");
|
var songLowercase = StringTools.replace(song, " ", "-").toLowerCase();
|
||||||
return 'songs:assets/songs/${song.toLowerCase()}/Voices.$SOUND_EXT';
|
switch (songLowercase) {
|
||||||
|
case 'dad-battle': songLowercase = 'dadbattle';
|
||||||
|
case 'philly-nice': songLowercase = 'philly';
|
||||||
|
}
|
||||||
|
return 'songs:assets/songs/${songLowercase}/Voices.$SOUND_EXT';
|
||||||
}
|
}
|
||||||
|
|
||||||
inline static public function inst(song:String)
|
inline static public function inst(song:String)
|
||||||
{
|
{
|
||||||
song = StringTools.replace(song," ", "-");
|
var songLowercase = StringTools.replace(song, " ", "-").toLowerCase();
|
||||||
return 'songs:assets/songs/${song.toLowerCase()}/Inst.$SOUND_EXT';
|
switch (songLowercase) {
|
||||||
|
case 'dad-battle': songLowercase = 'dadbattle';
|
||||||
|
case 'philly-nice': songLowercase = 'philly';
|
||||||
|
}
|
||||||
|
return 'songs:assets/songs/${songLowercase}/Inst.$SOUND_EXT';
|
||||||
}
|
}
|
||||||
|
|
||||||
inline static public function image(key:String, ?library:String)
|
inline static public function image(key:String, ?library:String)
|
||||||
|
@ -236,14 +236,21 @@ class PlayState extends MusicBeatState
|
|||||||
repPresses = 0;
|
repPresses = 0;
|
||||||
repReleases = 0;
|
repReleases = 0;
|
||||||
|
|
||||||
|
// pre lowercasing the song name (create)
|
||||||
|
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||||
|
switch (songLowercase) {
|
||||||
|
case 'dad-battle': songLowercase = 'dadbattle';
|
||||||
|
case 'philly-nice': songLowercase = 'philly';
|
||||||
|
}
|
||||||
|
|
||||||
#if windows
|
#if windows
|
||||||
executeModchart = FileSystem.exists(Paths.lua(PlayState.SONG.song.toLowerCase() + "/modchart"));
|
executeModchart = FileSystem.exists(Paths.lua(songLowercase + "/modchart"));
|
||||||
#end
|
#end
|
||||||
#if !cpp
|
#if !cpp
|
||||||
executeModchart = false; // FORCE disable for non cpp targets
|
executeModchart = false; // FORCE disable for non cpp targets
|
||||||
#end
|
#end
|
||||||
|
|
||||||
trace('Mod chart: ' + executeModchart + " - " + Paths.lua(PlayState.SONG.song.toLowerCase() + "/modchart"));
|
trace('Mod chart: ' + executeModchart + " - " + Paths.lua(songLowercase + "/modchart"));
|
||||||
|
|
||||||
#if windows
|
#if windows
|
||||||
// Making difficulty text for Discord Rich Presence.
|
// Making difficulty text for Discord Rich Presence.
|
||||||
@ -310,7 +317,7 @@ class PlayState extends MusicBeatState
|
|||||||
trace('INFORMATION ABOUT WHAT U PLAYIN WIT:\nFRAMES: ' + Conductor.safeFrames + '\nZONE: ' + Conductor.safeZoneOffset + '\nTS: ' + Conductor.timeScale + '\nBotPlay : ' + FlxG.save.data.botplay);
|
trace('INFORMATION ABOUT WHAT U PLAYIN WIT:\nFRAMES: ' + Conductor.safeFrames + '\nZONE: ' + Conductor.safeZoneOffset + '\nTS: ' + Conductor.timeScale + '\nBotPlay : ' + FlxG.save.data.botplay);
|
||||||
|
|
||||||
//dialogue shit
|
//dialogue shit
|
||||||
switch (SONG.song.toLowerCase())
|
switch (songLowercase)
|
||||||
{
|
{
|
||||||
case 'tutorial':
|
case 'tutorial':
|
||||||
dialogue = ["Hey you're pretty cute.", 'Use the arrow keys to keep up \nwith me singing.'];
|
dialogue = ["Hey you're pretty cute.", 'Use the arrow keys to keep up \nwith me singing.'];
|
||||||
@ -323,7 +330,7 @@ class PlayState extends MusicBeatState
|
|||||||
];
|
];
|
||||||
case 'fresh':
|
case 'fresh':
|
||||||
dialogue = ["Not too shabby boy.", ""];
|
dialogue = ["Not too shabby boy.", ""];
|
||||||
case 'dad battle':
|
case 'dadbattle':
|
||||||
dialogue = [
|
dialogue = [
|
||||||
"gah you think you're hot stuff?",
|
"gah you think you're hot stuff?",
|
||||||
"If you can beat me here...",
|
"If you can beat me here...",
|
||||||
@ -592,7 +599,7 @@ class PlayState extends MusicBeatState
|
|||||||
bgGirls = new BackgroundGirls(-100, 190);
|
bgGirls = new BackgroundGirls(-100, 190);
|
||||||
bgGirls.scrollFactor.set(0.9, 0.9);
|
bgGirls.scrollFactor.set(0.9, 0.9);
|
||||||
|
|
||||||
if (SONG.song.toLowerCase() == 'roses')
|
if (songLowercase == 'roses')
|
||||||
{
|
{
|
||||||
if(FlxG.save.data.distractions){
|
if(FlxG.save.data.distractions){
|
||||||
bgGirls.getScared();
|
bgGirls.getScared();
|
||||||
@ -998,7 +1005,7 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
if (isStoryMode)
|
if (isStoryMode)
|
||||||
{
|
{
|
||||||
switch (curSong.toLowerCase())
|
switch (StringTools.replace(curSong," ", "-").toLowerCase())
|
||||||
{
|
{
|
||||||
case "winter-horrorland":
|
case "winter-horrorland":
|
||||||
var blackScreen:FlxSprite = new FlxSprite(0, 0).makeGraphic(Std.int(FlxG.width * 2), Std.int(FlxG.height * 2), FlxColor.BLACK);
|
var blackScreen:FlxSprite = new FlxSprite(0, 0).makeGraphic(Std.int(FlxG.width * 2), Std.int(FlxG.height * 2), FlxColor.BLACK);
|
||||||
@ -1071,11 +1078,17 @@ class PlayState extends MusicBeatState
|
|||||||
senpaiEvil.updateHitbox();
|
senpaiEvil.updateHitbox();
|
||||||
senpaiEvil.screenCenter();
|
senpaiEvil.screenCenter();
|
||||||
|
|
||||||
if (SONG.song.toLowerCase() == 'roses' || SONG.song.toLowerCase() == 'thorns')
|
// pre lowercasing the song name (schoolIntro)
|
||||||
|
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 (SONG.song.toLowerCase() == 'thorns')
|
if (songLowercase == 'thorns')
|
||||||
{
|
{
|
||||||
add(red);
|
add(red);
|
||||||
}
|
}
|
||||||
@ -1095,7 +1108,7 @@ class PlayState extends MusicBeatState
|
|||||||
{
|
{
|
||||||
inCutscene = true;
|
inCutscene = true;
|
||||||
|
|
||||||
if (SONG.song.toLowerCase() == 'thorns')
|
if (songLowercase == 'thorns')
|
||||||
{
|
{
|
||||||
add(senpaiEvil);
|
add(senpaiEvil);
|
||||||
senpaiEvil.alpha = 0;
|
senpaiEvil.alpha = 0;
|
||||||
@ -1328,7 +1341,7 @@ class PlayState extends MusicBeatState
|
|||||||
// Song check real quick
|
// Song check real quick
|
||||||
switch(curSong)
|
switch(curSong)
|
||||||
{
|
{
|
||||||
case 'Bopeebo' | 'Philly' | 'Blammed' | 'Cocoa' | 'Eggnog': allowedToHeadbang = true;
|
case 'Bopeebo' | 'Philly Nice' | 'Blammed' | 'Cocoa' | 'Eggnog': allowedToHeadbang = true;
|
||||||
default: allowedToHeadbang = false;
|
default: allowedToHeadbang = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1368,9 +1381,16 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
var playerCounter:Int = 0;
|
var playerCounter:Int = 0;
|
||||||
|
|
||||||
|
// pre lowercasing the song name (generateSong)
|
||||||
|
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||||
|
switch (songLowercase) {
|
||||||
|
case 'dad-battle': songLowercase = 'dadbattle';
|
||||||
|
case 'philly-nice': songLowercase = 'philly';
|
||||||
|
}
|
||||||
// Per song offset check
|
// Per song offset check
|
||||||
#if windows
|
#if windows
|
||||||
var songPath = 'assets/data/' + StringTools.replace(PlayState.SONG.song," ", "-").toLowerCase() + '/';
|
var songPath = 'assets/data/' + songLowercase + '/';
|
||||||
|
|
||||||
for(file in sys.FileSystem.readDirectory(songPath))
|
for(file in sys.FileSystem.readDirectory(songPath))
|
||||||
{
|
{
|
||||||
var path = haxe.io.Path.join([songPath, file]);
|
var path = haxe.io.Path.join([songPath, file]);
|
||||||
@ -1935,7 +1955,7 @@ class PlayState extends MusicBeatState
|
|||||||
// Per song treatment since some songs will only have the 'Hey' at certain times
|
// Per song treatment since some songs will only have the 'Hey' at certain times
|
||||||
switch(curSong)
|
switch(curSong)
|
||||||
{
|
{
|
||||||
case 'Philly':
|
case 'Philly Nice':
|
||||||
{
|
{
|
||||||
// General duration of the song
|
// General duration of the song
|
||||||
if(curBeat < 250)
|
if(curBeat < 250)
|
||||||
@ -2438,8 +2458,16 @@ class PlayState extends MusicBeatState
|
|||||||
vocals.volume = 0;
|
vocals.volume = 0;
|
||||||
if (SONG.validScore)
|
if (SONG.validScore)
|
||||||
{
|
{
|
||||||
|
// adjusting the highscore song name to be compatible
|
||||||
|
// would read original scores if we didn't change packages
|
||||||
|
var songHighscore = StringTools.replace(PlayState.SONG.song, " ", "-");
|
||||||
|
switch (songHighscore) {
|
||||||
|
case 'Dad-Battle': songHighscore = 'Dadbattle';
|
||||||
|
case 'Philly-Nice': songHighscore = 'Philly';
|
||||||
|
}
|
||||||
|
|
||||||
#if !switch
|
#if !switch
|
||||||
Highscore.saveScore(SONG.song, Math.round(songScore), storyDifficulty);
|
Highscore.saveScore(songHighscore, Math.round(songScore), storyDifficulty);
|
||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2498,9 +2526,21 @@ class PlayState extends MusicBeatState
|
|||||||
difficulty = '-hard';
|
difficulty = '-hard';
|
||||||
|
|
||||||
trace('LOADING NEXT SONG');
|
trace('LOADING NEXT SONG');
|
||||||
trace(PlayState.storyPlaylist[0].toLowerCase() + difficulty);
|
// pre lowercasing the next story song name
|
||||||
|
var nextSongLowercase = StringTools.replace(PlayState.storyPlaylist[0], " ", "-").toLowerCase();
|
||||||
|
switch (nextSongLowercase) {
|
||||||
|
case 'dad-battle': nextSongLowercase = 'dadbattle';
|
||||||
|
case 'philly-nice': nextSongLowercase = 'philly';
|
||||||
|
}
|
||||||
|
trace(nextSongLowercase + difficulty);
|
||||||
|
|
||||||
if (SONG.song.toLowerCase() == 'eggnog')
|
// pre lowercasing the song name (endSong)
|
||||||
|
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);
|
||||||
@ -2515,7 +2555,7 @@ class PlayState extends MusicBeatState
|
|||||||
FlxTransitionableState.skipNextTransOut = true;
|
FlxTransitionableState.skipNextTransOut = true;
|
||||||
prevCamFollow = camFollow;
|
prevCamFollow = camFollow;
|
||||||
|
|
||||||
PlayState.SONG = Song.loadFromJson(PlayState.storyPlaylist[0].toLowerCase() + difficulty, PlayState.storyPlaylist[0]);
|
PlayState.SONG = Song.loadFromJson(nextSongLowercase + difficulty, PlayState.storyPlaylist[0]);
|
||||||
FlxG.sound.music.stop();
|
FlxG.sound.music.stop();
|
||||||
|
|
||||||
LoadingState.loadAndSwitchState(new PlayState());
|
LoadingState.loadAndSwitchState(new PlayState());
|
||||||
@ -2729,8 +2769,14 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
var comboSplit:Array<String> = (combo + "").split('');
|
var comboSplit:Array<String> = (combo + "").split('');
|
||||||
|
|
||||||
if (comboSplit.length == 2)
|
// make sure we have 3 digits to display (looks weird otherwise lol)
|
||||||
seperatedScore.push(0); // make sure theres a 0 in front or it looks weird lol!
|
if (comboSplit.length == 1)
|
||||||
|
{
|
||||||
|
seperatedScore.push(0);
|
||||||
|
seperatedScore.push(0);
|
||||||
|
}
|
||||||
|
else if (comboSplit.length == 2)
|
||||||
|
seperatedScore.push(0);
|
||||||
|
|
||||||
for(i in 0...comboSplit.length)
|
for(i in 0...comboSplit.length)
|
||||||
{
|
{
|
||||||
@ -2762,8 +2808,7 @@ class PlayState extends MusicBeatState
|
|||||||
numScore.velocity.y -= FlxG.random.int(140, 160);
|
numScore.velocity.y -= FlxG.random.int(140, 160);
|
||||||
numScore.velocity.x = FlxG.random.float(-5, 5);
|
numScore.velocity.x = FlxG.random.float(-5, 5);
|
||||||
|
|
||||||
if (combo >= 10 || combo == 0)
|
add(numScore);
|
||||||
add(numScore);
|
|
||||||
|
|
||||||
FlxTween.tween(numScore, {alpha: 0}, 0.2, {
|
FlxTween.tween(numScore, {alpha: 0}, 0.2, {
|
||||||
onComplete: function(tween:FlxTween)
|
onComplete: function(tween:FlxTween)
|
||||||
@ -2872,36 +2917,43 @@ class PlayState extends MusicBeatState
|
|||||||
var possibleNotes:Array<Note> = []; // notes that can be hit
|
var possibleNotes:Array<Note> = []; // notes that can be hit
|
||||||
var directionList:Array<Int> = []; // directions that can be hit
|
var directionList:Array<Int> = []; // directions that can be hit
|
||||||
var dumbNotes:Array<Note> = []; // notes to kill later
|
var dumbNotes:Array<Note> = []; // notes to kill later
|
||||||
|
var directionsAccounted:Array<Bool> = [false,false,false,false]; // we don't want to do judgments for more than one presses
|
||||||
|
|
||||||
notes.forEachAlive(function(daNote:Note)
|
notes.forEachAlive(function(daNote:Note)
|
||||||
{
|
{
|
||||||
if (daNote.canBeHit && daNote.mustPress && !daNote.tooLate && !daNote.wasGoodHit)
|
if (daNote.canBeHit && daNote.mustPress && !daNote.tooLate && !daNote.wasGoodHit)
|
||||||
{
|
{
|
||||||
if (directionList.contains(daNote.noteData))
|
if (!directionsAccounted[daNote.noteData])
|
||||||
{
|
{
|
||||||
for (coolNote in possibleNotes)
|
if (directionList.contains(daNote.noteData))
|
||||||
{
|
{
|
||||||
if (coolNote.noteData == daNote.noteData && Math.abs(daNote.strumTime - coolNote.strumTime) < 10)
|
directionsAccounted[daNote.noteData] = true;
|
||||||
{ // if it's the same note twice at < 10ms distance, just delete it
|
for (coolNote in possibleNotes)
|
||||||
// EXCEPT u cant delete it in this loop cuz it fucks with the collection lol
|
{
|
||||||
dumbNotes.push(daNote);
|
if (coolNote.noteData == daNote.noteData && Math.abs(daNote.strumTime - coolNote.strumTime) < 10)
|
||||||
break;
|
{ // if it's the same note twice at < 10ms distance, just delete it
|
||||||
}
|
// EXCEPT u cant delete it in this loop cuz it fucks with the collection lol
|
||||||
else if (coolNote.noteData == daNote.noteData && daNote.strumTime < coolNote.strumTime)
|
dumbNotes.push(daNote);
|
||||||
{ // if daNote is earlier than existing note (coolNote), replace
|
break;
|
||||||
possibleNotes.remove(coolNote);
|
}
|
||||||
possibleNotes.push(daNote);
|
else if (coolNote.noteData == daNote.noteData && daNote.strumTime < coolNote.strumTime)
|
||||||
break;
|
{ // if daNote is earlier than existing note (coolNote), replace
|
||||||
|
possibleNotes.remove(coolNote);
|
||||||
|
possibleNotes.push(daNote);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
else
|
{
|
||||||
{
|
possibleNotes.push(daNote);
|
||||||
possibleNotes.push(daNote);
|
directionList.push(daNote.noteData);
|
||||||
directionList.push(daNote.noteData);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
trace('\nCURRENT LINE:\n' + directionsAccounted);
|
||||||
|
|
||||||
for (note in dumbNotes)
|
for (note in dumbNotes)
|
||||||
{
|
{
|
||||||
|
@ -46,9 +46,18 @@ class Song
|
|||||||
|
|
||||||
public static function loadFromJson(jsonInput:String, ?folder:String):SwagSong
|
public static function loadFromJson(jsonInput:String, ?folder:String):SwagSong
|
||||||
{
|
{
|
||||||
trace('loading ' + folder.toLowerCase() + '/' + jsonInput.toLowerCase());
|
trace(jsonInput);
|
||||||
|
|
||||||
|
// pre lowercasing the song name (update)
|
||||||
|
var folderLowercase = StringTools.replace(folder, " ", "-").toLowerCase();
|
||||||
|
switch (folderLowercase) {
|
||||||
|
case 'dad-battle': folderLowercase = 'dadbattle';
|
||||||
|
case 'philly-nice': folderLowercase = 'philly';
|
||||||
|
}
|
||||||
|
|
||||||
|
trace('loading ' + folderLowercase + '/' + jsonInput.toLowerCase());
|
||||||
|
|
||||||
var rawJson = Assets.getText(Paths.json(folder.toLowerCase() + '/' + jsonInput.toLowerCase())).trim();
|
var rawJson = Assets.getText(Paths.json(folderLowercase + '/' + jsonInput.toLowerCase())).trim();
|
||||||
|
|
||||||
while (!rawJson.endsWith("}"))
|
while (!rawJson.endsWith("}"))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user