Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
mcagabe19 committed Sep 26, 2024
2 parents 7610752 + 74bca19 commit 85df703
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 8 deletions.
Binary file removed assets/shared/images/NMCW/combo.png
Binary file not shown.
Binary file removed assets/shared/images/combo.png
Binary file not shown.
Binary file removed assets/shared/images/dokistuff/combo-pixel.png
Binary file not shown.
Binary file removed assets/shared/images/dokistuff/combo.png
Binary file not shown.
Binary file removed assets/shared/images/fireinthehole/combo.png
Binary file not shown.
Binary file removed assets/shared/images/goldstuff/combo.png
Binary file not shown.
Binary file removed assets/shared/images/impostorratings/combo-pixel.png
Binary file not shown.
Binary file removed assets/shared/images/kadethings/combo-pixel.png
Binary file not shown.
Binary file removed assets/shared/images/kadethings/combo.png
Binary file not shown.
Binary file removed assets/shared/images/pixelUI/combo-pixel.png
Binary file not shown.
14 changes: 13 additions & 1 deletion source/Paths.hx
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,20 @@ class Paths
currentLevel = name.toLowerCase();
}

public static function getPath(file:String, type:AssetType, ?library:Null<String> = null)
public static function getPath(file:String, ?type:AssetType = TEXT, ?library:Null<String> = null, ?modsAllowed:Bool = false):String
{
#if MODS_ALLOWED
if(modsAllowed)
{
var customFile:String = file;
if (library != null)
customFile = '$library/$file';

var modded:String = modFolders(customFile);
if(FileSystem.exists(modded)) return modded;
}
#end

if (library != null)
return getLibraryPath(file, library);

Expand Down
5 changes: 3 additions & 2 deletions source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -3371,7 +3371,8 @@ class PlayState extends MusicBeatState

override public function onFocus():Void
{
if (health > 0 && !paused) resetRPC(Conductor.songPosition > 0.0);
try {if (health > 0 && !paused) resetRPC(Conductor.songPosition > 0.0);}
catch(e) {};
super.onFocus();
}

Expand Down Expand Up @@ -4712,7 +4713,7 @@ class PlayState extends MusicBeatState
for (note in notes){
if (note == null)
continue;
note.updateRGBColors();
if (ClientPrefs.enableColorShader) note.updateRGBColors();
}
}
}
Expand Down
12 changes: 12 additions & 0 deletions source/editors/ChartingState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2369,6 +2369,18 @@ class ChartingState extends MusicBeatState
if(sender == noteSplashesInputText) {
_song.splashSkin = noteSplashesInputText.text;
}
else if(sender == gameOverCharacterInputText) {
_song.gameOverChar = gameOverCharacterInputText.text;
}
else if(sender == gameOverSoundInputText) {
_song.gameOverSound = gameOverSoundInputText.text;
}
else if(sender == gameOverLoopInputText) {
_song.gameOverLoop = gameOverLoopInputText.text;
}
else if(sender == gameOverEndInputText) {
_song.gameOverEnd = gameOverEndInputText.text;
}
else if(curSelectedNote != null)
{
if(sender == value1InputText) {
Expand Down
8 changes: 4 additions & 4 deletions source/editors/EditorPlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -431,16 +431,16 @@ class EditorPlayState extends MusicBeatState

override public function onFocus():Void
{
vocals.play();
opponentVocals.play();
for (i in [vocals, opponentVocals])
if (i != null) i.play();

super.onFocus();
}

override public function onFocusLost():Void
{
vocals.pause();
opponentVocals.pause();
for (i in [vocals, opponentVocals])
if (i != null) i.pause();

super.onFocusLost();
}
Expand Down
3 changes: 2 additions & 1 deletion source/editors/NoteSplashDebugState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,10 @@ class NoteSplashDebugState extends MusicBeatState
for (offGroup in config.offsets)
strToSave += '\n' + offGroup[0] + ' ' + offGroup[1];

var pathSplit:Array<String> = (Paths.getPath('images/$texturePath.png', IMAGE).split('.png')[0] + '.txt').split(':');
var pathSplit:Array<String> = (Paths.getPath('images/$texturePath.png', IMAGE, null, true).split('.png')[0] + '.txt').split(':');
var path:String = pathSplit[pathSplit.length-1];
savedText.text = 'Saved to: $path';
trace ('$path');
File.saveContent(path, strToSave);

//trace(strToSave);
Expand Down

0 comments on commit 85df703

Please sign in to comment.