Skip to content

Commit 13902a0

Browse files
committed
I told you I would
1 parent 46d1d1b commit 13902a0

File tree

9 files changed

+201
-130
lines changed

9 files changed

+201
-130
lines changed

source/archipelago/APItem.hx

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -669,8 +669,8 @@ class APItem {
669669
t.isTrap = true;
670670
});
671671

672-
case "Nothing":
673-
popup('...For now...', "APItem: Nothing");
672+
case "Lonely Friday Night":
673+
popup('Looks like you\'re spending this Friday Night alone...', "APItem: Lonely Friday Night");
674674
return null;
675675

676676
case "PowerPoint Trap":
@@ -1614,7 +1614,7 @@ class APItem {
16141614
"Pong Challenge",
16151615
"Math Problem Trap",
16161616
"Pocket Lens",
1617-
"Nothing"
1617+
"Lonely Friday Night"
16181618
];
16191619
for (name in itemNames) {
16201620
createItemByName(name);
@@ -2161,9 +2161,49 @@ class APrilFools extends APTrap {
21612161
"The void is coming."
21622162
];
21632163

2164+
var funnySpamMessages = [
2165+
"I CAN [[I See You!]]...",
2166+
"DID YOU [[Hearing-Aid]] THAT?",
2167+
"DON'T LOOK [[RUN! RUN AWAY!]].",
2168+
"YOUR [[Time is a valuable thing]] is [[Drifting Away]].",
2169+
"IS SOMEONE [[watching from afar!]]?",
2170+
"CHECK YOUR [[Surround-Sound Speaker System]].",
2171+
"WHAT WAS [[Sound Around Town]]?",
2172+
"ARE YOU [[all alone on a friday afternoon]]?",
2173+
"SOMETHING [[FEEL YOUR]] [[Power Off]].",
2174+
"WHY IS IT SO [[it's quiet. too quiet]]?",
2175+
"YOUR [[Smart Device]] IS NOW [[Where am I? What is this??]]. JUST [[clowning around]]!",
2176+
"WHY DID THE [[creator of all things technology]] [[GIVE UP!]]? THEY DIDN'T GET [[Group your strings into in array]].",
2177+
"404: [[lucky number 9]] [[MISSING]].",
2178+
"DID YOU JUST [[Feeling lucky]]? [[THE BOLD AND THE BRAVE]] move.",
2179+
"YOUR [[TYPING MECHANIC]] IS [[I HATE YOU SO MUCH]].",
2180+
"[[Congratulations!]] YOU'VE WON [[absolutely nothing]]!",
2181+
"THIS IS NOT A [[hyperlink blocked]], IT'S A [[FEATURE PRESENTATION]].",
2182+
"YOUR [[rodent]] JUST [[go of my own will]]. OR DID IT?",
2183+
"DON'T WORRY, THE [[Spagetti Code]] IS 100% [[insect repellent]]. MAYBE.",
2184+
"[[fun fact]]: [[The following message is]] [[what's the point to life]].",
2185+
"YOUR [[LORD OF SCREENS]] IS NOW [[10% brighter on kids]]. JUST [[it was a joke calm down, CALM DOWN]]!",
2186+
"[[Did you know?]] This message is [[it all feels like a waste of time]].",
2187+
"Your [[CPU]] is [[STOP LAUGHING AT ME]].",
2188+
"[[ERR]] 42: [[Life, the universe, and everything sweet]].",
2189+
"Your [[Raw, Artifical Memory]] just said [[Hello, World!]].",
2190+
"This is a [[testing, testing]]. [[Or is it?]]",
2191+
"Your [[Projection Device]] wants [[a break from all of you]].",
2192+
"[[GOD]] is [[I See You]].",
2193+
"[[GOD]][[2]] is [[I See You]].",
2194+
"[[GOD]][[2]] is [[I'm always watching]].",
2195+
"[[GOD]] is [[I'm always watching]].",
2196+
"[[GOD]][[2]] and [[GOD]] are [[I'm always watching]].",
2197+
"[[GOD]][[2]] and [[GOD]] are [[you're adorable when you sleep!]].",
2198+
"[[GOD]][[2]] and [[GOD]] are [[go play, children! I'll watch from here]].",
2199+
"[[GOD]][[2]] and [[GOD]] are [[STOP LOOKING AT MY DECK YOU FILTHY CHEATER!]].",
2200+
"[[the void is coming.]]"
2201+
];
2202+
21642203
var randomMessage = Std.random(100) < 20 // 20% chance for creepy messages
21652204
? creepyMessages[Std.random(creepyMessages.length)]
21662205
: funnyMessages[Std.random(funnyMessages.length)];
2206+
if FlxG.random.bool(1) randomMessage = funnySpamMessages[Std.random(funnySpamMessages.length)];
21672207
if (!PlatformUtil.sendWindowsNotification("Archipelago", randomMessage)) {
21682208
APItem.popup(randomMessage, "Archipelago", true);
21692209
}

source/backend/Paths.hx

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ class Paths
178178
return;
179179
}
180180
}
181+
catch(r) {}
181182

182183
//trace('check...');
183184
try
@@ -189,7 +190,7 @@ class Paths
189190
//trace('gfx added to the list successfully!');
190191
}
191192
}
192-
//catch(haxe.Exception) {}
193+
catch(r) {}
193194
}
194195

195196
for (member in FlxG.state.members)
@@ -269,21 +270,22 @@ class Paths
269270

