mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2026-08-26 22:28:03 +01:00
Trigger bloodfledge coffin healing on-demand
Prevents quirk processing from running by default for Bloodsucker Fledgling. Processing is started and stopped by being inside a coffin when it is opened or closed. Messages have been added for all start and stop interactions. The following changes are made for Bloodfledges: - Added quirk processing triggers to coffins - Added coffin check for robotic mob biotypes - Added return for non-coffin locations to quirk processing - Added feedback messages for open, close, synthetic, fully healed, and starving - Removed robotic biotype check from processing - Removed obsolete brute and burn damage adjustments - Stop processing if fully healed - Stop processing if below nutrition requirement
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
/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(HAS_TRAIT(coffin_examinee, TRAIT_BLOODFLEDGE))
|
||||
. += 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(HAS_TRAIT(coffin_user, TRAIT_BLOODFLEDGE))
|
||||
// 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
|
||||
|
||||
// User is not synthetic
|
||||
|
||||
// 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(HAS_TRAIT(coffin_user, TRAIT_BLOODFLEDGE))
|
||||
// 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."))
|
||||
Reference in New Issue
Block a user