Stop ethereals reviving during Mafia games (#60210)

This commit is contained in:
coiax
2021-07-15 17:37:17 -07:00
committed by GitHub
parent 748cac4f97
commit 603c7412bc
4 changed files with 22 additions and 10 deletions
+3
View File
@@ -491,6 +491,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
/// Minor trait used for beakers, or beaker-ishes. [/obj/item/reagent_containers], to show that they've been used in a reagent grinder.
#define TRAIT_MAY_CONTAIN_BLENDED_DUST "may_contain_blended_dust"
/// Trait put on [/mob/living/carbon/human]. If that mob has a crystal core, also known as an ethereal heart, it will not try to revive them if the mob dies.
#define TRAIT_CANNOT_CRYSTALIZE "cannot_crystalize"
///Trait applied to turfs when an atmos holosign is placed on them. It will stop firedoors from closing.
#define TRAIT_FIREDOOR_STOP "firedoor_stop"
+1 -2
View File
@@ -162,8 +162,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_NOBLEED" = TRAIT_NOBLEED,
"TRAIT_KISS_OF_DEATH" = TRAIT_KISS_OF_DEATH,
"TRAIT_ANXIOUS" = TRAIT_ANXIOUS,
"TRAIT_WEAK_SOUL" = TRAIT_WEAK_SOUL
"TRAIT_WEAK_SOUL" = TRAIT_WEAK_SOUL,
),
/obj/item/bodypart = list(
"TRAIT_PARALYSIS" = TRAIT_PARALYSIS,
+1
View File
@@ -572,6 +572,7 @@
var/mob/living/carbon/human/H = new(get_turf(role.assigned_landmark))
ADD_TRAIT(H, TRAIT_NOFIRE, MAFIA_TRAIT)
ADD_TRAIT(H, TRAIT_NOBREATH, MAFIA_TRAIT)
ADD_TRAIT(H, TRAIT_CANNOT_CRYSTALIZE, MAFIA_TRAIT)
H.equipOutfit(player_outfit)
H.status_flags |= GODMODE
RegisterSignal(H,COMSIG_ATOM_UPDATE_OVERLAYS,.proc/display_votes)
+17 -8
View File
@@ -259,7 +259,7 @@
/obj/item/organ/heart/ethereal
name = "Crystal core"
name = "crystal core"
icon_state = "ethereal_heart" //Welp. At least it's more unique in functionaliy.
desc = "A crystal-like organ that functions similarly to a heart for Ethereals. It can revive its owner."
@@ -335,8 +335,13 @@
if(!COOLDOWN_FINISHED(src, crystalize_cooldown))
return //lol double rip
to_chat(victim, span_nicegreen("Crystals start forming around your dead body."))
victim.visible_message(span_notice("Crystals start forming around [victim]."))
if(HAS_TRAIT(victim, TRAIT_CANNOT_CRYSTALIZE))
return // no reviving during mafia, or other inconvenient times.
victim.visible_message(
span_notice("Crystals start forming around [victim]."),
span_nicegreen("Crystals start forming around your dead body."),
)
ADD_TRAIT(victim, TRAIT_CORPSELOCKED, SPECIES_TRAIT)
crystalize_timer_id = addtimer(CALLBACK(src, .proc/crystalize, victim), CRYSTALIZE_PRE_WAIT_TIME, TIMER_STOPPABLE)
@@ -348,8 +353,10 @@
///Ran when disarmed, prevents the ethereal from reviving
/obj/item/organ/heart/ethereal/proc/reset_crystalizing(mob/living/defender, mob/living/attacker, zone)
SIGNAL_HANDLER
to_chat(defender, span_notice("The crystals on your corpse are gently broken off, and will need some time to recover."))
defender.visible_message(span_notice("The crystals on [defender] are gently broken off."))
defender.visible_message(
span_notice("The crystals on [defender] are gently broken off."),
span_notice("The crystals on your corpse are gently broken off, and will need some time to recover."),
)
deltimer(crystalize_timer_id)
crystalize_timer_id = addtimer(CALLBACK(src, .proc/crystalize, defender), CRYSTALIZE_DISARM_WAIT_TIME, TIMER_STOPPABLE) //Lets us restart the timer on disarm
@@ -405,13 +412,15 @@
var/mob/living/carbon/human/ethereal = source
to_chat(ethereal, span_warning("The crystals on your body have completely broken"))
ethereal.visible_message(span_notice("The crystals on [ethereal] are completely shattered and stopped growing"))
ethereal.visible_message(
span_notice("The crystals on [ethereal] are completely shattered and stopped growing."),
span_warning("The crystals on your body have completely broken."),
)
stop_crystalization_process(ethereal)
/obj/structure/ethereal_crystal
name = "Ethereal Resurrection Crystal"
name = "ethereal resurrection crystal"
desc = "It seems to contain the corpse of an ethereal mending its wounds."
icon = 'icons/obj/ethereal_crystal.dmi'
icon_state = "ethereal_crystal"