mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2026-08-23 20:56:47 +01:00
Adds the Sanguine Metabolism quirk. This is a lite version of Bloodsucker Fledgling with no special powers.
72 lines
2.4 KiB
Plaintext
72 lines
2.4 KiB
Plaintext
/obj/structure/closet/crate/coffin/examine(mob/user)
|
|
. = ..()
|
|
|
|
// Define carbon user
|
|
var/mob/living/carbon/coffin_examinee
|
|
|
|
// Check if carbon user exists
|
|
if(!istype(coffin_examinee))
|
|
return
|
|
|
|
// Check for bloodfledge
|
|
if(isbloodfledge(coffin_examinee))
|
|
. += span_cult("As a Bloodsucker Fledgling; You can use coffins like this one to heal your wounds and escape from death.")
|
|
|
|
/obj/structure/closet/crate/coffin/after_close(mob/living/coffin_toucher)
|
|
. = ..()
|
|
|
|
// Iterate over carbon mobs inside
|
|
for(var/mob/living/carbon/coffin_user in contents)
|
|
// Check for bloodfledge
|
|
if(isbloodfledge(coffin_user))
|
|
// Check for lite version
|
|
if (HAS_TRAIT(coffin_user, TRAIT_BLOODFLEDGE_LITE))
|
|
// Warn user and continue
|
|
to_chat(coffin_user, span_warning("Your body lacks a proper sanguine connection! [src] does not respond."))
|
|
continue
|
|
|
|
// Check for synthetic
|
|
if(coffin_user.mob_biotypes && (coffin_user.mob_biotypes & MOB_ROBOTIC))
|
|
// Warn user and continue
|
|
to_chat(coffin_user, span_warning("Your components don't respond to [src]'s sanguine connection! Regeneration will not be possible."))
|
|
continue
|
|
|
|
// Check if vampire ability is allowed
|
|
if(!coffin_user.allow_vampiric_ability())
|
|
to_chat(coffin_user, span_warning("[src] fails to form a connection with your body amidst the strong magical interference! Something is blocking your connection to the other-world!"))
|
|
// Function already contains message
|
|
continue
|
|
|
|
// Define quirk entry
|
|
var/datum/quirk/bloodfledge/quirk_target = locate() in coffin_user.roundstart_quirks
|
|
|
|
// Start processing
|
|
START_PROCESSING(SSquirks, quirk_target)
|
|
|
|
// Alert user
|
|
to_chat(coffin_user, span_nicegreen("[src] empowers your connection to the other-world, allowing your body to mend."))
|
|
|
|
/obj/structure/closet/crate/coffin/after_open(mob/living/coffin_toucher)
|
|
. = ..()
|
|
|
|
// Define turf
|
|
var/turf/coffin_turf = get_turf(src)
|
|
|
|
// Iterate over carbon mobs inside
|
|
for(var/mob/living/carbon/coffin_user in coffin_turf.contents)
|
|
// Check for bloodfledge
|
|
if(isbloodfledge(coffin_user))
|
|
// Check for lite version
|
|
if (HAS_TRAIT(coffin_user, TRAIT_BLOODFLEDGE_LITE))
|
|
// Do nothing
|
|
continue
|
|
|
|
// Define quirk entry
|
|
var/datum/quirk/bloodfledge/quirk_target = locate() in coffin_user.roundstart_quirks
|
|
|
|
// Stop processing
|
|
STOP_PROCESSING(SSquirks, quirk_target)
|
|
|
|
// Alert user
|
|
to_chat(coffin_user, span_notice("[src] is no longer empowering you."))
|