Replaces /image with /mutable_appearance (#556)

* Replaces /image with /mutable_appearance, where appropriate

* Update miscellaneous.dm

* Delete miscellaneous.dm.rej

* Delete pet.dm.rej

* Update pet.dm

* Update species.dm

* Update miscellaneous.dm

* Update species.dm

* Update miscellaneous.dm

* Delete species.dm.rej

* Update species.dm

pretty sure I got all the indentation correct THIS time, ffs

* Update species.dm

* Update species.dm

fucking tabs man, fucking tabs.
This commit is contained in:
CitadelStationBot
2017-04-26 08:18:35 -05:00
committed by Poojawa
parent a8c4c86e1c
commit a905c15dad
151 changed files with 1379 additions and 1531 deletions
+16 -16
View File
@@ -37,10 +37,10 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
//These variables store hair data if the ghost originates from a species with head and/or facial hair.
var/hair_style
var/hair_color
var/image/hair_image
var/mutable_appearance/hair_overlay
var/facial_hair_style
var/facial_hair_color
var/image/facial_hair_image
var/mutable_appearance/facial_hair_overlay
var/updatedir = 1 //Do we have to update our dir as the ghost moves around?
var/lastsetting = null //Stores the last setting that ghost_others was set to, for a little more efficiency when we update ghost images. Null means no update is necessary
@@ -161,13 +161,13 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
ghost_accs = client.prefs.ghost_accs
ghost_others = client.prefs.ghost_others
if(hair_image)
cut_overlay(hair_image)
hair_image = null
if(hair_overlay)
cut_overlay(hair_overlay)
hair_overlay = null
if(facial_hair_image)
cut_overlay(facial_hair_image)
facial_hair_image = null
if(facial_hair_overlay)
cut_overlay(facial_hair_overlay)
facial_hair_overlay = null
if(new_form)
@@ -188,19 +188,19 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
if(facial_hair_style)
S = GLOB.facial_hair_styles_list[facial_hair_style]
if(S)
facial_hair_image = image("icon" = S.icon, "icon_state" = "[S.icon_state]", "layer" = -HAIR_LAYER)
facial_hair_overlay = mutable_appearance(S.icon, "[S.icon_state]", -HAIR_LAYER)
if(facial_hair_color)
facial_hair_image.color = "#" + facial_hair_color
facial_hair_image.alpha = 200
add_overlay(facial_hair_image)
facial_hair_overlay.color = "#" + facial_hair_color
facial_hair_overlay.alpha = 200
add_overlay(facial_hair_overlay)
if(hair_style)
S = GLOB.hair_styles_list[hair_style]
if(S)
hair_image = image("icon" = S.icon, "icon_state" = "[S.icon_state]", "layer" = -HAIR_LAYER)
hair_overlay = mutable_appearance(S.icon, "[S.icon_state]", -HAIR_LAYER)
if(hair_color)
hair_image.color = "#" + hair_color
hair_image.alpha = 200
add_overlay(hair_image)
hair_overlay.color = "#" + hair_color
hair_overlay.alpha = 200
add_overlay(hair_overlay)
/*
* Increase the brightness of a color by calculating the average distance between the R, G and B values,
@@ -1,7 +1,7 @@
/mob/living/carbon/alien/humanoid/update_icons()
cut_overlays()
for(var/image/I in overlays_standing)
for(var/I in overlays_standing)
add_overlay(I)
if(stat == DEAD)
@@ -66,7 +66,7 @@
dmi_file = 'icons/mob/alienqueen.dmi'
if(handcuffed)
overlays_standing[HANDCUFF_LAYER] = image(dmi_file,icon_state= cuff_icon, layer =-HANDCUFF_LAYER)
overlays_standing[HANDCUFF_LAYER] = mutable_appearance(dmi_file, cuff_icon, -HANDCUFF_LAYER)
apply_overlay(HANDCUFF_LAYER)
//Royals have bigger sprites, so inhand things must be handled differently.
@@ -80,16 +80,14 @@
var/itm_state = l_hand.item_state
if(!itm_state)
itm_state = l_hand.icon_state
var/image/I = image("icon" = alt_inhands_file , "icon_state"="[itm_state][caste]_l", "layer"=-HANDS_LAYER)
hands += I
hands += mutable_appearance(alt_inhands_file, "[itm_state][caste]_l", -HANDS_LAYER)
var/obj/item/r_hand = get_item_for_held_index(2)
if(r_hand)
var/itm_state = r_hand.item_state
if(!itm_state)
itm_state = r_hand.icon_state
var/image/I = image("icon" = alt_inhands_file , "icon_state"="[itm_state][caste]_r", "layer"=-HANDS_LAYER)
hands += I
hands += mutable_appearance(alt_inhands_file, "[itm_state][caste]_r", -HANDS_LAYER)
overlays_standing[HANDS_LAYER] = hands
apply_overlay(HANDS_LAYER)
@@ -18,7 +18,6 @@
return
var/Qdir = get_dir(src, Q)
var/Qdist = get_dist(src, Q)
image(icon,loc,icon_state,layer,dir)
var/finder_icon = "finder_center" //Overlay showed when adjacent to or on top of the queen!
switch(Qdist)
if(2 to 7)
@@ -27,7 +26,7 @@
finder_icon = "finder_med"
if(21 to INFINITY)
finder_icon = "finder_far"
var/image/finder_eye = image('icons/mob/screen_alien.dmi', icon_state = finder_icon, dir = Qdir)
var/image/finder_eye = image('icons/mob/screen_alien.dmi', finder_icon, dir = Qdir)
hud_used.alien_queen_finder.add_overlay(finder_eye)
/mob/living/carbon/alien/humanoid/royal/queen/findQueen()
@@ -81,7 +81,7 @@
var/mob/dead/observer/ghost = pick(candidates)
var/overlay = image('icons/mob/alien.dmi', loc = owner, icon_state = "burst_lie")
var/mutable_appearance/overlay = mutable_appearance('icons/mob/alien.dmi', "burst_lie")
owner.add_overlay(overlay)
var/atom/xeno_loc = get_turf(owner)
+1 -1
View File
@@ -751,7 +751,7 @@
..()
/mob/living/carbon/fakefire(var/fire_icon = "Generic_mob_burning")
var/image/new_fire_overlay = image("icon"='icons/mob/OnFire.dmi', "icon_state"= fire_icon, "layer"=-FIRE_LAYER)
var/mutable_appearance/new_fire_overlay = mutable_appearance('icons/mob/OnFire.dmi', fire_icon, -FIRE_LAYER)
new_fire_overlay.appearance_flags = RESET_COLOR
overlays_standing[FIRE_LAYER] = new_fire_overlay
apply_overlay(FIRE_LAYER)
+10 -8
View File
@@ -732,8 +732,8 @@
/mob/living/carbon/human/wash_cream()
//clean both to prevent a rare bug
cut_overlay(image('icons/effects/creampie.dmi', "creampie_lizard"))
cut_overlay(image('icons/effects/creampie.dmi', "creampie_human"))
cut_overlay(mutable_appearance('icons/effects/creampie.dmi', "creampie_lizard"))
cut_overlay(mutable_appearance('icons/effects/creampie.dmi', "creampie_human"))
//Turns a mob black, flashes a skeleton overlay
@@ -742,17 +742,19 @@
//Handle mutant parts if possible
if(dna && dna.species)
add_atom_colour("#000000", TEMPORARY_COLOUR_PRIORITY)
var/static/image/electrocution_skeleton_anim = image(icon = icon, icon_state = "electrocuted_base")
electrocution_skeleton_anim.appearance_flags = RESET_COLOR
var/static/mutable_appearance/electrocution_skeleton_anim
if(!electrocution_skeleton_anim)
electrocution_skeleton_anim = mutable_appearance(icon, "electrocuted_base")
electrocution_skeleton_anim.appearance_flags |= RESET_COLOR
add_overlay(electrocution_skeleton_anim)
addtimer(CALLBACK(src, .proc/end_electrocution_animation, electrocution_skeleton_anim), anim_duration)
else //or just do a generic animation
flick_overlay_view(image(icon,src,"electrocuted_generic",ABOVE_MOB_LAYER), src, anim_duration)
/mob/living/carbon/human/proc/end_electrocution_animation(image/I)
/mob/living/carbon/human/proc/end_electrocution_animation(mutable_appearance/MA)
remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, "#000000")
cut_overlay(I)
cut_overlay(MA)
/mob/living/carbon/human/canUseTopic(atom/movable/M, be_close = 0)
if(incapacitated() || lying )
@@ -821,9 +823,9 @@
if(hal_screwyhud == SCREWYHUD_HEALTHY)
icon_num = 0
if(icon_num)
hud_used.healthdoll.add_overlay(image('icons/mob/screen_gen.dmi',"[BP.body_zone][icon_num]"))
hud_used.healthdoll.add_overlay(mutable_appearance('icons/mob/screen_gen.dmi', "[BP.body_zone][icon_num]"))
for(var/t in get_missing_limbs()) //Missing limbs
hud_used.healthdoll.add_overlay(image('icons/mob/screen_gen.dmi',"[t]6"))
hud_used.healthdoll.add_overlay(mutable_appearance('icons/mob/screen_gen.dmi', "[t]6"))
else
hud_used.healthdoll.icon_state = "healthdoll_DEAD"
+127 -123
View File
@@ -229,22 +229,22 @@
fhair_state += dynamic_fhair_suffix
fhair_file = 'icons/mob/facialhair_extensions.dmi'
var/image/img_facial = image("icon" = fhair_file, "icon_state" = fhair_state, "layer" = -HAIR_LAYER)
var/mutable_appearance/facial_overlay = mutable_appearance(fhair_file, fhair_state, -HAIR_LAYER)
if(!forced_colour)
if(hair_color)
if(hair_color == "mutcolor")
img_facial.color = "#" + H.dna.features["mcolor"]
facial_overlay.color = "#" + H.dna.features["mcolor"]
else
img_facial.color = "#" + hair_color
facial_overlay.color = "#" + hair_color
else
img_facial.color = "#" + H.facial_hair_color
facial_overlay.color = "#" + H.facial_hair_color
else
img_facial.color = forced_colour
facial_overlay.color = forced_colour
img_facial.alpha = hair_alpha
facial_overlay.alpha = hair_alpha
standing += img_facial
standing += facial_overlay
if(H.head)
var/obj/item/I = H.head
@@ -262,9 +262,11 @@
hair_hidden = TRUE
if(!hair_hidden || dynamic_hair_suffix)
var/mutable_appearance/hair_overlay = mutable_appearance(layer = -HAIR_LAYER)
if(!hair_hidden && !H.getorgan(/obj/item/organ/brain)) //Applies the debrained overlay if there is no brain
if(!(NOBLOOD in species_traits))
standing += image("icon"='icons/mob/human_face.dmi', "icon_state" = "debrained", "layer" = -HAIR_LAYER)
hair_overlay.icon = 'icons/mob/human_face.dmi'
hair_overlay.icon_state = "debrained"
else if(H.hair_style && (HAIR in species_traits))
S = GLOB.hair_styles_list[H.hair_style]
@@ -286,70 +288,70 @@
hair_state += dynamic_hair_suffix
hair_file = 'icons/mob/hair_extensions.dmi'
var/image/img_hair = image("icon" = hair_file, "icon_state" = hair_state, "layer" = -HAIR_LAYER)
hair_overlay.icon = hair_file
hair_overlay.icon_state = hair_state
if(!forced_colour)
if(hair_color)
if(hair_color == "mutcolor")
img_hair.color = "#" + H.dna.features["mcolor"]
hair_overlay.color = "#" + H.dna.features["mcolor"]
else
img_hair.color = "#" + hair_color
hair_overlay.color = "#" + hair_color
else
img_hair.color = "#" + H.hair_color
hair_overlay.color = "#" + H.hair_color
else
img_hair.color = forced_colour
img_hair.alpha = hair_alpha
img_hair.pixel_y += hair_y_offset
standing += img_hair
hair_overlay.color = forced_colour
hair_overlay.alpha = hair_alpha
hair_overlay.pixel_y += hair_y_offset
if(hair_overlay.icon)
standing += hair_overlay
if(standing.len)
H.overlays_standing[HAIR_LAYER] = standing
H.overlays_standing[HAIR_LAYER] = standing
H.apply_overlay(HAIR_LAYER)
/datum/species/proc/handle_body(mob/living/carbon/human/H)
H.remove_overlay(BODY_LAYER)
var/list/standing = list()
var/list/standing = list()
var/obj/item/bodypart/head/HD = H.get_bodypart("head")
if(!(H.disabilities & HUSK))
// lipstick
if(H.lip_style && (LIPS in species_traits) && HD)
var/image/lips = image("icon"='icons/mob/human_face.dmi', "icon_state"="lips_[H.lip_style]", "layer" = -BODY_LAYER)
lips.color = H.lip_color
lips.pixel_y += face_y_offset
standing += lips
var/mutable_appearance/lip_overlay = mutable_appearance('icons/mob/human_face.dmi', "lips_[H.lip_style]", -BODY_LAYER)
lip_overlay.color = H.lip_color
lip_overlay.pixel_y += face_y_offset
standing += lip_overlay
// eyes
if((EYECOLOR in species_traits) && HD)
var/image/img_eyes = image("icon" = 'icons/mob/human_face.dmi', "icon_state" = "eyes", "layer" = -BODY_LAYER)
img_eyes.color = "#" + H.eye_color
img_eyes.pixel_y += face_y_offset
standing += img_eyes
var/mutable_appearance/eye_overlay = mutable_appearance('icons/mob/human_face.dmi', "eyes", -BODY_LAYER)
eye_overlay.color = "#" + H.eye_color
eye_overlay.pixel_y += face_y_offset
standing += eye_overlay
//Underwear, Undershirts & Socks
/*This will be refactored at a later date
if(H.underwear)
var/datum/sprite_accessory/underwear/underwear = GLOB.underwear_list[H.underwear]
if(underwear)
standing += image("icon"=underwear.icon, "icon_state"="[underwear.icon_state]", "layer"=-BODY_LAYER)
standing += mutable_appearance(underwear.icon, underwear.icon_state, -BODY_LAYER)
if(H.undershirt)
var/datum/sprite_accessory/undershirt/undershirt = GLOB.undershirt_list[H.undershirt]
if(undershirt)
if(H.dna.species.sexes && H.gender == FEMALE)
standing += wear_female_version("[undershirt.icon_state]", undershirt.icon, BODY_LAYER)
standing += wear_female_version(undershirt.icon_state, undershirt.icon, -BODY_LAYER)
else
standing += image("icon"=undershirt.icon, "icon_state"="[undershirt.icon_state]", "layer"=-BODY_LAYER)
standing += mutable_appearance(undershirt.icon, undershirt.icon_state, -BODY_LAYER)
if(H.socks && H.get_num_legs() >= 2 && !(DIGITIGRADE in species_traits))
var/datum/sprite_accessory/socks/socks = GLOB.socks_list[H.socks]
if(socks)
standing += image("icon"=socks.icon, "icon_state"="[socks.icon_state]", "layer"=-BODY_LAYER)
*/
standing += mutable_appearance(socks.icon, socks.icon_state, -BODY_LAYER)
if(standing.len)
H.overlays_standing[BODY_LAYER] = standing
@@ -486,8 +488,6 @@
var/g = (H.gender == FEMALE) ? "f" : "m"
var/image/I
for(var/layer in relevant_layers)
var/layertext = mutant_bodyparts_layertext(layer)
@@ -552,7 +552,9 @@
S = /datum/sprite_accessory/slimecoon_snout*/
if(!S || S.icon_state == "none")
continue
var/mutable_appearance/accessory_overlay = mutable_appearance(S.icon, layer = -layer)
//A little rename so we don't have to use tail_lizard or tail_human when naming the sprites.
if(bodypart == "tail_lizard" || bodypart == "tail_human" || bodypart == "mam_tail" || bodypart == "slimecoontail" || bodypart == "xenotail")
bodypart = "tail"
@@ -563,134 +565,136 @@
if(bodypart == "xenohead")
bodypart = "xhead"
var/icon_string
if(S.gender_specific)
icon_string = "[g]_[bodypart]_[S.icon_state]_[layertext]"
accessory_overlay.icon_state = "[g]_[bodypart]_[S.icon_state]_[layertext]"
else
icon_string = "m_[bodypart]_[S.icon_state]_[layertext]"
I = image("icon" = S.icon, "icon_state" = icon_string, "layer" =- layer)
accessory_overlay.icon_state = "m_[bodypart]_[S.icon_state]_[layertext]"
if(S.center)
I = center_image(I,S.dimension_x,S.dimension_y)
accessory_overlay = center_image(accessory_overlay, S.dimension_x, S.dimension_y)
if(!(H.disabilities & HUSK))
if(!forced_colour)
switch(S.color_src)
if(MUTCOLORS)
if(fixed_mut_color)
I.color = "#[fixed_mut_color]"
accessory_overlay.color = "#[fixed_mut_color]"
else
I.color = "#[H.dna.features["mcolor"]]"
accessory_overlay.color = "#[H.dna.features["mcolor"]]"
if(MUTCOLORS2)
if(fixed_mut_color2)
I.color = "#[fixed_mut_color2]"
accessory_overlay.color = "#[fixed_mut_color2]"
else
I.color = "#[H.dna.features["mcolor2"]]"
accessory_overlay.color = "#[H.dna.features["mcolor2"]]"
if(MUTCOLORS3)
if(fixed_mut_color3)
I.color = "#[fixed_mut_color3]"
accessory_overlay.color = "#[fixed_mut_color3]"
else
I.color = "#[H.dna.features["mcolor3"]]"
accessory_overlay.color = "#[H.dna.features["mcolor3"]]"
if(HAIR)
if(hair_color == "mutcolor")
I.color = "#[H.dna.features["mcolor"]]"
accessory_overlay.color = "#[H.dna.features["mcolor"]]"
else
I.color = "#[H.hair_color]"
accessory_overlay.color = "#[H.hair_color]"
if(FACEHAIR)
I.color = "#[H.facial_hair_color]"
accessory_overlay.color = "#[H.facial_hair_color]"
if(EYECOLOR)
I.color = "#[H.eye_color]"
accessory_overlay.color = "#[H.eye_color]"
else
I.color = forced_colour
standing += I
accessory_overlay.color = forced_colour
standing += accessory_overlay
if(S.hasinner)
var/mutable_appearance/inner_accessory_overlay = mutable_appearance(S.icon, layer = -layer)
if(S.gender_specific)
icon_string = "[g]_[bodypart]inner_[S.icon_state]_[layertext]"
inner_accessory_overlay.icon_state = "[g]_[bodypart]inner_[S.icon_state]_[layertext]"
else
icon_string = "m_[bodypart]inner_[S.icon_state]_[layertext]"
I = image("icon" = S.icon, "icon_state" = icon_string, "layer" =- layer)
inner_accessory_overlay.icon_state = "m_[bodypart]inner_[S.icon_state]_[layertext]"
if(S.center)
I = center_image(I,S.dimension_x,S.dimension_y)
inner_accessory_overlay = center_image(inner_accessory_overlay, S.dimension_x, S.dimension_y)
standing += I
standing += inner_accessory_overlay
if(S.extra) //apply the extra overlay, if there is one
var/mutable_appearance/extra_accessory_overlay = mutable_appearance(S.icon, layer = -layer)
if(S.gender_specific)
icon_string = "[g]_[bodypart]_extra_[S.icon_state]_[layertext]"
extra_accessory_overlay.icon_state = "[g]_[bodypart]_extra_[S.icon_state]_[layertext]"
else
icon_string = "m_[bodypart]_extra_[S.icon_state]_[layertext]"
I = image("icon" = S.icon, "icon_state" = icon_string, "layer" =- layer)
extra_accessory_overlay.icon_state = "m_[bodypart]_extra_[S.icon_state]_[layertext]"
if(S.center)
I = center_image(I,S.dimension_x,S.dimension_y)
switch(S.extra_color_src) //change the color of the extra overlay
if(MUTCOLORS)
if(fixed_mut_color)
I.color = "#[fixed_mut_color]"
else
I.color = "#[H.dna.features["mcolor"]]"
if(MUTCOLORS2)
if(fixed_mut_color2)
I.color = "#[fixed_mut_color2]"
else
I.color = "#[H.dna.features["mcolor2"]]"
if(MUTCOLORS3)
if(fixed_mut_color3)
I.color = "#[fixed_mut_color3]"
else
I.color = "#[H.dna.features["mcolor3"]]"
if(HAIR)
if(hair_color == "mutcolor")
I.color = "#[H.dna.features["mcolor"]]"
else
I.color = "#[H.hair_color]"
if(FACEHAIR)
I.color = "#[H.facial_hair_color]"
if(EYECOLOR)
I.color = "#[H.eye_color]"
standing += I
extra_accessory_overlay.icon_state = center_image(extra_accessory_overlay, S.dimension_x, S.dimension_y)
if(!forced_colour)
switch(S.extra_color_src) //change the color of the extra overlay
if(MUTCOLORS)
if(fixed_mut_color)
extra_accessory_overlay.color = "#[fixed_mut_color]"
else
extra_accessory_overlay.color = "#[H.dna.features["mcolor"]]"
if(MUTCOLORS2)
if(fixed_mut_color2)
extra_accessory_overlay.color = "#[fixed_mut_color2]"
else
extra_accessory_overlay.color = "#[H.dna.features["mcolor2"]]"
if(MUTCOLORS3)
if(fixed_mut_color3)
extra_accessory_overlay.color = "#[fixed_mut_color3]"
else
extra_accessory_overlay.color = "#[H.dna.features["mcolor3"]]"
if(HAIR)
if(hair_color == "mutcolor")
extra_accessory_overlay.color = "#[H.dna.features["mcolor"]]"
else
extra_accessory_overlay.color = "#[H.hair_color]"
if(FACEHAIR)
extra_accessory_overlay.color = "#[H.facial_hair_color]"
if(EYECOLOR)
extra_accessory_overlay.color = "#[H.eye_color]"
else
extra_accessory_overlay.color = forced_colour
standing += extra_accessory_overlay
if(S.extra2) //apply the extra overlay, if there is one
var/mutable_appearance/extra2_accessory_overlay = mutable_appearance(S.icon, layer = -layer)
if(S.gender_specific)
icon_string = "[g]_[bodypart]_extra2_[S.icon_state]_[layertext]"
extra2_accessory_overlay.icon_state = "[g]_[bodypart]_extra2_[S.icon_state]_[layertext]"
else
icon_string = "m_[bodypart]_extra2_[S.icon_state]_[layertext]"
I = image("icon" = S.icon, "icon_state" = icon_string, "layer" =- layer)
extra2_accessory_overlay.icon_state = "m_[bodypart]_extra2_[S.icon_state]_[layertext]"
if(S.center)
I = center_image(I,S.dimension_x,S.dimension_y)
switch(S.extra2_color_src) //change the color of the extra overlay
if(MUTCOLORS)
if(fixed_mut_color)
I.color = "#[fixed_mut_color]"
else
I.color = "#[H.dna.features["mcolor"]]"
if(MUTCOLORS2)
if(fixed_mut_color2)
I.color = "#[fixed_mut_color2]"
else
I.color = "#[H.dna.features["mcolor2"]]"
if(MUTCOLORS3)
if(fixed_mut_color3)
I.color = "#[fixed_mut_color3]"
else
I.color = "#[H.dna.features["mcolor3"]]"
if(HAIR)
if(hair_color == "mutcolor")
I.color = "#[H.dna.features["mcolor"]]"
else
I.color = "#[H.hair_color]"
standing += I
extra2_accessory_overlay.icon_state = center_image(extra2_accessory_overlay, S.dimension_x, S.dimension_y)
if(!forced_colour)
switch(S.extra_color_src) //change the color of the extra overlay
if(MUTCOLORS)
if(fixed_mut_color)
extra2_accessory_overlay.color = "#[fixed_mut_color]"
else
extra2_accessory_overlay.color = "#[H.dna.features["mcolor"]]"
if(MUTCOLORS2)
if(fixed_mut_color2)
extra2_accessory_overlay.color = "#[fixed_mut_color2]"
else
extra2_accessory_overlay.color = "#[H.dna.features["mcolor2"]]"
if(MUTCOLORS3)
if(fixed_mut_color3)
extra2_accessory_overlay.color = "#[fixed_mut_color3]"
else
extra2_accessory_overlay.color = "#[H.dna.features["mcolor3"]]"
if(HAIR)
if(hair_color == "mutcolor")
extra2_accessory_overlay.color = "#[H.dna.features["mcolor"]]"
else
extra2_accessory_overlay.color = "#[H.hair_color]"
if(FACEHAIR)
extra2_accessory_overlay.color = "#[H.facial_hair_color]"
if(EYECOLOR)
extra2_accessory_overlay.color = "#[H.eye_color]"
else
extra2_accessory_overlay.color = forced_colour
standing += extra2_accessory_overlay
H.overlays_standing[layer] = standing.Copy()
standing = list()
@@ -126,17 +126,17 @@ There are several things that need to be remembered:
else if(U.adjusted == DIGITIGRADE_STYLE)
t_color = "[t_color]_l"
var/image/standing
var/mutable_appearance/uniform_overlay
if(dna && dna.species.sexes)
var/G = (gender == FEMALE) ? "f" : "m"
if(G == "f" && U.fitted != NO_FEMALE_UNIFORM)
standing = U.build_worn_icon(state = "[t_color]", default_layer = UNIFORM_LAYER, default_icon_file = 'icons/mob/uniform.dmi', isinhands = FALSE, femaleuniform = U.fitted)
uniform_overlay = U.build_worn_icon(state = "[t_color]", default_layer = UNIFORM_LAYER, default_icon_file = 'icons/mob/uniform.dmi', isinhands = FALSE, femaleuniform = U.fitted)
if(!standing)
standing = U.build_worn_icon(state = "[t_color]", default_layer = UNIFORM_LAYER, default_icon_file = 'icons/mob/uniform.dmi', isinhands = FALSE)
if(!uniform_overlay)
uniform_overlay = U.build_worn_icon(state = "[t_color]", default_layer = UNIFORM_LAYER, default_icon_file = 'icons/mob/uniform.dmi', isinhands = FALSE)
overlays_standing[UNIFORM_LAYER] = standing
overlays_standing[UNIFORM_LAYER] = uniform_overlay
else if(!(dna && dna.species.nojumpsuit) && invdrop)
// Automatically drop anything in store / id / belt if you're not wearing a uniform. //CHECK IF NECESARRY
@@ -161,8 +161,7 @@ There are several things that need to be remembered:
update_observer_view(wear_id)
//TODO: add an icon file for ID slot stuff, so it's less snowflakey
var/image/standing = wear_id.build_worn_icon(state = wear_id.item_state, default_layer = ID_LAYER, default_icon_file = 'icons/mob/mob.dmi')
overlays_standing[ID_LAYER] = standing
overlays_standing[ID_LAYER] = wear_id.build_worn_icon(state = wear_id.item_state, default_layer = ID_LAYER, default_icon_file = 'icons/mob/mob.dmi')
apply_overlay(ID_LAYER)
@@ -170,20 +169,20 @@ There are several things that need to be remembered:
/mob/living/carbon/human/update_inv_gloves()
remove_overlay(GLOVES_LAYER)
if(get_num_arms() <2)
if(!gloves && blood_DNA)
if(has_left_hand())
overlays_standing[GLOVES_LAYER] = image("icon"='icons/effects/blood.dmi', "icon_state"="bloodyhands_left", "layer"=-GLOVES_LAYER)
apply_overlay(GLOVES_LAYER)
else if(has_right_hand())
overlays_standing[GLOVES_LAYER] = image("icon"='icons/effects/blood.dmi', "icon_state"="bloodyhands_right", "layer"=-GLOVES_LAYER)
apply_overlay(GLOVES_LAYER)
return
if(client && hud_used && hud_used.inv_slots[slot_gloves])
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_gloves]
inv.update_icon()
if(!gloves && blood_DNA)
var/mutable_appearance/bloody_overlay = mutable_appearance('icons/effects/blood.dmi', "bloodyhands", -GLOVES_LAYER)
if(get_num_arms() < 2)
if(has_left_hand())
bloody_overlay.icon_state = "bloodyhands_left"
else if(has_right_hand())
bloody_overlay.icon_state = "bloodyhands_right"
overlays_standing[GLOVES_LAYER] = bloody_overlay
if(gloves)
gloves.screen_loc = ui_gloves
if(client && hud_used && hud_used.hud_shown)
@@ -193,14 +192,7 @@ There are several things that need to be remembered:
var/t_state = gloves.item_state
if(!t_state)
t_state = gloves.icon_state
var/image/standing = gloves.build_worn_icon(state = t_state, default_layer = GLOVES_LAYER, default_icon_file = 'icons/mob/hands.dmi')
overlays_standing[GLOVES_LAYER] = standing
else
if(blood_DNA)
overlays_standing[GLOVES_LAYER] = image("icon"='icons/effects/blood.dmi', "icon_state"="bloodyhands", "layer"=-GLOVES_LAYER)
overlays_standing[GLOVES_LAYER] = gloves.build_worn_icon(state = t_state, default_layer = GLOVES_LAYER, default_icon_file = 'icons/mob/hands.dmi')
apply_overlay(GLOVES_LAYER)
@@ -223,8 +215,7 @@ There are several things that need to be remembered:
update_observer_view(glasses,1)
if(!(head && (head.flags_inv & HIDEEYES)) && !(wear_mask && (wear_mask.flags_inv & HIDEEYES)))
var/image/standing = glasses.build_worn_icon(state = glasses.icon_state, default_layer = GLASSES_LAYER, default_icon_file = 'icons/mob/eyes.dmi')
overlays_standing[GLASSES_LAYER] = standing
overlays_standing[GLASSES_LAYER] = glasses.build_worn_icon(state = glasses.icon_state, default_layer = GLASSES_LAYER, default_icon_file = 'icons/mob/eyes.dmi')
apply_overlay(GLASSES_LAYER)
@@ -246,8 +237,7 @@ There are several things that need to be remembered:
client.screen += ears //add it to the client's screen
update_observer_view(ears,1)
var/image/standing = ears.build_worn_icon(state = ears.icon_state, default_layer = EARS_LAYER, default_icon_file = 'icons/mob/ears.dmi')
overlays_standing[EARS_LAYER] = standing
overlays_standing[EARS_LAYER] = ears.build_worn_icon(state = ears.icon_state, default_layer = EARS_LAYER, default_icon_file = 'icons/mob/ears.dmi')
apply_overlay(EARS_LAYER)
@@ -268,8 +258,7 @@ There are several things that need to be remembered:
if(hud_used.inventory_shown) //if the inventory is open
client.screen += shoes //add it to client's screen
update_observer_view(shoes,1)
var/image/standing = shoes.build_worn_icon(state = shoes.icon_state, default_layer = SHOES_LAYER, default_icon_file = 'icons/mob/feet.dmi')
overlays_standing[SHOES_LAYER] = standing
overlays_standing[SHOES_LAYER] = shoes.build_worn_icon(state = shoes.icon_state, default_layer = SHOES_LAYER, default_icon_file = 'icons/mob/feet.dmi')
apply_overlay(SHOES_LAYER)
@@ -289,7 +278,7 @@ There are several things that need to be remembered:
var/t_state = s_store.item_state
if(!t_state)
t_state = s_store.icon_state
overlays_standing[SUIT_STORE_LAYER] = image("icon"='icons/mob/belt_mirror.dmi', "icon_state"="[t_state]", "layer"=-SUIT_STORE_LAYER)
overlays_standing[SUIT_STORE_LAYER] = mutable_appearance('icons/mob/belt_mirror.dmi', t_state, -SUIT_STORE_LAYER)
apply_overlay(SUIT_STORE_LAYER)
@@ -315,8 +304,7 @@ There are several things that need to be remembered:
if(!t_state)
t_state = belt.icon_state
var/image/standing = belt.build_worn_icon(state = t_state, default_layer = BELT_LAYER, default_icon_file = 'icons/mob/belt.dmi')
overlays_standing[BELT_LAYER] = standing
overlays_standing[BELT_LAYER] = belt.build_worn_icon(state = t_state, default_layer = BELT_LAYER, default_icon_file = 'icons/mob/belt.dmi')
apply_overlay(BELT_LAYER)
@@ -337,8 +325,7 @@ There are several things that need to be remembered:
client.screen += wear_suit
update_observer_view(wear_suit,1)
var/image/standing = wear_suit.build_worn_icon(state = wear_suit.icon_state, default_layer = SUIT_LAYER, default_icon_file = 'icons/mob/suit.dmi')
overlays_standing[SUIT_LAYER] = standing
overlays_standing[SUIT_LAYER] = wear_suit.build_worn_icon(state = wear_suit.icon_state, default_layer = SUIT_LAYER, default_icon_file = 'icons/mob/suit.dmi')
if(wear_suit.breakouttime) //suit is restraining
drop_all_held_items()
@@ -381,7 +368,7 @@ There are several things that need to be remembered:
remove_overlay(LEGCUFF_LAYER)
clear_alert("legcuffed")
if(legcuffed)
overlays_standing[LEGCUFF_LAYER] = image("icon"='icons/mob/mob.dmi', "icon_state"="legcuff1", "layer"=-LEGCUFF_LAYER)
overlays_standing[LEGCUFF_LAYER] = mutable_appearance('icons/mob/mob.dmi', "legcuff1", -LEGCUFF_LAYER)
apply_overlay(LEGCUFF_LAYER)
throw_alert("legcuffed", /obj/screen/alert/restrained/legcuffed, new_master = src.legcuffed)
@@ -390,8 +377,7 @@ There are several things that need to be remembered:
var/icon/female_clothing_icon = GLOB.female_clothing_icons[index]
if(!female_clothing_icon) //Create standing/laying icons if they don't exist
generate_female_clothing(index,t_color,icon,type)
var/standing = image("icon"=GLOB.female_clothing_icons["[t_color]"], "layer"=-layer)
return(standing)
return mutable_appearance(GLOB.female_clothing_icons[t_color], layer = -layer)
/mob/living/carbon/human/proc/get_overlays_copy(list/unwantedLayers)
var/list/out = new
@@ -440,12 +426,12 @@ There are several things that need to be remembered:
/*
Does everything in relation to building the /image used in the mob's overlays list
Does everything in relation to building the /mutable_appearance used in the mob's overlays list
covers:
inhands and any other form of worn item
centering large images
layering images on custom layers
building images from custom icon files
centering large appearances
layering appearances on custom layers
building appearances from custom icon files
By Remie Richards (yes I'm taking credit because this just removed 90% of the copypaste in update_icons())
@@ -480,13 +466,13 @@ generate/load female uniform sprites matching all previously decided variables
if(!layer2use)
layer2use = default_layer
var/image/standing
var/mutable_appearance/standing
if(femaleuniform)
standing = wear_female_version(state,file2use,layer2use,femaleuniform)
if(!standing)
standing = image("icon"=file2use, "icon_state"=state,"layer"=-layer2use)
standing = mutable_appearance(file2use, state, -layer2use)
//Get the overlay images for this item when it's being worn
//Get the overlays for this item when it's being worn
//eg: ammo counters, primed grenade flashes, etc.
var/list/worn_overlays = worn_overlays(isinhands)
if(worn_overlays && worn_overlays.len)
@@ -34,8 +34,7 @@
hair_hidden = 1
if(!hair_hidden)
if(!getorgan(/obj/item/organ/brain)) //Applies the debrained overlay if there is no brain
var/image/I = image("icon"='icons/mob/human_face.dmi', "icon_state" = "debrained", "layer" = -HAIR_LAYER)
overlays_standing[HAIR_LAYER] = I
overlays_standing[HAIR_LAYER] = mutable_appearance('icons/mob/human_face.dmi', "debrained", -HAIR_LAYER)
apply_overlay(HAIR_LAYER)
@@ -45,9 +44,9 @@
/mob/living/carbon/monkey/update_inv_legcuffed()
remove_overlay(LEGCUFF_LAYER)
if(legcuffed)
var/image/standing = image("icon"='icons/mob/mob.dmi', "icon_state"="legcuff1", "layer"=-LEGCUFF_LAYER)
standing.pixel_y = 8
overlays_standing[LEGCUFF_LAYER] = standing
var/mutable_appearance/legcuff_overlay = mutable_appearance('icons/mob/mob.dmi', "legcuff1", -LEGCUFF_LAYER)
legcuff_overlay.pixel_y = 8
overlays_standing[LEGCUFF_LAYER] = legcuff_overlay
apply_overlay(LEGCUFF_LAYER)
+14 -22
View File
@@ -30,9 +30,8 @@
var/list/overlays_standing[TOTAL_LAYERS]
/mob/living/carbon/proc/apply_overlay(cache_index)
var/I = overlays_standing[cache_index]
if(I)
add_overlay(I)
if((. = overlays_standing[cache_index]))
add_overlay(.)
/mob/living/carbon/proc/remove_overlay(cache_index)
var/I = overlays_standing[cache_index]
@@ -79,8 +78,7 @@
if(get_held_index_of_item(I) % 2 == 0)
icon_file = I.righthand_file
var/image/standing = I.build_worn_icon(state = t_state, default_layer = HANDS_LAYER, default_icon_file = icon_file, isinhands = TRUE)
hands += standing
hands += I.build_worn_icon(state = t_state, default_layer = HANDS_LAYER, default_icon_file = icon_file, isinhands = TRUE)
overlays_standing[HANDS_LAYER] = hands
apply_overlay(HANDS_LAYER)
@@ -89,7 +87,7 @@
/mob/living/carbon/update_fire(var/fire_icon = "Generic_mob_burning")
remove_overlay(FIRE_LAYER)
if(on_fire)
var/image/new_fire_overlay = image("icon"='icons/mob/OnFire.dmi', "icon_state"= fire_icon, "layer"=-FIRE_LAYER)
var/mutable_appearance/new_fire_overlay = mutable_appearance('icons/mob/OnFire.dmi', fire_icon, -FIRE_LAYER)
new_fire_overlay.appearance_flags = RESET_COLOR
overlays_standing[FIRE_LAYER] = new_fire_overlay
@@ -100,16 +98,16 @@
/mob/living/carbon/update_damage_overlays()
remove_overlay(DAMAGE_LAYER)
var/image/standing = image("icon"='icons/mob/dam_mob.dmi', "icon_state"="blank", "layer"=-DAMAGE_LAYER)
overlays_standing[DAMAGE_LAYER] = standing
var/mutable_appearance/damage_overlay = mutable_appearance('icons/mob/dam_mob.dmi', "blank", -DAMAGE_LAYER)
overlays_standing[DAMAGE_LAYER] = damage_overlay
for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
if(BP.dmg_overlay_type)
if(BP.brutestate)
standing.add_overlay("[BP.dmg_overlay_type]_[BP.body_zone]_[BP.brutestate]0") //we're adding icon_states of the base image as overlays
damage_overlay.add_overlay("[BP.dmg_overlay_type]_[BP.body_zone]_[BP.brutestate]0") //we're adding icon_states of the base image as overlays
if(BP.burnstate)
standing.add_overlay("[BP.dmg_overlay_type]_[BP.body_zone]_0[BP.burnstate]")
damage_overlay.add_overlay("[BP.dmg_overlay_type]_[BP.body_zone]_0[BP.burnstate]")
apply_overlay(DAMAGE_LAYER)
@@ -126,8 +124,7 @@
if(wear_mask)
if(!(head && (head.flags_inv & HIDEMASK)))
var/image/standing = wear_mask.build_worn_icon(state = wear_mask.icon_state, default_layer = FACEMASK_LAYER, default_icon_file = 'icons/mob/mask.dmi')
overlays_standing[FACEMASK_LAYER] = standing
overlays_standing[FACEMASK_LAYER] = wear_mask.build_worn_icon(state = wear_mask.icon_state, default_layer = FACEMASK_LAYER, default_icon_file = 'icons/mob/mask.dmi')
update_hud_wear_mask(wear_mask)
apply_overlay(FACEMASK_LAYER)
@@ -141,8 +138,7 @@
if(wear_neck)
if(!(head && (head.flags_inv & HIDENECK)))
var/image/standing = wear_neck.build_worn_icon(state = wear_neck.icon_state, default_layer = NECK_LAYER, default_icon_file = 'icons/mob/neck.dmi')
overlays_standing[NECK_LAYER] = standing
overlays_standing[NECK_LAYER] = wear_neck.build_worn_icon(state = wear_neck.icon_state, default_layer = NECK_LAYER, default_icon_file = 'icons/mob/neck.dmi')
update_hud_neck(wear_neck)
apply_overlay(NECK_LAYER)
@@ -155,8 +151,7 @@
inv.update_icon()
if(back)
var/image/standing = back.build_worn_icon(state = back.icon_state, default_layer = BACK_LAYER, default_icon_file = 'icons/mob/back.dmi')
overlays_standing[BACK_LAYER] = standing
overlays_standing[BACK_LAYER] = back.build_worn_icon(state = back.icon_state, default_layer = BACK_LAYER, default_icon_file = 'icons/mob/back.dmi')
update_hud_back(back)
apply_overlay(BACK_LAYER)
@@ -171,8 +166,7 @@
inv.update_icon()
if(head)
var/image/standing = head.build_worn_icon(state = head.icon_state, default_layer = HEAD_LAYER, default_icon_file = 'icons/mob/head.dmi')
overlays_standing[HEAD_LAYER] = standing
overlays_standing[HEAD_LAYER] = head.build_worn_icon(state = head.icon_state, default_layer = HEAD_LAYER, default_icon_file = 'icons/mob/head.dmi')
update_hud_head(head)
apply_overlay(HEAD_LAYER)
@@ -181,7 +175,7 @@
/mob/living/carbon/update_inv_handcuffed()
remove_overlay(HANDCUFF_LAYER)
if(handcuffed)
overlays_standing[HANDCUFF_LAYER] = image("icon"='icons/mob/mob.dmi', "icon_state"="handcuff1", "layer"=-HANDCUFF_LAYER)
overlays_standing[HANDCUFF_LAYER] = mutable_appearance('icons/mob/mob.dmi', "handcuff1", -HANDCUFF_LAYER)
apply_overlay(HANDCUFF_LAYER)
@@ -250,9 +244,7 @@
var/list/new_limbs = list()
for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
var/image/temp = BP.get_limb_icon()
if(temp)
new_limbs += temp
new_limbs += BP.get_limb_icon()
if(new_limbs.len)
overlays_standing[BODYPARTS_LAYER] = new_limbs
limb_icon_cache[icon_render_key] = new_limbs
+2 -2
View File
@@ -491,7 +491,7 @@
for(var/obj/effect/decal/cleanable/trail_holder/TH in src.loc)
if((!(newdir in TH.existing_dirs) || trail_type == "trails_1" || trail_type == "trails_2") && TH.existing_dirs.len <= 16) //maximum amount of overlays is 16 (all light & heavy directions filled)
TH.existing_dirs += newdir
TH.overlays.Add(image('icons/effects/blood.dmi',trail_type,dir = newdir))
TH.add_overlay(image('icons/effects/blood.dmi', trail_type, dir = newdir))
TH.transfer_mob_blood_dna(src)
/mob/living/carbon/human/makeTrail(turf/T)
@@ -930,4 +930,4 @@
/mob/living/ConveyorMove()
if((movement_type & FLYING) && !stat)
return
..()
..()
@@ -102,11 +102,11 @@
return
/mob/living/silicon/robot/update_fire()
var/I = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Generic_mob_burning")
var/mutable_appearance/fire_overlay = mutable_appearance('icons/mob/OnFire.dmi', "Generic_mob_burning")
if(on_fire)
add_overlay(I)
add_overlay(fire_overlay)
else
cut_overlay(I)
cut_overlay(fire_overlay)
/mob/living/silicon/robot/update_canmove()
if(stat || buckled || lockcharge)
@@ -38,7 +38,7 @@
var/obj/item/module_active = null
held_items = list(null, null, null) //we use held_items for the module holding, because that makes sense to do!
var/image/eye_lights
var/mutable_appearance/eye_lights
var/mob/living/silicon/ai/connected_ai = null
var/obj/item/weapon/stock_parts/cell/cell = null
@@ -629,7 +629,7 @@
else
add_overlay("ov-opencover -c")
if(hat)
var/image/head_overlay = hat.build_worn_icon(state = hat.icon_state, default_layer = 20, default_icon_file = 'icons/mob/head.dmi')
var/mutable_appearance/head_overlay = hat.build_worn_icon(state = hat.icon_state, default_layer = 20, default_icon_file = 'icons/mob/head.dmi')
head_overlay.pixel_y += hat_offset
add_overlay(head_overlay)
update_fire()
@@ -286,7 +286,7 @@
..()
spawn(5)
if(skin)
add_overlay(image('icons/mob/aibots.dmi', "kit_skin_[skin]"))
add_overlay("kit_skin_[skin]")
/obj/item/weapon/storage/firstaid/attackby(obj/item/bodypart/S, mob/user, params)
@@ -333,7 +333,7 @@
build_step++
to_chat(user, "<span class='notice'>You add the health sensor to [src].</span>")
name = "First aid/robot arm/health analyzer assembly"
add_overlay(image('icons/mob/aibots.dmi', "na_scanner"))
add_overlay("na_scanner")
if(1)
if(isprox(W))
@@ -358,7 +358,7 @@ Auto Patrol[]"},
var/obj/item/weapon/ed209_assembly/Sa = new /obj/item/weapon/ed209_assembly(Tsec)
Sa.build_step = 1
Sa.add_overlay(image('icons/mob/aibots.dmi', "hs_hole"))
Sa.add_overlay("hs_hole")
Sa.created_name = name
new /obj/item/device/assembly/prox_sensor(Tsec)
@@ -90,7 +90,7 @@
update_icon()
if(skin)
add_overlay(image('icons/mob/aibots.dmi', "medskin_[skin]"))
add_overlay("medskin_[skin]")
var/datum/job/doctor/J = new /datum/job/doctor
access_card.access += J.get_access()
@@ -407,7 +407,7 @@
cut_overlays()
if(inventory_head)
var/image/head_icon
var/datum/dog_fashion.DF = new inventory_head.dog_fashion(src)
var/datum/dog_fashion/DF = new inventory_head.dog_fashion(src)
if(!DF.obj_icon_state)
DF.obj_icon_state = inventory_head.icon_state
@@ -417,17 +417,17 @@
DF.obj_color = inventory_head.color
if(health <= 0)
head_icon = DF.get_image(dir = EAST)
head_icon = DF.get_overlay(dir = EAST)
head_icon.pixel_y = -8
head_icon.transform = turn(head_icon.transform, 180)
else
head_icon = DF.get_image()
head_icon = DF.get_overlay()
add_overlay(head_icon)
if(inventory_back)
var/image/back_icon
var/datum/dog_fashion.DF = new inventory_back.dog_fashion(src)
var/datum/dog_fashion/DF = new inventory_back.dog_fashion(src)
if(!DF.obj_icon_state)
DF.obj_icon_state = inventory_back.icon_state
@@ -437,18 +437,20 @@
DF.obj_color = inventory_back.color
if(health <= 0)
back_icon = DF.get_image(dir = EAST)
back_icon = DF.get_overlay(dir = EAST)
back_icon.pixel_y = -11
back_icon.transform = turn(back_icon.transform, 180)
else
back_icon = DF.get_image()
back_icon = DF.get_overlay()
add_overlay(back_icon)
if(facehugger)
var/mutable_appearance/facehugger_overlay = mutable_appearance('icons/mob/mask.dmi')
if(istype(src, /mob/living/simple_animal/pet/dog/corgi/puppy))
add_overlay(image('icons/mob/mask.dmi',"facehugger_corgipuppy"))
facehugger_overlay.icon_state = "facehugger_corgipuppy"
else
add_overlay(image('icons/mob/mask.dmi',"facehugger_corgi"))
facehugger_overlay.icon_state = "facehugger_corgi"
add_overlay(facehugger_overlay)
if(pcollar)
add_overlay(collar)
add_overlay(pettag)
@@ -7,9 +7,8 @@
/mob/living/simple_animal/drone/proc/apply_overlay(cache_index)
var/I = drone_overlays[cache_index]
if(I)
add_overlay(I)
if((. = drone_overlays[cache_index]))
add_overlay(.)
/mob/living/simple_animal/drone/proc/remove_overlay(cache_index)
@@ -34,11 +33,11 @@
if(!r_state)
r_state = r_hand.icon_state
var/image/r_hand_image = r_hand.build_worn_icon(state = r_state, default_layer = DRONE_HANDS_LAYER, default_icon_file = r_hand.righthand_file, isinhands = TRUE)
var/mutable_appearance/r_hand_overlay = r_hand.build_worn_icon(state = r_state, default_layer = DRONE_HANDS_LAYER, default_icon_file = r_hand.righthand_file, isinhands = TRUE)
if(y_shift)
r_hand_image.pixel_y += y_shift
r_hand_overlay.pixel_y += y_shift
hands_overlays += r_hand_image
hands_overlays += r_hand_overlay
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
r_hand.layer = ABOVE_HUD_LAYER
@@ -52,11 +51,11 @@
if(!l_state)
l_state = l_hand.icon_state
var/image/l_hand_image = l_hand.build_worn_icon(state = l_state, default_layer = DRONE_HANDS_LAYER, default_icon_file = l_hand.lefthand_file, isinhands = TRUE)
var/mutable_appearance/l_hand_overlay = l_hand.build_worn_icon(state = l_state, default_layer = DRONE_HANDS_LAYER, default_icon_file = l_hand.lefthand_file, isinhands = TRUE)
if(y_shift)
l_hand_image.pixel_y += y_shift
l_hand_overlay.pixel_y += y_shift
hands_overlays += l_hand_image
hands_overlays += l_hand_overlay
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
l_hand.layer = ABOVE_HUD_LAYER
@@ -86,10 +85,10 @@
var/used_head_icon = 'icons/mob/head.dmi'
if(istype(head, /obj/item/clothing/mask))
used_head_icon = 'icons/mob/mask.dmi'
var/image/head_overlay = head.build_worn_icon(state = head.icon_state, default_layer = DRONE_HEAD_LAYER, default_icon_file = used_head_icon)
var/mutable_appearance/head_overlay = head.build_worn_icon(state = head.icon_state, default_layer = DRONE_HEAD_LAYER, default_icon_file = used_head_icon)
head_overlay.pixel_y += -15
drone_overlays[DRONE_HEAD_LAYER] = head_overlay
drone_overlays[DRONE_HEAD_LAYER] = head_overlay
apply_overlay(DRONE_HEAD_LAYER)
@@ -2,8 +2,8 @@
icon = 'icons/mob/pets.dmi'
mob_size = MOB_SIZE_SMALL
var/obj/item/clothing/neck/petcollar/pcollar = null
var/image/collar = null
var/image/pettag = null
var/collar = ""
var/pettag = ""
blood_volume = BLOOD_VOLUME_NORMAL
devourable = TRUE
@@ -11,8 +11,8 @@
if(istype(O, /obj/item/clothing/neck/petcollar) && !pcollar)
var/obj/item/clothing/neck/petcollar/P = O
pcollar = P
collar = image('icons/mob/pets.dmi', src, "[icon_state]collar")
pettag = image('icons/mob/pets.dmi', src, "[icon_state]tag")
collar = "[icon_state]collar"
pettag = "[icon_state]tag"
regenerate_icons()
to_chat(user, "<span class='notice'>You put the [P] around [src]'s neck.</span>")
if(P.tagname)
@@ -47,5 +47,7 @@
/mob/living/simple_animal/pet/regenerate_icons()
cut_overlays()
add_overlay(collar)
add_overlay(pettag)
if(collar)
add_overlay(collar)
if(pettag)
add_overlay(pettag)
@@ -260,9 +260,8 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
I.plane = ABOVE_HUD_PLANE
/mob/living/simple_animal/hostile/guardian/proc/apply_overlay(cache_index)
var/I = guardian_overlays[cache_index]
if(I)
add_overlay(I)
if((. = guardian_overlays[cache_index]))
add_overlay(.)
/mob/living/simple_animal/hostile/guardian/proc/remove_overlay(cache_index)
var/I = guardian_overlays[cache_index]
@@ -281,9 +280,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
if(!r_state)
r_state = r_hand.icon_state
var/image/r_hand_image = r_hand.build_worn_icon(state = r_state, default_layer = GUARDIAN_HANDS_LAYER, default_icon_file = r_hand.righthand_file, isinhands = TRUE)
hands_overlays += r_hand_image
hands_overlays += r_hand.build_worn_icon(state = r_state, default_layer = GUARDIAN_HANDS_LAYER, default_icon_file = r_hand.righthand_file, isinhands = TRUE)
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
r_hand.layer = ABOVE_HUD_LAYER
@@ -296,9 +293,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
if(!l_state)
l_state = l_hand.icon_state
var/image/l_hand_image = l_hand.build_worn_icon(state = l_state, default_layer = GUARDIAN_HANDS_LAYER, default_icon_file = l_hand.lefthand_file, isinhands = TRUE)
hands_overlays += l_hand_image
hands_overlays += l_hand.build_worn_icon(state = l_state, default_layer = GUARDIAN_HANDS_LAYER, default_icon_file = l_hand.lefthand_file, isinhands = TRUE)
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
l_hand.layer = ABOVE_HUD_LAYER
@@ -40,10 +40,10 @@
to_chat(src, "<span class='danger'><B>You switch to combat mode.</span></B>")
toggle = FALSE
else
var/image/I = new('icons/effects/effects.dmi', "shield-grey")
var/mutable_appearance/shield_overlay = mutable_appearance('icons/effects/effects.dmi', "shield-grey")
if(namedatum)
I.color = namedatum.colour
add_overlay(I)
shield_overlay.color = namedatum.colour
add_overlay(shield_overlay)
melee_damage_lower = 2
melee_damage_upper = 2
speed = 1
@@ -71,9 +71,7 @@
/mob/living/simple_animal/hostile/bear/update_icons()
..()
if(armored)
var/image/B = image(icon = 'icons/mob/animal.dmi', icon_state = "armor_bear")
if(B)
add_overlay(B)
add_overlay("armor_bear")
/obj/item/bear_armor
name = "pile of bear armor"
@@ -49,7 +49,6 @@
var/idle = 0
var/isqueen = FALSE
var/icon_base = "bee"
var/static/list/bee_icons = list()
/mob/living/simple_animal/hostile/poison/bees/Process_Spacemove(movement_dir = 0)
@@ -91,24 +90,15 @@
if(beegent && beegent.color)
col = beegent.color
var/image/base
if(!bee_icons["[icon_base]_base"])
bee_icons["[icon_base]_base"] = image(icon = 'icons/mob/bees.dmi', icon_state = "[icon_base]_base")
base = bee_icons["[icon_base]_base"]
add_overlay(base)
add_overlay("[icon_base]_base")
var/image/greyscale
if(!bee_icons["[icon_base]_grey_[col]"])
bee_icons["[icon_base]_grey_[col]"] = image(icon = 'icons/mob/bees.dmi', icon_state = "[icon_base]_grey")
greyscale = bee_icons["[icon_base]_grey_[col]"]
greyscale.color = col
add_overlay(greyscale)
var/static/mutable_appearance/greyscale_overlay
greyscale_overlay = greyscale_overlay || mutable_appearance('icons/mob/bees.dmi')
greyscale_overlay.icon_state = "[icon_base]_grey"
greyscale_overlay.color = col
add_overlay(greyscale_overlay)
var/image/wings
if(!bee_icons["[icon_base]_wings"])
bee_icons["[icon_base]_wings"] = image(icon = 'icons/mob/bees.dmi', icon_state = "[icon_base]_wings")
wings = bee_icons["[icon_base]_wings"]
add_overlay(wings)
add_overlay("[icon_base]_wings")
//We don't attack beekeepers/people dressed as bees//Todo: bee costume
@@ -100,7 +100,7 @@ GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/ca
var/mob/living/creator = null // the creator
var/destroy_objects = 0
var/knockdown_people = 0
var/image/googly_eyes = null
var/static/mutable_appearance/googly_eyes = mutable_appearance('icons/mob/mob.dmi', "googly_eyes")
gold_core_spawnable = 0
/mob/living/simple_animal/hostile/mimic/copy/Initialize(mapload, obj/copy, mob/living/creator, destroy_original = 0)
@@ -143,7 +143,6 @@ GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/ca
icon_state = O.icon_state
icon_living = icon_state
copy_overlays(O)
googly_eyes = image('icons/mob/mob.dmi',"googly_eyes")
add_overlay(googly_eyes)
if(istype(O, /obj/structure) || istype(O, /obj/machinery))
health = (anchored * 50) + 50
@@ -178,11 +177,6 @@ GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/ca
C.visible_message("<span class='danger'>\The [src] knocks down \the [C]!</span>", \
"<span class='userdanger'>\The [src] knocks you down!</span>")
/mob/living/simple_animal/hostile/mimic/copy/Aggro()
..()
googly_eyes.setDir(get_dir(src,target))
/mob/living/simple_animal/hostile/mimic/copy/machine
speak = list("HUMANS ARE IMPERFECT!", "YOU SHALL BE ASSIMILATED!", "YOU ARE HARMING YOURSELF", "You have been deemed hazardous. Will you comply?", \
"My logic is undeniable.", "One of us.", "FLESH IS WEAK", "THIS ISN'T WAR, THIS IS EXTERMINATION!")
@@ -29,12 +29,13 @@
unique_name = 1
speak_emote = list("squeaks")
deathmessage = "fainted."
var/cap_color = "#ffffff"
var/powerlevel = 0 //Tracks our general strength level gained from eating other shrooms
var/bruised = 0 //If someone tries to cheat the system by attacking a shroom to lower its health, punish them so that it wont award levels to shrooms that eat it
var/recovery_cooldown = 0 //So you can't repeatedly revive it during a fight
var/faint_ticker = 0 //If we hit three, another mushroom's gonna eat us
var/image/cap_living = null //Where we store our cap icons so we dont generate them constantly to update our icon
var/image/cap_dead = null
var/static/mutable_appearance/cap_living //Where we store our cap icons so we dont generate them constantly to update our icon
var/static/mutable_appearance/cap_dead
/mob/living/simple_animal/hostile/mushroom/examine(mob/user)
..()
@@ -53,11 +54,10 @@
melee_damage_upper += rand(10,20)
maxHealth += rand(40,60)
move_to_delay = rand(3,11)
var/cap_color = rgb(rand(0, 255), rand(0, 255), rand(0, 255))
cap_living = image('icons/mob/animal.dmi',icon_state = "mushroom_cap")
cap_dead = image('icons/mob/animal.dmi',icon_state = "mushroom_cap_dead")
cap_living.color = cap_color
cap_dead.color = cap_color
cap_living = cap_living || mutable_appearance(icon, "mushroom_cap")
cap_dead = cap_dead || mutable_appearance(icon, "mushroom_cap_dead")
cap_color = rgb(rand(0, 255), rand(0, 255), rand(0, 255))
UpdateMushroomCap()
health = maxHealth
..()
@@ -101,6 +101,8 @@
/mob/living/simple_animal/hostile/mushroom/proc/UpdateMushroomCap()
cut_overlays()
cap_living.color = cap_color
cap_dead.color = cap_color
if(health == 0)
add_overlay(cap_dead)
else
@@ -32,10 +32,10 @@
gold_core_spawnable = 0 //too spooky for science
var/ghost_hair_style
var/ghost_hair_color
var/image/ghost_hair = null
var/mutable_appearance/ghost_hair
var/ghost_facial_hair_style
var/ghost_facial_hair_color
var/image/ghost_facial_hair = null
var/mutable_appearance/ghost_facial_hair
var/random = TRUE //if you want random names for ghosts or not
/mob/living/simple_animal/hostile/retaliate/ghost/Initialize()
@@ -48,19 +48,16 @@
name = "ghost of [pick(GLOB.first_names_male)] [pick(GLOB.last_names)]"
if(1)
name = "ghost of [pick(GLOB.first_names_female)] [pick(GLOB.last_names)]"
give_hair()
/mob/living/simple_animal/hostile/retaliate/ghost/proc/give_hair()
if(ghost_hair_style != null)
ghost_hair = image('icons/mob/human_face.dmi', "hair_[ghost_hair_style]")
ghost_hair.layer = -HAIR_LAYER
ghost_hair = mutable_appearance('icons/mob/human_face.dmi', "hair_[ghost_hair_style]", -HAIR_LAYER)
ghost_hair.alpha = 200
ghost_hair.color = ghost_hair_color
add_overlay(ghost_hair)
if(ghost_facial_hair_style != null)
ghost_facial_hair = image('icons/mob/human_face.dmi', "facial_[ghost_facial_hair_style]")
ghost_facial_hair.layer = -HAIR_LAYER
ghost_facial_hair = mutable_appearance('icons/mob/human_face.dmi', "facial_[ghost_facial_hair_style]", -HAIR_LAYER)
ghost_facial_hair.alpha = 200
ghost_facial_hair.color = ghost_facial_hair_color
add_overlay(ghost_facial_hair)
@@ -118,7 +118,7 @@
if(stat != DEAD)
icon_state = icon_text
if(mood && !stat)
add_overlay(image('icons/mob/slimes.dmi', icon_state = "aslime-[mood]"))
add_overlay("aslime-[mood]")
else
icon_state = icon_dead
..()
+5 -12
View File
@@ -377,7 +377,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
/mob/proc/reagent_check(datum/reagent/R) // utilized in the species code
return 1
/proc/notify_ghosts(var/message, var/ghost_sound = null, var/enter_link = null, var/atom/source = null, var/image/alert_overlay = null, var/action = NOTIFY_JUMP, flashwindow = TRUE) //Easy notification of ghosts.
/proc/notify_ghosts(var/message, var/ghost_sound = null, var/enter_link = null, var/atom/source = null, var/mutable_appearance/alert_overlay = null, var/action = NOTIFY_JUMP, flashwindow = TRUE) //Easy notification of ghosts.
if(SSatoms.initialized != INITIALIZATION_INNEW_REGULAR) //don't notify for objects created during a map load
return
for(var/mob/dead/observer/O in GLOB.player_list)
@@ -396,17 +396,10 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
A.action = action
A.target = source
if(!alert_overlay)
var/old_layer = source.layer
var/old_plane = source.plane
source.layer = FLOAT_LAYER
source.plane = FLOAT_PLANE
A.add_overlay(source)
source.layer = old_layer
source.plane = old_plane
else
alert_overlay.layer = FLOAT_LAYER
alert_overlay.plane = FLOAT_PLANE
A.add_overlay(alert_overlay)
alert_overlay = new(src)
alert_overlay.layer = FLOAT_LAYER
alert_overlay.plane = FLOAT_PLANE
A.add_overlay(alert_overlay)
/proc/item_heal_robotic(mob/living/carbon/human/H, mob/user, brute_heal, burn_heal)
var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected))