>Resolves some dna runtimes. - check_dna_integrity() was not being used properly.

>Removed a for(obj/item in world) loop triggered by bloodying items. It now uses a caching system.
>New skin_tones - they are now sprite-based. This is to prepare for expansion of the mutantrace system. Thanks validsalid x
>Removed fat icons from the game - when you are obese you will now just look like a regular human. You will not be immune to being pushed. You will not be immune to choking. You will still overheat and run slower and appear fat upon "examine" verb use.

Modified   code/__HELPERS/mobs.dm
Modified   code/game/atoms.dm
Modified   code/game/dna.dm
Modified   code/game/machinery/computer/hologram.dm
Modified   code/game/objects/items.dm
Modified   code/modules/client/preferences.dm
Modified   code/modules/client/preferences_savefile.dm
Modified   code/modules/flufftext/Hallucination.dm
Modified   code/modules/mob/living/carbon/alien/larva/larva.dm
Modified   code/modules/mob/living/carbon/human/human.dm
Modified   code/modules/mob/living/carbon/human/human_defines.dm
Modified   code/modules/mob/living/carbon/human/life.dm
Modified   code/modules/mob/living/carbon/human/update_icons.dm
Modified   code/modules/mob/living/carbon/monkey/monkey.dm
Modified   code/modules/mob/living/silicon/robot/robot.dm
Modified   code/modules/mob/living/simple_animal/constructs.dm
Modified   code/modules/mob/living/simple_animal/friendly/corgi.dm
Modified   code/modules/mob/living/simple_animal/friendly/farm_animals.dm
Modified   code/modules/mob/new_player/preferences_setup.dm
Modified   icons/effects/genetics.dmi
Modified   icons/mob/human.dmi

