From ad1f3ff8a2a2b98b1771f66e1be5f1ad2aa601f2 Mon Sep 17 00:00:00 2001 From: tralezab <40974010+tralezab@users.noreply.github.com> Date: Sun, 19 Feb 2023 12:57:19 -0800 Subject: [PATCH] Fixes valentines breaking highlander (#73519) ## About The Pull Request fixes #73450 Highlander checked special roles instead of antag datum for its abilities, special role is set to the last antag you were so becoming valentines (or anything else for that matter) broke it ## Why It's Good For The Game Bugfix ## Changelog :cl: fix: Valentines and other antags no longer break highlander /:cl: --- code/game/objects/items/weaponry.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index 0c4aabd891f..2ea50e415c9 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -163,7 +163,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 /obj/item/claymore/highlander/attack(mob/living/target, mob/living/user) . = ..() - if(!QDELETED(target) && target.stat == DEAD && target.mind && target.mind.special_role == "highlander") + if(!QDELETED(target) && target.stat == DEAD && target.mind?.has_antag_datum(/datum/antagonist/highlander)) user.fully_heal() //STEAL THE LIFE OF OUR FALLEN FOES add_notch(user) target.visible_message(span_warning("[target] crumbles to dust beneath [user]'s blows!"), span_userdanger("As you fall, your body crumbles to dust!")) @@ -174,10 +174,10 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 var/closest_victim var/closest_distance = 255 for(var/mob/living/carbon/human/scot in GLOB.player_list - user) - if(scot.mind.special_role == "highlander" && (!closest_victim || get_dist(user, closest_victim) < closest_distance)) + if(scot.mind?.has_antag_datum(/datum/antagonist/highlander) && (!closest_victim || get_dist(user, closest_victim) < closest_distance)) closest_victim = scot for(var/mob/living/silicon/robot/siliscot in GLOB.player_list - user) - if(siliscot.mind.special_role == "highlander" && (!closest_victim || get_dist(user, closest_victim) < closest_distance)) + if(siliscot.mind?.has_antag_datum(/datum/antagonist/highlander) && (!closest_victim || get_dist(user, closest_victim) < closest_distance)) closest_victim = siliscot if(!closest_victim)