From 31439b1b6c7bce844bea3345da75c1d281b8fecf Mon Sep 17 00:00:00 2001 From: Geeves Date: Thu, 22 Dec 2022 06:23:24 +0200 Subject: [PATCH] Crew Transfer Fix (#15399) --- code/controllers/subsystems/ticker.dm | 21 +++---- code/game/gamemodes/game_mode.dm | 62 ++++---------------- html/changelogs/geeves-crew_transfer_fix.yml | 6 ++ 3 files changed, 30 insertions(+), 59 deletions(-) create mode 100644 html/changelogs/geeves-crew_transfer_fix.yml diff --git a/code/controllers/subsystems/ticker.dm b/code/controllers/subsystems/ticker.dm index e9ca8573b20..13c6fd4fb38 100644 --- a/code/controllers/subsystems/ticker.dm +++ b/code/controllers/subsystems/ticker.dm @@ -233,24 +233,25 @@ var/datum/controller/subsystem/ticker/SSticker if(Player.mind && !isnewplayer(Player)) if(Player.stat != DEAD) var/turf/playerTurf = get_turf(Player) + var/area/playerArea = get_area(playerTurf) if(evacuation_controller.round_over() && evacuation_controller.emergency_evacuation) - if(isNotAdminLevel(playerTurf.z)) - to_chat(Player, "You managed to survive, but were marooned on [station_name()] as [Player.real_name]...") + if(isStationLevel(playerTurf.z) && is_station_area(playerArea)) + to_chat(Player, SPAN_GOOD(SPAN_BOLD("You managed to survive the events on [station_name()] as [Player.real_name]."))) else - to_chat(Player, "You managed to survive the events on [station_name()] as [Player.real_name].") - else if(isAdminLevel(playerTurf.z)) - to_chat(Player, "You successfully underwent crew transfer after events on [station_name()] as [Player.real_name].") + to_chat(Player, SPAN_NOTICE(SPAN_BOLD("You managed to survive, but were marooned as [Player.real_name]..."))) + else if(isStationLevel(playerTurf.z) && is_station_area(playerArea)) + to_chat(Player, SPAN_GOOD(SPAN_BOLD("You successfully underwent the bluespace jump after the events on [station_name()] as [Player.real_name]."))) else if(issilicon(Player)) - to_chat(Player, "You remain operational after the events on [station_name()] as [Player.real_name].") + to_chat(Player, SPAN_GOOD(SPAN_BOLD("You remain operational after the events on [station_name()] as [Player.real_name]."))) else - to_chat(Player, "You missed the crew transfer after the events on [station_name()] as [Player.real_name].") + to_chat(Player, SPAN_NOTICE(SPAN_BOLD("You missed the crew transfer after the events on [station_name()] as [Player.real_name]."))) else if(istype(Player,/mob/abstract/observer)) var/mob/abstract/observer/O = Player if(!O.started_as_observer) - to_chat(Player, "You did not survive the events on [station_name()]...") + to_chat(Player, SPAN_WARNING(SPAN_BOLD("You did not survive the events on [station_name()]..."))) else - to_chat(Player, "You did not survive the events on [station_name()]...") + to_chat(Player, SPAN_WARNING(SPAN_BOLD("You did not survive the events on [station_name()]..."))) to_world("
") for (var/mob/living/silicon/ai/aiPlayer in mob_list) @@ -719,4 +720,4 @@ var/datum/controller/subsystem/ticker/SSticker #undef SETUP_OK #undef SETUP_REVOTE #undef SETUP_REATTEMPT -#undef LOBBY_TIME \ No newline at end of file +#undef LOBBY_TIME diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index b80242ed2f2..6096f85451e 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -364,57 +364,33 @@ var/global/list/additional_antag_types = list() discord_text = "" var/clients = 0 - var/surviving_humans = 0 var/surviving_total = 0 - var/ghosts = 0 - var/escaped_humans = 0 var/escaped_total = 0 - var/escaped_on_pod_1 = 0 - var/escaped_on_pod_2 = 0 - var/escaped_on_pod_3 = 0 - var/escaped_on_shuttle = 0 - - var/list/area/escape_locations = list(/area/shuttle/escape, /area/shuttle/escape_pod/pod1, /area/shuttle/escape_pod/pod2, /area/shuttle/escape_pod/pod3) + var/ghosts = 0 for(var/mob/M in player_list) if(M.client) clients++ - if(ishuman(M)) + if(M.stat != DEAD && isipc(M)) var/mob/living/carbon/human/H = M - if(M.stat != DEAD) - surviving_humans++ - if(M.loc && M.loc.loc && (M.loc.loc.type in escape_locations)) - escaped_humans++ - if (isipc(H)) - var/datum/species/machine/machine = H.species - machine.update_tag(H, H.client) + var/datum/species/machine/machine = H.species + machine.update_tag(H, H.client) if(M.stat != DEAD) + var/turf/playerTurf = get_turf(M) + var/area/playerArea = get_area(playerTurf) surviving_total++ - if(M.loc && M.loc.loc && (M.loc.loc.type in escape_locations)) + if(isStationLevel(playerTurf.z) && is_station_area(playerArea)) escaped_total++ - - if(M.loc && M.loc.loc && M.loc.loc.type == /area/shuttle/escape) - escaped_on_shuttle++ - - if(M.loc && M.loc.loc && M.loc.loc.type == /area/shuttle/escape_pod/pod1) - escaped_on_pod_1++ - - if(M.loc && M.loc.loc && M.loc.loc.type == /area/shuttle/escape_pod/pod2) - escaped_on_pod_2++ - - if(M.loc && M.loc.loc && M.loc.loc.type == /area/shuttle/escape_pod/pod3) - escaped_on_pod_3++ - if(isobserver(M)) ghosts++ var/text = "" if(surviving_total > 0) text += "
There [surviving_total>1 ? "were [surviving_total] survivors" : "was one survivor"]" - text += " ([escaped_total>0 ? escaped_total : "none"] [evacuation_controller.emergency_evacuation ? "escaped" : "transferred"]) and [ghosts] ghosts.
" + text += " ([escaped_total>0 ? escaped_total : "none"] [evacuation_controller.emergency_evacuation ? "escaped" : "bluespace jumped"]) and [ghosts] ghosts.
" discord_text += "There [surviving_total>1 ? "were **[surviving_total] survivors**" : "was **one survivor**"]" - discord_text += " ([escaped_total>0 ? escaped_total : "none"] [evacuation_controller.emergency_evacuation ? "escaped" : "transferred"]) and **[ghosts] ghosts**." + discord_text += " ([escaped_total>0 ? escaped_total : "none"] [evacuation_controller.emergency_evacuation ? "escaped" : "bluespace jumped"]) and **[ghosts] ghosts**." else text += "There were no survivors ([ghosts] ghosts)." @@ -425,25 +401,13 @@ var/global/list/additional_antag_types = list() post_webhook_event(WEBHOOK_ROUNDEND, list("survivours"=surviving_total, "escaped"=escaped_total, "ghosts"=ghosts, "gamemode"=name, "gameid"=game_id, "antags"=antag_text)) if(clients > 0) - feedback_set("round_end_clients",clients) + feedback_set("round_end_clients", clients) if(ghosts > 0) - feedback_set("round_end_ghosts",ghosts) - if(surviving_humans > 0) - feedback_set("survived_human",surviving_humans) + feedback_set("round_end_ghosts", ghosts) if(surviving_total > 0) - feedback_set("survived_total",surviving_total) - if(escaped_humans > 0) - feedback_set("escaped_human",escaped_humans) + feedback_set("survived_total", surviving_total) if(escaped_total > 0) - feedback_set("escaped_total",escaped_total) - if(escaped_on_shuttle > 0) - feedback_set("escaped_on_shuttle",escaped_on_shuttle) - if(escaped_on_pod_1 > 0) - feedback_set("escaped_on_pod_1",escaped_on_pod_1) - if(escaped_on_pod_2 > 0) - feedback_set("escaped_on_pod_2",escaped_on_pod_2) - if(escaped_on_pod_3 > 0) - feedback_set("escaped_on_pod_3",escaped_on_pod_3) + feedback_set("escaped_total", escaped_total) return 0 diff --git a/html/changelogs/geeves-crew_transfer_fix.yml b/html/changelogs/geeves-crew_transfer_fix.yml new file mode 100644 index 00000000000..7655d23f603 --- /dev/null +++ b/html/changelogs/geeves-crew_transfer_fix.yml @@ -0,0 +1,6 @@ +author: Geeves + +delete-after: True + +changes: + - bugfix: "You now count as successfully transferring at roundend if you're on the ship's Z-level and in a ship area."