Merge branch 'dev' into ofChemistryAndStuff

Conflicts:
	code/datums/recipe.dm
	code/game/machinery/bots/farmbot.dm
	code/game/machinery/bots/medbot.dm
	code/game/mecha/equipment/tools/tools.dm
	code/game/objects/effects/chem/chemsmoke.dm
	code/game/objects/effects/effect_system.dm
	code/game/objects/items/toys.dm
	code/game/objects/items/weapons/extinguisher.dm
	code/game/objects/items/weapons/mop.dm
	code/modules/mob/living/carbon/human/human.dm
	code/modules/organs/organ_internal.dm
	code/modules/reagents/Chemistry-Holder.dm
	code/modules/reagents/Chemistry-Reagents.dm
	code/modules/reagents/Chemistry-Recipes.dm
	code/modules/reagents/reagent_containers/food/snacks.dm
	code/modules/reagents/reagent_containers/pill.dm
	code/modules/reagents/reagent_containers/spray.dm
	maps/exodus-1.dmm
This commit is contained in:
Kelenius
2015-04-28 10:49:26 +03:00
999 changed files with 26502 additions and 23206 deletions
+1 -1
View File
@@ -279,7 +279,7 @@ proc/blood_splatter(var/target,var/datum/reagent/blood/source,var/large)
// Only a certain number of drips (or one large splatter) can be on a given turf.
for(var/obj/effect/decal/cleanable/blood/drip/drop in T)
drips |= drop.drips
del(drop)
qdel(drop)
if(!large && drips.len < 3)
decal_type = /obj/effect/decal/cleanable/blood/drip
+25 -19
View File
@@ -3,7 +3,7 @@ var/list/organ_cache = list()
/obj/item/organ
name = "organ"
icon = 'icons/obj/surgery.dmi'
var/dead_icon
var/mob/living/carbon/human/owner = null
var/status = 0
var/vital //Lose a vital limb, die immediately.
@@ -50,11 +50,12 @@ var/list/organ_cache = list()
holder.internal_organs |= src
/obj/item/organ/proc/die()
name = "dead [initial(name)]"
health = 0
if(status & ORGAN_ROBOT)
return
damage = max_damage
processing_objects -= src
//TODO: Grey out the icon state.
//TODO: Inject an organ with peridaxon to make it alive again.
if(dead_icon)
icon_state = dead_icon
/obj/item/organ/process()
@@ -75,10 +76,10 @@ var/list/organ_cache = list()
if(B && prob(40))
reagents.remove_reagent("blood",0.1)
blood_splatter(src,B,1)
health -= rand(1,3)
if(health <= 0)
damage += rand(1,3)
if(damage >= max_damage)
die()
else if(owner.bodytemperature >= 170) //cryo stops germs from moving and doing their bad stuffs
//** Handle antibiotics and curing infections
handle_antibiotics()
@@ -145,7 +146,7 @@ var/list/organ_cache = list()
return damage >= min_bruised_damage
/obj/item/organ/proc/is_broken()
return (damage >= min_broken_damage || (status & ORGAN_CUT_AWAY) || ((status & ORGAN_BROKEN) && !(status & ORGAN_SPLINTED)))
return (damage >= min_broken_damage || (status & ORGAN_CUT_AWAY) || (status & ORGAN_BROKEN))
//Germs
/obj/item/organ/proc/handle_antibiotics()
@@ -179,9 +180,10 @@ var/list/organ_cache = list()
else
src.damage += amount
var/obj/item/organ/external/parent = owner.get_organ(parent_organ)
if (!silent)
owner.custom_pain("Something inside your [parent.name] hurts a lot.", 1)
if(owner && parent_organ)
var/obj/item/organ/external/parent = owner.get_organ(parent_organ)
if(parent && !silent)
owner.custom_pain("Something inside your [parent.name] hurts a lot.", 1)
/obj/item/organ/proc/robotize() //Being used to make robutt hearts, etc
robotic = 2
@@ -235,12 +237,14 @@ var/list/organ_cache = list()
owner.internal_organs_by_name[organ_tag] = null
owner.internal_organs_by_name -= organ_tag
owner.internal_organs_by_name -= null
owner.internal_organs -= src
var/obj/item/organ/external/affected = owner.get_organ(parent_organ)
if(affected) affected.internal_organs -= src
loc = owner.loc
loc = get_turf(owner)
processing_objects |= src
rejecting = null
var/datum/reagent/blood/organ_blood = locate(/datum/reagent/blood) in reagents.reagent_list
if(!organ_blood || !organ_blood.data["blood_DNA"])
@@ -253,6 +257,8 @@ var/list/organ_cache = list()
msg_admin_attack("[user.name] ([user.ckey]) removed a vital organ ([src]) from [owner.name] ([owner.ckey]) (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
owner.death()
owner = null
/obj/item/organ/proc/replaced(var/mob/living/carbon/human/target,var/obj/item/organ/external/affected)
if(!istype(target)) return
@@ -269,12 +275,13 @@ var/list/organ_cache = list()
transplant_data["blood_DNA"] = transplant_blood.data["blood_DNA"]
owner = target
loc = owner
processing_objects -= src
target.internal_organs |= src
affected.internal_organs |= src
target.internal_organs_by_name[organ_tag] = src
status |= ORGAN_CUT_AWAY
del(src)
if(robotic)
status |= ORGAN_ROBOT
/obj/item/organ/eyes/replaced(var/mob/living/carbon/human/target)
@@ -283,7 +290,7 @@ var/list/organ_cache = list()
target.r_eyes = eye_colour[1]
target.g_eyes = eye_colour[2]
target.b_eyes = eye_colour[3]
target.update_body()
target.update_eyes()
..()
/obj/item/organ/proc/bitten(mob/user)
@@ -295,7 +302,6 @@ var/list/organ_cache = list()
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in reagents.reagent_list
blood_splatter(src,B,1)
user.drop_from_inventory(src)
var/obj/item/weapon/reagent_containers/food/snacks/organ/O = new(get_turf(src))
O.name = name
@@ -309,7 +315,7 @@ var/list/organ_cache = list()
if(fingerprintslast) O.fingerprintslast = fingerprintslast
user.put_in_active_hand(O)
del(src)
qdel(src)
/obj/item/organ/attack_self(mob/user as mob)
+5 -5
View File
@@ -5,12 +5,12 @@
//This is a terrible hack and I should be ashamed.
var/datum/seed/diona = plant_controller.seeds["diona"]
if(!diona)
del(src)
qdel(src)
spawn(1) // So it has time to be thrown about by the gib() proc.
var/mob/living/carbon/alien/diona/D = new(get_turf(organ))
diona.request_player(D)
del(organ)
qdel(organ)
/obj/item/organ/external/diona
name = "tendril"
@@ -130,7 +130,7 @@
/obj/item/organ/external/diona/removed()
..()
if(!istype(owner))
del(src)
qdel(src)
if(!owner.organs.len)
owner.death()
@@ -175,7 +175,7 @@
..()
if(!istype(owner))
del(src)
qdel(src)
if(!owner.internal_organs.len)
owner.death()
@@ -247,7 +247,7 @@
B.ckey = owner.ckey
spawn(0)
del(src)
qdel(src)
//XENOMORPH ORGANS
/obj/item/organ/xenos/eggsac
+87 -79
View File
@@ -3,13 +3,16 @@
****************************************************/
/obj/item/organ/external
name = "external"
min_broken_damage = 30
max_damage = 0
dir = SOUTH
organ_tag = "limb"
var/icon_name = null
var/body_part = null
var/icon_position = 0
var/model
var/force_icon
var/damage_state = "00"
var/brute_dam = 0
var/burn_dam = 0
@@ -18,7 +21,7 @@
var/icon/mob_icon
var/gendered_icon = 0
var/limb_name
var/disfigured = 1
var/disfigured = 0
var/cannot_amputate
var/cannot_break
var/s_tone
@@ -26,38 +29,25 @@
var/list/wounds = list()
var/number_wounds = 0 // cache the number of wounds, which is NOT wounds.len!
var/perma_injury = 0
var/obj/item/organ/external/parent
var/list/obj/item/organ/external/children
// Internal organs of this body part
var/list/internal_organs = list()
var/list/internal_organs = list() // Internal organs of this body part
var/damage_msg = "\red You feel an intense pain"
var/broken_description
var/open = 0
var/stage = 0
var/cavity = 0
var/sabotaged = 0 // If a prosthetic limb is emagged, it will detonate when it fails.
var/encased // Needs to be opened with a saw to access the organs.
var/obj/item/hidden = null
var/list/implants = list()
// how often wounds should be updated, a higher number means less often
var/wound_update_accuracy = 1
var/wound_update_accuracy = 1 // how often wounds should be updated, a higher number means less often
var/joint = "joint" // Descriptive string used in dislocation.
var/amputation_point // Descriptive string used in amputation.
var/dislocated = 0 // If you target a joint, you can dislocate the limb, causing temporary damage to the organ.
var/can_grasp
var/can_stand
min_broken_damage = 30
max_damage = 0
dir = SOUTH
/obj/item/organ/external/attackby(obj/item/weapon/W as obj, mob/user as mob)
switch(stage)
if(0)
@@ -106,9 +96,14 @@
dislocated = 0
if(children && children.len)
for(var/obj/item/organ/external/child in children)
child.undislocate()
if(child.dislocated == 1)
child.undislocate()
if(owner)
owner.shock_stage += 20
for(var/obj/item/organ/external/limb in owner.organs)
if(limb.dislocated == 2)
return
owner.verbs -= /mob/living/carbon/human/proc/undislocate
/obj/item/organ/external/update_health()
damage = min(max_damage, (brute_dam + burn_dam))
@@ -120,6 +115,8 @@
if(owner)
replaced(owner)
sync_colour_to_human(owner)
spawn(1)
get_icon()
/obj/item/organ/external/replaced(var/mob/living/carbon/human/target)
owner = target
@@ -213,25 +210,29 @@
// sync the organ's damage with its wounds
src.update_damages()
owner.updatehealth() //droplimb will call updatehealth() again if it does end up being called
//If limb took enough damage, try to cut or tear it off
if(owner && loc == owner)
if(!cannot_amputate && config.limbs_can_break && (brute_dam + burn_dam) >= (max_damage * config.organ_health_multiplier))
var/threshold = max_damage/3
var/threshold = max_damage
var/dropped
if((burn >= threshold) && prob(burn/3))
dropped = 1
droplimb(0,DROPLIMB_BURN)
if(!dropped && prob(brute))
if(brute >= threshold)
if((sharp || edge) && istype(used_weapon,/obj/item))
var/obj/item/W = used_weapon
if(W.w_class >= 3)
droplimb(0,DROPLIMB_EDGE)
var/edge_eligible = 0
if(edge && istype(used_weapon,/obj/item))
var/obj/item/W = used_weapon
if(W.w_class >= 3)
edge_eligible = 1
if(brute >= threshold || (edge_eligible && brute >= threshold/3))
if((sharp || edge))
droplimb(0,DROPLIMB_EDGE)
else
droplimb(0,DROPLIMB_BLUNT)
owner.updatehealth()
return update_icon()
/obj/item/organ/external/proc/heal_damage(brute, burn, internal = 0, robo_repair = 0)
@@ -253,10 +254,10 @@
status &= ~ORGAN_BROKEN
perma_injury = 0
if((brute || burn) && children && children.len && (owner.species.flags & REGENERATES_LIMBS))
/*if((brute || burn) && children && children.len && (owner.species.flags & REGENERATES_LIMBS))
var/obj/item/organ/external/stump/S = locate() in children
if(S)
world << "Extra healing to go around ([brute+burn]) and [owner] needs a replacement limb."
world << "Extra healing to go around ([brute+burn]) and [owner] needs a replacement limb."*/
//Sync the organ's damage with its wounds
src.update_damages()
@@ -343,8 +344,12 @@ This function completely restores a damaged organ to perfect condition.
PROCESSING & UPDATING
****************************************************/
//Determines if we even need to process this organ.
//external organs handle brokenness a bit differently when it comes to damage. Instead brute_dam is checked inside process()
//this also ensures that an external organ cannot be "broken" without broken_description being set.
/obj/item/organ/external/is_broken()
return ((status & ORGAN_CUT_AWAY) || ((status & ORGAN_BROKEN) && !(status & ORGAN_SPLINTED)))
//Determines if we even need to process this organ.
/obj/item/organ/external/proc/need_process()
if(status && status != ORGAN_ROBOT) // If it's robotic, that's fine it will have a status.
return 1
@@ -644,14 +649,15 @@ 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(null, ignore_children)
owner.traumatic_shock += 60
var/mob/living/carbon/human/victim = owner //Keep a reference for post-removed().
removed(null, ignore_children)
victim.traumatic_shock += 60
wounds.Cut()
if(parent)
var/datum/wound/W
if(max_damage < 50)
W = new/datum/wound/lost_limb/small(max_damage)
if(clean || max_damage < 50)
W = new/datum/wound/lost_limb/small(max_damage/2)
else
W = new/datum/wound/lost_limb(max_damage)
parent.children -= src
@@ -659,22 +665,22 @@ Note that amputating the affected organ does in fact remove the infection from t
parent.wounds |= W
parent.update_damages()
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
owner.organs |= stump
victim.organs |= stump
stump.update_damages()
parent = null
spawn(1)
owner.update_body()
owner.updatehealth()
owner.UpdateDamageIcon()
victim.updatehealth()
victim.UpdateDamageIcon()
victim.regenerate_icons()
dir = 2
switch(disintegrate)
if(DROPLIMB_EDGE)
compile_icon()
add_blood(owner)
add_blood(victim)
var/matrix/M = matrix()
M.Turn(rand(180))
src.transform = M
@@ -683,15 +689,15 @@ Note that amputating the affected organ does in fact remove the infection from t
if(src && istype(loc,/turf))
throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30)
dir = 2
return
if(DROPLIMB_BURN)
new /obj/effect/decal/cleanable/ash(get_turf(owner))
new /obj/effect/decal/cleanable/ash(get_turf(victim))
qdel(src)
if(DROPLIMB_BLUNT)
var/obj/effect/decal/cleanable/blood/gibs/gore = new owner.species.single_gib_type(get_turf(owner))
if(owner.species.flesh_color)
gore.fleshcolor = owner.species.flesh_color
if(owner.species.blood_color)
gore.basecolor = owner.species.blood_color
var/obj/effect/decal/cleanable/blood/gibs/gore = new owner.species.single_gib_type(get_turf(victim))
if(victim.species.flesh_color)
gore.fleshcolor = victim.species.flesh_color
if(victim.species.blood_color)
gore.basecolor = victim.species.blood_color
gore.update_icon()
gore.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30)
@@ -699,8 +705,7 @@ Note that amputating the affected organ does in fact remove the infection from t
I.removed()
if(istype(loc,/turf))
I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30)
del(src)
qdel(src)
/****************************************************
HELPERS
@@ -709,25 +714,21 @@ Note that amputating the affected organ does in fact remove the infection from t
/obj/item/organ/external/proc/is_stump()
return 0
/obj/item/organ/external/replaced()
get_icon()
icon = mob_icon
return ..()
/obj/item/organ/external/proc/release_restraints()
if (owner.handcuffed && body_part in list(ARM_LEFT, ARM_RIGHT, HAND_LEFT, HAND_RIGHT))
owner.visible_message(\
"\The [owner.handcuffed.name] falls off of [owner.name].",\
"\The [owner.handcuffed.name] falls off you.")
owner.drop_from_inventory(owner.handcuffed)
if (owner.legcuffed && body_part in list(FOOT_LEFT, FOOT_RIGHT, LEG_LEFT, LEG_RIGHT))
owner.visible_message(\
"\The [owner.legcuffed.name] falls off of [owner.name].",\
"\The [owner.legcuffed.name] falls off you.")
owner.drop_from_inventory(owner.legcuffed)
/obj/item/organ/external/proc/release_restraints(var/mob/living/carbon/human/holder)
if(!holder)
holder = owner
if(!holder)
return
if (holder.handcuffed && body_part in list(ARM_LEFT, ARM_RIGHT, HAND_LEFT, HAND_RIGHT))
holder.visible_message(\
"\The [holder.handcuffed.name] falls off of [holder.name].",\
"\The [holder.handcuffed.name] falls off you.")
holder.drop_from_inventory(holder.handcuffed)
if (holder.legcuffed && body_part in list(FOOT_LEFT, FOOT_RIGHT, LEG_LEFT, LEG_RIGHT))
holder.visible_message(\
"\The [holder.legcuffed.name] falls off of [holder.name].",\
"\The [holder.legcuffed.name] falls off you.")
holder.drop_from_inventory(holder.legcuffed)
/obj/item/organ/external/proc/bandage()
var/rval = 0
@@ -823,7 +824,7 @@ Note that amputating the affected organ does in fact remove the infection from t
name = "[R.company] [initial(name)]"
desc = "[R.desc]"
dislocated = -1
dislocated = -1 //TODO, make robotic limbs a separate type, remove snowflake
cannot_break = 1
get_icon()
for (var/obj/item/organ/external/T in children)
@@ -848,7 +849,7 @@ Note that amputating the affected organ does in fact remove the infection from t
return 0
/obj/item/organ/external/proc/is_usable()
return !(status & (ORGAN_DESTROYED|ORGAN_MUTATED|ORGAN_DEAD))
return !is_dislocated() && !(status & (ORGAN_DESTROYED|ORGAN_MUTATED|ORGAN_DEAD))
/obj/item/organ/external/proc/is_malfunctioning()
return ((status & ORGAN_ROBOT) && (brute_dam + burn_dam) >= 10 && prob(brute_dam + burn_dam))
@@ -869,14 +870,18 @@ 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)
if(!owner)
return
var/is_robotic = status & ORGAN_ROBOT
var/mob/living/carbon/human/victim = owner
..()
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
del(implant)
qdel(implant)
// Attached organs also fly off.
if(!ignore_children)
@@ -890,24 +895,24 @@ Note that amputating the affected organ does in fact remove the infection from t
organ.removed()
organ.loc = src
release_restraints()
owner.organs -= src
owner.organs_by_name[limb_name] = null // Remove from owner's vars.
release_restraints(victim)
victim.organs -= src
victim.organs_by_name[limb_name] = null // Remove from owner's vars.
//Robotic limbs explode if sabotaged.
if(is_robotic && sabotaged)
owner.visible_message(
"<span class='danger'>\The [owner]'s [src.name] explodes violently!</span>",\
victim.visible_message(
"<span class='danger'>\The [victim]'s [src.name] explodes violently!</span>",\
"<span class='danger'>Your [src.name] explodes!</span>",\
"<span class='danger'>You hear an explosion!</span>")
explosion(get_turf(owner),-1,-1,2,3)
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.start()
spawn(10)
del(spark_system)
del(src)
qdel(spark_system)
qdel(src)
/obj/item/organ/external/proc/disfigure(var/type = "brute")
if (disfigured)
@@ -940,6 +945,7 @@ Note that amputating the affected organ does in fact remove the infection from t
gendered_icon = 1
cannot_amputate = 1
parent_organ = null
encased = "ribcage"
/obj/item/organ/external/groin
name = "lower body"
@@ -1061,9 +1067,11 @@ Note that amputating the affected organ does in fact remove the infection from t
joint = "jaw"
amputation_point = "neck"
gendered_icon = 1
encased = "skull"
/obj/item/organ/external/head/removed()
if(owner)
name = "[owner.real_name]'s head"
owner.u_equip(owner.glasses)
owner.u_equip(owner.head)
owner.u_equip(owner.l_ear)
+48 -41
View File
@@ -5,22 +5,66 @@ var/global/list/limb_icon_cache = list()
/obj/item/organ/external/proc/compile_icon()
overlays.Cut()
get_icon()
// This is a kludge, only one icon has more than one generation of children though.
for(var/obj/item/organ/external/organ in contents)
if(organ.children && organ.children.len)
for(var/obj/item/organ/external/child in organ.children)
overlays += child.get_icon()
overlays += organ.get_icon()
overlays += child.mob_icon
overlays += organ.mob_icon
/obj/item/organ/external/proc/sync_colour_to_human(var/mob/living/carbon/human/human)
s_tone = null
s_col = null
if(human.s_tone && (human.species.flags & HAS_SKIN_TONE))
if(status & ORGAN_ROBOT)
return
if(!isnull(human.s_tone) && (human.species.flags & HAS_SKIN_TONE))
s_tone = human.s_tone
if(human.species.flags & HAS_SKIN_COLOR)
s_col = list(human.r_skin, human.g_skin, human.b_skin)
/obj/item/organ/external/head/sync_colour_to_human(var/mob/living/carbon/human/human)
..()
var/obj/item/organ/eyes/eyes = owner.internal_organs_by_name["eyes"]
if(eyes) eyes.update_colour()
/obj/item/organ/external/head/removed()
get_icon()
..()
/obj/item/organ/external/head/get_icon()
..()
if(owner.species.has_organ["eyes"])
var/obj/item/organ/eyes/eyes = owner.internal_organs_by_name["eyes"]
if(owner.species.eyes)
var/icon/eyes_icon = new/icon('icons/mob/human_face.dmi', owner.species.eyes)
if(eyes)
eyes_icon.Blend(rgb(eyes.eye_colour[1], eyes.eye_colour[2], eyes.eye_colour[3]), ICON_ADD)
else
eyes_icon.Blend(rgb(128,0,0), ICON_ADD)
mob_icon.Blend(eyes_icon, ICON_OVERLAY)
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)
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[owner.f_style]
if(facial_hair_style && facial_hair_style.species_allowed && (owner.species.name in facial_hair_style.species_allowed))
var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
if(facial_hair_style.do_colouration)
facial_s.Blend(rgb(owner.r_facial, owner.g_facial, owner.b_facial), ICON_ADD)
overlays |= facial_s
if(owner.h_style && !(owner.head && (owner.head.flags & BLOCKHEADHAIR)))
var/datum/sprite_accessory/hair_style = hair_styles_list[owner.h_style]
if(hair_style && (owner.species.name in hair_style.species_allowed))
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
if(hair_style.do_colouration)
hair_s.Blend(rgb(owner.r_hair, owner.g_hair, owner.b_hair), ICON_ADD)
overlays |= hair_s
return mob_icon
/obj/item/organ/external/proc/get_icon(var/skeletal)
var/gender
@@ -64,43 +108,6 @@ var/global/list/limb_icon_cache = list()
return mob_icon
/obj/item/organ/external/head/get_icon(var/skeletal)
if(skeletal || !owner)
return
..()
if(owner.species.has_organ["eyes"])
var/obj/item/organ/eyes/eyes = owner.internal_organs_by_name["eyes"]
if(eyes && owner.species.eyes)
var/icon/eyes_icon = new/icon('icons/mob/human_face.dmi', owner.species.eyes)
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)))
mob_icon.Blend(new/icon('icons/mob/human_face.dmi', "lips_[owner.lip_style]_s"), ICON_OVERLAY)
if(owner.f_style)
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[owner.f_style]
if(facial_hair_style)
var/icon/facial = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
if(facial_hair_style.do_colouration)
facial.Blend(rgb(owner.r_facial, owner.g_facial, owner.b_facial), ICON_ADD)
mob_icon.Blend(facial, ICON_OVERLAY)
if(owner.h_style && !(owner.head && (owner.head.flags & BLOCKHEADHAIR)))
var/datum/sprite_accessory/hair_style = hair_styles_list[owner.h_style]
if(hair_style)
var/icon/hair = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
if(hair_style.do_colouration)
hair.Blend(rgb(owner.r_hair, owner.g_hair, owner.b_hair), ICON_ADD)
mob_icon.Blend(hair, ICON_OVERLAY)
icon = mob_icon
return mob_icon
// new damage icon system
// adjusted to set damage_state to brute/burn code only (without r_name0 as before)
/obj/item/organ/external/update_icon()
+22 -44
View File
@@ -11,6 +11,7 @@
icon_state = "heart-on"
organ_tag = "heart"
parent_organ = "chest"
dead_icon = "heart-off"
/obj/item/organ/lungs
name = "lungs"
@@ -44,7 +45,7 @@
organ_tag = "kidneys"
parent_organ = "groin"
/obj/item/organ/kidney/process()
/obj/item/organ/kidneys/process()
..()
@@ -61,7 +62,6 @@
else if(is_broken())
owner.adjustToxLoss(0.3 * PROCESS_ACCURACY)
/obj/item/organ/eyes
name = "eyeballs"
icon_state = "eyes"
@@ -70,6 +70,15 @@
parent_organ = "head"
var/list/eye_colour = list(0,0,0)
/obj/item/organ/eyes/proc/update_colour()
if(!owner)
return
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/process() //Eye damage replaces the old eye_stat var.
..()
if(!owner)
@@ -79,41 +88,11 @@
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)
eye_colour = list(0,0,0)
..() //Make sure target is set so we can steal their eye colour for later.
var/mob/living/carbon/human/H = target
if(istype(H))
eye_colour = list(
H.r_eyes ? H.r_eyes : 0,
H.g_eyes ? H.g_eyes : 0,
H.b_eyes ? H.b_eyes : 0
)
// Leave bloody red pits behind!
H.r_eyes = 128
H.g_eyes = 0
H.b_eyes = 0
H.update_body()
/obj/item/organ/liver
name = "liver"
icon_state = "liver"
organ_tag = "liver"
parent_organ = "chest"
parent_organ = "groin"
/obj/item/organ/liver/process()
@@ -167,17 +146,16 @@
name = "appendix"
icon_state = "appendix"
parent_organ = "groin"
organ_tag = "appendix"
/obj/item/organ/appendix/removed()
if(owner)
var/inflamed = 0
for(var/datum/disease/appendicitis/appendicitis in owner.viruses)
inflamed = 1
appendicitis.cure()
owner.resistances += appendicitis
if(inflamed)
icon_state = "appendixinflamed"
name = "inflamed appendix"
..()
var/inflamed = 0
for(var/datum/disease/appendicitis/appendicitis in owner.viruses)
inflamed = 1
appendicitis.cure()
owner.resistances += appendicitis
if(inflamed)
icon_state = "appendixinflamed"
name = "inflamed appendix"
+1 -1
View File
@@ -21,4 +21,4 @@
/obj/item/organ/external/stump/removed()
..()
del(src)
qdel(src)
+3 -3
View File
@@ -209,9 +209,9 @@
/** WOUND DEFINITIONS **/
//Note that the MINIMUM damage before a wound can be applied should correspond to
//Note that the MINIMUM damage before a wound can be applied should correspond to
//the damage amount for the stage with the same name as the wound.
//e.g. /datum/wound/cut/deep should only be applied for 15 damage and up,
//e.g. /datum/wound/cut/deep should only be applied for 15 damage and up,
//because in it's stages list, "deep cut" = 15.
/proc/get_wound_type(var/type = CUT, var/damage)
switch(type)
@@ -323,4 +323,4 @@ datum/wound/cut/massive
return 0 //cannot be merged
/datum/wound/lost_limb/small
stages = list("ripped stump" = 40, "bloody stump" = 30, "clotted stump" = 15, "scarred stump" = 0)
stages = list("ripped hole" = 40, "bloody hole" = 30, "clotted hole" = 15, "scarred hole" = 0)