270271
//super.destroy();
271272
} else {
272-
try {
273-
clearStoredWithoutStickers();
274-
freeGraphicsFromMemory();
275-
Paths.clearStoredMemory();
276-
Paths.clearUnusedMemory();
277-
//MemoryUtilBase.compact();
278-
//MemoryUtilBase.collect(true);
279-
currentTrackedSounds.clear();
280-
@:privateAccess {
281-
for (key => asset in FlxG.bitmap._cache)
282-
asset.destroy();
283-
}
273+
clearStoredWithoutStickers();
274+
freeGraphicsFromMemory();
275+
MemoryUtilBase.compact();
276+
MemoryUtilBase.collect(true);
277+
Paths.clearStoredMemory();
278+
Paths.clearUnusedMemory();
279+
currentTrackedSounds.clear();
280+
@:privateAccess {
281+
for (key => asset in FlxG.bitmap._cache)
282+
asset.destroy();
283+
}
284+
/*try {
285+
284286
} catch(e) {
285287
trace('ERROR: Couldn\'t' );
286-
}
288+
}*/
287289
}
288290
}
289291

source/objects/Note.hx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,8 @@ class Note extends NoteObject
687687
public var hitsound:String = 'hitsound';
688688
public var doRGBShader:Bool = true;
689689

690+
public var noteSplashTexture:String = "";
691+
690692
private function set_multSpeed(value:Float):Float {
691693
resizeByRatio(value / multSpeed);
692694
multSpeed = value;
@@ -875,6 +877,8 @@ class Note extends NoteObject
875877
super();
876878
isNotePool = inNotePool;
877879

880+
if (noteSplashTexture != '') noteSplashData.texture = noteSplashTexture;
881+
878882
animation = new PsychAnimationController(this);
879883

880884
antialiasing = ClientPrefs.data.antialiasing;

source/objects/NoteSplash.hx

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,43 @@ class NoteSplash extends NoteObject
5252
public static var defaultNoteSplash(default, never):String = "noteSplashes/noteSplashes";
5353
public static var configs:Map<String, NoteSplashConfig> = new Map();
5454

55-
public function new(?x:Float = 0, ?y:Float = 0, ?splash:String)
55+
public function new(?x:Float = 0, ?y:Float = 0, ?strum:Int = 0, ?splash:String)
5656
{
5757
super(x, y);
58+
this.objType = SPLASH;
5859

5960
animation = new PsychAnimationController(this);
6061

6162
rgbShader = new PixelSplashShaderRef();
6263
shader = rgbShader.shader;
64+
setupNoteSplash(x, y, strum, splash);
65+
visible = false;
66+
}
6367

64-
this.objType = SPLASH;
68+
public var animationAmount:Int = 2;
69+
public function setupNoteSplash(x:Float, y:Float, ?column:Int = 0, ?texture:String = null)
70+
{
71+
visible = true;
72+
/*var doR:Bool = false;
73+
if (note != null && note.genScript != null){
74+
var ret:Dynamic = note.genScript.call("preSetupNoteSplash", [x, y, column, texture, hueColor, satColor, brtColor, note], ["this" => this, "noteData" => noteData, "column" => column]);
75+
if(ret == Globals.Function_Stop) doR = true;
76+
}
77+
78+
if (callOnHScripts("preSetupNoteSplash", [x, y, column, texture, hueColor, satColor, brtColor, note], ["this" => this, "noteData" => noteData, "column" => column]) == Globals.Function_Stop)
79+
return;
80+
81+
if (doR)return;*/ //TODO: Psych-ify this later
82+
83+
loadSplash(texture);
84+
setPosition(x, y);
85+
animationAmount = 2;
86+
alpha = 0.6;
87+
scale.set(0.8, 0.8);
88+
updateHitbox();
89+
90+
this.column = column;
6591

66-
loadSplash(splash);
6792
}
6893

6994
public var maxAnims(default, set):Int = 0;

source/objects/playfields/PlayField.hx

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -222,13 +222,12 @@ class PlayField extends FlxTypedGroup<FlxBasic>
222222
add(strumAttachments);
223223

224224
// Pre-allocate a few note splashes for better performance
225-
for (i in 0...4) {
226-
var splash:NoteSplash = new NoteSplash();
227-
splash.handleRendering = false;
228-
splash.alpha = 0.0;
229-
splash.kill(); // Start them as killed objects in the pool
230-
grpNoteSplashes.add(splash);
231-
}
225+
// No need, you only need one. It creates everything else for you
226+
var splash:NoteSplash = new NoteSplash();
227+
splash.handleRendering = false;
228+
grpNoteSplashes.add(splash);
229+
grpNoteSplashes.visible = false; // so they dont get drawn
230+
splash.alpha = 0.0;
232231

233232
////
234233
noteField = new NoteField(this, modMgr);
@@ -927,7 +926,7 @@ class PlayField extends FlxTypedGroup<FlxBasic>
927926
public function spawnSplash(note:Note, ?splashSkin:String):NoteSplash {
928927
if (note == null) return null;
929928

930-
var splash:NoteSplash = grpNoteSplashes.recycle(NoteSplash);
929+
/*var splash:NoteSplash = grpNoteSplashes.recycle(NoteSplash);
931930
if (splash == null) {
932931
splash = new NoteSplash();
933932
grpNoteSplashes.add(splash);
@@ -961,7 +960,13 @@ class PlayField extends FlxTypedGroup<FlxBasic>
961960
}
962961
963962
splash.spawnSplashNote(strumX, strumY, note.noteData, note);
963+
splash.handleRendering = false;*/
964+
965+
// do it the way god (troll engine) intended
966+
var splash:NoteSplash = grpNoteSplashes.recycle(NoteSplash);
967+
splash.setupNoteSplash(0, 0, note.column, splashSkin);
964968
splash.handleRendering = false;
969+
grpNoteSplashes.add(splash);
965970

966971
return splash;
967972
}

0 commit comments

Comments
 (0)