Skip to content

Commit c27a30f

Browse files
committed
working sustains LES GOOO
1 parent 533a645 commit c27a30f

File tree

4 files changed

+33
-23
lines changed

4 files changed

+33
-23
lines changed

source/archipelago/APPlayState.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2445,7 +2445,7 @@ class APPlayState extends PlayState {
24452445
alreadySent = true; // because indie cross likes to spam this every frame for some reason
24462446
APEntryState.apGame.info().sendDeathLink(COD.COD);
24472447
}
2448-
super.doDeathCheck();
2448+
super.doDeathCheck(skipHealthCheck);
24492449
return true;
24502450
}
24512451

source/games/uno/HandSwapSubstate.hx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@ class HandSwapSubstate extends MusicBeatSubstate {
3838
private var shouldBeClosed:Bool = false;
3939

4040

41-
public function new(currentPlayer:UnoPlayer, availablePlayers:Array<UnoPlayer>, onPlayerSelected:UnoPlayer->Void, onPlayerCancel:UnoPlayer->Void) {
41+
public function new(currentPlayer:UnoPlayer, availablePlayers:Array<UnoPlayer>, onPlayerSelected:UnoPlayer->Void) {
4242
super();
4343
this.currentPlayer = currentPlayer;
4444
this.availablePlayers = availablePlayers.copy();
4545
this.onPlayerSelected = onPlayerSelected;
46-
this.onPlayerCancel = onPlayerCancel;
4746

4847
// Remove current player from available choices
4948
this.availablePlayers.remove(currentPlayer);
@@ -717,13 +716,11 @@ class HandSwapSubstate extends MusicBeatSubstate {
717716
}
718717
try {
719718
animateOut(function() {
720-
onPlayerCancel(currentPlayer);
721719
close();
722720
});
723721
} catch(e:Dynamic) {
724722
trace("Error in escape animateOut: " + e);
725723
try {
726-
onPlayerCancel(currentPlayer);
727724
close();
728725
} catch(e2:Dynamic) {
729726
trace("Error in escape close: " + e2);

source/objects/StrumNote.hx

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,17 @@ class StrumNote extends NoteObject
105105

106106
var skin:String = null;
107107
if(PlayState.SONG != null && PlayState.SONG.arrowSkin != null && PlayState.SONG.arrowSkin.length > 1) skin = PlayState.SONG.arrowSkin;
108-
else skin = Note.defaultNoteSkin;
109108

110-
if (Note.getNoteSkinPostfix() != '')
111-
{
112-
var customSkin:String = skin + Note.getNoteSkinPostfix();
113-
if(Paths.fileExists('images/$customSkin.png', IMAGE)) skin = customSkin;
114-
}
115-
else {
116-
var customSkin:String = skin = (PlayState.SONG != null ? PlayState.SONG.arrowSkin : 'NOTE_assets') + Note.getNoteSkinPostfix();
117-
skin = (PlayState.isPixelStage ? customSkin : 'noteSkins/strums');
109+
if (skin == null || skin == '') {
110+
if (Note.getNoteSkinPostfix() != '')
111+
{
112+
var customSkin:String = skin + Note.getNoteSkinPostfix();
113+
if(Paths.fileExists('images/$customSkin.png', IMAGE)) skin = customSkin;
114+
}
115+
else {
116+
var customSkin:String = (PlayState.SONG != null && PlayState.SONG.arrowSkin != null ? PlayState.SONG.arrowSkin : 'NOTE_assets') + Note.getNoteSkinPostfix();
117+
skin = (PlayState.isPixelStage ? customSkin : 'noteSkins/strums');
118+
}
118119
}
119120

120121
texture = skin; //Load texture and anims
@@ -128,6 +129,20 @@ class StrumNote extends NoteObject
128129
public function reloadNote()
129130
{
130131
var postfix:String = Note.getNoteSkinPostfix();
132+
var skin:String = texture + postfix;
133+
if (!PlayState.isPixelStage) {
134+
if(texture.length < 1 || skin == 'null')
135+
{
136+
skin = (PlayState.SONG != null ? PlayState.SONG.arrowSkin : (texture + postfix));
137+
if (skin == null || skin.length < 1) {
138+
if (postfix == null || postfix.length < 1)
139+
skin = "noteSkins/strums";
140+
else
141+
skin = "noteSkins/NOTE_assets" + postfix;
142+
}
143+
}
144+
}
145+
131146
if (PlayState.isPixelStage || postfix.toLowerCase() == '-retribution')
132147
useRGBShader = false;
133148

@@ -141,12 +156,12 @@ class StrumNote extends NoteObject
141156

142157
if(PlayState.isPixelStage)
143158
{
144-
loadGraphic(Paths.image('pixelUI/noteSkins/' + texture));
159+
loadGraphic(Paths.image('pixelUI/noteSkins/' + skin));
145160
pxDV = Note.pixelNotesDivisionValue[width == 306 ? 1 : 0];
146161
width = width / pxDV;
147162
height = height / 5;
148163
antialiasing = false;
149-
loadGraphic(Paths.image('pixelUI/noteSkins/' + texture), true, Math.floor(width), Math.floor(height));
164+
loadGraphic(Paths.image('pixelUI/noteSkins/' + skin), true, Math.floor(width), Math.floor(height));
150165
var daFrames:Array<Int> = Note.keysShit.get(PlayState.mania).get('pixelAnimIndex');
151166

152167
setGraphicSize(Std.int(width * PlayState.daPixelZoom * Note.pixelScales[PlayState.mania]));
@@ -161,18 +176,16 @@ class StrumNote extends NoteObject
161176
{
162177
var postfix:String = Note.getNoteSkinPostfix();
163178
var skin:String = texture + postfix;
179+
//trace("Skin: " + skin);
164180
if(texture.length < 1)
165181
{
166182
skin = (PlayState.SONG != null ? PlayState.SONG.arrowSkin : (texture + postfix));
167-
if (skin == null || skin.length < 1) {
168-
if (postfix == null || postfix.length < 1)
169-
skin = "noteSkins/strums";
170-
else
171-
skin = "noteSkins/NOTE_assets" + postfix;
183+
if (skin == 'noteSkins/NOTE_assets') {
184+
skin = "noteSkins/strums";
172185
}
173186
}
174187

175-
trace("Skin: " + skin);
188+
//trace("Skin: " + skin);
176189

177190
frames = Paths.getSparrowAtlas(skin);
178191
antialiasing = ClientPrefs.data.antialiasing;

source/states/PlayState.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10257,7 +10257,7 @@ class PlayState extends MusicBeatState
1025710257
modManager.setValue('transform${i}Y', offsetY, field.playerId);
1025810258
} else {
1025910259
// If the strum has been moved significantly, update the base position
10260-
trace('ModchartSync: Strum ${i} moved significantly (${Math.abs(offsetY)}px), updating base Y from ${baseY} to ${strumNote.y}');
10260+
//trace('ModchartSync: Strum ${i} moved significantly (${Math.abs(offsetY)}px), updating base Y from ${baseY} to ${strumNote.y}');
1026110261
field.updateBaseYPosition(i, strumNote.y);
1026210262
}
1026310263
//strumNote.y = strumNote.y;

0 commit comments

Comments
 (0)