[MIRROR] Removes "strandling" status effect from a bunch of random places / refactors it [MDB IGNORE] (#13480)

* Removes "strandling" status effect from a bunch of random places / refactors it

* Update carbon_defense.dm

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-05-11 01:35:40 +02:00
committed by GitHub
parent 7606c1715e
commit 0228180861
13 changed files with 192 additions and 135 deletions

View File

@@ -1,7 +1,13 @@
///When a carbon mob hugs someone, this is called on the carbon that is hugging. (mob/living/hugger, mob/living/hugged)
#define COMSIG_CARBON_HUG "carbon_hug"
///When a carbon mob is hugged, this is called on the carbon that is hugged. (mob/living/hugger)
#define COMSIG_CARBON_HUGGED "carbon_hugged"
///Called from /mob/living/carbon/help_shake_act, before any hugs have ocurred. (mob/living/helper)
#define COMSIG_CARBON_PRE_HELP_ACT "carbon_pre_help"
/// Stops the rest of help act (hugging, etc) from occuring
#define COMPONENT_BLOCK_HELP_ACT (1<<0)
///Called from /mob/living/carbon/help_shake_act on the person being helped, after any hugs have ocurred. (mob/living/helper)
#define COMSIG_CARBON_HELP_ACT "carbon_help"
///Called from /mob/living/carbon/help_shake_act on the helper, after any hugs have ocurred. (mob/living/helped)
#define COMSIG_CARBON_HELPED "carbon_helped_someone"
///Before a carbon mob is shoved, sent to the turf we're trying to shove onto (mob/living/carbon/shover, mob/living/carbon/target)
#define COMSIG_CARBON_DISARM_PRESHOVE "carbon_disarm_preshove"
#define COMSIG_CARBON_ACT_SOLID (1<<0) //Tells disarm code to act as if the mob was shoved into something solid, even we we're not
@@ -58,6 +64,9 @@
#define COMSIG_CARBON_HEALTH_UPDATE "carbon_health_update"
///Called when a carbon updates their sanity (source = carbon)
#define COMSIG_CARBON_SANITY_UPDATE "carbon_sanity_update"
///Called when a carbon breathes, before the breath has actually occured
#define COMSIG_CARBON_PRE_BREATHE "carbon_pre_breathe"
// /mob/living/carbon/human signals
///Hit by successful disarm attack (mob/living/carbon/human/attacker,zone_targeted)

View File

@@ -266,7 +266,6 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_ABDUCTOR_SCIENTIST_TRAINING "abductor-scientist-training"
#define TRAIT_SURGEON "surgeon"
#define TRAIT_STRONG_GRABBER "strong_grabber"
#define TRAIT_MAGIC_CHOKE "magic_choke"
#define TRAIT_SOOTHED_THROAT "soothed-throat"
#define TRAIT_BOOZE_SLIDER "booze-slider"
/// We place people into a fireman carry quicker than standard

View File

@@ -98,7 +98,6 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_ABDUCTOR_SCIENTIST_TRAINING" = TRAIT_ABDUCTOR_SCIENTIST_TRAINING,
"TRAIT_SURGEON" = TRAIT_SURGEON,
"TRAIT_STRONG_GRABBER" = TRAIT_STRONG_GRABBER,
"TRAIT_MAGIC_CHOKE" = TRAIT_MAGIC_CHOKE,
"TRAIT_SOOTHED_THROAT" = TRAIT_SOOTHED_THROAT,
"TRAIT_LAW_ENFORCEMENT_METABOLISM" = TRAIT_LAW_ENFORCEMENT_METABOLISM,
"TRAIT_BOOZE_SLIDER" = TRAIT_BOOZE_SLIDER,

View File

@@ -34,7 +34,7 @@
//antag stuff//
antagonist.forge_objectives(obsession.mind)
antagonist.greet()
RegisterSignal(owner, COMSIG_CARBON_HUG, .proc/on_hug)
RegisterSignal(owner, COMSIG_CARBON_HELPED, .proc/on_hug)
/datum/brain_trauma/special/obsessed/on_life(delta_time, times_fired)
if(!obsession || obsession.stat == DEAD)
@@ -80,7 +80,8 @@
to_chat(owner, span_warning("Being near [obsession] makes you nervous and you begin to stutter..."))
owner.set_timed_status_effect(6 SECONDS, /datum/status_effect/speech/stutter, only_if_higher = TRUE)
/datum/brain_trauma/special/obsessed/proc/on_hug(datum/source, mob/living/hugger, mob/living/hugged)
/// Singal proc for [COMSIG_CARBON_HELPED], when our obsessed helps (hugs) our obsession, increases hug count
/datum/brain_trauma/special/obsessed/proc/on_hug(datum/source, mob/living/hugged)
SIGNAL_HANDLER
if(hugged != obsession)

View File

@@ -828,12 +828,13 @@
hardcore_value = 1
/datum/quirk/bad_touch/add()
RegisterSignal(quirk_holder, list(COMSIG_LIVING_GET_PULLED, COMSIG_CARBON_HUGGED), .proc/uncomfortable_touch)
RegisterSignal(quirk_holder, list(COMSIG_LIVING_GET_PULLED, COMSIG_CARBON_HELP_ACT), .proc/uncomfortable_touch)
/datum/quirk/bad_touch/remove()
UnregisterSignal(quirk_holder, list(COMSIG_LIVING_GET_PULLED, COMSIG_CARBON_HUGGED))
UnregisterSignal(quirk_holder, list(COMSIG_LIVING_GET_PULLED, COMSIG_CARBON_HELP_ACT))
/datum/quirk/bad_touch/proc/uncomfortable_touch()
/// Causes a negative moodlet to our quirk holder on signal
/datum/quirk/bad_touch/proc/uncomfortable_touch(datum/source)
SIGNAL_HANDLER
if(quirk_holder.stat == DEAD)

View File

@@ -258,44 +258,6 @@
desc = "Your biological functions have halted. You could live forever this way, but it's pretty boring."
icon_state = "stasis"
//GOLEM GANG
//OTHER DEBUFFS
/datum/status_effect/strandling //get it, strand as in durathread strand + strangling = strandling hahahahahahahahahahhahahaha i want to die
id = "strandling"
status_type = STATUS_EFFECT_UNIQUE
alert_type = /atom/movable/screen/alert/status_effect/strandling
/datum/status_effect/strandling/on_apply()
ADD_TRAIT(owner, TRAIT_MAGIC_CHOKE, STATUS_EFFECT_TRAIT)
return ..()
/datum/status_effect/strandling/on_remove()
REMOVE_TRAIT(owner, TRAIT_MAGIC_CHOKE, STATUS_EFFECT_TRAIT)
return ..()
/datum/status_effect/strandling/get_examine_text()
return span_warning("[owner.p_they(TRUE)] seem[owner.p_s()] to be being choked by some durathread strands. You may be able to <b>cut</b> them off.")
/atom/movable/screen/alert/status_effect/strandling
name = "Choking strand"
desc = "A magical strand of Durathread is wrapped around your neck, preventing you from breathing! Click this icon to remove the strand."
icon_state = "his_grace"
alerttooltipstyle = "hisgrace"
/atom/movable/screen/alert/status_effect/strandling/Click(location, control, params)
. = ..()
if(!.)
return
to_chat(owner, span_notice("You attempt to remove the durathread strand from around your neck."))
if(do_after(owner, 3.5 SECONDS, owner))
if(isliving(owner))
var/mob/living/living_owner = owner
to_chat(living_owner, span_notice("You succesfuly remove the durathread strand."))
living_owner.remove_status_effect(/datum/status_effect/strandling)
//OTHER DEBUFFS
/datum/status_effect/pacify
id = "pacify"
status_type = STATUS_EFFECT_REPLACE

View File

@@ -0,0 +1,106 @@
/// A multiplier to the time it takes to remove durathread strangling when using a tool instead of your hands
#define STRANGLING_TOOL_MULTIPLIER 0.4
//get it, strand as in durathread strand + strangling = strandling hahahahahahahahahahhahahaha i want to die
/datum/status_effect/strandling
id = "strandling"
status_type = STATUS_EFFECT_UNIQUE
alert_type = /atom/movable/screen/alert/status_effect/strandling
/// How long it takes to remove the status effect via [proc/try_remove_effect]
var/time_to_remove = 3.5 SECONDS
/datum/status_effect/strandling/on_apply()
RegisterSignal(owner, COMSIG_CARBON_PRE_BREATHE, .proc/on_breathe)
RegisterSignal(owner, COMSIG_ATOM_TOOL_ACT(TOOL_WIRECUTTER), .proc/on_cut)
RegisterSignal(owner, COMSIG_CARBON_PRE_HELP_ACT, .proc/on_self_check)
return TRUE
/datum/status_effect/strandling/on_remove()
UnregisterSignal(owner, list(COMSIG_CARBON_PRE_BREATHE, COMSIG_ATOM_TOOL_ACT(TOOL_WIRECUTTER), COMSIG_CARBON_PRE_HELP_ACT))
/datum/status_effect/strandling/get_examine_text()
return span_warning("[owner.p_they(TRUE)] seem[owner.p_s()] to be being choked by some durathread strands. You may be able to <b>cut</b> them off.")
/// Signal proc for [COMSIG_CARBON_PRE_BREATHE], causes losebreath whenever we're trying to breathe
/datum/status_effect/strandling/proc/on_breathe(mob/living/source)
SIGNAL_HANDLER
if(source.getorganslot(ORGAN_SLOT_BREATHING_TUBE))
return
source.losebreath++
/// Signal proc for [COMSIG_ATOM_TOOL_ACT] with [TOOL_WIRECUTTER], allowing wirecutters to remove the effect (from others / themself)
/datum/status_effect/strandling/proc/on_cut(mob/living/source, mob/user, obj/item/tool)
SIGNAL_HANDLER
if(DOING_INTERACTION(user, REF(src)))
return
INVOKE_ASYNC(src, .proc/try_remove_effect, user, tool)
return COMPONENT_BLOCK_TOOL_ATTACK
/// Signal proc for [COMSIG_CARBON_PRE_HELP_ACT], allowing someone to remove the effect by hand
/datum/status_effect/strandling/proc/on_self_check(mob/living/carbon/source, mob/living/helper)
SIGNAL_HANDLER
if(DOING_INTERACTION(helper, REF(src)))
return
INVOKE_ASYNC(src, .proc/try_remove_effect, helper)
return COMPONENT_BLOCK_HELP_ACT
/**
* Attempts a do_after to remove the effect and stop the strangling.
*
* user - the mob attempting to remove the strangle. Can be the same as the owner.
* tool - the tool the user's using to remove the strange. Can be null.
*/
/datum/status_effect/strandling/proc/try_remove_effect(mob/user, obj/item/tool)
if(user.incapacitated() || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
return
user.visible_message(
span_notice("[user] attempts to [tool ? "cut":"remove"] the strand from around [owner == user ? "[owner.p_their()]":"[owner]'s"] neck..."),
span_notice("You attempt to [tool ? "cut":"remove"] the strand from around [owner == user ? "your":"[owner]'s"] neck..."),
)
// Play a sound if we have a tool
tool?.play_tool_sound(owner)
// Now try to remove the effect with a doafter. If we have a tool, we'll even remove it 60% faster.
if(!do_mob(user, owner, time_to_remove * (tool ? STRANGLING_TOOL_MULTIPLIER : 1), interaction_key = REF(src)))
to_chat(user, span_warning("You fail to [tool ? "cut":"remove"] the strand from around [owner == user ? "your":"[owner]'s"] neck!"))
return FALSE
// Play another sound after we're done
tool?.play_tool_sound(owner)
user.visible_message(
span_notice("[user] successfully [tool ? "cut":"remove"] the strand from around [owner == user ? "[owner.p_their()]":"[owner]'s"] neck."),
span_notice("You successfully [tool ? "cut":"remove"] the strand from around [owner == user ? "your":"[owner]'s"] neck."),
)
qdel(src)
return TRUE
/atom/movable/screen/alert/status_effect/strandling
name = "Choking strand"
desc = "Strands of Durathread are wrapped around your neck, preventing you from breathing! Click this icon to remove the strand."
icon_state = "his_grace"
alerttooltipstyle = "hisgrace"
/atom/movable/screen/alert/status_effect/strandling/Click(location, control, params)
. = ..()
if(!.)
return
if(!isliving(owner))
return
var/datum/status_effect/strandling/strangle_effect = attached_effect
if(!istype(strangle_effect))
return
strangle_effect.try_remove_effect(owner)
#undef STRANGLING_TOOL_MULTIPLIER

View File

@@ -140,15 +140,8 @@
user.visible_message(span_notice("[user] cuts [attacked_carbon]'s restraints with [src]!"))
qdel(attacked_carbon.handcuffed)
return
else if(istype(attacked_carbon) && attacked_carbon.has_status_effect(/datum/status_effect/strandling) && tool_behaviour == TOOL_WIRECUTTER)
user.visible_message(span_notice("[user] attempts to cut the durathread strand from around [attacked_carbon]'s neck."))
if(do_after(user, 1.5 SECONDS, attacked_carbon))
user.visible_message(span_notice("[user] succesfully cuts the durathread strand from around [attacked_carbon]'s neck."))
attacked_carbon.remove_status_effect(/datum/status_effect/strandling)
playsound(loc, usesound, 50, TRUE, -1)
return
else
..()
return ..()
/obj/item/crowbar/cyborg
name = "hydraulic crowbar"

View File

@@ -50,15 +50,8 @@
user.visible_message(span_notice("[user] cuts [attacked_carbon]'s restraints with [src]!"))
qdel(attacked_carbon.handcuffed)
return
else if(istype(attacked_carbon) && attacked_carbon.has_status_effect(/datum/status_effect/strandling))
user.visible_message(span_notice("[user] attempts to cut the durathread strand from around [attacked_carbon]'s neck."))
if(do_after(user, 1.5 SECONDS, attacked_carbon))
user.visible_message(span_notice("[user] succesfully cuts the durathread strand from around [attacked_carbon]'s neck."))
attacked_carbon.remove_status_effect(/datum/status_effect/strandling)
playsound(loc, usesound, 50, TRUE, -1)
return
else
..()
return ..()
/obj/item/wirecutters/suicide_act(mob/user)
user.visible_message(span_suicide("[user] is cutting at [user.p_their()] arteries with [src]! It looks like [user.p_theyre()] trying to commit suicide!"))

View File

@@ -451,102 +451,105 @@
//Paralyze(60) - SKYRAT EDIT REMOVAL
StaminaKnockdown(10, TRUE) //SKYRAT EDIT ADDITION
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/helper)
var/nosound = FALSE //SKYRAT EDIT ADDITION - EMOTES
if(on_fire)
to_chat(M, span_warning("You can't put [p_them()] out with just your bare hands!"))
to_chat(helper, span_warning("You can't put [p_them()] out with just your bare hands!"))
return
if(M == src && check_self_for_injuries())
if(SEND_SIGNAL(src, COMSIG_CARBON_PRE_HELP_ACT, helper) & COMPONENT_BLOCK_HELP_ACT)
return
if(helper == src)
check_self_for_injuries()
return
if(body_position == LYING_DOWN)
if(buckled)
to_chat(M, span_warning("You need to unbuckle [src] first to do that!"))
to_chat(helper, span_warning("You need to unbuckle [src] first to do that!"))
return
M.visible_message(span_notice("[M] shakes [src] trying to get [p_them()] up!"), \
null, span_hear("You hear the rustling of clothes."), DEFAULT_MESSAGE_RANGE, list(M, src))
to_chat(M, span_notice("You shake [src] trying to pick [p_them()] up!"))
to_chat(src, span_notice("[M] shakes you to get you up!"))
else if(check_zone(M.zone_selected) == BODY_ZONE_HEAD && get_bodypart(BODY_ZONE_HEAD)) //Headpats!
M.visible_message(span_notice("[M] gives [src] a pat on the head to make [p_them()] feel better!"), \
null, span_hear("You hear a soft patter."), DEFAULT_MESSAGE_RANGE, list(M, src))
to_chat(M, span_notice("You give [src] a pat on the head to make [p_them()] feel better!"))
to_chat(src, span_notice("[M] gives you a pat on the head to make you feel better! "))
helper.visible_message(span_notice("[helper] shakes [src] trying to get [p_them()] up!"), \
null, span_hear("You hear the rustling of clothes."), DEFAULT_MESSAGE_RANGE, list(helper, src))
to_chat(helper, span_notice("You shake [src] trying to pick [p_them()] up!"))
to_chat(src, span_notice("[helper] shakes you to get you up!"))
else if(check_zone(helper.zone_selected) == BODY_ZONE_HEAD && get_bodypart(BODY_ZONE_HEAD)) //Headpats!
helper.visible_message(span_notice("[helper] gives [src] a pat on the head to make [p_them()] feel better!"), \
null, span_hear("You hear a soft patter."), DEFAULT_MESSAGE_RANGE, list(helper, src))
to_chat(helper, span_notice("You give [src] a pat on the head to make [p_them()] feel better!"))
to_chat(src, span_notice("[helper] gives you a pat on the head to make you feel better! "))
if(HAS_TRAIT(src, TRAIT_BADTOUCH))
to_chat(M, span_warning("[src] looks visibly upset as you pat [p_them()] on the head."))
to_chat(helper, span_warning("[src] looks visibly upset as you pat [p_them()] on the head."))
//SKYRAT EDIT ADDITION BEGIN - EMOTES
if(HAS_TRAIT(src, TRAIT_EXCITABLE))
if(!src.dna.species.is_wagging_tail(src))
src.emote("wag")
//SKYRAT EDIT ADDITION END
else if ((M.zone_selected == BODY_ZONE_PRECISE_GROIN) && !isnull(src.getorgan(/obj/item/organ/tail)))
M.visible_message(span_notice("[M] pulls on [src]'s tail!"), \
null, span_hear("You hear a soft patter."), DEFAULT_MESSAGE_RANGE, list(M, src))
to_chat(M, span_notice("You pull on [src]'s tail!"))
to_chat(src, span_notice("[M] pulls on your tail!"))
else if ((helper.zone_selected == BODY_ZONE_PRECISE_GROIN) && !isnull(src.getorgan(/obj/item/organ/tail)))
helper.visible_message(span_notice("[helper] pulls on [src]'s tail!"), \
null, span_hear("You hear a soft patter."), DEFAULT_MESSAGE_RANGE, list(helper, src))
to_chat(helper, span_notice("You pull on [src]'s tail!"))
to_chat(src, span_notice("[helper] pulls on your tail!"))
if(HAS_TRAIT(src, TRAIT_BADTOUCH)) //How dare they!
to_chat(M, span_warning("[src] makes a grumbling noise as you pull on [p_their()] tail."))
to_chat(helper, span_warning("[src] makes a grumbling noise as you pull on [p_their()] tail."))
else
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "tailpulled", /datum/mood_event/tailpulled)
//SKYRAT EDIT ADDITION BEGIN - EMOTES -- SENSITIVE SNOUT TRAIT ADDITION
else if(M.zone_selected == BODY_ZONE_PRECISE_MOUTH)
else if(helper.zone_selected == BODY_ZONE_PRECISE_MOUTH)
nosound = TRUE
playsound(src, 'modular_skyrat/modules/emotes/sound/emotes/Nose_boop.ogg', 50, 0)
if(HAS_TRAIT(src, TRAIT_SENSITIVESNOUT) && get_location_accessible(src, BODY_ZONE_PRECISE_MOUTH))
to_chat(src, "<span class='warning'>[M] boops you on your sensitive nose, sending you to the ground!</span>")
to_chat(src, span_warning("[helper] boops you on your sensitive nose, sending you to the ground!"))
src.Knockdown(20)
src.apply_damage(30, STAMINA, BODY_ZONE_CHEST)
M.visible_message("<span class='notice'>[M] boops [src]'s nose.", \
"<span class='notice'>You boop [src] on the nose.</span>")
helper.visible_message(span_notice("[helper] boops [src]'s nose."), \
span_notice("You boop [src] on the nose."))
//SKYRAT EDIT ADDITION END
else
M.visible_message(span_notice("[M] hugs [src] to make [p_them()] feel better!"), \
null, span_hear("You hear the rustling of clothes."), DEFAULT_MESSAGE_RANGE, list(M, src))
to_chat(M, span_notice("You hug [src] to make [p_them()] feel better!"))
to_chat(src, span_notice("[M] hugs you to make you feel better!"))
helper.visible_message(span_notice("[helper] hugs [src] to make [p_them()] feel better!"), \
null, span_hear("You hear the rustling of clothes."), DEFAULT_MESSAGE_RANGE, list(helper, src))
to_chat(helper, span_notice("You hug [src] to make [p_them()] feel better!"))
to_chat(src, span_notice("[helper] hugs you to make you feel better!"))
// Warm them up with hugs
share_bodytemperature(M)
share_bodytemperature(helper)
// No moodlets for people who hate touches
if(!HAS_TRAIT(src, TRAIT_BADTOUCH))
if(bodytemperature > M.bodytemperature)
if(!HAS_TRAIT(M, TRAIT_BADTOUCH))
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "hug", /datum/mood_event/warmhug, src) // Hugger got a warm hug (Unless they hate hugs)
if(bodytemperature > helper.bodytemperature)
if(!HAS_TRAIT(helper, TRAIT_BADTOUCH))
SEND_SIGNAL(helper, COMSIG_ADD_MOOD_EVENT, "hug", /datum/mood_event/warmhug, src) // Hugger got a warm hug (Unless they hate hugs)
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "hug", /datum/mood_event/hug) // Reciver always gets a mood for being hugged
else
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "hug", /datum/mood_event/warmhug, M) // You got a warm hug
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "hug", /datum/mood_event/warmhug, helper) // You got a warm hug
// Let people know if they hugged someone really warm or really cold
if(M.bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT)
to_chat(src, span_warning("It feels like [M] is over heating as [M.p_they()] hug[M.p_s()] you."))
else if(M.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT)
to_chat(src, span_warning("It feels like [M] is freezing as [M.p_they()] hug[M.p_s()] you."))
if(helper.bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT)
to_chat(src, span_warning("It feels like [helper] is over heating as [helper.p_they()] hug[helper.p_s()] you."))
else if(helper.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT)
to_chat(src, span_warning("It feels like [helper] is freezing as [helper.p_they()] hug[helper.p_s()] you."))
if(bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT)
to_chat(M, span_warning("It feels like [src] is over heating as you hug [p_them()]."))
to_chat(helper, span_warning("It feels like [src] is over heating as you hug [p_them()]."))
else if(bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT)
to_chat(M, span_warning("It feels like [src] is freezing as you hug [p_them()]."))
to_chat(helper, span_warning("It feels like [src] is freezing as you hug [p_them()]."))
if(HAS_TRAIT(M, TRAIT_FRIENDLY))
var/datum/component/mood/hugger_mood = M.GetComponent(/datum/component/mood)
if(HAS_TRAIT(helper, TRAIT_FRIENDLY))
var/datum/component/mood/hugger_mood = helper.GetComponent(/datum/component/mood)
if (hugger_mood.sanity >= SANITY_GREAT)
new /obj/effect/temp_visual/heart(loc)
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/besthug, M)
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/besthug, helper)
else if (hugger_mood.sanity >= SANITY_DISTURBED)
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/betterhug, M)
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/betterhug, helper)
if(HAS_TRAIT(src, TRAIT_BADTOUCH))
to_chat(M, span_warning("[src] looks visibly upset as you hug [p_them()]."))
to_chat(helper, span_warning("[src] looks visibly upset as you hug [p_them()]."))
SEND_SIGNAL(src, COMSIG_CARBON_HELP_ACT, helper)
SEND_SIGNAL(helper, COMSIG_CARBON_HELPED, src)
SEND_SIGNAL(src, COMSIG_CARBON_HUGGED, M)
SEND_SIGNAL(M, COMSIG_CARBON_HUG, M, src)
adjust_status_effects_on_shake_up()
set_resting(FALSE)
if(body_position != STANDING_UP && !resting && !buckled && !HAS_TRAIT(src, TRAIT_FLOORED))

