From d5232fcc6bca7af0e6eba2984a5f46836d78f5de Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Wed, 12 Oct 2022 19:53:09 +0200 Subject: [PATCH] [MIRROR] Fixes "absorb another ling" objective [MDB IGNORE] (#16799) * Fixes "absorb another ling" objective (#70413) Purchased powers was changed to assoc list, and this was not updated * Fixes "absorb another ling" objective Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> --- code/game/gamemodes/objective.dm | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index cc4d5f2b0b8..216fe2bb22d 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -804,20 +804,19 @@ GLOBAL_LIST_EMPTY(possible_items_special) /datum/objective/absorb_changeling/check_completion() var/list/datum/mind/owners = get_owners() - for(var/datum/mind/M in owners) - if(!M) - continue - var/datum/antagonist/changeling/changeling = M.has_antag_datum(/datum/antagonist/changeling) + for(var/datum/mind/ling_mind as anything in owners) + var/datum/antagonist/changeling/changeling = ling_mind.has_antag_datum(/datum/antagonist/changeling) if(!changeling) continue - var/total_genetic_points = changeling.genetic_points - for(var/datum/action/changeling/p in changeling.purchased_powers) - total_genetic_points += p.dna_cost + var/total_genetic_points = changeling.genetic_points + for(var/power_path in changeling.purchased_powers) + var/datum/action/changeling/power = changeling.purchased_powers[power_path] + total_genetic_points += power.dna_cost if(total_genetic_points > initial(changeling.genetic_points)) return TRUE - return FALSE + return completed //End Changeling Objectives