From 740f23bf0e0c56226c87ce9c953169b43282063e Mon Sep 17 00:00:00 2001 From: Runa Dacino Date: Sun, 3 Sep 2023 22:29:12 +0200 Subject: [PATCH 1/2] tweak(MOTD): Makes RESPAWN MESSAGE appear AFTER MOTD Creates a new var on new player mob that tracks if we have quit the round/abandoned our ghost mob to return to lobby or if we have done our first login. On leaving a previously occupied mob, regardless if we clear manifest or not (previous functionality), the respawn message is sent. However, this is no longer done by the abandon_mob() procedure as that causes the MOTD to cover it up. Instead, by setting the has_respawned var to true, we request Login() for new_player mobs (aka lobby joiners) to see it. --- code/modules/mob/mob.dm | 3 ++- code/modules/mob/new_player/login.dm | 8 ++++++-- code/modules/mob/new_player/new_player.dm | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index cd94acf4da0..7bbb7fc71c5 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -406,7 +406,6 @@ to_chat(src,"Your job has been free'd up, and you can rejoin as another character or quit. Thanks for properly quitting round, it helps the server!") // Beyond this point, you're going to respawn - to_chat(usr, config.respawn_message) if(!client) log_game("[usr.key] AM failed due to disconnect.") @@ -425,7 +424,9 @@ qdel(M) return + M.has_respawned = TRUE //When we returned to main menu, send respawn message M.key = key + if(M.mind) M.mind.reset() return diff --git a/code/modules/mob/new_player/login.dm b/code/modules/mob/new_player/login.dm index 299719aaa8f..1fe31e965d9 100644 --- a/code/modules/mob/new_player/login.dm +++ b/code/modules/mob/new_player/login.dm @@ -31,6 +31,10 @@ var/obj/effect/lobby_image = new /obj/effect/lobby_image if(join_motd) to_chat(src, "
[join_motd]
") + if(has_respawned) + to_chat(usr, config.respawn_message) + has_respawned = FALSE + if(!mind) mind = new /datum/mind(key) mind.active = 1 @@ -53,7 +57,7 @@ var/obj/effect/lobby_image = new /obj/effect/lobby_image /mob/new_player/proc/version_warnings() var/problems // string to store message to present to player as a problem - + // TODO: Move this to a config file at some point maybe? What would the structure of that look like? switch(client.byond_build) // http://www.byond.com/forum/post/2711510 @@ -62,7 +66,7 @@ var/obj/effect/lobby_image = new /obj/effect/lobby_image // http://www.byond.com/forum/post/2711748 if(1562 to 1563) problems = "frequent known crashes related to animations" - + // Don't have a thread, just a lot of player reports. if(1564 to 1565) // Fixed in 1566 which isn't released as of this commit if(world.byond_build == 1564) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 9c04c087175..df3bdad9d73 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -6,6 +6,7 @@ var/totalPlayers = 0 //Player counts for the Lobby tab var/totalPlayersReady = 0 var/show_hidden_jobs = 0 //Show jobs that are set to "Never" in preferences + var/has_respawned = FALSE //Determines if we're using RESPAWN_MESSAGE var/datum/browser/panel universal_speak = 1 From 2b955ceff4a0c14ed8969877832d98df287993fd Mon Sep 17 00:00:00 2001 From: Runa Dacino Date: Sun, 3 Sep 2023 22:31:30 +0200 Subject: [PATCH 2/2] refactor(Quit round): Changes message to be more clear Previously, the message implied that saying no/cancelling acts as a double-check for leaving the round. Now, it's clear that pressing No will still kick you out. --- code/modules/mob/mob.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 7bbb7fc71c5..4856542a556 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -366,7 +366,9 @@ if(choice == "No, wait") return else if(mind.assigned_role) - var/extra_check = tgui_alert(usr, "Do you want to Quit This Round before you return to lobby? This will properly remove you from manifest, as well as prevent resleeving.","Quit This Round",list("Quit Round","Cancel")) + var/extra_check = tgui_alert(usr, "Do you want to Quit This Round before you return to lobby?\ + This will properly remove you from manifest, as well as prevent resleeving. BEWARE: Pressing 'NO' will STILL return you to lobby!", + "Quit This Round",list("Quit Round","No")) if(extra_check == "Quit Round") //Update any existing objectives involving this mob. for(var/datum/objective/O in all_objectives)