Skip to content

Commit fce087b

Browse files
committed
e
1 parent f615e48 commit fce087b

File tree

6 files changed

+166
-128
lines changed

6 files changed

+166
-128
lines changed

source/archipelago/APAdvancedSettingsState.hx

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,6 +1853,24 @@ class APAdvancedSettingsState extends MusicBeatState
18531853
if (songData.folder != null && songData.folder.length > 0)
18541854
{
18551855
formattedName = songData.songName + " (" + songData.folder + ")";
1856+
1857+
// Check if this is a modded song and mods are disabled
1858+
if (!allowMods)
1859+
{
1860+
allowMods = true;
1861+
startingSong = formattedName;
1862+
startingSongData = songData;
1863+
updateSongStats();
1864+
refreshCurrentPage();
1865+
1866+
// Show info notification about enabling mods
1867+
var infoPanel = new InfoPanelSubstate("Mods Auto-Enabled",
1868+
"Mods have been automatically enabled because you selected a modded song:\n\n" +
1869+
formattedName + "\n\nThis setting has been updated in your configuration.",
1870+
FlxColor.LIME);
1871+
openSubState(infoPanel);
1872+
return;
1873+
}
18561874
}
18571875

18581876
startingSong = formattedName;
@@ -1883,6 +1901,24 @@ class APAdvancedSettingsState extends MusicBeatState
18831901
if (songData.folder != null && songData.folder.length > 0)
18841902
{
18851903
formattedName = songData.songName + " (" + songData.folder + ")";
1904+
1905+
// Check if this is a modded song and mods are disabled
1906+
if (!allowMods)
1907+
{
1908+
allowMods = true;
1909+
victorySong = formattedName;
1910+
victorySongData = songData;
1911+
updateSongStats();
1912+
refreshCurrentPage();
1913+
1914+
// Show info notification about enabling mods
1915+
var infoPanel = new InfoPanelSubstate("Mods Auto-Enabled",
1916+
"Mods have been automatically enabled because you selected a modded song:\n\n" +
1917+
formattedName + "\n\nThis setting has been updated in your configuration.",
1918+
FlxColor.LIME);
1919+
openSubState(infoPanel);
1920+
return;
1921+
}
18861922
}
18871923

18881924
victorySong = formattedName;

source/archipelago/APPlayState.hx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2239,10 +2239,12 @@ class APPlayState extends PlayState {
22392239
cause = "???\n[pause:0.5](Someone died... somehow...)\n[pause:0.5](Unsure how...)";
22402240
}
22412241
COD.setCOD(null, cause);
2242-
if (!alreadyKilledByLink) {
2242+
if (alreadyKilledByLink) {
2243+
FlxG.switchState(new substates.GameOverSubstate(boyfriend, new PlayState()));
2244+
} else {
22432245
alreadyKilledByLink = true;
22442246
die();
2245-
} else {FlxG.state.openSubState(new substates.GameOverSubstate(boyfriend));}
2247+
}
22462248
trace("Triggering DeathLink!");
22472249
}
22482250
#if cpp

source/backend/ClientPrefs.hx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ import states.TitleState;
193193
public var menuTheme:String = 'Light';
194194
public var showRenderText:Bool = false;
195195
public var garbageCollection:Bool = true;
196+
public var dontAllowScriptOverride:Bool = true;
196197

197198
// Experimental Settings
198199
public var useExperimentalNotePool:Bool = false;

source/objects/playfields/NotefieldRenderer.hx

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package objects.playfields;
2-
/*
2+
/*
33
if ((FlxG.state is PlayState))
44
PlayState.instance.callOnHScripts("notefieldDraw", [this], ["drawQueue" => drawQueue]); // lets you do custom rendering in scripts, if needed
55
@@ -8,14 +8,14 @@ package objects.playfields;
88
var glowB = modManager.getValue("flashB", modNumber);
99
*/
1010