View File

@@ -705,28 +705,16 @@
. = rand(-1000, 1000)
..() //Called afterwards because getting the mind after getting gibbed is sketchy
/mob/living/carbon/human/help_shake_act(mob/living/carbon/M)
if(!istype(M))
/mob/living/carbon/human/help_shake_act(mob/living/carbon/helper)
if(!istype(helper))
return
if(src == M)
if(has_status_effect(/datum/status_effect/strandling))
to_chat(src, span_notice("You attempt to remove the durathread strand from around your neck."))
if(do_after(src, 3.5 SECONDS, src))
to_chat(src, span_notice("You succesfuly remove the durathread strand."))
remove_status_effect(/datum/status_effect/strandling)
return
check_self_for_injuries()
else
if(wear_suit)
wear_suit.add_fingerprint(M)
wear_suit.add_fingerprint(helper)
else if(w_uniform)
w_uniform.add_fingerprint(M)
..()
w_uniform.add_fingerprint(helper)
return ..()
/mob/living/carbon/human/check_self_for_injuries()
if(stat >= UNCONSCIOUS)

View File

@@ -81,6 +81,8 @@
if(reagents.has_reagent(/datum/reagent/toxin/lexorin, needs_metabolizing = TRUE))
return
SEND_SIGNAL(src, COMSIG_CARBON_PRE_BREATHE)
var/datum/gas_mixture/environment
if(loc)
environment = loc.return_air()
@@ -88,7 +90,7 @@
var/datum/gas_mixture/breath
if(!getorganslot(ORGAN_SLOT_BREATHING_TUBE))
if(health <= HEALTH_THRESHOLD_FULLCRIT || (pulledby && pulledby.grab_state >= GRAB_KILL) || HAS_TRAIT(src, TRAIT_MAGIC_CHOKE) || (lungs && lungs.organ_flags & ORGAN_FAILING))
if(health <= HEALTH_THRESHOLD_FULLCRIT || (pulledby?.grab_state >= GRAB_KILL) || (lungs?.organ_flags & ORGAN_FAILING))
losebreath++ //You can't breath at all when in critical or when being choked, so you're going to miss a breath
else if(health <= crit_threshold)

View File

@@ -1195,6 +1195,7 @@
#include "code\datums\status_effects\debuffs\drunk.dm"
#include "code\datums\status_effects\debuffs\fire_stacks.dm"
#include "code\datums\status_effects\debuffs\speech_debuffs.dm"
#include "code\datums\status_effects\debuffs\strandling.dm"
#include "code\datums\votes\_vote_datum.dm"
#include "code\datums\votes\custom_vote.dm"
#include "code\datums\votes\map_vote.dm"