From 418a76fccb83309d09c55c077fd1e0d8caccdca5 Mon Sep 17 00:00:00 2001 From: PopGamer46 Date: Tue, 26 Mar 2024 10:56:43 +0100 Subject: [PATCH] Fixes virology goals completing even if you delivered less than 15u (#24749) * fix * removes unnecessary else --- code/modules/virology/virology_goals.dm | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/code/modules/virology/virology_goals.dm b/code/modules/virology/virology_goals.dm index d30d27b9a48..4306ec9093f 100644 --- a/code/modules/virology/virology_goals.dm +++ b/code/modules/virology/virology_goals.dm @@ -101,16 +101,21 @@ GLOBAL_LIST_EMPTY(archived_virology_goals) var/property = properties[goal_property] if(property != goal_property_value) continue + var/found_goal_symptom = FALSE for(var/datum/symptom/S in D.symptoms) if(!goal_symptom) return if(S.type != goal_symptom) continue - delivered_amount += BL.volume - if(delivered_amount >= delivery_goal) - completed = TRUE - check_total_virology_goals_completion() - return TRUE + found_goal_symptom = TRUE + break + if(!found_goal_symptom) + return + delivered_amount += BL.volume + if(delivered_amount >= delivery_goal) + completed = TRUE + check_total_virology_goals_completion() + return TRUE /datum/virology_goal/virus name = "Specific Viral Sample Request (Non-Stealth)" @@ -174,11 +179,11 @@ GLOBAL_LIST_EMPTY(archived_virology_goals) var/datum/symptom/SY = locate(S) in D.symptoms if(!SY) return - delivered_amount += BL.volume - if(delivered_amount >= delivery_goal) - completed = TRUE - check_total_virology_goals_completion() - return TRUE + delivered_amount += BL.volume + if(delivered_amount >= delivery_goal) + completed = TRUE + check_total_virology_goals_completion() + return TRUE /datum/virology_goal/virus/stealth name = "Specific Viral Sample Request (Stealth)"