diff --git a/modular_splurt/code/datums/traits/neutral.dm b/modular_splurt/code/datums/traits/neutral.dm index 038bfbda62..7c6ab9aba2 100644 --- a/modular_splurt/code/datums/traits/neutral.dm +++ b/modular_splurt/code/datums/traits/neutral.dm @@ -357,7 +357,7 @@ mob_trait = TRAIT_BLOODFLEDGE gain_text = span_notice("You feel a sanguine thirst.") lose_text = span_notice("You feel the sanguine thirst fade away.") - processing_quirk = TRUE + processing_quirk = FALSE // Handled by crates.dm /datum/quirk/bloodfledge/add() // Define quirk mob @@ -395,32 +395,33 @@ act_revive.Grant(quirk_mob) /datum/quirk/bloodfledge/on_process() + // Processing is currently only used for coffin healing + // This is started and stopped by a proc in crates.dm + + // Define potential coffin + var/quirk_coffin = quirk_holder.loc + // Check if the current area is a coffin - if(istype(quirk_holder.loc, /obj/structure/closet/crate/coffin)) + if(istype(quirk_coffin, /obj/structure/closet/crate/coffin)) // Define quirk mob var/mob/living/carbon/human/quirk_mob = quirk_holder // Quirk mob must be injured if(quirk_mob.health >= quirk_mob.maxHealth) - return + // Warn user + to_chat(quirk_mob, span_notice("[quirk_coffin] does nothing more to help you, as your body is fully mended.")) - // Prevent healing for robots - // This caused numerous technical issues - if(quirk_mob.mob_biotypes & MOB_ROBOTIC) - // Display a warning chat message (10% chance) - if(prob(20)) - to_chat(quirk_mob, span_warning("Your mechanical body rejects the curse's healing properties!")) - - // Return without healing, due robotic nature + // Stop processing and return + STOP_PROCESSING(SSquirks, src) return // Nutrition (blood) level must be above STARVING if(quirk_mob.nutrition <= NUTRITION_LEVEL_STARVING) - // Display a warning chat message (10% chance) - if(prob(20)) - to_chat(quirk_mob, span_warning("You need more blood before you can regenerate!")) + // Warn user + to_chat(quirk_mob, span_warning("[quirk_coffin] requires blood to operate, which you are currently lacking. Your connection to the other-world fades once again.")) - // Return without healing, due to lack of blood + // Stop processing and return + STOP_PROCESSING(SSquirks, src) return // Define initial health @@ -429,12 +430,6 @@ // Heal brute and burn // Accounts for robotic limbs quirk_mob.heal_overall_damage(2,2) - /* - // Heal brute - quirk_mob.adjustBruteLoss(-2) - // Heal burn - quirk_mob.adjustFireLoss(-2) - */ // Heal oxygen quirk_mob.adjustOxyLoss(-2) // Heal clone @@ -460,6 +455,15 @@ // Amount is equal to 50% of healing done quirk_mob.adjust_nutrition(health_restored*-1) + // User is not in a coffin + // This should not occur without teleportation + else + // Warn user + to_chat(quirk_holder, span_warning("Your connection to the other-world is broken upon leaving the [quirk_coffin]!")) + + // Stop processing + STOP_PROCESSING(SSquirks, src) + /datum/quirk/bloodfledge/remove() // Define quirk mob var/mob/living/carbon/human/quirk_mob = quirk_holder diff --git a/modular_splurt/code/game/objects/structures/crates_lockers/crates.dm b/modular_splurt/code/game/objects/structures/crates_lockers/crates.dm new file mode 100644 index 0000000000..cc1a97d0f0 --- /dev/null +++ b/modular_splurt/code/game/objects/structures/crates_lockers/crates.dm @@ -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.")) diff --git a/tgstation.dme b/tgstation.dme index 8226bcf8af..181d22a187 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -4445,6 +4445,7 @@ #include "modular_splurt\code\game\objects\structures\bed_chairs\sofa.dm" #include "modular_splurt\code\game\objects\structures\cannons\cannon.dm" #include "modular_splurt\code\game\objects\structures\cannons\cannonballs.dm" +#include "modular_splurt\code\game\objects\structures\crates_lockers\crates.dm" #include "modular_splurt\code\game\objects\structures\crates_lockers\closets\fitness.dm" #include "modular_splurt\code\game\objects\structures\crates_lockers\closets\slaver.dm" #include "modular_splurt\code\game\objects\structures\crates_lockers\closets\secure\psychology.dm"