Signed-off-by: carnie <elly1989@rocketmail.com>
This commit is contained in:
carnie
2013-05-08 08:20:15 +01:00
parent 17e4358d4c
commit cff9ed5f71
21 changed files with 299 additions and 509 deletions
+13 -11
View File
@@ -39,20 +39,22 @@ proc/random_name(gender, attempts_to_find_unique_name=10)
break
proc/random_skin_tone()
return pick(60;"caucasian", 15;"afroamerican", 10;"african", 10;"latino", 5;"albino", 20;"oriental", 10;"mediteranian")
return pick(skin_tones)
var/list/skin_tones = list(
"caucasian" = "fdc",
"afroamerican" = "963",
"african" = "630",
"latino" = "c90",
"albino" = "fff",
"oriental" = "ff6",
"mediteranian" = "cc0"
"albino",
"caucasian1",
"caucasian2",
"caucasian3",
"latino",
"mediterranean",
"asian1",
"asian2",
"arab",
"indian",
"african1",
"african2"
)
/proc/skin_tone2color(skin_tone)
. = skin_tones[skin_tone]
if(!.) . = "fdc"
proc/age2agedescription(age)
switch(age)
+41 -65
View File
@@ -304,69 +304,57 @@ its easier to just keep the beam vertical.
if(!istype(W, /obj/item/weapon/grab) && !istype(W, /obj/item/weapon/plastique) && !istype(W, /obj/item/weapon/reagent_containers/spray) && !istype(W, /obj/item/weapon/packageWrap) && !istype(W, /obj/item/device/detective_scanner))
visible_message("<span class='danger'>[src] has been hit by [user] with [W].</span>")
var/list/blood_splatter_icons = list()
/atom/proc/blood_splatter_index()
return "\ref[initial(icon)]-[initial(icon_state)]"
//returns 1 if made bloody, returns 0 otherwise
/atom/proc/add_blood(mob/living/carbon/human/M as mob)
if (!( istype(M, /mob/living/carbon/human) ))
/atom/proc/add_blood(mob/living/carbon/M)
if(!initial(icon) || !initial(icon_state))
return 0
check_dna_integrity(M) //check dna is valid and create/setup if necessary
if (!( src.flags ) & FPRINT)
if(!istype(M))
return 0
if(!blood_DNA || !istype(blood_DNA, /list)) //if our list of DNA doesn't exist yet (or isn't a list) initialise it.
if(!check_dna_integrity(M)) //check dna is valid and create/setup if necessary
return 0 //no dna!
if(!(flags & FPRINT))
return 0
if(!istype(blood_DNA, /list)) //if our list of DNA doesn't exist yet (or isn't a list) initialise it.
blood_DNA = list()
//adding blood to items
if (istype(src, /obj/item)&&!istype(src, /obj/item/weapon/melee/energy))//Only regular items. Energy melee weapon are not affected.
var/obj/item/O = src
//if we haven't made our blood_overlay already
if( !O.blood_overlay )
var/icon/I = new /icon(O.icon, O.icon_state)
I.Blend(new /icon('icons/effects/blood.dmi', rgb(255,255,255)),ICON_ADD) //fills the icon_state with white (except where it's transparent)
I.Blend(new /icon('icons/effects/blood.dmi', "itemblood"),ICON_MULTIPLY) //adds blood and the remaining white areas become transparant
//not sure if this is worth it. It attaches the blood_overlay to every item of the same type if they don't have one already made.
for(var/obj/item/A in world)
if(A.type == O.type && !A.blood_overlay)
A.blood_overlay = I
if(istype(src, /obj/item))
//apply the blood-splatter overlay if it isn't already in there
if(!blood_DNA.len)
O.overlays += O.blood_overlay
//try to find a pre-processed blood-splatter. otherwise, make a new one
var/index = blood_splatter_index()
var/icon/blood_splatter_icon = blood_splatter_icons[index]
if(!blood_splatter_icon )
blood_splatter_icon = icon(initial(icon), initial(icon_state), , 1) //we only want to apply blood-splatters to the initial icon_state for each object
blood_splatter_icon.Blend("#fff", ICON_ADD) //fills the icon_state with white (except where it's transparent)
blood_splatter_icon.Blend(icon('icons/effects/blood.dmi', "itemblood"), ICON_MULTIPLY) //adds blood and the remaining white areas become transparant
blood_splatter_icon = fcopy_rsc(blood_splatter_icon)
blood_splatter_icons[index] = blood_splatter_icon
overlays += blood_splatter_icon
//if this blood isn't already in the list, add it
if(blood_DNA[M.dna.unique_enzymes])
return 0 //already bloodied with this blood. Cannot add more.
blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
return 1 //we applied blood to the item
//adding blood to turfs
else if (istype(src, /turf/simulated))
else if(istype(src, /turf/simulated))
var/turf/simulated/T = src
//get one blood decal and infect it with virus from M.viruses
for(var/obj/effect/decal/cleanable/blood/B in T.contents)
if(!B.blood_DNA[M.dna.unique_enzymes])
B.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
/*for(var/datum/disease/D in M.viruses)
var/datum/disease/newDisease = D.Copy(1)
B.viruses += newDisease
newDisease.holder = B*/
return 1 //we bloodied the floor
//if there isn't a blood decal already, make one.
var/obj/effect/decal/cleanable/blood/newblood = new /obj/effect/decal/cleanable/blood(T)
newblood.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
/*for(var/datum/disease/D in M.viruses)
var/datum/disease/newDisease = D.Copy(1)
newblood.viruses += newDisease
newDisease.holder = newblood*/
var/obj/effect/decal/cleanable/blood/B = locate() in T.contents
if(!B) B = new /obj/effect/decal/cleanable/blood(T)
B.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
return 1 //we bloodied the floor
//adding blood to humans
else if (istype(src, /mob/living/carbon/human))
else if(istype(src, /mob/living/carbon/human))
var/mob/living/carbon/human/H = src
//if this blood isn't already in the list, add it
if(blood_DNA[H.dna.unique_enzymes])
@@ -391,34 +379,22 @@ its easier to just keep the beam vertical.
// Only adds blood on the floor -- Skie
/atom/proc/add_blood_floor(mob/living/carbon/M as mob)
if( istype(M, /mob/living/carbon/monkey) || istype(M, /mob/living/carbon/human))
if( istype(src, /turf/simulated) )
var/turf/simulated/source1 = src
var/obj/effect/decal/cleanable/blood/this = new /obj/effect/decal/cleanable/blood(source1)
this.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
/*for(var/datum/disease/D in M.viruses)
var/datum/disease/newDisease = D.Copy(1)
this.viruses += newDisease
newDisease.holder = this*/
else if( istype(M, /mob/living/carbon/alien ))
if( istype(src, /turf/simulated) )
var/turf/simulated/source2 = src
var/obj/effect/decal/cleanable/xenoblood/this = new /obj/effect/decal/cleanable/xenoblood(source2)
this.blood_DNA["UNKNOWN BLOOD"] = "X*"
/*for(var/datum/disease/D in M.viruses)
var/datum/disease/newDisease = D.Copy(1)
this.viruses += newDisease
newDisease.holder = this*/
else if( istype(M, /mob/living/silicon/robot ))
if( istype(src, /turf/simulated) )
var/turf/simulated/source2 = src
new /obj/effect/decal/cleanable/oil(source2)
if(istype(src, /turf/simulated))
if(check_dna_integrity(M)) //mobs with dna = (monkeys + humans at time of writing)
var/obj/effect/decal/cleanable/blood/B = locate() in contents
if(!B) B = new(src)
B.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
else if(istype(M, /mob/living/carbon/alien))
var/obj/effect/decal/cleanable/xenoblood/B = locate() in contents
if(!B) B = new(src)
B.blood_DNA["UNKNOWN BLOOD"] = "X*"
else if(istype(M, /mob/living/silicon/robot))
var/obj/effect/decal/cleanable/oil/B = locate() in contents
if(!B) B = new(src)
/atom/proc/clean_blood()
if(istype(blood_DNA, /list))
del(blood_DNA)
blood_DNA = null
return 1
+8 -8
View File
@@ -39,7 +39,7 @@
L[DNA_HAIR_COLOR_BLOCK] = sanitize_hexcolor(H.h_color)
L[DNA_FACIAL_HAIR_STYLE_BLOCK] = construct_block(hair_styles_list.Find(H.f_style), facial_hair_styles_list.len)
L[DNA_FACIAL_HAIR_COLOR_BLOCK] = sanitize_hexcolor(H.f_color)
L[DNA_SKIN_TONE_BLOCK] = construct_block(skin_tones.Find(H.s_tone), skin_tones.len)
L[DNA_SKIN_TONE_BLOCK] = construct_block(skin_tones.Find(H.skin_tone), skin_tones.len)
L[DNA_EYE_COLOR_BLOCK] = sanitize_hexcolor(H.eye_color)
for(var/i=1, i<=DNA_UNI_IDENTITY_BLOCKS, i++)
@@ -98,11 +98,11 @@
/proc/check_dna_integrity(mob/living/carbon/character)
if(!istype(character))
return 0
return
if(!character.dna)
if(ready_dna(character))
return 1
return 0
return character.dna
return
if(length(character.dna.uni_identity) != DNA_UNI_IDENTITY_BLOCKS*DNA_BLOCK_SIZE)
character.dna.uni_identity = character.dna.generate_uni_identity(character)
@@ -110,11 +110,11 @@
character.dna.struc_enzymes = character.dna.generate_struc_enzymes()
if(!character.dna.real_name || length(character.dna.unique_enzymes) != DNA_UNIQUE_ENZYMES_LEN)
character.dna.unique_enzymes = character.dna.generate_unique_enzymes(character)
return 1
return character.dna
/proc/ready_dna(mob/living/carbon/character, blood_type)
if(!istype(character, /mob/living/carbon/monkey) && !istype(character, /mob/living/carbon/human))
return 0
return
if(!character.dna)
character.dna = new /datum/dna()
if(blood_type)
@@ -123,7 +123,7 @@
character.dna.uni_identity = character.dna.generate_uni_identity(character)
character.dna.struc_enzymes = character.dna.generate_struc_enzymes(character)
character.dna.unique_enzymes = character.dna.generate_unique_enzymes(character)
return 1
return character.dna
/////////////////////////// DNA DATUM
@@ -211,7 +211,7 @@
var/structure = H.dna.uni_identity
H.h_color = sanitize_hexcolor(getblock(structure, DNA_HAIR_COLOR_BLOCK))
H.f_color = sanitize_hexcolor(getblock(structure, DNA_FACIAL_HAIR_COLOR_BLOCK))
H.s_tone = skin_tones[deconstruct_block(getblock(structure, DNA_SKIN_TONE_BLOCK), skin_tones.len)]
H.skin_tone = skin_tones[deconstruct_block(getblock(structure, DNA_SKIN_TONE_BLOCK), skin_tones.len)]
H.eye_color = sanitize_hexcolor(getblock(structure, DNA_EYE_COLOR_BLOCK))
H.gender = (deconstruct_block(getblock(structure, DNA_GENDER_BLOCK), 2)-1) ? MALE : FEMALE
H.f_style = facial_hair_styles_list[deconstruct_block(getblock(structure, DNA_FACIAL_HAIR_STYLE_BLOCK), facial_hair_styles_list.len)]
+1 -2
View File
@@ -27,14 +27,13 @@
return
/obj/machinery/computer/hologram_comp/proc/render()
var/icon/I = new /icon('icons/mob/human.dmi', "body_m_s")
var/icon/I = new /icon('icons/mob/human.dmi', "[skin_tones[1]]_m_s")
if (src.lumens >= 0)
I.Blend(rgb(src.lumens, src.lumens, src.lumens), ICON_ADD)
else
I.Blend(rgb(- src.lumens, -src.lumens, -src.lumens), ICON_SUBTRACT)
I.Blend(new /icon('icons/mob/human.dmi', "mouth_m_s"), ICON_OVERLAY)
I.Blend(new /icon('icons/mob/underwear.dmi', "Mens White"), ICON_OVERLAY)
var/icon/U = new /icon('icons/mob/human_face.dmi', "hair_a_s")
+11 -14
View File
@@ -1,7 +1,6 @@
/obj/item
name = "item"
icon = 'icons/obj/items.dmi'
var/icon/blood_overlay = null //this saves our blood splatter overlay, which will be processed not to go over the edges of the sprite
var/abstract = 0
var/item_state = null
var/r_speed = 1.0
@@ -385,14 +384,6 @@
if(ishuman(M))
//START HUMAN
var/mob/living/carbon/human/H = M
if(istype(src, /obj/item/clothing/under) || istype(src, /obj/item/clothing/suit))
if(FAT in H.mutations)
if(!(flags & ONESIZEFITSALL))
if(!disable_warning)
H << "\red You're too fat to wear the [name]."
return 0
switch(slot)
if(slot_l_hand)
if(H.l_hand)
@@ -674,8 +665,14 @@
/obj/item/clean_blood()
. = ..()
if(blood_overlay)
overlays.Remove(blood_overlay)
if(istype(src, /obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = src
G.transfer_blood = 0
if(.)
if(initial(icon) && initial(icon_state))
var/index = blood_splatter_index()
var/icon/blood_splatter_icon = blood_splatter_icons[index]
if(blood_splatter_icon)
overlays -= blood_splatter_icon
/obj/item/clothing/gloves/clean_blood()
. = ..()
if(.)
transfer_blood = 0
+5 -5
View File
@@ -50,7 +50,7 @@ datum/preferences
var/h_color = "000" //Hair color
var/f_style = "Shaved" //Face hair type
var/f_color = "000" //Facial hair color
var/s_tone = "caucasian" //Skin color
var/skin_tone = "caucasian" //Skin color
var/eye_color = "000" //Eye color
//Mob preview
@@ -157,7 +157,7 @@ datum/preferences
dat += "<table width='100%'><tr><td width='24%' valign='top'>"
dat += "<b>Blood Type:</b> [b_type]<BR>"
dat += "<b>Skin Tone:</b><BR><span style='border:1px solid #161616; background-color: #[skin_tones[s_tone]];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=s_tone;task=input'>[s_tone]</a><BR>"
dat += "<b>Skin Tone:</b><BR><a href='?_src_=prefs;preference=s_tone;task=input'>[skin_tone]</a><BR>"
dat += "<b>Underwear:</b><BR><a href ='?_src_=prefs;preference=underwear;task=input'>[underwear]</a><BR>"
dat += "<b>Backpack:</b><BR><a href ='?_src_=prefs;preference=bag;task=input'>[backbaglist[backbag]]</a><BR>"
@@ -493,7 +493,7 @@ datum/preferences
if("eyes")
eye_color = random_eye_color()
if("s_tone")
s_tone = random_skin_tone()
skin_tone = random_skin_tone()
if("bag")
backbag = rand(1,3)
if("all")
@@ -564,7 +564,7 @@ datum/preferences
if("s_tone")
var/new_s_tone = input(user, "Choose your character's skin-tone:", "Character Preference") as null|anything in skin_tones
if(new_s_tone)
s_tone = new_s_tone
skin_tone = new_s_tone
if("ooccolor")
var/new_ooccolor = input(user, "Choose your OOC colour:", "Game Preference") as color|null
@@ -667,7 +667,7 @@ datum/preferences
character.h_color = h_color
character.f_color = f_color
character.s_tone = s_tone
character.skin_tone = skin_tone
character.h_style = h_style
character.f_style = f_style
character.underwear = underwear
+3 -3
View File
@@ -163,7 +163,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["hair_color"] >> h_color
S["facial_hair_color"] >> f_color
S["eye_color"] >> eye_color
S["skin_tone"] >> s_tone
S["skin_tone"] >> skin_tone
S["hair_style_name"] >> h_style
S["facial_style_name"] >> f_style
S["underwear"] >> underwear
@@ -203,7 +203,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
h_color = sanitize_hexcolor(h_color, 3, 0)
f_color = sanitize_hexcolor(f_color, 3, 0)
eye_color = sanitize_hexcolor(eye_color, 3, 0)
s_tone = sanitize_inlist(s_tone, skin_tones)
skin_tone = sanitize_inlist(skin_tone, skin_tones)
backbag = sanitize_integer(backbag, 1, backbaglist.len, initial(backbag))
userandomjob = sanitize_integer(userandomjob, 0, 1, initial(userandomjob))
@@ -236,7 +236,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["hair_color"] << h_color
S["facial_hair_color"] << f_color
S["eye_color"] << eye_color
S["skin_tone"] << s_tone
S["skin_tone"] << skin_tone
S["hair_style_name"] << h_style
S["facial_style_name"] << f_style
S["underwear"] << underwear
+1 -1
View File
@@ -229,7 +229,7 @@ proc/check_panel(mob/M)
var/image/stand_icon = null
var/image/currentimage = null
var/icon/base = null
var/s_tone
var/skin_tone
var/mob/living/clone = null
var/image/left
var/image/right
@@ -33,14 +33,6 @@
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
if(prob(70))
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
return
if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
tmob.LAssailant = src
now_pushing = 0
@@ -3,7 +3,7 @@
real_name = "unknown"
voice_name = "unknown"
icon = 'icons/mob/human.dmi'
icon_state = "body_m_s"
icon_state = "caucasian1_m_s"
var/list/hud_list = list()
@@ -66,11 +66,6 @@
slime.UpdateFeed()
return
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
if(prob(40) && !(FAT in src.mutations))
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
return
if(tmob.r_hand && istype(tmob.r_hand, /obj/item/weapon/shield/riot))
if(prob(99))
now_pushing = 0
@@ -10,7 +10,7 @@
//Eye colour
var/eye_color = "000"
var/s_tone = "caucasian" //Skin tone
var/skin_tone = "caucasian1" //Skin tone
var/lip_style = null //no lipstick by default- arguably misleading, as it could be used for general makeup
+2 -6
View File
@@ -755,17 +755,13 @@
if(FAT in mutations)
if(overeatduration < 100)
src << "\blue You feel fit again!"
mutations.Remove(FAT)
update_mutantrace(0)
update_mutations(0)
mutations -= FAT
update_inv_w_uniform(0)
update_inv_wear_suit()
else
if(overeatduration > 500)
src << "\red You suddenly feel blubbery!"
mutations.Add(FAT)
update_mutantrace(0)
update_mutations(0)
mutations |= FAT
update_inv_w_uniform(0)
update_inv_wear_suit()
@@ -123,6 +123,18 @@ Please contact me on #coderbus IRC. ~Carn x
var/list/overlays_lying[TOTAL_LAYERS]
var/list/overlays_standing[TOTAL_LAYERS]
/mob/living/carbon/human/proc/apply_overlay(cache_index)
var/image/I = lying ? overlays_lying[cache_index] : overlays_standing[cache_index]
if(I)
overlays += I
/mob/living/carbon/human/proc/remove_overlay(cache_index)
if(overlays_lying[cache_index])
overlays -= overlays_lying[cache_index]
overlays_lying[cache_index] = null
if(overlays_standing[cache_index])
overlays -= overlays_standing[cache_index]
overlays_standing[cache_index] = null
//UPDATES OVERLAYS FROM OVERLAYS_LYING/OVERLAYS_STANDING
//this proc is messy as I was forced to include some old laggy cloaking code to it so that I don't break cloakers
@@ -162,11 +174,14 @@ Please contact me on #coderbus IRC. ~Carn x
//DAMAGE OVERLAYS
//constructs damage icon for each organ from mask * damage field and saves it in our overlays_ lists
/mob/living/carbon/human/UpdateDamageIcon(var/update_icons=1)
overlays -= overlays_lying[DAMAGE_LAYER]
overlays -= overlays_standing[DAMAGE_LAYER]
/mob/living/carbon/human/UpdateDamageIcon(update_icons=0)
remove_overlay(DAMAGE_LAYER)
var/image/standing = image("icon" = 'icons/mob/dam_human.dmi', "icon_state" = "blank", "layer" = -DAMAGE_LAYER)
var/image/lying = image("icon" = 'icons/mob/dam_human.dmi', "icon_state" = "blank2", "layer" = -DAMAGE_LAYER)
overlays_standing[DAMAGE_LAYER] = standing
overlays_lying[DAMAGE_LAYER] = lying
for(var/datum/limb/O in organs)
if(O.brutestate)
standing.overlays += "[O.icon_name]_[O.brutestate]0" //we're adding icon_states of the base image as overlays
@@ -174,79 +189,59 @@ Please contact me on #coderbus IRC. ~Carn x
if(O.burnstate)
standing.overlays += "[O.icon_name]_0[O.burnstate]"
lying.overlays += "[O.icon_name]2_0[O.burnstate]"
overlays_standing[DAMAGE_LAYER] = standing
overlays_lying[DAMAGE_LAYER] = lying
if (src.lying)
overlays += overlays_lying[DAMAGE_LAYER]
else
overlays += overlays_standing[DAMAGE_LAYER]
apply_overlay(DAMAGE_LAYER)
if(update_icons) update_icons()
//BASE MOB SPRITE
/mob/living/carbon/human/proc/update_body(var/update_icons=1)
if(stand_icon) del(stand_icon)
if(lying_icon) del(lying_icon)
/mob/living/carbon/human/proc/update_body(update_icons=0)
stand_icon = null
lying_icon = null
if(dna && dna.mutantrace) return
var/husk = (HUSK in src.mutations) //100% unnecessary -Agouri //nope, do you really want to iterate through src.mutations repeatedly? -Pete
var/fat = (FAT in src.mutations)
var/skeleton = (SKELETON in src.mutations)
var/g = "m"
if(gender == FEMALE) g = "f"
var/base_icon_state
//Base mob icon
if(husk)
stand_icon = new /icon('icons/mob/human.dmi', "husk_s")
lying_icon = new /icon('icons/mob/human.dmi', "husk_l")
else if(fat)
stand_icon = new /icon('icons/mob/human.dmi', "fatbody_s")
lying_icon = new /icon('icons/mob/human.dmi', "fatbody_l")
else if(skeleton)
stand_icon = new /icon('icons/mob/human.dmi', "skeleton_s")
lying_icon = new /icon('icons/mob/human.dmi', "skeleton_l")
if(skeleton)
base_icon_state = "skeleton"
else
stand_icon = new /icon('icons/mob/human.dmi', "body_[g]_s")
lying_icon = new /icon('icons/mob/human.dmi', "body_[g]_l")
if(HUSK in src.mutations)
base_icon_state = "husk"
else
base_icon_state = "[skin_tone]_[(gender == FEMALE) ? "f" : "m"]"
stand_icon = icon('icons/mob/human.dmi', "[base_icon_state]_s")
lying_icon = icon('icons/mob/human.dmi', "[base_icon_state]_l")
//Skin tone
if(!skeleton)
var/color = skin_tones[s_tone]
if(color)
color = "#" + color
stand_icon.Blend(color, ICON_MULTIPLY)
lying_icon.Blend(color, ICON_MULTIPLY)
//Mouth (lipstick!)
if(lip_style) //skeletons are allowed to wear lipstick no matter what you think, agouri.
stand_icon.Blend(icon('icons/mob/human_face.dmi', "lips_[lip_style]_s"), ICON_OVERLAY)
lying_icon.Blend(icon('icons/mob/human_face.dmi', "lips_[lip_style]_l"), ICON_OVERLAY)
//Eyes
var/icon/eyes_s = new/icon('icons/mob/human_face.dmi', "eyes_s")
var/icon/eyes_l = new/icon('icons/mob/human_face.dmi', "eyes_l")
if(!skeleton)
var/icon/eyes_s = icon('icons/mob/human_face.dmi', "eyes_s")
var/icon/eyes_l = icon('icons/mob/human_face.dmi', "eyes_l")
eyes_s.Blend("#[eye_color]", ICON_ADD)
eyes_l.Blend("#[eye_color]", ICON_ADD)
stand_icon.Blend(eyes_s, ICON_OVERLAY)
lying_icon.Blend(eyes_l, ICON_OVERLAY)
//Mouth (lipstick!)
if(lip_style) //skeletons are allowed to wear lipstick no matter what you think, agouri.
stand_icon.Blend(new/icon('icons/mob/human_face.dmi', "lips_[lip_style]_s"), ICON_OVERLAY)
lying_icon.Blend(new/icon('icons/mob/human_face.dmi', "lips_[lip_style]_l"), ICON_OVERLAY)
//Underwear
if(underwear && !fat && !skeleton)
var/datum/sprite_accessory/underwear/U = underwear_all[underwear]
if(U)
stand_icon.Blend(new /icon(U.icon, "[U.icon_state]_s"), ICON_OVERLAY)
lying_icon.Blend(new /icon(U.icon, "[U.icon_state]_l"), ICON_OVERLAY)
//Underwear
if(underwear)
var/datum/sprite_accessory/underwear/U = underwear_all[underwear]
if(U)
stand_icon.Blend(icon(U.icon, "[U.icon_state]_s"), ICON_OVERLAY)
lying_icon.Blend(icon(U.icon, "[U.icon_state]_l"), ICON_OVERLAY)
if(update_icons) update_icons()
//HAIR OVERLAY
/mob/living/carbon/human/proc/update_hair(var/update_icons=1)
/mob/living/carbon/human/proc/update_hair(update_icons=0)
//Reset our hair
overlays -= overlays_lying[HAIR_LAYER]
overlays -= overlays_standing[HAIR_LAYER]
overlays_standing[HAIR_LAYER] = null
overlays_lying[HAIR_LAYER] = null
remove_overlay(HAIR_LAYER)
//mutants don't have hair. masks and helmets can obscure our hair too.
if( (dna && dna.mutantrace) || (head && (head.flags & BLOCKHAIR)) || (wear_mask && (wear_mask.flags & BLOCKHAIR)) )
@@ -286,20 +281,11 @@ Please contact me on #coderbus IRC. ~Carn x
overlays_lying[HAIR_LAYER] = image(face_lying, "layer" = -HAIR_LAYER)
overlays_standing[HAIR_LAYER] = image(face_standing, "layer" = -HAIR_LAYER)
if (src.lying)
overlays += overlays_lying[HAIR_LAYER]
else
overlays += overlays_standing[HAIR_LAYER]
apply_overlay(HAIR_LAYER)
if(update_icons) update_icons()
/mob/living/carbon/human/update_mutations(var/update_icons=1)
overlays -= overlays_lying[MUTATIONS_LAYER]
overlays -= overlays_standing[MUTATIONS_LAYER]
var/fat
if(FAT in mutations)
fat = "fat"
/mob/living/carbon/human/update_mutations(update_icons=0)
remove_overlay(MUTATIONS_LAYER)
var/image/lying = image("icon" = 'icons/effects/genetics.dmi', "layer" = -MUTATIONS_LAYER)
var/image/standing = image("icon" = 'icons/effects/genetics.dmi', "layer" = -MUTATIONS_LAYER)
@@ -309,20 +295,16 @@ Please contact me on #coderbus IRC. ~Carn x
for(var/mut in mutations)
switch(mut)
if(HULK)
if(fat)
lying.underlays += "hulk_[fat]_l"
standing.underlays += "hulk_[fat]_s"
else
lying.underlays += "hulk_[g]_l"
standing.underlays += "hulk_[g]_s"
lying.underlays += "hulk_[g]_l"
standing.underlays += "hulk_[g]_s"
add_image = 1
if(COLD_RESISTANCE)
lying.underlays += "fire[fat]_l"
standing.underlays += "fire[fat]_s"
lying.underlays += "fire_l"
standing.underlays += "fire_s"
add_image = 1
if(TK)
lying.underlays += "telekinesishead[fat]_l"
standing.underlays += "telekinesishead[fat]_s"
lying.underlays += "telekinesishead_l"
standing.underlays += "telekinesishead_s"
add_image = 1
if(LASER)
lying.overlays += "lasereyes_l"
@@ -331,43 +313,30 @@ Please contact me on #coderbus IRC. ~Carn x
if(add_image)
overlays_lying[MUTATIONS_LAYER] = lying
overlays_standing[MUTATIONS_LAYER] = standing
if (src.lying)
overlays += overlays_lying[MUTATIONS_LAYER]
else
overlays += overlays_standing[MUTATIONS_LAYER]
else
overlays -= overlays_lying[MUTATIONS_LAYER]
overlays -= overlays_standing[MUTATIONS_LAYER]
overlays_lying[MUTATIONS_LAYER] = null
overlays_standing[MUTATIONS_LAYER] = null
apply_overlay(MUTATIONS_LAYER)
if(update_icons) update_icons()
/mob/living/carbon/human/proc/update_mutantrace(var/update_icons=1)
overlays -= overlays_lying[MUTANTRACE_LAYER]
overlays -= overlays_standing[MUTANTRACE_LAYER]
var/fat
if( FAT in mutations )
fat = "fat"
/mob/living/carbon/human/proc/update_mutantrace(update_icons=0)
remove_overlay(MUTANTRACE_LAYER)
if(dna)
switch(dna.mutantrace)
if("lizard","golem","slime","shadow","adamantine", "fly")
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_l", "layer" = -MUTANTRACE_LAYER)
overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_s", "layer" = -MUTANTRACE_LAYER)
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace]_[gender]_l", "layer" = -MUTANTRACE_LAYER)
overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace]_[gender]_s", "layer" = -MUTANTRACE_LAYER)
if("plant")
if(stat == DEAD) //TODO
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace]_d", "layer" = -MUTANTRACE_LAYER)
else
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_l", "layer" = -MUTANTRACE_LAYER)
overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_s", "layer" = -MUTANTRACE_LAYER)
else
overlays -= overlays_lying[MUTANTRACE_LAYER]
overlays -= overlays_standing[MUTANTRACE_LAYER]
overlays_lying[MUTANTRACE_LAYER] = null
overlays_standing[MUTANTRACE_LAYER] = null
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace]_[gender]_l", "layer" = -MUTANTRACE_LAYER)
overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace]_[gender]_s", "layer" = -MUTANTRACE_LAYER)
update_body(0)
update_hair(0)
apply_overlay(MUTANTRACE_LAYER)
if(update_icons) update_icons()
/* --------------------------------------- */
@@ -401,306 +370,214 @@ Please contact me on #coderbus IRC. ~Carn x
/* --------------------------------------- */
//vvvvvv UPDATE_INV PROCS vvvvvv
/mob/living/carbon/human/update_inv_w_uniform(var/update_icons=1)
if(w_uniform && istype(w_uniform, /obj/item/clothing/under) )
/mob/living/carbon/human/update_inv_w_uniform(update_icons=0)
remove_overlay(UNIFORM_LAYER)
if(istype(w_uniform, /obj/item/clothing/under))
var/obj/item/clothing/under/U = w_uniform
if(client && hud_used && hud_used.hud_shown && hud_used.inventory_shown)
w_uniform.screen_loc = ui_iclothing
client.screen += w_uniform
overlays -= overlays_lying[UNIFORM_LAYER]
overlays -= overlays_standing[UNIFORM_LAYER]
var/t_color = w_uniform.color
if(!t_color) t_color = icon_state
var/image/lying = image("icon_state" = "[t_color]_l", "layer" = -UNIFORM_LAYER)
var/image/standing = image("icon_state" = "[t_color]_s", "layer" = -UNIFORM_LAYER)
if(FAT in mutations)
if(w_uniform.flags&ONESIZEFITSALL)
lying.icon = 'icons/mob/uniform_fat.dmi'
standing.icon = 'icons/mob/uniform_fat.dmi'
else
src << "\red You burst out of \the [w_uniform]!"
drop_from_inventory(w_uniform)
return
else
lying.icon = 'icons/mob/uniform.dmi'
standing.icon = 'icons/mob/uniform.dmi'
var/image/lying = image("icon" = 'icons/mob/uniform.dmi', "icon_state" = "[t_color]_l", "layer" = -UNIFORM_LAYER)
var/image/standing = image("icon" = 'icons/mob/uniform.dmi', "icon_state" = "[t_color]_s", "layer" = -UNIFORM_LAYER)
overlays_lying[UNIFORM_LAYER] = lying
overlays_standing[UNIFORM_LAYER] = standing
if(w_uniform.blood_DNA)
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "uniformblood2")
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "uniformblood")
if(w_uniform:hastie) //WE CHECKED THE TYPE ABOVE. THIS REALLY SHOULD BE FINE.
var/tie_color = w_uniform:hastie.color
if(!tie_color) tie_color = w_uniform:hastie.icon_state
if(U.hastie)
var/tie_color = U.hastie.color
if(!tie_color) tie_color = U.hastie.icon_state
lying.overlays += image("icon" = 'icons/mob/ties.dmi', "icon_state" = "[tie_color]2")
standing.overlays += image("icon" = 'icons/mob/ties.dmi', "icon_state" = "[tie_color]")
overlays_lying[UNIFORM_LAYER] = lying
overlays_standing[UNIFORM_LAYER] = standing
if (src.lying)
overlays += overlays_lying[UNIFORM_LAYER]
else
overlays += overlays_standing[UNIFORM_LAYER]
else
overlays -= overlays_lying[UNIFORM_LAYER]
overlays -= overlays_standing[UNIFORM_LAYER]
overlays_lying[UNIFORM_LAYER] = null
overlays_standing[UNIFORM_LAYER] = null
// Automatically drop anything in store / id / belt if you're not wearing a uniform. //CHECK IF NECESARRY
for( var/obj/item/thing in list(r_store, l_store, wear_id, belt) ) //
if(thing) //
u_equip(thing) //
if (client) //
client.screen -= thing //
//
if (thing) //
thing.loc = loc //
thing.dropped(src) //
thing.layer = initial(thing.layer)
for(var/obj/item/thing in list(r_store, l_store, wear_id, belt)) //
drop_from_inventory(thing)
apply_overlay(UNIFORM_LAYER)
if(update_icons) update_icons()
/mob/living/carbon/human/update_inv_wear_id(var/update_icons=1)
/mob/living/carbon/human/update_inv_wear_id(update_icons=0)
remove_overlay(ID_LAYER)
if(wear_id)
if(client && hud_used && hud_used.hud_shown)
wear_id.screen_loc = ui_id //TODO
client.screen += wear_id
overlays -= overlays_lying[ID_LAYER]
overlays -= overlays_standing[ID_LAYER]
overlays_lying[ID_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "id2", "layer" = -ID_LAYER)
overlays_standing[ID_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "id", "layer" = -ID_LAYER)
if (src.lying)
overlays += overlays_lying[ID_LAYER]
else
overlays += overlays_standing[ID_LAYER]
else
overlays -= overlays_lying[ID_LAYER]
overlays -= overlays_standing[ID_LAYER]
overlays_lying[ID_LAYER] = null
overlays_standing[ID_LAYER] = null
apply_overlay(ID_LAYER)
if(update_icons) update_icons()
/mob/living/carbon/human/update_inv_gloves(var/update_icons=1)
/mob/living/carbon/human/update_inv_gloves(update_icons=0)
remove_overlay(GLOVES_LAYER)
if(gloves)
if(client && hud_used && hud_used.hud_shown && hud_used.inventory_shown)
gloves.screen_loc = ui_gloves
client.screen += gloves
overlays -= overlays_lying[GLOVES_LAYER]
overlays -= overlays_standing[GLOVES_LAYER]
var/t_state = gloves.item_state
if(!t_state) t_state = gloves.icon_state
var/image/lying = image("icon" = 'icons/mob/hands.dmi', "icon_state" = "[t_state]2", "layer" = -GLOVES_LAYER)
var/image/standing = image("icon" = 'icons/mob/hands.dmi', "icon_state" = "[t_state]", "layer" = -GLOVES_LAYER)
overlays_lying[GLOVES_LAYER] = lying
overlays_standing[GLOVES_LAYER] = standing
if(gloves.blood_DNA)
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "bloodyhands2")
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "bloodyhands")
overlays_lying[GLOVES_LAYER] = lying
overlays_standing[GLOVES_LAYER] = standing
if (src.lying)
overlays += overlays_lying[GLOVES_LAYER]
else
overlays += overlays_standing[GLOVES_LAYER]
else
if(blood_DNA)
overlays_lying[GLOVES_LAYER] = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "bloodyhands2")
overlays_standing[GLOVES_LAYER] = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "bloodyhands")
else
overlays -= overlays_lying[GLOVES_LAYER]
overlays -= overlays_standing[GLOVES_LAYER]
overlays_lying[GLOVES_LAYER] = null
overlays_standing[GLOVES_LAYER] = null
apply_overlay(GLOVES_LAYER)
if(update_icons) update_icons()
/mob/living/carbon/human/update_inv_glasses(var/update_icons=1)
/mob/living/carbon/human/update_inv_glasses(update_icons=0)
remove_overlay(GLASSES_LAYER)
if(glasses)
if(client && hud_used && hud_used.hud_shown && hud_used.inventory_shown)
glasses.screen_loc = ui_glasses
client.screen += glasses
overlays -= overlays_lying[GLASSES_LAYER]
overlays -= overlays_standing[GLASSES_LAYER]
overlays_lying[GLASSES_LAYER] = image("icon" = 'icons/mob/eyes.dmi', "icon_state" = "[glasses.icon_state]2", "layer" = -GLASSES_LAYER)
overlays_standing[GLASSES_LAYER] = image("icon" = 'icons/mob/eyes.dmi', "icon_state" = "[glasses.icon_state]", "layer" = -GLASSES_LAYER)
if (src.lying)
overlays += overlays_lying[GLASSES_LAYER]
else
overlays += overlays_standing[GLASSES_LAYER]
else
overlays -= overlays_lying[GLASSES_LAYER]
overlays -= overlays_standing[GLASSES_LAYER]
overlays_lying[GLASSES_LAYER] = null
overlays_standing[GLASSES_LAYER] = null
apply_overlay(GLASSES_LAYER)
if(update_icons) update_icons()
/mob/living/carbon/human/update_inv_ears(var/update_icons=1)
/mob/living/carbon/human/update_inv_ears(update_icons=0)
remove_overlay(EARS_LAYER)
if(ears)
if(client && hud_used && hud_used.hud_shown && hud_used.inventory_shown)
ears.screen_loc = ui_ears
client.screen += ears
overlays -= overlays_lying[EARS_LAYER]
overlays -= overlays_standing[EARS_LAYER]
overlays_lying[EARS_LAYER] = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[ears.icon_state]2", "layer" = -EARS_LAYER)
overlays_standing[EARS_LAYER] = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[ears.icon_state]", "layer" = -EARS_LAYER)
if (src.lying)
overlays += overlays_lying[EARS_LAYER]
else
overlays += overlays_standing[EARS_LAYER]
else
overlays -= overlays_lying[EARS_LAYER]
overlays -= overlays_standing[EARS_LAYER]
overlays_lying[EARS_LAYER] = null
overlays_standing[EARS_LAYER] = null
apply_overlay(EARS_LAYER)
if(update_icons) update_icons()
/mob/living/carbon/human/update_inv_shoes(var/update_icons=1)
/mob/living/carbon/human/update_inv_shoes(update_icons=0)
remove_overlay(SHOES_LAYER)
if(shoes)
if(client && hud_used && hud_used.hud_shown && hud_used.inventory_shown)
shoes.screen_loc = ui_shoes
client.screen += shoes
var/image/lying = image("icon" = 'icons/mob/feet.dmi', "icon_state" = "[shoes.icon_state]2", "layer" = -SHOES_LAYER)
var/image/standing = image("icon" = 'icons/mob/feet.dmi', "icon_state" = "[shoes.icon_state]", "layer" = -SHOES_LAYER)
overlays_lying[SHOES_LAYER] = lying
overlays_standing[SHOES_LAYER] = standing
if(shoes.blood_DNA)
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "shoeblood2")
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "shoeblood")
overlays -= overlays_lying[SHOES_LAYER]
overlays -= overlays_standing[SHOES_LAYER]
overlays_lying[SHOES_LAYER] = lying
overlays_standing[SHOES_LAYER] = standing
if (src.lying)
overlays += overlays_lying[SHOES_LAYER]
else
overlays += overlays_standing[SHOES_LAYER]
else
overlays -= overlays_lying[SHOES_LAYER]
overlays -= overlays_standing[SHOES_LAYER]
overlays_lying[SHOES_LAYER] = null
overlays_standing[SHOES_LAYER] = null
apply_overlay(SHOES_LAYER)
if(update_icons) update_icons()
/mob/living/carbon/human/update_inv_s_store(var/update_icons=1)
/mob/living/carbon/human/update_inv_s_store(update_icons=0)
remove_overlay(SUIT_STORE_LAYER)
if(s_store)
if(client && hud_used && hud_used.hud_shown)
s_store.screen_loc = ui_sstore1 //TODO
client.screen += s_store
overlays -= overlays_lying[SUIT_STORE_LAYER]
overlays -= overlays_standing[SUIT_STORE_LAYER]
var/t_state = s_store.item_state
if(!t_state) t_state = s_store.icon_state
overlays_lying[SUIT_STORE_LAYER] = image("icon" = 'icons/mob/belt_mirror.dmi', "icon_state" = "[t_state]2", "layer" = -SUIT_STORE_LAYER)
overlays_standing[SUIT_STORE_LAYER] = image("icon" = 'icons/mob/belt_mirror.dmi', "icon_state" = "[t_state]", "layer" = -SUIT_STORE_LAYER)
if (src.lying)
overlays += overlays_lying[SUIT_STORE_LAYER]
else
overlays += overlays_standing[SUIT_STORE_LAYER]
else
overlays -= overlays_lying[SUIT_STORE_LAYER]
overlays -= overlays_standing[SUIT_STORE_LAYER]
overlays_lying[SUIT_STORE_LAYER] = null
overlays_standing[SUIT_STORE_LAYER] = null
apply_overlay(SUIT_STORE_LAYER)
if(update_icons) update_icons()
/mob/living/carbon/human/update_inv_head(var/update_icons=1)
/mob/living/carbon/human/update_inv_head(update_icons=0)
remove_overlay(HEAD_LAYER)
if(head)
if(client && hud_used && hud_used.hud_shown && hud_used.inventory_shown)
head.screen_loc = ui_head //TODO
client.screen += head
overlays -= overlays_lying[HEAD_LAYER]
overlays -= overlays_standing[HEAD_LAYER]
var/image/lying
var/image/standing
if(istype(head,/obj/item/clothing/head/kitty))
lying = image("icon" = head:mob2, "layer" = -HEAD_LAYER)
standing = image("icon" = head:mob, "layer" = -HEAD_LAYER)
var/obj/item/clothing/head/kitty/K = head
lying = image("icon" = K.mob2, "layer" = -HEAD_LAYER)
standing = image("icon" = K.mob, "layer" = -HEAD_LAYER)
else
lying = image("icon" = 'icons/mob/head.dmi', "icon_state" = "[head.icon_state]2", "layer" = -HEAD_LAYER)
standing = image("icon" = 'icons/mob/head.dmi', "icon_state" = "[head.icon_state]", "layer" = -HEAD_LAYER)
overlays_lying[HEAD_LAYER] = lying
overlays_standing[HEAD_LAYER] = standing
if(head.blood_DNA)
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "helmetblood2")
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "helmetblood")
overlays_lying[HEAD_LAYER] = lying
overlays_standing[HEAD_LAYER] = standing
if (src.lying)
overlays += overlays_lying[HEAD_LAYER]
else
overlays += overlays_standing[HEAD_LAYER]
else
overlays -= overlays_lying[HEAD_LAYER]
overlays -= overlays_standing[HEAD_LAYER]
overlays_lying[HEAD_LAYER] = null
overlays_standing[HEAD_LAYER] = null
apply_overlay(HEAD_LAYER)
if(update_icons) update_icons()
/mob/living/carbon/human/update_inv_belt(var/update_icons=1)
/mob/living/carbon/human/update_inv_belt(update_icons=0)
remove_overlay(BELT_LAYER)
if(belt)
if(client && hud_used && hud_used.hud_shown)
belt.screen_loc = ui_belt //TODO
belt.screen_loc = ui_belt
client.screen += belt
overlays -= overlays_lying[BELT_LAYER]
overlays -= overlays_standing[BELT_LAYER]
var/t_state = belt.item_state
if(!t_state) t_state = belt.icon_state
overlays_lying[BELT_LAYER] = image("icon" = 'icons/mob/belt.dmi', "icon_state" = "[t_state]2", "layer" = -BELT_LAYER)
overlays_standing[BELT_LAYER] = image("icon" = 'icons/mob/belt.dmi', "icon_state" = "[t_state]", "layer" = -BELT_LAYER)
if (src.lying)
overlays += overlays_lying[BELT_LAYER]
else
overlays += overlays_standing[BELT_LAYER]
else
overlays -= overlays_lying[BELT_LAYER]
overlays -= overlays_standing[BELT_LAYER]
overlays_lying[BELT_LAYER] = null
overlays_standing[BELT_LAYER] = null
apply_overlay(BELT_LAYER)
if(update_icons) update_icons()
/mob/living/carbon/human/update_inv_wear_suit(var/update_icons=1)
if( wear_suit && istype(wear_suit, /obj/item/clothing/suit) ) //TODO check this
/mob/living/carbon/human/update_inv_wear_suit(update_icons=0)
remove_overlay(SUIT_LAYER)
if(istype(wear_suit, /obj/item/clothing/suit))
if(client && hud_used && hud_used.hud_shown && hud_used.inventory_shown)
wear_suit.screen_loc = ui_oclothing //TODO
client.screen += wear_suit
overlays -= overlays_lying[SUIT_LAYER]
overlays -= overlays_standing[SUIT_LAYER]
var/image/lying = image("icon" = 'icons/mob/suit.dmi', "icon_state" = "[wear_suit.icon_state]2", "layer" = -SUIT_LAYER)
var/image/standing = image("icon" = 'icons/mob/suit.dmi', "icon_state" = "[wear_suit.icon_state]", "layer" = -SUIT_LAYER)
if(FAT in mutations)
if(!wear_suit.flags&ONESIZEFITSALL)
src << "\red You burst out of \the [wear_suit]!"
var/obj/item/clothing/c = wear_suit
wear_suit = null
if(client)
client.screen -= c
c.loc = loc
c.dropped(src)
c.layer = initial(c.layer)
lying = null
standing = null
else
if( istype(wear_suit, /obj/item/clothing/suit/straight_jacket) )
drop_from_inventory(handcuffed)
drop_l_hand()
drop_r_hand()
if(wear_suit.blood_DNA)
var/obj/item/clothing/suit/S = wear_suit
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[S.blood_overlay_type]blood2")
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[S.blood_overlay_type]blood")
overlays_lying[SUIT_LAYER] = lying
overlays_standing[SUIT_LAYER] = standing
if (src.lying)
overlays += overlays_lying[SUIT_LAYER]
else
overlays += overlays_standing[SUIT_LAYER]
else
overlays -= overlays_lying[SUIT_LAYER]
overlays -= overlays_standing[SUIT_LAYER]
overlays_lying[SUIT_LAYER] = null
overlays_standing[SUIT_LAYER] = null
if(istype(wear_suit, /obj/item/clothing/suit/straight_jacket))
drop_from_inventory(handcuffed)
drop_l_hand()
drop_r_hand()
if(wear_suit.blood_DNA)
var/obj/item/clothing/suit/S = wear_suit
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[S.blood_overlay_type]blood2")
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[S.blood_overlay_type]blood")
apply_overlay(SUIT_LAYER)
if(update_icons) update_icons()
/mob/living/carbon/human/update_inv_pockets(var/update_icons=1)
/mob/living/carbon/human/update_inv_pockets(update_icons=0)
if(l_store)
if(client && hud_used && hud_used.hud_shown)
l_store.screen_loc = ui_storage1 //TODO
@@ -712,50 +589,39 @@ Please contact me on #coderbus IRC. ~Carn x
if(update_icons) update_icons()
/mob/living/carbon/human/update_inv_wear_mask(var/update_icons=1)
if( wear_mask && istype(wear_mask, /obj/item/clothing/mask) )
/mob/living/carbon/human/update_inv_wear_mask(update_icons=0)
remove_overlay(FACEMASK_LAYER)
if(istype(wear_mask, /obj/item/clothing/mask))
if(client && hud_used && hud_used.hud_shown && hud_used.inventory_shown)
wear_mask.screen_loc = ui_mask //TODO
client.screen += wear_mask
overlays -= overlays_lying[FACEMASK_LAYER]
overlays -= overlays_standing[FACEMASK_LAYER]
var/image/lying = image("icon" = 'icons/mob/mask.dmi', "icon_state" = "[wear_mask.icon_state]2", "layer" = -FACEMASK_LAYER)
var/image/standing = image("icon" = 'icons/mob/mask.dmi', "icon_state" = "[wear_mask.icon_state]", "layer" = -FACEMASK_LAYER)
if( !istype(wear_mask, /obj/item/clothing/mask/cigarette) && wear_mask.blood_DNA )
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "maskblood2")
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "maskblood")
overlays_lying[FACEMASK_LAYER] = lying
overlays_standing[FACEMASK_LAYER] = standing
if (src.lying)
overlays += overlays_lying[FACEMASK_LAYER]
else
overlays += overlays_standing[FACEMASK_LAYER]
else
overlays -= overlays_lying[FACEMASK_LAYER]
overlays -= overlays_standing[FACEMASK_LAYER]
overlays_lying[FACEMASK_LAYER] = null
overlays_standing[FACEMASK_LAYER] = null
if(wear_mask.blood_DNA && !istype(wear_mask, /obj/item/clothing/mask/cigarette))
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "maskblood2")
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "maskblood")
apply_overlay(FACEMASK_LAYER)
if(update_icons) update_icons()
/mob/living/carbon/human/update_inv_back(var/update_icons=1)
/mob/living/carbon/human/update_inv_back(update_icons=0)
remove_overlay(BACK_LAYER)
if(back)
if(client && hud_used && hud_used.hud_shown)
back.screen_loc = ui_back //TODO
client.screen += back
overlays -= overlays_lying[BACK_LAYER]
overlays -= overlays_standing[BACK_LAYER]
overlays_lying[BACK_LAYER] = image("icon" = 'icons/mob/back.dmi', "icon_state" = "[back.icon_state]2", "layer" = -BACK_LAYER)
overlays_standing[BACK_LAYER] = image("icon" = 'icons/mob/back.dmi', "icon_state" = "[back.icon_state]", "layer" = -BACK_LAYER)
if (src.lying)
overlays += overlays_lying[BACK_LAYER]
else
overlays += overlays_standing[BACK_LAYER]
else
overlays -= overlays_lying[BACK_LAYER]
overlays -= overlays_standing[BACK_LAYER]
overlays_lying[BACK_LAYER] = null
overlays_standing[BACK_LAYER] = null
apply_overlay(BACK_LAYER)
if(update_icons) update_icons()
@@ -766,7 +632,9 @@ Please contact me on #coderbus IRC. ~Carn x
hud_used.hidden_inventory_update() //Updates the screenloc of the items on the 'other' inventory bar
/mob/living/carbon/human/update_inv_handcuffed(var/update_icons=1)
/mob/living/carbon/human/update_inv_handcuffed(update_icons=0)
remove_overlay(HANDCUFF_LAYER)
if(handcuffed)
drop_r_hand()
drop_l_hand()
@@ -776,78 +644,66 @@ Please contact me on #coderbus IRC. ~Carn x
var/obj/screen/inventory/L = hud_used.adding[4]
R.overlays += image("icon" = 'icons/mob/screen_gen.dmi', "icon_state" = "markus")
L.overlays += image("icon" = 'icons/mob/screen_gen.dmi', "icon_state" = "gabrielle")
overlays -= overlays_lying[HANDCUFF_LAYER]
overlays -= overlays_standing[HANDCUFF_LAYER]
overlays_lying[HANDCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "handcuff2", "layer" = -HANDCUFF_LAYER)
overlays_standing[HANDCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "handcuff1", "layer" = -HANDCUFF_LAYER)
if(src.lying)
overlays += overlays_lying[HANDCUFF_LAYER]
else
overlays += overlays_standing[HANDCUFF_LAYER]
else
if(hud_used)
var/obj/screen/inventory/R = hud_used.adding[3]
var/obj/screen/inventory/L = hud_used.adding[4]
R.overlays = null
L.overlays = null
overlays -= overlays_lying[HANDCUFF_LAYER]
overlays -= overlays_standing[HANDCUFF_LAYER]
overlays_lying[HANDCUFF_LAYER] = null
overlays_standing[HANDCUFF_LAYER] = null
apply_overlay(HANDCUFF_LAYER)
if(update_icons) update_icons()
/mob/living/carbon/human/update_inv_legcuffed(var/update_icons=1)
/mob/living/carbon/human/update_inv_legcuffed(update_icons=0)
remove_overlay(LEGCUFF_LAYER)
if(legcuffed)
overlays -= overlays_lying[LEGCUFF_LAYER]
overlays -= overlays_standing[LEGCUFF_LAYER]
overlays_lying[LEGCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "legcuff2", "layer" = -LEGCUFF_LAYER)
overlays_standing[LEGCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "legcuff1", "layer" = -LEGCUFF_LAYER)
if(src.lying)
overlays += overlays_lying[LEGCUFF_LAYER]
else
overlays += overlays_standing[LEGCUFF_LAYER]
if(src.m_intent != "walk")
src.m_intent = "walk"
if(src.hud_used && src.hud_used.move_intent)
src.hud_used.move_intent.icon_state = "walking"
overlays_lying[LEGCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "legcuff2", "layer" = -LEGCUFF_LAYER)
overlays_standing[LEGCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "legcuff1", "layer" = -LEGCUFF_LAYER)
else
overlays -= overlays_lying[LEGCUFF_LAYER]
overlays -= overlays_standing[LEGCUFF_LAYER]
overlays_lying[LEGCUFF_LAYER] = null
overlays_standing[LEGCUFF_LAYER] = null
apply_overlay(LEGCUFF_LAYER)
if(update_icons) update_icons()
/mob/living/carbon/human/update_inv_r_hand(var/update_icons=1)
/mob/living/carbon/human/update_inv_r_hand(update_icons=0)
remove_overlay(R_HAND_LAYER)
if(r_hand)
if(client)
r_hand.screen_loc = ui_rhand //TODO
client.screen += r_hand
var/t_state = r_hand.item_state
if(!t_state) t_state = r_hand.icon_state
overlays -= overlays_standing[R_HAND_LAYER]
overlays_standing[R_HAND_LAYER] = image("icon" = 'icons/mob/items_righthand.dmi', "icon_state" = "[t_state]", "layer" = -R_HAND_LAYER)
overlays += overlays_standing[R_HAND_LAYER]
else
overlays -= overlays_standing[R_HAND_LAYER]
overlays_standing[R_HAND_LAYER] = null
apply_overlay(R_HAND_LAYER)
if(update_icons) update_icons()
/mob/living/carbon/human/update_inv_l_hand(var/update_icons=1)
/mob/living/carbon/human/update_inv_l_hand(update_icons=0)
remove_overlay(L_HAND_LAYER)
if(l_hand)
if(client)
l_hand.screen_loc = ui_lhand //TODO
client.screen += l_hand
var/t_state = l_hand.item_state
if(!t_state) t_state = l_hand.icon_state
overlays -= overlays_standing[L_HAND_LAYER]
overlays_standing[L_HAND_LAYER] = image("icon" = 'icons/mob/items_lefthand.dmi', "icon_state" = "[t_state]", "layer" = -L_HAND_LAYER)
overlays += overlays_standing[L_HAND_LAYER]
else
overlays -= overlays_standing[L_HAND_LAYER]
overlays_standing[L_HAND_LAYER] = null
apply_overlay(L_HAND_LAYER)
if(update_icons) update_icons()
//Human Overlays Indexes/////////
@@ -47,11 +47,6 @@
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if(istype(tmob, /mob/living/carbon/human) && (HULK in tmob.mutations))
if(prob(70))
usr << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
return
if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
@@ -327,11 +327,6 @@
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
if(prob(20))
usr << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
return
if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
@@ -60,11 +60,6 @@
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
if(prob(5))
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
return
if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
@@ -326,11 +326,6 @@
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
if(prob(70))
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
return
if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
@@ -140,7 +140,7 @@
var/list/responses = list( "[src] looks at you imploringly.",
"[src] looks at you pleadingly",
"[src] looks at you with a resigned expression.",
"[src] seems resigned to it's fate.")
"[src] seems resigned to its fate.")
M << pick(responses)
else
..()
@@ -6,7 +6,7 @@ datum/preferences
else
gender = pick(MALE,FEMALE)
underwear = random_underwear(gender)
s_tone = random_skin_tone()
skin_tone = random_skin_tone()
h_style = random_hair_style(gender)
f_style = random_facial_hair_style(gender)
h_color = random_short_color()
@@ -23,10 +23,7 @@ datum/preferences
var/g = "m"
if(gender == FEMALE) g = "f"
preview_icon = new /icon('icons/mob/human.dmi', "body_[g]_s")
// Skin tone
preview_icon.Blend("#[skin_tones[s_tone]]", ICON_MULTIPLY)
preview_icon = new /icon('icons/mob/human.dmi', "[skin_tone]_[g]_s")
if(underwear)
var/datum/sprite_accessory/underwear/U = underwear_all[underwear]
Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 46 KiB