Skip to content

Commit 411f446

Browse files
committed
e
1 parent 6cad9f5 commit 411f446

File tree

2 files changed

+96
-1
lines changed

2 files changed

+96
-1
lines changed

source/archipelago/APGameState.hx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,12 @@ class APGameState
526526
modName = (modName != null && modName != "") ? modName.trim() : "";
527527
var info = info();
528528
var locations = locationData(songName, modName).concat(noteData(songName, modName));
529+
530+
if (locations == null || locations.length == 0)
531+
{
532+
trace("No locations found for song: " + songName + " with mod: " + modName);
533+
return false;
534+
}
529535
for (location in locations)
530536
{
531537
if (info.missingLocations.contains(location))

source/archipelago/APPlayState.hx

Lines changed: 90 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1985,7 +1985,96 @@ class APPlayState extends PlayState {
19851985
})())) && deathByLink) {
19861986
var cause:String = "";
19871987
try {
1988-
if (deathLinkPacket.cause != null && (deathLinkPacket.cause != "" || deathLinkPacket.cause != " ")) cause = deathLinkPacket.cause + "\n[pause:0.5](Sounds like a skill issue...)";
1988+
var extraMessages = [
1989+
"Sounds like a skill issue...",
1990+
"They must suck...",
1991+
"At least they tried...",
1992+
"What a noob...",
1993+
"At least you aren't that bad... [pause:0.5]Or are you?",
1994+
"Maybe next time...",
1995+
"You can always try again...",
1996+
"This doesn't affect you, right?",
1997+
"What a shame...",
1998+
"Better luck next time...",
1999+
'Eh, you can always play ${PlayState.SONG.song} again...',
2000+
"Dang...",
2001+
"RIP..."
2002+
];
2003+
2004+
// Find player ID from name and add game-specific messages
2005+
if (apGame?.info() != null && deathLinkPacket?.source != null) {
2006+
var playerID:Int = -1;
2007+
var apClient = apGame.info();
2008+
2009+
// Find player ID by name - iterate through _slotInfo
2010+
@:privateAccess
2011+
for (id in apClient._slotInfo.keys()) {
2012+
if (apClient._slotInfo.get(id).name == deathLinkPacket.source) {
2013+
playerID = id;
2014+
break;
2015+
}
2016+
}
2017+
2018+
// Get player's game and add game-specific messages
2019+
if (playerID != -1) {
2020+
var playerGame = apClient.get_player_game(playerID);
2021+
2022+
switch (playerGame.toLowerCase()) {
2023+
case "friday night funkin'", "fnf":
2024+
extraMessages = extraMessages.concat([
2025+
"Skill issue detected...",
2026+
"They couldn't hit the notes...",
2027+
"Rhythm game more like skill issue game...",
2028+
"Maybe they should practice on easy mode...",
2029+
"Beep boop beep... FAIL!"
2030+
]);
2031+
case "minecraft":
2032+
extraMessages = extraMessages.concat([
2033+
"They got creeper'd...",
2034+
"Fell into lava, didn't they?",
2035+
"Should have brought more torches...",
2036+
"Respawning in 3... 2... 1...",
2037+
"At least they didn't lose their diamonds... right?"
2038+
]);
2039+
case "the legend of zelda: a link to the past":
2040+
extraMessages = extraMessages.concat([
2041+
"Link has fallen...",
2042+
"The princess will have to wait...",
2043+
"Game Over! Press Start to continue...",
2044+
"Even the Master Sword couldn't save them...",
2045+
"Ganon laughs in the distance..."
2046+
]);
2047+
case "super metroid":
2048+
extraMessages = extraMessages.concat([
2049+
"Samus has lost all energy...",
2050+
"The mission has failed...",
2051+
"Planet Zebes claims another victim...",
2052+
"Should have collected more energy tanks...",
2053+
"The last Metroid is still in captivity..."
2054+
]);
2055+
case "super mario world":
2056+
extraMessages = extraMessages.concat([
2057+
"Mario has lost a life...",
2058+
"Game Over! Thank you Mario!",
2059+
"Bowser wins this round...",
2060+
"Should have grabbed that mushroom...",
2061+
"Mamma mia! That's-a gonna hurt!"
2062+
]);
2063+
default:
2064+
extraMessages = extraMessages.concat([
2065+
"They failed at " + playerGame + "...",
2066+
"Game over in " + playerGame + "!",
2067+
"Apparently " + playerGame + " is harder than it looks...",
2068+
"RIP to another " + playerGame + " player..."
2069+
]);
2070+
}
2071+
}
2072+
}
2073+
2074+
if (deathLinkPacket.cause != null && (deathLinkPacket.cause != "" || deathLinkPacket.cause != " ")) {
2075+
var randomMsg = extraMessages[FlxG.random.int(0, extraMessages.length - 1)];
2076+
cause = deathLinkPacket.cause + "\n[pause:0.5](" + randomMsg + ")";
2077+
}
19892078
}
19902079
catch(e) {trace('DEATHLINKPACK WAS NULL!');}
19912080
try {

0 commit comments

Comments
 (0)