11-
import flixel.util.FlxDestroyUtil;
1211
import flixel.math.FlxPoint;
13-
import openfl.geom.ColorTransform;
1412
import flixel.util.FlxColor;
15-
import objects.playfields.NoteField;
13+
import flixel.util.FlxDestroyUtil;
14+
import flixel.util.FlxSort;
1615
import objects.playfields.FieldBase;
16+
import objects.playfields.NoteField;
1717
import objects.proxies.ProxyField;
18-
import flixel.util.FlxSort;
18+
import openfl.geom.ColorTransform;
1919
import states.PlayState;
2020
@:structInit
2121
class FinalRenderObject extends RenderObject {
@@ -36,7 +36,7 @@ class NotefieldRenderer extends FlxBasic {
3636
if (members.contains(field))
3737
members.remove(field);
3838
}
39-
39+
4040
static inline function zindexSort(Order:Int, Obj1:FinalRenderObject, Obj2:FinalRenderObject):Int {
4141
var result:Int = 0;
4242
var Value1:Float = Obj1.zIndex;
@@ -63,12 +63,12 @@ class NotefieldRenderer extends FlxBasic {
6363
static function drawQueueSort(Obj1:FinalRenderObject, Obj2:FinalRenderObject) {
6464
return zindexSort(FlxSort.ASCENDING, Obj1, Obj2);
6565
}
66-
66+
6767
var point:FlxPoint = FlxPoint.get(0, 0);
68-
68+
6969
inline function getFlashComponent(field:NoteField, component:String, column:Int)
7070
return field.modManager.getValue('flash$component', field.modNumber) * field.modManager.getValue('flash$column$component', field.modNumber);
71-
71+
7272
/**
7373
* Check if a ProxyField is in PlayState's members list
7474
* If it is, PlayState will handle rendering it at the correct layer
@@ -77,16 +77,16 @@ class NotefieldRenderer extends FlxBasic {
7777
// Only check ProxyFields
7878
if (!Std.isOfType(field, ProxyField))
7979
return false;
80-
80+
8181
// Check if PlayState exists and has the field in its members
8282
var playState = PlayState.instance;
8383
if (playState != null && playState.members != null) {
8484
return playState.members.contains(field);
8585
}
86-
86+
8787
return false;
8888
}
89-
89+
9090

9191
override function draw(){
9292
var finalDrawQueue:Array<FinalRenderObject> = [];
@@ -102,27 +102,27 @@ class NotefieldRenderer extends FlxBasic {
102102

103103
field.preDraw(); // Collects all the drawing information
104104
}
105-
105+
106106
// Now that the main draw queues should have been populated, it's time to push them into the final draw queue for sorting
107-
108-
107+
108+
109109
for (field in members){
110110
// Skip ProxyFields that are in PlayState's members - they'll be rendered by PlayState
111111
if (isProxyFieldInPlayState(field))
112112
continue;
113-
114-
field.draw(); // Just incase they want to do something before gathering happens (i.e ProxyFields grabbing their host's draw queue)
113+
114+
field.draw(); // Just incase they want to do something before gathering happens (i.e ProxyFields grabbing their host's draw queue)
115115

116116
if (!field.exists || !field.visible)
117117
continue;
118-
118+
119119
var realField:NoteField = field.getNotefield();
120120

121121
var queue:Array<RenderObject> = field.drawQueue;
122122
for (object in queue){
123123
var glowColour = realField.modManager == null ? FlxColor.WHITE : FlxColor.fromRGBFloat(getFlashComponent(realField, 'R', object.column),
124124
getFlashComponent(realField, 'G', object.column), getFlashComponent(realField, 'B', object.column));
125-
125+
126126
finalDrawQueue.push({
127127
graphic: object.graphic,
128128
shader: object.shader,
@@ -180,7 +180,7 @@ class NotefieldRenderer extends FlxBasic {
180180
continue;
181181
for (shit in transforms)
182182
shit.alphaMultiplier *= camera.alpha;
183-
183+
184184
object.sourceField.getScreenPosition(point, camera);
185185
var drawItem = camera.startTrianglesBatch(graphic, object.antialiasing, true, null, true, shader);
186186
@:privateAccess
@@ -197,7 +197,7 @@ class NotefieldRenderer extends FlxBasic {
197197

198198
override function update(elapsed:Float){
199199
super.update(elapsed);
200-
200+
201201
for(field in members)
202202
field.update(elapsed);
203203
}
@@ -207,8 +207,8 @@ class NotefieldRenderer extends FlxBasic {
207207
super.destroy();
208208

209209
while (members.length > 0)
210-
members.pop().destroy();
211-
210+
members.pop().destroy();
211+
212212
members = null;
213213
}
214-
}
214+
}

0 commit comments

Comments
 (0)