Skip to content

Commit

Permalink
fixed char select and (hopefully that annoying story mode issue)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikolka9144 committed Dec 29, 2024
1 parent 8d05305 commit 5bc0934
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 12 deletions.
2 changes: 1 addition & 1 deletion setup/mobile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ haxelib git hxdiscord_rpc https://github.com/MAJigsaw77/hxdiscord_rpc f9353b9edc
haxelib install hxvlc 1.8.2 --quiet --skip-dependencies
haxelib git funkin.vis https://github.com/FunkinCrew/funkVis 22b1ce089dd924f15cdc4632397ef3504d464e90 --quiet --skip-dependencies
haxelib git grig.audio https://gitlab.com/haxe-grig/grig.audio.git cbf91e2180fd2e374924fe74844086aab7891666 --quiet
haxelib git FlxPartialSound https://github.com/Psych-Slice/FlxPartialSound.git d751a8588dd150720fe5a7c6c086cd12a7f49cdc --quiet
haxelib git FlxPartialSound https://github.com/FunkinDroidTeam/FlxPartialSound.git 2b7943ba50eb41cf8f70e1f2089a5bd7ef242947 --quiet
haxelib git extension-androidtools https://github.com/MAJigsaw77/extension-androidtools --quiet --skip-dependencies
echo Finished!
2 changes: 1 addition & 1 deletion source/mikolka/editors/CharSelectEditor.hx
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ class CharSelectEditor extends MusicBeatState

function newLabel(ref:FlxSprite, text:String)
{
return new FlxText(ref.x, ref.y - 10, 100, text);
return new FlxText(ref.x, ref.y - 13, 100, text);
}

function saveCharacter()
Expand Down
23 changes: 17 additions & 6 deletions source/mikolka/editors/editorProps/FreeplayEditSubstate.hx
Original file line number Diff line number Diff line change
Expand Up @@ -240,21 +240,29 @@ class FreeplayEditSubstate extends MusicBeatSubstate
UI_box.scrollFactor.set();

// GENERAL
@:privateAccess
input_assetPath = new PsychUIInputText(10, 20, 150, data._data.freeplayDJ.assetPath);
@:privateAccess{
input_assetPath = new PsychUIInputText(10, 20, 150, data._data.freeplayDJ.assetPath);
input_assetPath.onChange = (prev, cur) -> {
data._data.freeplayDJ.assetPath = cur;
};
}

btn_reload = new PsychUIButton(180, 20, "Reload", () ->
{
dj_anim.saveAnimations();
remove(dj);
dj.destroy();
dj = new FlxAtlasSprite(640, 366, data.getFreeplayDJData().getAtlasPath());
dj_anim.attachSprite(dj);
add(dj);
});
@:privateAccess
steper_charSelectDelay = new PsychUINumericStepper(20, 60, 0.05, data._data.freeplayDJ.charSelect.transitionDelay, 0, 10, 0, 100);


@:privateAccess {
steper_charSelectDelay = new PsychUINumericStepper(10, 130, 0.1, data._data.freeplayDJ.charSelect.transitionDelay, 0, 15, 1, 100);
steper_charSelectDelay.onValueChange = () -> {
data._data.freeplayDJ.charSelect.transitionDelay = steper_charSelectDelay.value;
};

input_text1 = new PsychUIInputText(10, 50, 150, data._data.freeplayDJ.text1);
input_text2 = new PsychUIInputText(10, 70, 150, data._data.freeplayDJ.text2);
input_text3 = new PsychUIInputText(10, 90, 150, data._data.freeplayDJ.text3);
Expand Down Expand Up @@ -420,6 +428,9 @@ class FreeplayEditSubstate extends MusicBeatSubstate
tab.add(input_text1);
tab.add(input_text2);
tab.add(input_text3);

tab.add(newLabel(steper_charSelectDelay, "Transition delay:"));
tab.add(steper_charSelectDelay);

// DJ EDITOR
var tab = UI_box.getTab("DJ Editor").menu;
Expand Down Expand Up @@ -455,7 +466,7 @@ class FreeplayEditSubstate extends MusicBeatSubstate

function newLabel(ref:FlxSprite, text:String)
{
return new FlxText(ref.x, ref.y - 10, 100, text);
return new FlxText(ref.x, ref.y - 13, 100, text);
}

function setDadBG()
Expand Down
8 changes: 4 additions & 4 deletions source/states/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2604,10 +2604,7 @@ class PlayState extends MusicBeatState
FlxTransitionableState.skipNextTransIn = true;
FlxTransitionableState.skipNextTransOut = true;
prevCamFollow = camFollow;

Song.loadFromJson(PlayState.storyPlaylist[0] + difficulty, PlayState.storyPlaylist[0]);
FlxG.sound.music.stop();


#if !switch
//!! We have to save the score for current song BEFORE loading the next one
if(!ClientPrefs.getGameplaySetting('practice') && !ClientPrefs.getGameplaySetting('botplay')){
Expand All @@ -2617,6 +2614,9 @@ class PlayState extends MusicBeatState
}
#end

Song.loadFromJson(PlayState.storyPlaylist[0] + difficulty, PlayState.storyPlaylist[0]);
FlxG.sound.music.stop();

canResync = false;
LoadingState.prepareToSong();
LoadingState.loadAndSwitchState(new PlayState(), false, false);
Expand Down

0 comments on commit 5bc0934

Please sign in to comment.