mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Runtime fixes.
This commit is contained in:
@@ -52,7 +52,6 @@ var/list/organ_cache = list()
|
|||||||
/obj/item/organ/proc/die()
|
/obj/item/organ/proc/die()
|
||||||
if(status & ORGAN_ROBOT)
|
if(status & ORGAN_ROBOT)
|
||||||
return
|
return
|
||||||
name = "dead [name]"
|
|
||||||
damage = max_damage
|
damage = max_damage
|
||||||
processing_objects -= src
|
processing_objects -= src
|
||||||
if(dead_icon)
|
if(dead_icon)
|
||||||
|
|||||||
@@ -634,8 +634,9 @@ Note that amputating the affected organ does in fact remove the infection from t
|
|||||||
"<span class='moderate'><b>Your [src.name] explodes in a shower of gore!</b></span>",\
|
"<span class='moderate'><b>Your [src.name] explodes in a shower of gore!</b></span>",\
|
||||||
"<span class='danger'>You hear the sickening splatter of gore.</span>")
|
"<span class='danger'>You hear the sickening splatter of gore.</span>")
|
||||||
|
|
||||||
src.removed(null, ignore_children)
|
var/mob/living/carbon/human/victim = owner //Keep a reference for post-removed().
|
||||||
owner.traumatic_shock += 60
|
removed(null, ignore_children)
|
||||||
|
victim.traumatic_shock += 60
|
||||||
|
|
||||||
wounds.Cut()
|
wounds.Cut()
|
||||||
if(parent)
|
if(parent)
|
||||||
@@ -649,22 +650,22 @@ Note that amputating the affected organ does in fact remove the infection from t
|
|||||||
parent.wounds |= W
|
parent.wounds |= W
|
||||||
parent.update_damages()
|
parent.update_damages()
|
||||||
else
|
else
|
||||||
var/obj/item/organ/external/stump/stump = new (owner, 0, src)
|
var/obj/item/organ/external/stump/stump = new (victim, 0, src)
|
||||||
stump.wounds |= W
|
stump.wounds |= W
|
||||||
owner.organs |= stump
|
victim.organs |= stump
|
||||||
stump.update_damages()
|
stump.update_damages()
|
||||||
parent = null
|
parent = null
|
||||||
|
|
||||||
spawn(1)
|
spawn(1)
|
||||||
owner.updatehealth()
|
victim.updatehealth()
|
||||||
owner.UpdateDamageIcon()
|
victim.UpdateDamageIcon()
|
||||||
owner.regenerate_icons()
|
victim.regenerate_icons()
|
||||||
dir = 2
|
dir = 2
|
||||||
|
|
||||||
switch(disintegrate)
|
switch(disintegrate)
|
||||||
if(DROPLIMB_EDGE)
|
if(DROPLIMB_EDGE)
|
||||||
compile_icon()
|
compile_icon()
|
||||||
add_blood(owner)
|
add_blood(victim)
|
||||||
var/matrix/M = matrix()
|
var/matrix/M = matrix()
|
||||||
M.Turn(rand(180))
|
M.Turn(rand(180))
|
||||||
src.transform = M
|
src.transform = M
|
||||||
@@ -675,13 +676,13 @@ Note that amputating the affected organ does in fact remove the infection from t
|
|||||||
dir = 2
|
dir = 2
|
||||||
return
|
return
|
||||||
if(DROPLIMB_BURN)
|
if(DROPLIMB_BURN)
|
||||||
new /obj/effect/decal/cleanable/ash(get_turf(owner))
|
new /obj/effect/decal/cleanable/ash(get_turf(victim))
|
||||||
if(DROPLIMB_BLUNT)
|
if(DROPLIMB_BLUNT)
|
||||||
var/obj/effect/decal/cleanable/blood/gibs/gore = new owner.species.single_gib_type(get_turf(owner))
|
var/obj/effect/decal/cleanable/blood/gibs/gore = new owner.species.single_gib_type(get_turf(victim))
|
||||||
if(owner.species.flesh_color)
|
if(victim.species.flesh_color)
|
||||||
gore.fleshcolor = owner.species.flesh_color
|
gore.fleshcolor = victim.species.flesh_color
|
||||||
if(owner.species.blood_color)
|
if(victim.species.blood_color)
|
||||||
gore.basecolor = owner.species.blood_color
|
gore.basecolor = victim.species.blood_color
|
||||||
gore.update_icon()
|
gore.update_icon()
|
||||||
gore.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30)
|
gore.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30)
|
||||||
|
|
||||||
@@ -704,20 +705,21 @@ Note that amputating the affected organ does in fact remove the infection from t
|
|||||||
icon = mob_icon
|
icon = mob_icon
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/item/organ/external/proc/release_restraints()
|
/obj/item/organ/external/proc/release_restraints(var/mob/living/carbon/human/holder)
|
||||||
if (owner.handcuffed && body_part in list(ARM_LEFT, ARM_RIGHT, HAND_LEFT, HAND_RIGHT))
|
if(!holder)
|
||||||
owner.visible_message(\
|
holder = owner
|
||||||
"\The [owner.handcuffed.name] falls off of [owner.name].",\
|
if(!holder)
|
||||||
"\The [owner.handcuffed.name] falls off you.")
|
return
|
||||||
|
if (holder.handcuffed && body_part in list(ARM_LEFT, ARM_RIGHT, HAND_LEFT, HAND_RIGHT))
|
||||||
owner.drop_from_inventory(owner.handcuffed)
|
holder.visible_message(\
|
||||||
|
"\The [holder.handcuffed.name] falls off of [holder.name].",\
|
||||||
if (owner.legcuffed && body_part in list(FOOT_LEFT, FOOT_RIGHT, LEG_LEFT, LEG_RIGHT))
|
"\The [holder.handcuffed.name] falls off you.")
|
||||||
owner.visible_message(\
|
holder.drop_from_inventory(holder.handcuffed)
|
||||||
"\The [owner.legcuffed.name] falls off of [owner.name].",\
|
if (holder.legcuffed && body_part in list(FOOT_LEFT, FOOT_RIGHT, LEG_LEFT, LEG_RIGHT))
|
||||||
"\The [owner.legcuffed.name] falls off you.")
|
holder.visible_message(\
|
||||||
|
"\The [holder.legcuffed.name] falls off of [holder.name].",\
|
||||||
owner.drop_from_inventory(owner.legcuffed)
|
"\The [holder.legcuffed.name] falls off you.")
|
||||||
|
holder.drop_from_inventory(holder.legcuffed)
|
||||||
|
|
||||||
/obj/item/organ/external/proc/bandage()
|
/obj/item/organ/external/proc/bandage()
|
||||||
var/rval = 0
|
var/rval = 0
|
||||||
@@ -859,11 +861,15 @@ Note that amputating the affected organ does in fact remove the infection from t
|
|||||||
|
|
||||||
/obj/item/organ/external/removed(var/mob/living/user, var/ignore_children)
|
/obj/item/organ/external/removed(var/mob/living/user, var/ignore_children)
|
||||||
|
|
||||||
|
if(!owner)
|
||||||
|
return
|
||||||
var/is_robotic = status & ORGAN_ROBOT
|
var/is_robotic = status & ORGAN_ROBOT
|
||||||
|
var/mob/living/carbon/human/victim = owner
|
||||||
|
get_icon()
|
||||||
..()
|
..()
|
||||||
|
|
||||||
status |= ORGAN_DESTROYED
|
status |= ORGAN_DESTROYED
|
||||||
owner.bad_external_organs -= src
|
victim.bad_external_organs -= src
|
||||||
|
|
||||||
for(var/implant in implants) //todo: check if this can be left alone
|
for(var/implant in implants) //todo: check if this can be left alone
|
||||||
del(implant)
|
del(implant)
|
||||||
@@ -880,19 +886,19 @@ Note that amputating the affected organ does in fact remove the infection from t
|
|||||||
organ.removed()
|
organ.removed()
|
||||||
organ.loc = src
|
organ.loc = src
|
||||||
|
|
||||||
release_restraints()
|
release_restraints(victim)
|
||||||
owner.organs -= src
|
victim.organs -= src
|
||||||
owner.organs_by_name[limb_name] = null // Remove from owner's vars.
|
victim.organs_by_name[limb_name] = null // Remove from owner's vars.
|
||||||
|
|
||||||
//Robotic limbs explode if sabotaged.
|
//Robotic limbs explode if sabotaged.
|
||||||
if(is_robotic && sabotaged)
|
if(is_robotic && sabotaged)
|
||||||
owner.visible_message(
|
victim.visible_message(
|
||||||
"<span class='danger'>\The [owner]'s [src.name] explodes violently!</span>",\
|
"<span class='danger'>\The [victim]'s [src.name] explodes violently!</span>",\
|
||||||
"<span class='danger'>Your [src.name] explodes!</span>",\
|
"<span class='danger'>Your [src.name] explodes!</span>",\
|
||||||
"<span class='danger'>You hear an explosion!</span>")
|
"<span class='danger'>You hear an explosion!</span>")
|
||||||
explosion(get_turf(owner),-1,-1,2,3)
|
explosion(get_turf(owner),-1,-1,2,3)
|
||||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||||
spark_system.set_up(5, 0, owner)
|
spark_system.set_up(5, 0, victim)
|
||||||
spark_system.attach(owner)
|
spark_system.attach(owner)
|
||||||
spark_system.start()
|
spark_system.start()
|
||||||
spawn(10)
|
spawn(10)
|
||||||
|
|||||||
@@ -28,10 +28,6 @@ var/global/list/limb_icon_cache = list()
|
|||||||
var/obj/item/organ/eyes/eyes = owner.internal_organs_by_name["eyes"]
|
var/obj/item/organ/eyes/eyes = owner.internal_organs_by_name["eyes"]
|
||||||
if(eyes) eyes.update_colour()
|
if(eyes) eyes.update_colour()
|
||||||
|
|
||||||
/obj/item/organ/external/head/removed()
|
|
||||||
get_icon()
|
|
||||||
..()
|
|
||||||
|
|
||||||
/obj/item/organ/external/head/get_icon()
|
/obj/item/organ/external/head/get_icon()
|
||||||
|
|
||||||
..()
|
..()
|
||||||
|
|||||||
Reference in New Issue
Block a user