mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 19:47:47 +01:00
Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into limbs
This commit is contained in:
@@ -25,32 +25,27 @@ var/list/organ_cache = list()
|
||||
/obj/item/organ/proc/update_health()
|
||||
return
|
||||
|
||||
/obj/item/organ/New(var/newloc, var/mob/living/carbon/holder, var/internal)
|
||||
..(newloc)
|
||||
|
||||
/obj/item/organ/New(var/mob/living/carbon/holder, var/internal)
|
||||
..(holder)
|
||||
create_reagents(5)
|
||||
|
||||
if(!max_damage) max_damage = min_broken_damage * 2
|
||||
|
||||
if(!max_damage)
|
||||
max_damage = min_broken_damage * 2
|
||||
if(istype(holder))
|
||||
|
||||
if(internal)
|
||||
holder.internal_organs |= src
|
||||
src.owner = holder
|
||||
|
||||
var/mob/living/carbon/human/H = holder
|
||||
if(istype(H))
|
||||
|
||||
if(internal)
|
||||
var/obj/item/organ/external/E = H.organs_by_name[src.parent_organ]
|
||||
if(E)
|
||||
if(E.internal_organs == null)
|
||||
E.internal_organs = list()
|
||||
E.internal_organs |= src
|
||||
if(H.dna)
|
||||
if(!blood_DNA)
|
||||
blood_DNA = list()
|
||||
blood_DNA[H.dna.unique_enzymes] = H.dna.b_type
|
||||
|
||||
var/obj/item/organ/external/E = H.organs_by_name[src.parent_organ]
|
||||
if(E)
|
||||
if(E.internal_organs == null)
|
||||
E.internal_organs = list()
|
||||
E.internal_organs |= src
|
||||
if(internal)
|
||||
holder.internal_organs |= src
|
||||
|
||||
/obj/item/organ/proc/die()
|
||||
name = "dead [initial(name)]"
|
||||
|
||||
@@ -108,13 +108,15 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/item/organ/external/New(var/newloc, var/mob/living/carbon/holder, var/obj/item/organ/external/P)
|
||||
if(P)
|
||||
parent = P
|
||||
if(!parent.children)
|
||||
parent.children = list()
|
||||
parent.children.Add(src)
|
||||
return ..()
|
||||
/obj/item/organ/external/New(var/mob/living/carbon/holder, var/internal)
|
||||
..()
|
||||
if(owner && parent_organ && istype(owner, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = owner
|
||||
var/obj/item/organ/external/parent = H.organs_by_name[src.parent_organ]
|
||||
if(parent)
|
||||
if(!parent.children)
|
||||
parent.children = list()
|
||||
parent.children.Add(src)
|
||||
|
||||
/****************************************************
|
||||
DAMAGE PROCS
|
||||
|
||||
@@ -35,7 +35,7 @@ var/global/list/limb_icon_cache = list()
|
||||
//TODO: cache these icons
|
||||
if(skeletal)
|
||||
mob_icon = new /icon('icons/mob/human_races/r_skeleton.dmi', "[icon_name][gender ? "_[gender]" : ""]")
|
||||
else if (status & ORGAN_ROBOT && !(owner.species && owner.species.flags & IS_SYNTHETIC))
|
||||
else if ((status & ORGAN_ROBOT) && !(owner.species && owner.species.flags & IS_SYNTHETIC))
|
||||
mob_icon = new /icon('icons/mob/human_races/robotic.dmi', "[icon_name][gender ? "_[gender]" : ""]")
|
||||
else
|
||||
if (status & ORGAN_MUTATED)
|
||||
@@ -55,9 +55,9 @@ var/global/list/limb_icon_cache = list()
|
||||
else if(owner.species.flags & HAS_SKIN_COLOR)
|
||||
mob_icon.Blend(rgb(owner.r_skin, owner.g_skin, owner.b_skin), ICON_ADD)
|
||||
|
||||
icon = mob_icon
|
||||
dir = EAST
|
||||
return icon
|
||||
icon = mob_icon
|
||||
return mob_icon
|
||||
|
||||
/obj/item/organ/external/head/get_icon(var/skeletal)
|
||||
|
||||
@@ -73,7 +73,7 @@ var/global/list/limb_icon_cache = list()
|
||||
eyes_icon.Blend(rgb(eyes.eye_colour[1], eyes.eye_colour[2], eyes.eye_colour[3]), ICON_ADD)
|
||||
mob_icon.Blend(eyes_icon, ICON_OVERLAY)
|
||||
|
||||
if(owner.lip_style && (owner.species && owner.species.flags & HAS_LIPS))
|
||||
if(owner.lip_style && (owner.species && (owner.species.flags & HAS_LIPS)))
|
||||
mob_icon.Blend(new/icon('icons/mob/human_face.dmi', "lips_[owner.lip_style]_s"), ICON_OVERLAY)
|
||||
|
||||
if(owner.f_style)
|
||||
@@ -94,7 +94,7 @@ var/global/list/limb_icon_cache = list()
|
||||
mob_icon.Blend(hair, ICON_OVERLAY)
|
||||
|
||||
icon = mob_icon
|
||||
return icon
|
||||
return mob_icon
|
||||
|
||||
// new damage icon system
|
||||
// adjusted to set damage_state to brute/burn code only (without r_name0 as before)
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
gender = PLURAL
|
||||
organ_tag = "eyes"
|
||||
parent_organ = "head"
|
||||
var/list/eye_colour
|
||||
var/list/eye_colour = list(0,0,0)
|
||||
|
||||
/obj/item/organ/eyes/process() //Eye damage replaces the old eye_stat var.
|
||||
..()
|
||||
@@ -79,6 +79,15 @@
|
||||
if(is_broken())
|
||||
owner.eye_blind = 20
|
||||
|
||||
/obj/item/organ/eyes/New()
|
||||
..()
|
||||
if(owner)
|
||||
eye_colour = list(
|
||||
owner.r_eyes ? owner.r_eyes : 0,
|
||||
owner.g_eyes ? owner.g_eyes : 0,
|
||||
owner.b_eyes ? owner.b_eyes : 0
|
||||
)
|
||||
|
||||
/obj/item/organ/eyes/removed(var/mob/living/target,var/mob/living/user)
|
||||
|
||||
if(!eye_colour)
|
||||
|
||||
Reference in New Issue
Block a user