mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-02-03 04:40:31 +00:00
Fixed up gibbing and organ icons.
This commit is contained in:
@@ -2,6 +2,8 @@ var/list/organ_cache = list()
|
||||
|
||||
/obj/item/organ
|
||||
name = "organ"
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
|
||||
var/mob/living/carbon/human/owner = null
|
||||
var/status = 0
|
||||
var/vital //Lose a vital limb, die immediately.
|
||||
|
||||
@@ -599,7 +599,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
****************************************************/
|
||||
|
||||
//Handles dismemberment
|
||||
/obj/item/organ/external/proc/droplimb(var/clean, var/disintegrate)
|
||||
/obj/item/organ/external/proc/droplimb(var/clean, var/disintegrate, var/ignore_children)
|
||||
|
||||
if(cannot_amputate || !owner)
|
||||
return
|
||||
@@ -625,7 +625,7 @@ 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='danger'>You hear the sickening splatter of gore.</span>")
|
||||
|
||||
src.removed()
|
||||
src.removed(null, ignore_children)
|
||||
|
||||
if(parent)
|
||||
parent.children -= src
|
||||
@@ -658,6 +658,12 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
gore.basecolor = owner.species.blood_color
|
||||
gore.update_icon()
|
||||
gore.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30)
|
||||
|
||||
for(var/obj/item/organ/I in internal_organs)
|
||||
I.removed()
|
||||
if(istype(loc,/turf))
|
||||
I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30)
|
||||
|
||||
del(src)
|
||||
|
||||
/****************************************************
|
||||
@@ -827,7 +833,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
H.drop_item()
|
||||
W.loc = owner
|
||||
|
||||
/obj/item/organ/external/removed()
|
||||
/obj/item/organ/external/removed(var/mob/living/user, var/ignore_children)
|
||||
|
||||
var/is_robotic = status & ORGAN_ROBOT
|
||||
..()
|
||||
@@ -839,9 +845,10 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
del(implant)
|
||||
|
||||
// Attached organs also fly off.
|
||||
for(var/obj/item/organ/external/O in children)
|
||||
O.removed()
|
||||
O.loc = src
|
||||
if(!ignore_children)
|
||||
for(var/obj/item/organ/external/O in children)
|
||||
O.removed()
|
||||
O.loc = src
|
||||
|
||||
// Grab all the internal giblets too.
|
||||
for(var/obj/item/organ/organ in internal_organs)
|
||||
|
||||
@@ -3,15 +3,6 @@ var/global/list/limb_icon_cache = list()
|
||||
/obj/item/organ/external/set_dir()
|
||||
return
|
||||
|
||||
/obj/item/organ/proc/get_icon(var/image/supplied)
|
||||
var/key = "internal-[icon_state]"
|
||||
var/image/I
|
||||
if(organ_cache[key])
|
||||
I = organ_cache[key]
|
||||
else
|
||||
I = image(icon, "[icon_state]")
|
||||
return I
|
||||
|
||||
/obj/item/organ/external/proc/compile_icon()
|
||||
overlays.Cut()
|
||||
get_icon()
|
||||
@@ -22,7 +13,7 @@ var/global/list/limb_icon_cache = list()
|
||||
overlays += child.get_icon()
|
||||
overlays += organ.get_icon()
|
||||
|
||||
/obj/item/organ/external/get_icon(var/skeletal)
|
||||
/obj/item/organ/external/proc/get_icon(var/skeletal)
|
||||
|
||||
if(!owner)
|
||||
mob_icon = new /icon('icons/mob/human_races/r_human.dmi', "[icon_name][gendered_icon ? "_f" : ""]")
|
||||
|
||||
Reference in New Issue
Block a user