diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index 22abe1e4c8..4be0985fbc 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -264,4 +264,4 @@ GLOBAL_LIST_INIT(glass_sheet_types, typecacheof(list( #define isblobmonster(O) (istype(O, /mob/living/simple_animal/hostile/blob)) -#define isshuttleturf(T) (length(T.baseturfs) && (/turf/baseturf_skipover/shuttle in T.baseturfs)) \ No newline at end of file +#define isshuttleturf(T) (length(T.baseturfs) && (/turf/baseturf_skipover/shuttle in T.baseturfs)) diff --git a/code/game/gamemodes/bloodsucker/bloodsucker.dm b/code/game/gamemodes/bloodsucker/bloodsucker.dm index 3cd68e3758..0796fc3c4c 100644 --- a/code/game/gamemodes/bloodsucker/bloodsucker.dm +++ b/code/game/gamemodes/bloodsucker/bloodsucker.dm @@ -9,7 +9,7 @@ var/list/vassal_allowed_antags = list(/datum/antagonist/brother, /datum/antagonist/traitor, /datum/antagonist/traitor/internal_affairs, /datum/antagonist/survivalist, \ /datum/antagonist/rev, /datum/antagonist/nukeop, /datum/antagonist/pirate, /datum/antagonist/cult, /datum/antagonist/abductee, /datum/antagonist/valentine, /datum/antagonist/heartbreaker,) // The antags you're allowed to be if turning Vassal. -/proc/isvamp(mob/living/M) +/proc/isbloodsucker(mob/living/M) return istype(M) && M.mind && M.mind.has_antag_datum(/datum/antagonist/bloodsucker) /datum/game_mode/bloodsucker @@ -70,25 +70,12 @@ // Gamemode is all done being set up. We have all our Vamps. We now pick objectives and let them know what's happening. /datum/game_mode/bloodsucker/post_setup() - // Sunlight (Creating Bloodsuckers manually will check to create this, too) check_start_sunlight() - // Vamps for(var/datum/mind/bloodsucker in bloodsuckers) - // spawn() --> Run block of code but game continues on past it. - // sleep() --> Run block of code and freeze code there (including whoever called us) until it's resolved. - - //Clean Bloodsucker Species (racist?) - //clean_invalid_species(bloodsucker) - // TO-DO !!! - - // Add Bloodsucker Antag Datum (or remove from list on Fail) - if (!make_bloodsucker(bloodsucker)) + if(!make_bloodsucker(bloodsucker)) bloodsuckers -= bloodsucker - - // NOTE: Hunters are done in ..() parent proc - return ..() // Init Sunlight (called from datum_bloodsucker.on_gain(), in case game mode isn't even Bloodsucker @@ -151,7 +138,6 @@ /datum/game_mode/proc/make_bloodsucker(datum/mind/bloodsucker, datum/mind/creator = null) // NOTE: This is a game_mode/proc, NOT a game_mode/bloodsucker/proc! We need to access this function despite the game mode. if(!can_make_bloodsucker(bloodsucker)) return FALSE - // Create Datum: Fledgling var/datum/antagonist/bloodsucker/A @@ -163,19 +149,14 @@ // Log message_admins("[bloodsucker] has become a Bloodsucker, and was created by [creator].") log_admin("[bloodsucker] has become a Bloodsucker, and was created by [creator].") - // [MASTER] else A = bloodsucker.add_antag_datum(ANTAG_DATUM_BLOODSUCKER) - - return TRUE - /datum/game_mode/proc/remove_bloodsucker(datum/mind/bloodsucker) bloodsucker.remove_antag_datum(ANTAG_DATUM_BLOODSUCKER) - /datum/game_mode/proc/clean_invalid_species(datum/mind/bloodsucker) // Only checking for Humans here if(!ishuman(bloodsucker.current) || !bloodsucker.current.client) @@ -277,7 +258,7 @@ target.mind.add_antag_datum(V, V.master.get_team()) // Update Bloodsucker Title (we're a daddy now) B.SelectTitle(am_fledgling = FALSE) // Only works if you have no title yet. - // Log + // lOg it message_admins("[target] has become a Vassal, and is enslaved to [creator].") log_admin("[target] has become a Vassal, and is enslaved to [creator].") return TRUE diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 62304112b2..266fcd0e40 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -157,7 +157,7 @@ mess = TRUE update_icon() return FALSE - if(isvamp(clonemind)) //If the mind is a bloodsucker + if(isbloodsucker(clonemind)) //If the mind is a bloodsucker return FALSE attempting = TRUE //One at a time!! diff --git a/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm b/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm index f9ba36e2c2..ec7c7e9ba8 100644 --- a/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm +++ b/code/modules/antagonists/bloodsucker/objects/bloodsucker_crypt.dm @@ -116,7 +116,7 @@ /obj/structure/bloodsucker/vassalrack/examine(mob/user) . = ..() - if(isvamp(user) || isobserver(user)) + if(isbloodsucker(user) || isobserver(user)) . += {"This is the vassal rack, which allows you to thrall crewmembers into loyal minions in your service."} . += {"You need to first secure the vassal rack by clicking on it while it is in your lair."} . += {"Simply click and hold on a victim, and then drag their sprite on the vassal rack. Alt click on the vassal rack to unbuckle them."} @@ -130,7 +130,7 @@ /obj/structure/bloodsucker/vassalrack/MouseDrop_T(atom/movable/O, mob/user) if(!O.Adjacent(src) || O == user || !isliving(O) || !isliving(user) || useLock || has_buckled_mobs() || user.incapacitated()) return - if(!anchored && isvamp(user)) + if(!anchored && isbloodsucker(user)) to_chat(user, "Until this rack is secured in place, it cannot serve its purpose.") return // PULL TARGET: Remember if I was pullin this guy, so we can restore this @@ -183,7 +183,7 @@ /obj/structure/bloodsucker/vassalrack/user_unbuckle_mob(mob/living/M, mob/user) // Attempt Unbuckle - if(!isvamp(user)) + if(!isbloodsucker(user)) if(M == user) M.visible_message("[user] tries to release themself from the rack!",\ "You attempt to release yourself from the rack!") // For sound if not seen --> "You hear a squishy wet noise.") @@ -454,7 +454,7 @@ /obj/structure/bloodsucker/candelabrum/examine(mob/user) . = ..() - if((isvamp()) || isobserver(user)) + if((isbloodsucker()) || isobserver(user)) . += {"This is a magical candle which drains at the sanity of mortals who are not under your command while it is active."} . += {"You can alt click on it from any range to turn it on remotely, or simply be next to it and click on it to turn it on and off normally."} /* if(user.mind.has_antag_datum(ANTAG_DATUM_VASSAL) @@ -463,12 +463,12 @@ /obj/structure/bloodsucker/candelabrum/attack_hand(mob/user) var/datum/antagonist/vassal/T = user.mind.has_antag_datum(ANTAG_DATUM_VASSAL) - if(isvamp(user) || istype(T)) + if(isbloodsucker(user) || istype(T)) toggle() /obj/structure/bloodsucker/candelabrum/AltClick(mob/user) // Bloodsuckers can turn their candles on from a distance. SPOOOOKY. - if(isvamp(user)) + if(isbloodsucker(user)) toggle() /obj/structure/bloodsucker/candelabrum/proc/toggle(mob/user) @@ -485,7 +485,7 @@ if(lit) for(var/mob/living/carbon/human/H in viewers(7, src)) var/datum/antagonist/vassal/T = H.mind.has_antag_datum(ANTAG_DATUM_VASSAL) - if(isvamp(H) || T) //We dont want vassals or vampires affected by this + if(isbloodsucker(H) || T) //We dont want vassals or vampires affected by this return H.hallucination = 20 SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "vampcandle", /datum/mood_event/vampcandle) diff --git a/code/modules/mining/equipment/regenerative_core.dm b/code/modules/mining/equipment/regenerative_core.dm index e8ba72e62f..65304c5460 100644 --- a/code/modules/mining/equipment/regenerative_core.dm +++ b/code/modules/mining/equipment/regenerative_core.dm @@ -69,14 +69,15 @@ /obj/item/organ/regenerative_core/afterattack(atom/target, mob/user, proximity_flag) . = ..() - if(proximity_flag && ishuman(target)) + if(proximity_flag) + apply_healing_core(target, user) + +/obj/item/organ/regenerative_core/apply_healing_core(atom/target, mob/user) + if(ishuman(target)) var/mob/living/carbon/human/H = target if(inert) to_chat(user, "[src] has decayed and can no longer be used to heal.") return - if(isvamp(user)) - to_chat(user, "[src] breaks down as it fails to heal your unholy self") - return else if(H.stat == DEAD) to_chat(user, "[src] are useless on the dead.") @@ -87,22 +88,16 @@ else to_chat(user, "You start to smear [src] on yourself. It feels and smells disgusting, but you feel amazingly refreshed in mere moments.") SSblackbox.record_feedback("nested tally", "hivelord_core", 1, list("[type]", "used", "self")) - H.revive(full_heal = 1) + if(!isbloodsucker(H)) + H.revive(full_heal = TRUE) + else + H.revive(full_heal = FALSE) qdel(src) user.log_message("[user] used [src] to heal [H]! Wake the fuck up, Samurai!", LOG_ATTACK, color="green") //Logging for 'old' style legion core use, when clicking on a sprite of yourself or another. /obj/item/organ/regenerative_core/attack_self(mob/user) //Knouli's first hack! Allows for the use of the core in hand rather than needing to click on the target, yourself, to selfheal. Its a rip of the proc just above - but skips on distance check and only uses 'user' rather than 'target' - if(ishuman(user)) //Check if user is human, no need for distance check as it's self heal - var/mob/living/carbon/human/H = user //Set H to user rather than target - if(inert) //Inert cores are useless - to_chat(user, "[src] has decayed and can no longer be used to heal.") - return - else //Skip on check if the target to be healed is dead as, if you are dead, you're not going to be able to use it on yourself! - to_chat(user, "You start to smear [src] on yourself. It feels and smells disgusting, but you feel amazingly refreshed in mere moments.") - SSblackbox.record_feedback("nested tally", "hivelord_core", 1, list("[type]", "used", "self")) - H.revive(full_heal = 1) - qdel(src) - H.log_message("[H] used [src] to heal themselves! Making use of Knouli's sexy and intelligent use-in-hand proc!", LOG_ATTACK, color="green") //Logging for 'new' style legion core use, when using the core in-hand. + . = ..() + apply_healing_core(user) /obj/item/organ/regenerative_core/Insert(mob/living/carbon/M, special = 0, drop_if_replaced = TRUE) diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index 6947ab28f8..de65b775b4 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -252,7 +252,7 @@ return 0 if(M.getorgan(/obj/item/organ/alien/hivenode)) return 0 - if(isvamp(M)) + if(isbloodsucker(M)) return 0 if(ismonkey(M)) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 574a5aedd2..d07785873a 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -837,7 +837,7 @@ /mob/living/carbon/proc/can_defib() var/tlimit = DEFIB_TIME_LIMIT * 10 var/obj/item/organ/heart = getorgan(/obj/item/organ/heart) - if(suiciding || hellbound || HAS_TRAIT(src, TRAIT_HUSK)) + if(suiciding || hellbound || HAS_TRAIT(src, TRAIT_HUSK) || isbloodsucker()) return if((world.time - timeofdeath) > tlimit) return