From e635c652c4a76cb86f13c2b07045655b7cdd9204 Mon Sep 17 00:00:00 2001 From: Rex9001 <120136161+Rex9001@users.noreply.github.com> Date: Tue, 5 Mar 2024 21:49:28 +0100 Subject: [PATCH] hopefully fixes a bug with give life --- .../bloodling/abilities/give_life.dm | 17 +++++++++++------ .../antagonists/bloodling/abilities/infest.dm | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/monkestation/code/modules/antagonists/bloodling/abilities/give_life.dm b/monkestation/code/modules/antagonists/bloodling/abilities/give_life.dm index 8410b16c9afc..19175ae2733c 100644 --- a/monkestation/code/modules/antagonists/bloodling/abilities/give_life.dm +++ b/monkestation/code/modules/antagonists/bloodling/abilities/give_life.dm @@ -21,8 +21,11 @@ owner.balloon_alert(owner, "only works on mobs!") return FALSE var/mob/living/mob_target = target - if(mob_target.ckey && !mob_target.stat == CONSCIOUS) - owner.balloon_alert(owner, "only works on non-sentient conscious mobs!") + if(mob_target.ckey && !mob_target.stat == DEAD) + owner.balloon_alert(owner, "only works on non-sentient alive mobs!") + return FALSE + if(iscarbon(mob_target)) + owner.balloon_alert(owner, "doesn't work on carbons!") return FALSE return ..() @@ -30,12 +33,14 @@ var/mob/living/target_mob = target var/question = "Would you like to be a [target_mob] servant of [owner]?" - var/list/candidates = poll_candidates_for_mobs(question, ROLE_SENTIENCE, ROLE_SENTIENCE, 10 SECONDS, target_mob, POLL_IGNORE_SHUTTLE_DENIZENS) + var/list/candidates = poll_candidates_for_mob(question, ROLE_SENTIENCE, ROLE_SENTIENCE, 10 SECONDS, target_mob, POLL_IGNORE_SHUTTLE_DENIZENS) if(!LAZYLEN(candidates) && !LAZYLEN(target_mob)) + owner.balloon_alert(owner, "[target_mob] rejects your generous gift...for now...") return FALSE - var/mob/dead/observer/C = pick_n_take(candidates) - message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(target_mob)])") + var/mob/dead/observer/candie = pick_n_take(candidates) + message_admins("[key_name_admin(candie)] has taken control of ([key_name_admin(target_mob)])") target_mob.ghostize(FALSE) - target_mob.key = C.key + target_mob.key = candie.key + target_mob.mind.add_antag_datum(/datum/antagonist/changeling/bloodling_thrall) return TRUE diff --git a/monkestation/code/modules/antagonists/bloodling/abilities/infest.dm b/monkestation/code/modules/antagonists/bloodling/abilities/infest.dm index e6371af689bd..a3b09b7294e7 100644 --- a/monkestation/code/modules/antagonists/bloodling/abilities/infest.dm +++ b/monkestation/code/modules/antagonists/bloodling/abilities/infest.dm @@ -35,7 +35,7 @@ /datum/action/cooldown/mob_cooldown/bloodling/infest/Activate(atom/target) var/mob/living/mob = target - if(istype(mob, /mob/living/carbon/human)) + if(iscarbon(mob)) var/mob/living/carbon/human/carbon_mob = target if(HAS_TRAIT(carbon_mob, TRAIT_MINDSHIELD)) if(!do_after(owner, 15 SECONDS))