diff --git a/example_mods/readme.txt b/example_mods/readme.txt index d36abbf..566e411 100644 --- a/example_mods/readme.txt +++ b/example_mods/readme.txt @@ -44,10 +44,15 @@ CONTENT CREATION MODE: If you press F10, you can open a console. This allows you to view the game's output, run some commands and code while the game's running. Pressing Shift+F8 will partially pause the game and enable the debug overlay. You can use this to move around objects - Pressing shift while clicking will prevent the game from looping groups - Pressing Ctrl while clicking will reverse the grab order, you can use this to grab objects behind other objects - If you move the scroll wheel, you can rotate an object - If you hold ALT, you can get the position of an object you're hovering over + Left Click will grab an object + - Pressing Shift while clicking will prevent the game from looping groups + - Pressing Ctrl while clicking will reverse the grab order, you can use this to grab objects behind other objects + - Scrolling will rotate the held object + - Holding ALT will give you the position of the object you're hovering over + Right Click will move the camera + - Scrolling will zoom in and out + Pressing 3 will trace the position of the last clicked object to the console + ADDING EXISTING CHARTS: diff --git a/source/Character.hx b/source/Character.hx index 1395e84..d74efd1 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -198,6 +198,7 @@ class CharAnimController extends FlxAnimationController{ public var camY:Float = 0; public var useMisses:Bool = false; public var useVoices:Bool = false; + public var useMidpoint:Bool = true; public var singDuration:Float = 4; // Singduration? public var dadVar(get,set):Float; // Singduration? @:keep inline public function get_dadVar() return singDuration; @@ -696,10 +697,18 @@ class CharAnimController extends FlxAnimationController{ charProperties.cam_pos= charProperties.camera_position; charProperties.cam_pos[0]*=-1; charProperties.cam_pos[1]*=-1; + switch(charType) { + case 0:charProperties.cam_pos[1]+=200; + case 1:charProperties.cam_pos[1]-=300; + // case 2:charProperties.cam_pos[0]+=100; + } + useMidpoint = false; + charProperties.offset_flip=3; charProperties.char_pos = charProperties.position; charProperties.char_pos[0]*=-1; charProperties.char_pos[1]*=-1; + } if(amPreview){ charProperties.camera_position = charProperties.position = null; diff --git a/source/HSBrTools.hx b/source/HSBrTools.hx index 69f0946..258566e 100644 --- a/source/HSBrTools.hx +++ b/source/HSBrTools.hx @@ -37,7 +37,7 @@ class HSBrTools { public var bitmapArray:Map = []; public var xmlArray:Map = []; public var textArray:Map = []; - public var soundArray:Map = []; + public var soundArray:Map = []; // public var dumpGraphics:Bool = false; // If true, All FlxGraphics will be dumped upon creation, trades off bitmap editability for less memory usage @@ -179,9 +179,9 @@ class HSBrTools { public function loadSound(soundPath:String):FlxSound{ - if(soundArray[soundPath] == null) soundArray[soundPath] = SELoader.loadFlxSound('${path}${soundPath}'); + if(soundArray[soundPath] == null) soundArray[soundPath] = SELoader.loadSound('${path}${soundPath}'); @:privateAccess{ - return new FlxSound().loadEmbedded(soundArray[soundPath]._sound); + return new FlxSound().loadEmbedded(soundArray[soundPath]); } } public function loadFlxSound(soundPath:String) return loadSound(soundPath); @@ -216,7 +216,7 @@ class HSBrTools { trace('${id} : CacheSound: "${path}${soundPath}" doesn\'t exist!'); return; } - soundArray[soundPath] = SELoader.loadFlxSound('${path}${soundPath}'); + soundArray[soundPath] = SELoader.loadSound('${path}${soundPath}'); } } public function cacheGraphic(pngPath:String,?dumpGraphic:Bool = false){ // DOES NOT CHECK IF FILE IS VALID! diff --git a/source/MusicBeatState.hx b/source/MusicBeatState.hx index e4e6ea3..18070ee 100644 --- a/source/MusicBeatState.hx +++ b/source/MusicBeatState.hx @@ -480,6 +480,7 @@ class DebugOverlay extends FlxTypedGroup{ songPos = FlxG.sound.music.time; songLooped = FlxG.sound.music.looped; FlxG.sound.music.looped = true; + FlxG.sound.music.onComplete=null; songFinishCallback = FlxG.sound.music.onComplete; } } @@ -601,6 +602,9 @@ class DebugOverlay extends FlxTypedGroup{ updateObjText('CamScrollPos:${Std.int(FlxG.camera.scroll.x * 100) * 0.01},${Std.int(FlxG.camera.scroll.y * 100) * 0.01} Zoom:${Std.int(FlxG.camera.zoom * 100) * 0.01}'); } } + if(FlxG.justPressed.THREE){ + trace(objectPosText.text); + } } @:keep inline function updateObjPosText(){ objectPosBack.visible = objectPosText.visible = true; diff --git a/source/PauseSubState.hx b/source/PauseSubState.hx index 44cc3e4..2dbacd3 100644 --- a/source/PauseSubState.hx +++ b/source/PauseSubState.hx @@ -415,6 +415,10 @@ class PauseSubState extends MusicBeatSubstate { } var _tween:FlxTween; public function countdown(){try{ + if(FlxG.keys.pressed.SHIFT){ + backToPlaystate(); + return; + } ready = false; var swagCounter:Int = 1; try{ diff --git a/source/PlayState.hx b/source/PlayState.hx index fb667c5..739ae1e 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -2361,6 +2361,7 @@ class PlayState extends ScriptMusicBeatState public var additionCamPos:Array = [0,0]; public var focusedCharacter:Int = 0; @:keep inline public function updateCharacterCamPos(){ // Resets all camera positions + cameraPositions = [ [boyfriend.getMidpoint().x - 100 + boyfriend.camX,boyfriend.getMidpoint().y - 100 + boyfriend.camY], [dad.getMidpoint().x + 150 + dad.camX,dad.getMidpoint().y - 100 + dad.camY], @@ -2369,14 +2370,23 @@ class PlayState extends ScriptMusicBeatState if(boyfriend.lonely || boyfriend.curCharacter == "" || boyfriend.curCharacter == "lonely"){ cameraPositions[0][0] = defLockedCamPos[0]; cameraPositions[0][1] = defLockedCamPos[1]; + }else if(!boyfriend.useMidpoint){ + cameraPositions[0][0] = boyfriend.x + boyfriend.camX; + cameraPositions[0][1] = boyfriend.y + boyfriend.camY; } if(dad.lonely || dad.curCharacter == "" || dad.curCharacter == "lonely"){ cameraPositions[1][0] = defLockedCamPos[0]; cameraPositions[1][1] = defLockedCamPos[1]; + }else if(!dad.useMidpoint){ + cameraPositions[0][0] = dad.x + dad.camX; + cameraPositions[0][1] = dad.y + dad.camY; } if(gf.lonely || gf.curCharacter == "" || gf.curCharacter == "lonely"){ cameraPositions[2][0] = defLockedCamPos[0]; cameraPositions[2][1] = defLockedCamPos[1]; + }else if(!gf.useMidpoint){ + cameraPositions[0][0] = gf.x + gf.camX; + cameraPositions[0][1] = gf.y + gf.camY; } if(swappedChars){ cameraPositions[0][0] -= 50; diff --git a/source/SearchMenuState.hx b/source/SearchMenuState.hx index 999a1aa..6e99439 100644 --- a/source/SearchMenuState.hx +++ b/source/SearchMenuState.hx @@ -330,17 +330,24 @@ class SearchMenuState extends ScriptMusicBeatState { } if(blackBorder == null || !FlxG.mouse.overlaps(blackBorder) ){ var curSel= grpSongs.members[curSelected]; - for (i in -2 ... 2) { - var member = grpSongs.members[curSelected + i]; - if(member != null && FlxG.mouse.overlaps(member)){ - if(member == curSel){ - select(curSelected); - if(retAfter) ret(); - }else{ - changeSelection(i); - } - } + + if(FlxG.mouse.y < curSel.y-20){ + changeSelection(-1); + }else if(FlxG.mouse.y > curSel.y+60){ + changeSelection(1); + }else if((FlxG.mouse.y > curSel.y-10 && FlxG.mouse.y < curSel.y+50) || FlxG.mouse.overlaps(curSel)){ + select(curSelected); + if(retAfter) ret(); } + // for (i in -2 ... 2) { + // var member = grpSongs.members[curSelected + i]; + // if(member != null && FlxG.mouse.overlaps(member)){ + // if(member == curSel){ + // }else{ + // changeSelection(i); + // } + // } + // } } } #if android diff --git a/source/multi/MultiMenuState.hx b/source/multi/MultiMenuState.hx index 1e7d666..b8998f4 100644 --- a/source/multi/MultiMenuState.hx +++ b/source/multi/MultiMenuState.hx @@ -615,17 +615,14 @@ class MultiMenuState extends onlinemod.OfflineMenuState { changeDiff(if(FlxG.mouse.screenX > 640) 1 else -1); } else if(!FlxG.mouse.overlaps(blackBorder)){ - var curSel = grpSongs.members[curSelected]; - for (i in -2 ... 2) { - var member = grpSongs.members[curSelected + i]; - if(member != null && FlxG.mouse.overlaps(member)){ - if(curSel == member){ - selSong(curSelected,FlxG.mouse.justPressedRight); - return; - } - changeSelection(i); - break; - } + var curSel= grpSongs.members[curSelected]; + if(FlxG.mouse.y < curSel.y-20){ + changeSelection(-1); + }else if(FlxG.mouse.y > curSel.y+60){ + changeSelection(1); + }else if((FlxG.mouse.y > curSel.y-10 && FlxG.mouse.y < curSel.y+50) || FlxG.mouse.overlaps(curSel)){ + selSong(curSelected,FlxG.mouse.justPressedRight); + if(retAfter) ret(); } } } @@ -832,12 +829,19 @@ class MultiMenuState extends onlinemod.OfflineMenuState { override function changeSelection(change:Int = 0){ var looped = 0; super.changeSelection(change); - var songInfo = grpSongs.members[curSelected]?.menuValue; + var songInfo:SongInfo = grpSongs.members[curSelected]?.menuValue; if(songInfo == null || !songInfo.charts.contains('${songInfo.name}.json')){ changeDiff(0,0); return; } - changeDiff(0,songInfo.charts.indexOf('${songInfo.name}.json')); + var pos = 0; + var json = '${songInfo.name}.json'; + for(i => chart in songInfo.charts){ + var s = '${songInfo.path}-${chart}${(QuickOptionsSubState.getSetting("Inverted chart") ? "-inverted" : "")}'; + if(Highscore.songScores.exists(s)) {pos = i;break;} + if(chart == json ) pos = i; + } + changeDiff(0,pos); // if (modes[curSelected].indexOf('${songNames[curSelected]}.json') != -1) changeDiff(0,modes[curSelected].indexOf('${songNames[curSelected]}.json')); else changeDiff(0,0); } @:keep inline public static function findFileFromAssets(path:String,name:String,file:String):String{ diff --git a/version.downloadMe b/version.downloadMe index 9e279bd..9e73422 100644 --- a/version.downloadMe +++ b/version.downloadMe @@ -1,4 +1,5 @@ -24.06.01.0224; +24.06.02.0048; * 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 \ No newline at end of file +* Fix characters not loading due to using ID instead of folderName +* Adjust mouse input on menus so clicking above alphabet will scroll up, and below will scroll down \ No newline at end of file