From 1de118d40e8a25a36103d793cd1900db8e095b1d Mon Sep 17 00:00:00 2001 From: Putnam Date: Tue, 10 Dec 2019 13:55:58 -0800 Subject: [PATCH 1/2] Dynamic no longer double dips on refunds for ghost antags --- code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm | 5 ----- 1 file changed, 5 deletions(-) diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm index 8cda402ebf..855d0c9109 100644 --- a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm +++ b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm @@ -127,11 +127,6 @@ /datum/dynamic_ruleset/midround/from_ghosts/proc/review_applications() for (var/i = 1, i <= required_candidates, i++) if(candidates.len <= 0) - if(i == 1) - // We have found no candidates so far and we are out of applicants. - mode.refund_threat(cost) - mode.log_threat("Rule [name] refunded [cost] (all applications invalid)",verbose=TRUE) - mode.executed_rules -= src break var/mob/applicant = pick(candidates) candidates -= applicant From 7b10c57b5ca995a387442cbf1fd8e88133857add Mon Sep 17 00:00:00 2001 From: Putnam Date: Tue, 10 Dec 2019 14:01:33 -0800 Subject: [PATCH 2/2] Actually gotta rework this properly --- .../gamemodes/dynamic/dynamic_rulesets_midround.dm | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm index 855d0c9109..06efc113da 100644 --- a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm +++ b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm @@ -94,11 +94,8 @@ var/list/possible_candidates = list() possible_candidates.Add(dead_players) possible_candidates.Add(list_observers) - send_applications(possible_candidates) - if(assigned.len > 0) - return TRUE - else - return FALSE + var/application_successful = send_applications(possible_candidates) + return assigned.len > 0 && application_successful /// This sends a poll to ghosts if they want to be a ghost spawn from a ruleset. /datum/dynamic_ruleset/midround/from_ghosts/proc/send_applications(list/possible_volunteers = list()) @@ -113,14 +110,12 @@ if(!candidates || candidates.len <= required_candidates) message_admins("The ruleset [name] did not receive enough applications.") log_game("DYNAMIC: The ruleset [name] did not receive enough applications.") - mode.refund_threat(cost) - mode.log_threat("Rule [name] refunded [cost] (not receive enough applications)",verbose=TRUE) - mode.executed_rules -= src - return + return FALSE message_admins("[candidates.len] players volunteered for the ruleset [name].") log_game("DYNAMIC: [candidates.len] players volunteered for [name].") review_applications() + return TRUE /// Here is where you can check if your ghost applicants are valid for the ruleset. /// Called by send_applications().