diff --git a/source/Character.hx b/source/Character.hx index d090b31..8b26c53 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -770,8 +770,8 @@ class CharAnimController extends FlxAnimationController{ var selAssets = -10; for (i => charFile in charProperties.asset_files) { if (charFile.char_side != null && charFile.char_side != 3 && charFile.char_side == charType){continue;} // This if statement hurts my brain - if (charFile.stage != "" && charFile.stage != null){if(PlayState.curStage.toLowerCase() != charFile.stage.toLowerCase()){continue;}} // Check if charFiletion specifies stage, skip if it doesn't match PlayState's stage - if (charFile.song != "" && charFile.song != null){if(PlayState.SONG.song.toLowerCase() != charFile.song.toLowerCase()){continue;}} // Check if charFiletion specifies song, skip if it doesn't match PlayState's song + if (charFile.stage != "" && charFile.stage != null && PlayState.curStage.toLowerCase() != charFile.stage.toLowerCase()){continue;} // Check if charFiletion specifies stage, skip if it doesn't match PlayState's stage + if (charFile.song != "" && charFile.song != null && PlayState.SONG.song.toLowerCase() != charFile.song.toLowerCase()){continue;} // Check if charFiletion specifies song, skip if it doesn't match PlayState's song var tagsMatched = 0; if (charFile.tags != null && charFile.tags[0] != null && PlayState.stageTags != null){ for (i in charFile.tags) {if (PlayState.stageTags.contains(i)) tagsMatched++;} diff --git a/source/ChartingState.hx b/source/ChartingState.hx index dfb746b..7e47142 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -184,6 +184,7 @@ class ChartingState extends ScriptMusicBeatState var chartType = "FNF"; static var snapSound:Sound; static var clapSound:Sound; + static var noteKeyCharting:Bool = false; public static function playSnap(){ if(snapSound == null) snapSound= SELoader.loadSound('./assets/shared/sounds/SNAP.ogg',true); snapSound.play(new openfl.media.SoundTransform(SESave.data.hitVol)); @@ -574,6 +575,11 @@ class ChartingState extends ScriptMusicBeatState stepperBPM.value = Conductor.bpm; stepperBPM.name = 'song_bpm'; + var check_noteKeys = new FlxUICheckBox(0,0, null, null, "Note key charting", 100); + check_noteKeys.checked = noteKeyCharting; + check_noteKeys.callback = function() { + noteKeyCharting = checked; + }; // var stepperBPMOffsetLabel = new FlxText(74,80,'BPM Offset'); // var stepperBPMOffset:FlxUINumericStepper = new FlxUINumericStepper(10, 80, 0, 1, -9999, 9999, 0); // stepperBPMOffset.value = Conductor.offset; @@ -747,6 +753,7 @@ class ChartingState extends ScriptMusicBeatState // uiMap['hurtnotescoreapply'] = hurtnotescoreapply; uiMap['hurtnotehealthtxt'] = hurtnotehealthtxt; uiMap['hurtnotehealth'] = hurtnotehealth; + uiMap['noteKeyCharting'] = check_noteKeys; // uiMap['hurtnotehealthapply'] = hurtnotehealthapply; @@ -820,7 +827,7 @@ class ChartingState extends ScriptMusicBeatState [stepperSongVol,stepperSongVolLabel], null, [waveformEnabled,waveformUseInstrumental], - [hitsounds], + [check_noteKeys,hitsounds], [check_voices,hurtnotescore,hurtnotescoretxt], [beatcheck,hurtnotehealth,hurtnotehealthtxt], null, @@ -1446,12 +1453,14 @@ class ChartingState extends ScriptMusicBeatState FlxG.mouse.y); } var justAdded = false; - if (FlxG.mouse.justPressed){ + if (FlxG.mouse.justPressed || FlxG.mouse.justPressedRight){ justAdded = true; var overlaps = false; - for(note in curRenderedNotes.members){ - if (FlxG.mouse.overlaps(note)){ - overlaps = true; + if(!FlxG.mouse.justPressedRight){ + + for(note in curRenderedNotes.members){ + if (FlxG.mouse.overlaps(note)){ + overlaps = true; if (FlxG.keys.pressed.CONTROL) { selectNote(note); if(FlxG.keys.pressed.SHIFT){ @@ -1487,7 +1496,7 @@ class ChartingState extends ScriptMusicBeatState } } - if(FlxG.mouse.pressed){ + if(FlxG.mouse.pressed || FlxG.mouse.pressedRight){ if (curSelectedNote != null && !modifyingNote && !justAdded && Math.floor(FlxG.mouse.x / GRID_SIZE) == (curSelectedNote[1] + 1)){ replaceNoteSustain(getStrumTime(dummyArrow.y) + sectionStartTime(curSection)); dummyArrow.visible = false; diff --git a/source/se/objects/SEJoinedSound.hx b/source/se/objects/SEJoinedSound.hx index 20b832a..6b16f9b 100644 --- a/source/se/objects/SEJoinedSound.hx +++ b/source/se/objects/SEJoinedSound.hx @@ -63,18 +63,19 @@ import flixel.FlxBasic; if(sound.playing) s.play(); else s.pause(); } - if(s.playing && syncTime && Math.abs(s.time-sound.time) > maxTimeDifference) s.time = sound.time; + if(s.playing && syncTime && sound.time <= s.length && Math.abs(s.time-sound.time) > maxTimeDifference) s.time = sound.time; } } function syncToSound(sound:FlxSound){ final s = this.sound; + if(s == null) return; if(syncVolume) s.volume = sound.volume; if(syncPlaying && s.playing != sound.playing){ if(sound.playing) s.play(); else s.pause(); } - if(s.playing && syncTime && Math.abs(s.time-sound.time) > maxTimeDifference) s.time = sound.time; + if(s.playing && syncTime && sound.time <= s.length && Math.abs(s.time-sound.time) > maxTimeDifference) s.time = sound.time; sync(); } function load(path:String):FlxSound{ diff --git a/version.downloadMe b/version.downloadMe index 1470323..d41508f 100644 --- a/version.downloadMe +++ b/version.downloadMe @@ -1,4 +1,4 @@ -24.07.09.2112; +24.07.15.0004; * Better Psych character support(Still kinda experimental but should be more stable) * Fix some small errors * Fix characters not loading due to using ID instead of folderName