From 38786f96feb9cdc461a4d31af818c1ffceca2fdc Mon Sep 17 00:00:00 2001 From: AnturK Date: Fri, 16 Feb 2018 09:35:44 +0100 Subject: [PATCH] Fixes AI dating --- code/game/gamemodes/objective.dm | 8 ++++++-- code/modules/antagonists/valentines/valentine.dm | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 81e52c35111..d000b90226d 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -214,8 +214,9 @@ explanation_text = "Free Objective" /datum/objective/protect//The opposite of killing a dude. - var/target_role_type=0 martyr_compatible = 1 + var/target_role_type = 0 + var/human_check = TRUE /datum/objective/protect/find_target_by_role(role, role_type=0, invert=0) if(!invert) @@ -224,7 +225,7 @@ return target /datum/objective/protect/check_completion() - return !target || considered_alive(target) + return !target || considered_alive(target, enforce_human = human_check) /datum/objective/protect/update_explanation_text() ..() @@ -233,6 +234,9 @@ else explanation_text = "Free Objective" +/datum/objective/protect/nonhuman + human_check = FALSE + /datum/objective/hijack explanation_text = "Hijack the shuttle to ensure no loyalist Nanotrasen crew escape alive and out of custody." team_explanation_text = "Hijack the shuttle to ensure no loyalist Nanotrasen crew escape alive and out of custody. Leave no team member behind." diff --git a/code/modules/antagonists/valentines/valentine.dm b/code/modules/antagonists/valentines/valentine.dm index 1ca8e39318a..b29c4d6bf3b 100644 --- a/code/modules/antagonists/valentines/valentine.dm +++ b/code/modules/antagonists/valentines/valentine.dm @@ -8,6 +8,8 @@ var/datum/objective/protect/protect_objective = new /datum/objective/protect protect_objective.owner = owner protect_objective.target = date + if(!ishuman(date.current)) + protect_objective.human_check = FALSE protect_objective.explanation_text = "Protect [date.name], your date." objectives += protect_objective owner.objectives += objectives