From d08cd1675276c59e997ed17164179420b31094b3 Mon Sep 17 00:00:00 2001 From: LetterN <24603524+LetterN@users.noreply.github.com> Date: Wed, 8 Sep 2021 10:56:20 +0800 Subject: [PATCH] fix --- code/__HELPERS/roundend.dm | 23 +++++++++++------------ code/modules/unit_tests/unit_test.dm | 1 + 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/code/__HELPERS/roundend.dm b/code/__HELPERS/roundend.dm index 2c13f30707..5b6d301dde 100644 --- a/code/__HELPERS/roundend.dm +++ b/code/__HELPERS/roundend.dm @@ -218,20 +218,14 @@ to_chat(world, "


The round has ended.") log_game("The round has ended.") - if(LAZYLEN(GLOB.round_end_notifiees)) - world.TgsTargetedChatBroadcast("[GLOB.round_end_notifiees.Join(", ")] the round has ended.", FALSE) + + CONFIG_SET(flag/suicide_allowed,TRUE) // EORG suicides allowed for(var/I in round_end_events) var/datum/callback/cb = I cb.InvokeAsync() LAZYCLEARLIST(round_end_events) - for(var/client/C in GLOB.clients) - if(!C.credits) - C.RollCredits() - C.playtitlemusic(40) - CONFIG_SET(flag/suicide_allowed,TRUE) // EORG suicides allowed - var/speed_round = FALSE if(world.time - SSticker.round_start_time <= 300 SECONDS) speed_round = TRUE @@ -264,12 +258,15 @@ send2adminchat("Server", "A round of [mode.name] just ended[mode_result == "undefined" ? "." : " with a [mode_result]."] Survival rate: [survival_rate]") + if(LAZYLEN(GLOB.round_end_notifiees)) + world.TgsTargetedChatBroadcast("[GLOB.round_end_notifiees.Join(", ")] the round has ended.", FALSE) + if(length(CONFIG_GET(keyed_list/cross_server))) send_news_report() //tell the nice people on discord what went on before the salt cannon happens. world.TgsTargetedChatBroadcast("The current round has ended. Please standby for your shift interlude Nanotrasen News Network's report!", FALSE) - world.TgsTargetedChatBroadcast(send_news_report(),FALSE) + world.TgsTargetedChatBroadcast(send_news_report(), FALSE) CHECK_TICK @@ -543,21 +540,23 @@ ///Generate a report for how much money is on station, as well as the richest crewmember on the station. /datum/controller/subsystem/ticker/proc/market_report() var/list/parts = list() - parts += "Station Economic Summary:" + ///This is the richest account on station at roundend. var/datum/bank_account/mr_moneybags ///This is the station's total wealth at the end of the round. var/station_vault = 0 ///How many players joined the round. var/total_players = GLOB.joined_player_list.len - var/list/typecache_bank = typecacheof(list(/datum/bank_account/department, /datum/bank_account/remote)) + var/static/list/typecache_bank = typecacheof(list(/datum/bank_account/department, /datum/bank_account/remote)) for(var/datum/bank_account/current_acc in SSeconomy.generated_accounts) if(typecache_bank[current_acc.type]) continue station_vault += current_acc.account_balance if(!mr_moneybags || mr_moneybags.account_balance < current_acc.account_balance) mr_moneybags = current_acc - parts += "
There were [station_vault] credits collected by crew this shift.
" + parts += "
Station Economic Summary:
" + parts += "General Statistics:
" + parts += "There were [station_vault] credits collected by crew this shift.
" if(total_players > 0) parts += "An average of [station_vault/total_players] credits were collected.
" // log_econ("Roundend credit total: [station_vault] credits. Average Credits: [station_vault/total_players]") diff --git a/code/modules/unit_tests/unit_test.dm b/code/modules/unit_tests/unit_test.dm index ef22f7960e..aee62b7a52 100644 --- a/code/modules/unit_tests/unit_test.dm +++ b/code/modules/unit_tests/unit_test.dm @@ -132,6 +132,7 @@ GLOBAL_VAR(test_log) SSticker.force_ending = TRUE //We have to call this manually because del_text can preceed us, and SSticker doesn't fire in the post game + SSticker.ready_for_reboot = TRUE SSticker.standard_reboot() // /datum/map_template/unit_tests