From 171aca5a41268eae21770eb1ec044674d38d7525 Mon Sep 17 00:00:00 2001 From: AnturK Date: Wed, 13 Dec 2017 12:20:56 +0100 Subject: [PATCH] Roundend fixes (#33477) * Fixes TC use counts and adds some spacing between solo antags of the same kind * Fixes nuke result * Fixes round result for clock_cult * Kevinz please. * Hurts my soul --- code/__HELPERS/roundend.dm | 2 +- code/datums/antagonists/datum_traitor.dm | 4 ++-- code/datums/antagonists/nukeop.dm | 2 +- code/game/gamemodes/clock_cult/clock_cult.dm | 2 +- code/game/gamemodes/nuclear/nuclear.dm | 2 +- code/modules/uplink/uplink.dm | 3 +-- code/modules/uplink/uplink_items.dm | 2 +- 7 files changed, 8 insertions(+), 9 deletions(-) diff --git a/code/__HELPERS/roundend.dm b/code/__HELPERS/roundend.dm index 7bd08167e67b..bc085bbf88d4 100644 --- a/code/__HELPERS/roundend.dm +++ b/code/__HELPERS/roundend.dm @@ -335,7 +335,7 @@ currrent_category = A.roundend_category previous_category = A result += A.roundend_report() - result += "
" + result += "

" if(all_antagonists.len) var/datum/antagonist/last = all_antagonists[all_antagonists.len] diff --git a/code/datums/antagonists/datum_traitor.dm b/code/datums/antagonists/datum_traitor.dm index 80c6f64a963a..80487f69e823 100644 --- a/code/datums/antagonists/datum_traitor.dm +++ b/code/datums/antagonists/datum_traitor.dm @@ -302,8 +302,8 @@ var/uplink_true = FALSE var/purchases = "" for(var/datum/component/uplink/H in GLOB.uplinks) - if(H && H.owner && H.owner == owner.key) - TC_uses += H.spent_telecrystals + if(H.owner && H.owner == owner.key) + TC_uses += H.purchase_log.total_spent uplink_true = TRUE purchases += H.purchase_log.generate_render(FALSE) diff --git a/code/datums/antagonists/nukeop.dm b/code/datums/antagonists/nukeop.dm index d0f24e7d7be4..30d00ac3dd32 100644 --- a/code/datums/antagonists/nukeop.dm +++ b/code/datums/antagonists/nukeop.dm @@ -306,7 +306,7 @@ for(var/U in GLOB.uplinks) var/datum/component/uplink/H = U if(H.owner == syndicate.key) - TC_uses += H.spent_telecrystals + TC_uses += H.purchase_log.total_spent if(H.purchase_log) purchases += H.purchase_log.generate_render(show_key = FALSE) else diff --git a/code/game/gamemodes/clock_cult/clock_cult.dm b/code/game/gamemodes/clock_cult/clock_cult.dm index 85a90cce988b..1baabbebeccb 100644 --- a/code/game/gamemodes/clock_cult/clock_cult.dm +++ b/code/game/gamemodes/clock_cult/clock_cult.dm @@ -196,7 +196,7 @@ Credit where due: /datum/game_mode/clockwork_cult/proc/check_clockwork_victory() return main_clockcult.check_clockwork_victory() -/datum/game_mode/clock_cult/set_round_result() +/datum/game_mode/clockwork_cult/set_round_result() ..() if(GLOB.clockwork_gateway_activated) SSticker.news_report = CLOCK_SUMMON diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 5807a7aacb9a..f3dee0030348 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -70,6 +70,7 @@ ..() /datum/game_mode/nuclear/set_round_result() + ..() var result = nuke_team.get_result() switch(result) if(NUKE_RESULT_FLUKE) @@ -102,7 +103,6 @@ else SSticker.mode_result = "halfwin - interrupted" SSticker.news_report = OPERATIVE_SKIRMISH - return ..() /datum/game_mode/nuclear/generate_report() return "One of Central Command's trading routes was recently disrupted by a raid carried out by the Gorlex Marauders. They seemed to only be after one ship - a highly-sensitive \ diff --git a/code/modules/uplink/uplink.dm b/code/modules/uplink/uplink.dm index 407965aeb98f..d4864faeabe0 100644 --- a/code/modules/uplink/uplink.dm +++ b/code/modules/uplink/uplink.dm @@ -17,7 +17,6 @@ GLOBAL_LIST_EMPTY(uplinks) var/selected_cat var/owner = null var/datum/game_mode/gamemode - var/spent_telecrystals = 0 var/datum/uplink_purchase_log/purchase_log var/list/uplink_items var/hidden_crystals = 0 @@ -89,7 +88,7 @@ GLOBAL_LIST_EMPTY(uplinks) var/refundable = initial(UI.refundable) if(I.type == path && refundable && I.check_uplink_validity()) telecrystals += cost - spent_telecrystals -= cost + purchase_log.total_spent -= cost to_chat(user, "[I] refunded.") qdel(I) return diff --git a/code/modules/uplink/uplink_items.dm b/code/modules/uplink/uplink_items.dm index 67dd06fe246c..753ae2c5eb88 100644 --- a/code/modules/uplink/uplink_items.dm +++ b/code/modules/uplink/uplink_items.dm @@ -1390,7 +1390,7 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once. if(possible_items.len) var/datum/uplink_item/I = pick(possible_items) U.telecrystals -= I.cost - U.spent_telecrystals += I.cost + U.purchase_log.total_spent += I.cost SSblackbox.record_feedback("nested tally", "traitor_uplink_items_bought", 1, list("[initial(I.name)]", "[cost]")) SSblackbox.record_feedback("tally", "traitor_random_uplink_items_gotten", 1, initial(I.name)) return new I.item(loc)