Skip to content

Commit 66109df

Browse files
committed
Updates were disabled
1 parent 1015ccd commit 66109df

File tree

8 files changed

+35
-15
lines changed

8 files changed

+35
-15
lines changed

source/backend/Mods.hx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,10 @@ class Mods
215215
if(fileStr.length > 0) fileStr += '\n';
216216
fileStr += values[0] + '|' + (values[1] ? '1' : '0');
217217
}
218-
219-
File.saveContent( StorageUtil.getStorageDirectory() + 'modsList.txt', fileStr);
218+
try{
219+
File.saveContent( StorageUtil.getStorageDirectory() + 'modsList.txt', fileStr);
220+
}
221+
catch(x:Exception){} // In case you don't move it from AppTranslocation
220222
updatedOnState = true;
221223
//trace('Saved modsList.txt');
222224
#end

source/mikolka/vslice/components/crash/Logger.hx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ class Logger{
2222
#if (LEGACY_PSYCH)
2323
FlxG.stage.window.alert(x.message, "File logging failed to init");
2424
#else
25+
#if macos
26+
if(StorageUtil.getStorageDirectory().contains("AppTranslocation"))
27+
CoolUtil.showPopUp("MacOS decided to isolate P-Slice from the rest of your system!"+
28+
"As such, you need to move P-Slice away from the \"Downloads\" folder into either your applications, or another folder.","File logging failed to init");
29+
else
30+
#end
2531
CoolUtil.showPopUp(x.message,"File logging failed to init");
2632
#end
2733
}

source/mikolka/vslice/ui/StoryMenuState.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ class StoryMenuState extends MusicBeatState
212212
add(bgSprite);
213213
add(grpWeekCharacters);
214214

215-
var tracksSprite:FlxSprite = new FlxSprite(FlxG.width * 0.05 + 190, bgSprite.y + 425).loadGraphic(Paths.image('Menu_Tracks'));
215+
var tracksSprite:FlxSprite = new FlxSprite(FlxG.width * 0.05 + 160, bgSprite.y + 425).loadGraphic(Paths.image('Menu_Tracks'));
216216
tracksSprite.antialiasing = VsliceOptions.ANTIALIASING;
217217
tracksSprite.x -= tracksSprite.width / 2;
218218
add(tracksSprite);

