Skip to content

Commit 0a51c45

Browse files
committed
Update APItem.hx
1 parent a54d501 commit 0a51c45

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

source/archipelago/APItem.hx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2261,11 +2261,21 @@ class APrilFools extends APTrap {
22612261
"[[GOD]][[2]] and [[GOD]] are [[STOP LOOKING AT MY DECK YOU FILTHY CHEATER!]].",
22622262
"[[the void is coming.]]"
22632263
];
2264-
2265-
var randomMessage = Std.random(100) < 20 // 20% chance for creepy messages
2266-
? creepyMessages[Std.random(creepyMessages.length)]
2267-
: funnyMessages[Std.random(funnyMessages.length)];
2268-
if FlxG.random.bool(1) randomMessage = funnySpamMessages[Std.random(funnySpamMessages.length)];
2264+
@:privateAccess
2265+
var randomMessage:String = (FlxG.random.bool((APInfo.ap != null && APInfo.ap._players != null && (function():Bool {
2266+
for (p in APInfo.ap._players) {
2267+
try {
2268+
if (APInfo.ap.get_player_game(p.slot) == "Deltarune") return true;
2269+
} catch (e:Dynamic) {
2270+
// ignore malformed entries
2271+
}
2272+
}
2273+
return false;
2274+
})()) ? 10 : 1))
2275+
? funnySpamMessages[Std.random(funnySpamMessages.length)]
2276+
: (Std.random(100) < 20
2277+
? creepyMessages[Std.random(creepyMessages.length)]
2278+
: funnyMessages[Std.random(funnyMessages.length)]);
22692279
if (!PlatformUtil.sendWindowsNotification("Archipelago", randomMessage)) {
22702280
APItem.popup(randomMessage, "Archipelago", true);
22712281
}

0 commit comments

Comments
 (0)