commit
3a3bea696d
@ -6,7 +6,7 @@ Spookeez:spooky:2
|
||||
South:spooky:2
|
||||
Monster:monster:2
|
||||
Pico:pico:3
|
||||
Philly:pico:3
|
||||
Philly Nice:pico:3
|
||||
Blammed:pico:3
|
||||
Satin Panties: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
|
||||
```
|
||||
|
||||
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
|
||||
|
||||
@ -376,10 +400,34 @@ Returns the angle 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)
|
||||
|
||||
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)
|
||||
|
||||
Set's the alpha for the sprite id
|
||||
|
@ -202,13 +202,27 @@ class FreeplayState extends MusicBeatState
|
||||
|
||||
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';
|
||||
}
|
||||
|
||||
var poop:String = Highscore.formatSong(StringTools.replace(songs[curSelected].songName," ", "-").toLowerCase(), curDifficulty);
|
||||
trace(songLowercase);
|
||||
|
||||
var poop:String = Highscore.formatSong(songHighscore, curDifficulty);
|
||||
|
||||
trace(poop);
|
||||
|
||||
PlayState.SONG = Song.loadFromJson(poop, StringTools.replace(songs[curSelected].songName," ", "-").toLowerCase());
|
||||
PlayState.SONG = Song.loadFromJson(poop, songLowercase);
|
||||
PlayState.isStoryMode = false;
|
||||
PlayState.storyDifficulty = curDifficulty;
|
||||
PlayState.storyWeek = songs[curSelected].week;
|
||||
@ -226,8 +240,15 @@ class FreeplayState extends MusicBeatState
|
||||
if (curDifficulty > 2)
|
||||
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
|
||||
intendedScore = Highscore.getScore(songs[curSelected].songName, curDifficulty);
|
||||
intendedScore = Highscore.getScore(songHighscore, curDifficulty);
|
||||
#end
|
||||
|
||||
switch (curDifficulty)
|
||||
@ -259,8 +280,16 @@ class FreeplayState extends MusicBeatState
|
||||
|
||||
// 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
|
||||
intendedScore = Highscore.getScore(songs[curSelected].songName, curDifficulty);
|
||||
intendedScore = Highscore.getScore(songHighscore, curDifficulty);
|
||||
// lerpScore = 0;
|
||||
#end
|
||||
|
||||
|
@ -564,6 +564,18 @@ class ModchartState
|
||||
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) {
|
||||
getActorByName(id).playAnim(anim, force, reverse);
|
||||
});
|
||||
@ -576,6 +588,18 @@ class ModchartState
|
||||
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) {
|
||||
getActorByName(id).angle = angle;
|
||||
});
|
||||
|
@ -97,14 +97,22 @@ class Paths
|
||||
|
||||
inline static public function voices(song:String)
|
||||
{
|
||||
song = StringTools.replace(song," ", "-");
|
||||
return 'songs:assets/songs/${song.toLowerCase()}/Voices.$SOUND_EXT';
|
||||
var songLowercase = StringTools.replace(song, " ", "-").toLowerCase();
|
||||
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)
|
||||
{
|
||||
song = StringTools.replace(song," ", "-");
|
||||
return 'songs:assets/songs/${song.toLowerCase()}/Inst.$SOUND_EXT';
|
||||
var songLowercase = StringTools.replace(song, " ", "-").toLowerCase();
|
||||
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)
|
||||
|
@ -236,14 +236,21 @@ class PlayState extends MusicBeatState
|
||||
repPresses = 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
|
||||
executeModchart = FileSystem.exists(Paths.lua(PlayState.SONG.song.toLowerCase() + "/modchart"));
|
||||
executeModchart = FileSystem.exists(Paths.lua(songLowercase + "/modchart"));
|
||||
#end
|
||||
#if !cpp
|
||||
executeModchart = false; // FORCE disable for non cpp targets
|
||||
#end
|
||||
|
||||
trace('Mod chart: ' + executeModchart + " - " + Paths.lua(PlayState.SONG.song.toLowerCase() + "/modchart"));
|
||||
trace('Mod chart: ' + executeModchart + " - " + Paths.lua(songLowercase + "/modchart"));
|
||||
|
||||
#if windows
|
||||
// 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);
|
||||
|
||||
//dialogue shit
|
||||
switch (SONG.song.toLowerCase())
|
||||
switch (songLowercase)
|
||||
{
|
||||
case 'tutorial':
|
||||
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':
|
||||
dialogue = ["Not too shabby boy.", ""];
|
||||
case 'dad battle':
|
||||
case 'dadbattle':
|
||||
dialogue = [
|
||||
"gah you think you're hot stuff?",
|
||||
"If you can beat me here...",
|
||||
@ -592,7 +599,7 @@ class PlayState extends MusicBeatState
|
||||
bgGirls = new BackgroundGirls(-100, 190);
|
||||
bgGirls.scrollFactor.set(0.9, 0.9);
|
||||
|
||||
if (SONG.song.toLowerCase() == 'roses')
|
||||
if (songLowercase == 'roses')
|
||||
{
|
||||
if(FlxG.save.data.distractions){
|
||||
bgGirls.getScared();
|
||||
@ -998,7 +1005,7 @@ class PlayState extends MusicBeatState
|
||||
|
||||
if (isStoryMode)
|
||||
{
|
||||
switch (curSong.toLowerCase())
|
||||
switch (StringTools.replace(curSong," ", "-").toLowerCase())
|
||||
{
|
||||
case "winter-horrorland":
|
||||
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.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);
|
||||
|
||||
if (SONG.song.toLowerCase() == 'thorns')
|
||||
if (songLowercase == 'thorns')
|
||||
{
|
||||
add(red);
|
||||
}
|
||||
@ -1095,7 +1108,7 @@ class PlayState extends MusicBeatState
|
||||
{
|
||||
inCutscene = true;
|
||||
|
||||
if (SONG.song.toLowerCase() == 'thorns')
|
||||
if (songLowercase == 'thorns')
|
||||
{
|
||||
add(senpaiEvil);
|
||||
senpaiEvil.alpha = 0;
|
||||
@ -1328,7 +1341,7 @@ class PlayState extends MusicBeatState
|
||||
// Song check real quick
|
||||
switch(curSong)
|
||||
{
|
||||
case 'Bopeebo' | 'Philly' | 'Blammed' | 'Cocoa' | 'Eggnog': allowedToHeadbang = true;
|
||||
case 'Bopeebo' | 'Philly Nice' | 'Blammed' | 'Cocoa' | 'Eggnog': allowedToHeadbang = true;
|
||||
default: allowedToHeadbang = false;
|
||||
}
|
||||
|
||||
@ -1368,9 +1381,16 @@ class PlayState extends MusicBeatState
|
||||
|
||||
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
|
||||
#if windows
|
||||
var songPath = 'assets/data/' + StringTools.replace(PlayState.SONG.song," ", "-").toLowerCase() + '/';
|
||||
var songPath = 'assets/data/' + songLowercase + '/';
|
||||
|
||||
for(file in sys.FileSystem.readDirectory(songPath))
|
||||
{
|
||||
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
|
||||
switch(curSong)
|
||||
{
|
||||
case 'Philly':
|
||||
case 'Philly Nice':
|
||||
{
|
||||
// General duration of the song
|
||||
if(curBeat < 250)
|
||||
@ -2438,8 +2458,16 @@ class PlayState extends MusicBeatState
|
||||
vocals.volume = 0;
|
||||
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
|
||||
Highscore.saveScore(SONG.song, Math.round(songScore), storyDifficulty);
|
||||
Highscore.saveScore(songHighscore, Math.round(songScore), storyDifficulty);
|
||||
#end
|
||||
}
|
||||
|
||||
@ -2498,9 +2526,21 @@ class PlayState extends MusicBeatState
|
||||
difficulty = '-hard';
|
||||
|
||||
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,
|
||||
-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;
|
||||
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();
|
||||
|
||||
LoadingState.loadAndSwitchState(new PlayState());
|
||||
@ -2729,8 +2769,14 @@ class PlayState extends MusicBeatState
|
||||
|
||||
var comboSplit:Array<String> = (combo + "").split('');
|
||||
|
||||
if (comboSplit.length == 2)
|
||||
seperatedScore.push(0); // make sure theres a 0 in front or it looks weird lol!
|
||||
// make sure we have 3 digits to display (looks weird otherwise 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)
|
||||
{
|
||||
@ -2762,7 +2808,6 @@ class PlayState extends MusicBeatState
|
||||
numScore.velocity.y -= FlxG.random.int(140, 160);
|
||||
numScore.velocity.x = FlxG.random.float(-5, 5);
|
||||
|
||||
if (combo >= 10 || combo == 0)
|
||||
add(numScore);
|
||||
|
||||
FlxTween.tween(numScore, {alpha: 0}, 0.2, {
|
||||
@ -2872,13 +2917,17 @@ class PlayState extends MusicBeatState
|
||||
var possibleNotes:Array<Note> = []; // notes that can be hit
|
||||
var directionList:Array<Int> = []; // directions that can be hit
|
||||
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)
|
||||
{
|
||||
if (daNote.canBeHit && daNote.mustPress && !daNote.tooLate && !daNote.wasGoodHit)
|
||||
{
|
||||
if (!directionsAccounted[daNote.noteData])
|
||||
{
|
||||
if (directionList.contains(daNote.noteData))
|
||||
{
|
||||
directionsAccounted[daNote.noteData] = true;
|
||||
for (coolNote in possibleNotes)
|
||||
{
|
||||
if (coolNote.noteData == daNote.noteData && Math.abs(daNote.strumTime - coolNote.strumTime) < 10)
|
||||
@ -2901,8 +2950,11 @@ class PlayState extends MusicBeatState
|
||||
directionList.push(daNote.noteData);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
trace('\nCURRENT LINE:\n' + directionsAccounted);
|
||||
|
||||
for (note in dumbNotes)
|
||||
{
|
||||
FlxG.log.add("killing dumb ass note at " + note.strumTime);
|
||||
|
@ -46,9 +46,18 @@ class Song
|
||||
|
||||
public static function loadFromJson(jsonInput:String, ?folder:String):SwagSong
|
||||
{
|
||||
trace('loading ' + folder.toLowerCase() + '/' + jsonInput.toLowerCase());
|
||||
trace(jsonInput);
|
||||
|
||||
var rawJson = Assets.getText(Paths.json(folder.toLowerCase() + '/' + jsonInput.toLowerCase())).trim();
|
||||
// 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(folderLowercase + '/' + jsonInput.toLowerCase())).trim();
|
||||
|
||||
while (!rawJson.endsWith("}"))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user