source/mikolka/vslice/ui/disclaimer/WarningState.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class WarningState extends MusicBeatState
4848
FlxTransitionableState.skipNextTransIn = true;
4949
FlxTransitionableState.skipNextTransOut = true;
5050
if(!back) {
51-
onAccept();
51+
if(onAccept != null) onAccept();
5252
FlxG.sound.play(Paths.sound('confirmMenu'));
5353
FlxTween.tween(warnText, {alpha: 0}, 0.5, {
5454
onComplete: function (twn:FlxTween) {
@@ -57,7 +57,7 @@ class WarningState extends MusicBeatState
5757
});
5858

5959
} else {
60-
onExit();
60+
if(onExit != null) onExit();
6161
FlxG.sound.play(Paths.sound('cancelMenu'));
6262
FlxTween.tween(warnText, {alpha: 0}, 0.5, {
6363
onComplete: function (twn:FlxTween) {

source/objects/StrumNote.hx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,16 @@ class StrumNote extends FlxSprite
146146
{
147147
// Arrow mode hitboxes require arrows to be in special place.
148148
x += Note.swagWidth * noteData;
149+
#if TOUCH_CONTROLS_ALLOWED
149150
final isHitboxArrowMode = ClientPrefs.data.extraHints == "ARROWS" && ClientPrefs.data.middleScroll;
150151
//Spacing between arrows
151152
if(isHitboxArrowMode && player == 1) {
152153
x += 90 * (noteData-1);
153154
x -= 45;
154155
}
156+
#end
157+
155158
x += 50;
156-
157159
x += ((FlxG.width / 2) * player);
158160
}
159161

source/states/InitState.hx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ class InitState extends MusicBeatState
3535
trace("Fixing DPI aware:");
3636
backend.Native.fixScaling();
3737
#end
38-
38+
39+
#if CHECK_FOR_UPDATES
40+
fetchUpdateData();
41+
#end
42+
3943
trace("Loading game settings");
4044
ClientPrefs.loadPrefs();
4145

@@ -76,7 +80,7 @@ class InitState extends MusicBeatState
7680
File.saveContent(path,File.getContent(exportPath));
7781
FileSystem.deleteFile(exportPath);
7882
Sys.exit(0);
79-
},() ->{},new TitleState()));
83+
},null,new TitleState()));
8084
}else
8185
#end
8286
#end
@@ -115,7 +119,7 @@ class InitState extends MusicBeatState
115119
File.copy(path,exportPath);
116120
File.copy(path,exportPath+".bak");
117121
CoolUtil.browserLoad("https://github.com/Psych-Slice/P-Slice/wiki/P%E2%80%90Slice-port-migration#you-should-land-here-after-doing-that");
118-
},() ->{},new TitleState()));
122+
},null,new TitleState()));
119123
#else
120124
new FlxTimer().start(0.05, function(tmr:FlxTimer)
121125
{

source/states/ModsMenuState.hx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,11 @@ class ModsMenuState extends MusicBeatState
865865
}
866866

867867
var path:String = StorageUtil.getStorageDirectory()+'/modsList.txt';
868-
File.saveContent(path, fileStr);
868+
try{
869+
File.saveContent(path, fileStr);
870+
}
871+
catch(x:Exception){} // In case you don't move it from AppTranslocation
872+
869873
Mods.parseList();
870874
Mods.loadTopMod();
871875
}

source/states/PlayState.hx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1691,14 +1691,16 @@ class PlayState extends MusicBeatState
16911691

16921692
private function generateStaticArrows(player:Int):Void
16931693
{
1694-
final isHitboxArrowMode = ClientPrefs.data.extraHints == "ARROWS" && ClientPrefs.data.middleScroll;
16951694
var strumLineX:Float = ClientPrefs.data.middleScroll ? STRUM_X_MIDDLESCROLL : STRUM_X;
16961695
var strumLineY:Float = ClientPrefs.data.downScroll ? (FlxG.height - 150) : 50;
16971696
var playerStrumLineY = strumLineY;
1698-
if(isHitboxArrowMode && ClientPrefs.data.downScroll) playerStrumLineY -= 50;
16991697

17001698
#if TOUCH_CONTROLS_ALLOWED
1699+
final isHitboxArrowMode = ClientPrefs.data.extraHints == "ARROWS" && ClientPrefs.data.middleScroll;
1700+
if(isHitboxArrowMode && ClientPrefs.data.downScroll) playerStrumLineY -= 50;
17011701
Note.swagWidth = 160 * (isHitboxArrowMode ? 0.8 : 0.7);
1702+
#else
1703+
final isHitboxArrowMode = false;
17021704
#end
17031705

17041706
for (i in 0...4)
@@ -1733,6 +1735,9 @@ class PlayState extends MusicBeatState
17331735
babyArrow.updateHitbox();
17341736
babyArrow.x -= 25;
17351737
}
1738+
else if(!ClientPrefs.data.middleScroll){
1739+
babyArrow.x += (FlxG.width-FlxG.initialWidth)/2;
1740+
}
17361741
playerStrums.add(babyArrow);
17371742
}
17381743
else
@@ -1750,9 +1755,6 @@ class PlayState extends MusicBeatState
17501755
else if(isHitboxArrowMode)
17511756
babyArrow.x -= 90;
17521757
}
1753-
else{
1754-
babyArrow.x += (FlxG.width-FlxG.initialWidth)/2;
1755-
}
17561758
opponentStrums.add(babyArrow);
17571759
}
17581760

0 commit comments

Comments
 (0)