From 556fc6f52098afc0b5943289efa33d92c5f5da72 Mon Sep 17 00:00:00 2001 From: Toastical <20125180+Toastical@users.noreply.github.com> Date: Tue, 13 May 2025 06:48:30 +0300 Subject: [PATCH] add a proc to get objs + fix obj check (#29194) --- code/game/gamemodes/objective.dm | 2 +- code/game/gamemodes/objective_holder.dm | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index b090cbf32c6..cd5309db00c 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -119,7 +119,7 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective) for(var/datum/mind/M in get_owners()) if(possible_target == M) return TARGET_INVALID_IS_OWNER - if(possible_target in M.targets) + if(possible_target in holder.get_targets()) return TARGET_INVALID_IS_TARGET if(SEND_SIGNAL(src, COMSIG_OBJECTIVE_CHECK_VALID_TARGET, possible_target) & OBJECTIVE_INVALID_TARGET) return TARGET_INVALID_BLACKLISTED diff --git a/code/game/gamemodes/objective_holder.dm b/code/game/gamemodes/objective_holder.dm index b447f67713c..dd7b1710875 100644 --- a/code/game/gamemodes/objective_holder.dm +++ b/code/game/gamemodes/objective_holder.dm @@ -55,6 +55,12 @@ /datum/objective_holder/proc/get_objectives() return objectives +/** + * Get all of our targets + */ +/datum/objective_holder/proc/get_targets() + return assigned_targets + /** * Replace old_objective with new_objective */