Merge branch 'master' into modsuits
This commit is contained in:
@@ -43,8 +43,7 @@
|
||||
if(owner)
|
||||
Remove(owner)
|
||||
target = null
|
||||
qdel(button)
|
||||
button = null
|
||||
QDEL_NULL(button)
|
||||
return ..()
|
||||
|
||||
/datum/action/proc/Grant(mob/M)
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
LAZYREMOVE(limb.scars, src)
|
||||
if(victim)
|
||||
LAZYREMOVE(victim.all_scars, src)
|
||||
limb = null
|
||||
victim = null
|
||||
. = ..()
|
||||
|
||||
/**
|
||||
@@ -45,6 +47,8 @@
|
||||
qdel(src)
|
||||
return
|
||||
limb = BP
|
||||
RegisterSignal(limb, COMSIG_PARENT_QDELETING, .proc/limb_gone)
|
||||
|
||||
severity = W.severity
|
||||
if(limb.owner)
|
||||
victim = limb.owner
|
||||
@@ -84,6 +88,7 @@
|
||||
return
|
||||
|
||||
limb = BP
|
||||
RegisterSignal(limb, COMSIG_PARENT_QDELETING, .proc/limb_gone)
|
||||
src.severity = severity
|
||||
LAZYADD(limb.scars, src)
|
||||
if(BP.owner)
|
||||
@@ -102,6 +107,10 @@
|
||||
visibility = 7
|
||||
return TRUE
|
||||
|
||||
/datum/scar/proc/limb_gone()
|
||||
SIGNAL_HANDLER
|
||||
qdel(src)
|
||||
|
||||
/// What will show up in examine_more() if this scar is visible
|
||||
/datum/scar/proc/get_examine_description(mob/viewer)
|
||||
if(!victim || !is_visible(viewer))
|
||||
|
||||
@@ -73,8 +73,6 @@
|
||||
|
||||
/// What status effect we assign on application
|
||||
var/status_effect_type
|
||||
/// The status effect we're linked to
|
||||
var/datum/status_effect/linked_status_effect
|
||||
/// If we're operating on this wound and it gets healed, we'll nix the surgery too
|
||||
var/datum/surgery/attached_surgery
|
||||
/// if you're a lazy git and just throw them in cryo, the wound will go away after accumulating severity * 25 power
|
||||
@@ -127,12 +125,13 @@
|
||||
return
|
||||
|
||||
victim = L.owner
|
||||
RegisterSignal(victim, COMSIG_PARENT_QDELETING, .proc/null_victim)
|
||||
limb = L
|
||||
LAZYADD(victim.all_wounds, src)
|
||||
LAZYADD(limb.wounds, src)
|
||||
limb.update_wounds()
|
||||
if(status_effect_type)
|
||||
linked_status_effect = victim.apply_status_effect(status_effect_type, src)
|
||||
victim.apply_status_effect(status_effect_type, src)
|
||||
SEND_SIGNAL(victim, COMSIG_CARBON_GAIN_WOUND, src, limb)
|
||||
victim.emote("pain")
|
||||
if(!victim.alerts["wound"]) // only one alert is shared between all of the wounds
|
||||
@@ -161,6 +160,14 @@
|
||||
wound_injury(old_wound)
|
||||
second_wind()
|
||||
|
||||
/datum/wound/proc/null_victim()
|
||||
SIGNAL_HANDLER
|
||||
victim = null
|
||||
|
||||
/datum/wound/proc/source_died()
|
||||
SIGNAL_HANDLER
|
||||
qdel(src)
|
||||
|
||||
/// Remove the wound from whatever it's afflicting, and cleans up whateverstatus effects it had or modifiers it had on interaction times. ignore_limb is used for detachments where we only want to forget the victim
|
||||
/datum/wound/proc/remove_wound(ignore_limb, replaced = FALSE)
|
||||
//TODO: have better way to tell if we're getting removed without replacement (full heal) scar stuff
|
||||
|
||||
Reference in New Issue
Block a user