mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 16:13:19 +01:00
Laying down is now a transform, so cleaning out unused icons
This commit is contained in:
@@ -124,7 +124,6 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
//////////////////////////////////
|
||||
|
||||
/mob/living/carbon/human
|
||||
var/list/overlays_lying[TOTAL_LAYERS]
|
||||
var/list/overlays_standing[TOTAL_LAYERS]
|
||||
var/previous_damage_appearance // store what the body last looked like, so we only have to update it if something changed
|
||||
var/icon/race_icon
|
||||
@@ -132,14 +131,11 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/apply_overlay(cache_index)
|
||||
var/image/I = lying ? overlays_lying[cache_index] : overlays_standing[cache_index]
|
||||
var/image/I = 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
|
||||
@@ -152,28 +148,32 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
update_hud() //TODO: remove the need for this
|
||||
overlays.Cut()
|
||||
|
||||
if(lying) //can't be cloaked when lying. (for now)
|
||||
icon = lying_icon
|
||||
for(var/image/I in overlays_lying)
|
||||
overlays += I
|
||||
var/stealth = 0
|
||||
//cloaking devices. //TODO: get rid of this :<
|
||||
for(var/obj/item/weapon/cloaking_device/S in list(l_hand,r_hand,belt,l_store,r_store))
|
||||
if(S.active)
|
||||
stealth = 1
|
||||
break
|
||||
if(stealth)
|
||||
icon = 'icons/mob/human.dmi'
|
||||
icon_state = "body_cloaked"
|
||||
var/image/I = overlays_standing[L_HAND_LAYER]
|
||||
if(istype(I)) overlays += I
|
||||
I = overlays_standing[R_HAND_LAYER]
|
||||
if(istype(I)) overlays += I
|
||||
else
|
||||
var/stealth = 0
|
||||
//cloaking devices. //TODO: get rid of this :<
|
||||
for(var/obj/item/weapon/cloaking_device/S in list(l_hand,r_hand,belt,l_store,r_store))
|
||||
if(S.active)
|
||||
stealth = 1
|
||||
break
|
||||
if(stealth)
|
||||
icon = 'icons/mob/human.dmi'
|
||||
icon_state = "body_cloaked"
|
||||
var/image/I = overlays_standing[L_HAND_LAYER]
|
||||
if(istype(I)) overlays += I
|
||||
I = overlays_standing[R_HAND_LAYER]
|
||||
if(istype(I)) overlays += I
|
||||
else
|
||||
icon = stand_icon
|
||||
for(var/image/I in overlays_standing)
|
||||
overlays += I
|
||||
icon = stand_icon
|
||||
for(var/image/I in overlays_standing)
|
||||
overlays += I
|
||||
if(lying)
|
||||
var/matrix/M = matrix()
|
||||
M.Turn(90)
|
||||
M.Translate(1,-6)
|
||||
src.transform = M
|
||||
else
|
||||
var/matrix/M = matrix()
|
||||
src.transform = M
|
||||
|
||||
|
||||
var/global/list/damage_icon_parts = list()
|
||||
proc/get_damage_icon_part(damage_state, body_part)
|
||||
@@ -203,10 +203,8 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
previous_damage_appearance = damage_appearance
|
||||
|
||||
var/icon/standing = new /icon('icons/mob/dam_human.dmi', "00")
|
||||
var/icon/lying = new /icon('icons/mob/dam_human.dmi', "00-2")
|
||||
|
||||
var/image/standing_image = new /image("icon" = standing)
|
||||
var/image/lying_image = new /image("icon" = lying)
|
||||
|
||||
|
||||
// blend the individual damage states with our icons
|
||||
@@ -219,19 +217,14 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
|
||||
standing_image.overlays += DI
|
||||
|
||||
DI = get_damage_icon_part("[O.damage_state]-2", "[O.icon_name]2")
|
||||
lying_image.overlays += DI
|
||||
|
||||
|
||||
overlays_standing[DAMAGE_LAYER] = standing_image
|
||||
overlays_lying[DAMAGE_LAYER] = lying_image
|
||||
|
||||
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)
|
||||
|
||||
var/husk_color_mod = rgb(96,88,80)
|
||||
var/hulk_color_mod = rgb(48,224,40)
|
||||
@@ -328,8 +321,6 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
if(!fat && !skeleton)
|
||||
stand_icon.Blend(new /icon('icons/mob/human.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY)
|
||||
|
||||
lying_icon = stand_icon.MakeLying()
|
||||
|
||||
if(update_icons)
|
||||
update_icons()
|
||||
|
||||
@@ -340,7 +331,6 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
//HAIR OVERLAY
|
||||
/mob/living/carbon/human/proc/update_hair(var/update_icons=1)
|
||||
//Reset our hair
|
||||
overlays_lying[HAIR_LAYER] = null
|
||||
overlays_standing[HAIR_LAYER] = null
|
||||
|
||||
var/datum/organ/external/head/head_organ = get_organ("head")
|
||||
@@ -355,33 +345,25 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
|
||||
//base icons
|
||||
var/icon/face_standing = new /icon('icons/mob/human_face.dmi',"bald_s")
|
||||
var/icon/face_lying = new /icon('icons/mob/human_face.dmi',"bald_l")
|
||||
|
||||
if(f_style)
|
||||
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[f_style]
|
||||
if(facial_hair_style && src.species.name in facial_hair_style.species_allowed)
|
||||
var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
|
||||
var/icon/facial_l = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_l")
|
||||
if(facial_hair_style.do_colouration)
|
||||
facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD)
|
||||
facial_l.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD)
|
||||
|
||||
face_standing.Blend(facial_s, ICON_OVERLAY)
|
||||
face_lying.Blend(facial_l, ICON_OVERLAY)
|
||||
|
||||
if(h_style && !(head && (head.flags & BLOCKHEADHAIR)))
|
||||
var/datum/sprite_accessory/hair_style = hair_styles_list[h_style]
|
||||
if(hair_style && src.species.name in hair_style.species_allowed)
|
||||
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
|
||||
var/icon/hair_l = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_l")
|
||||
if(hair_style.do_colouration)
|
||||
hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
|
||||
hair_l.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
|
||||
|
||||
face_standing.Blend(hair_s, ICON_OVERLAY)
|
||||
face_lying.Blend(hair_l, ICON_OVERLAY)
|
||||
|
||||
overlays_lying[HAIR_LAYER] = image(face_lying)
|
||||
overlays_standing[HAIR_LAYER] = image(face_standing)
|
||||
|
||||
if(update_icons) update_icons()
|
||||
@@ -391,7 +373,6 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
if(FAT in mutations)
|
||||
fat = "fat"
|
||||
|
||||
var/image/lying = image("icon" = 'icons/effects/genetics.dmi')
|
||||
var/image/standing = image("icon" = 'icons/effects/genetics.dmi')
|
||||
var/add_image = 0
|
||||
var/g = "m"
|
||||
@@ -400,29 +381,22 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
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"
|
||||
add_image = 1
|
||||
if(COLD_RESISTANCE)
|
||||
lying.underlays += "fire[fat]_l"
|
||||
standing.underlays += "fire[fat]_s"
|
||||
add_image = 1
|
||||
if(TK)
|
||||
lying.underlays += "telekinesishead[fat]_l"
|
||||
standing.underlays += "telekinesishead[fat]_s"
|
||||
add_image = 1
|
||||
if(LASER)
|
||||
lying.overlays += "lasereyes_l"
|
||||
standing.overlays += "lasereyes_s"
|
||||
add_image = 1
|
||||
if(add_image)
|
||||
overlays_lying[MUTATIONS_LAYER] = lying
|
||||
overlays_standing[MUTATIONS_LAYER] = standing
|
||||
else
|
||||
overlays_lying[MUTATIONS_LAYER] = null
|
||||
overlays_standing[MUTATIONS_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
@@ -445,10 +419,8 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
if(dna)
|
||||
switch(dna.mutantrace)
|
||||
if("golem","slime","shadow","adamantine")
|
||||
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_l")
|
||||
overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_s")
|
||||
else
|
||||
overlays_lying[MUTANTRACE_LAYER] = null
|
||||
overlays_standing[MUTANTRACE_LAYER] = null
|
||||
|
||||
if(!dna || !(dna.mutantrace in list("golem","metroid")))
|
||||
@@ -460,12 +432,10 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
//Call when target overlay should be added/removed
|
||||
/mob/living/carbon/human/update_targeted(var/update_icons=1)
|
||||
if (targeted_by && target_locked)
|
||||
overlays_lying[TARGETED_LAYER] = target_locked
|
||||
overlays_standing[TARGETED_LAYER] = target_locked
|
||||
else if (!targeted_by && target_locked)
|
||||
del(target_locked)
|
||||
if (!targeted_by)
|
||||
overlays_lying[TARGETED_LAYER] = null
|
||||
overlays_standing[TARGETED_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
@@ -473,7 +443,6 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
|
||||
remove_overlay(FIRE_LAYER)
|
||||
if(on_fire)
|
||||
overlays_lying[FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Lying", "layer"=-FIRE_LAYER)
|
||||
overlays_standing[FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing", "layer"=-FIRE_LAYER)
|
||||
|
||||
apply_overlay(FIRE_LAYER)
|
||||
@@ -517,43 +486,34 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
w_uniform.screen_loc = ui_iclothing
|
||||
var/t_color = w_uniform._color
|
||||
if(!t_color) t_color = icon_state
|
||||
var/image/lying = image("icon_state" = "[t_color]_l")
|
||||
var/image/standing = image("icon_state" = "[t_color]_s")
|
||||
|
||||
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'
|
||||
|
||||
if(w_uniform.custom)
|
||||
lying.icon = w_uniform.icon
|
||||
standing.icon = w_uniform.icon
|
||||
|
||||
if(w_uniform.blood_DNA)
|
||||
if(green==1)
|
||||
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "xuniformblood2")
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "xuniformblood")
|
||||
else
|
||||
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
|
||||
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
|
||||
else
|
||||
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, wear_pda, belt) ) //
|
||||
@@ -572,13 +532,10 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
if(wear_id)
|
||||
wear_id.screen_loc = ui_id //TODO
|
||||
if(w_uniform && w_uniform:displays_id)
|
||||
overlays_lying[ID_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "id2")
|
||||
overlays_standing[ID_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "id")
|
||||
else
|
||||
overlays_lying[ID_LAYER] = null
|
||||
overlays_standing[ID_LAYER] = null
|
||||
else
|
||||
overlays_lying[ID_LAYER] = null
|
||||
overlays_standing[ID_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
@@ -586,28 +543,21 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
if(gloves)
|
||||
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")
|
||||
var/image/standing = image("icon" = 'icons/mob/hands.dmi', "icon_state" = "[t_state]")
|
||||
if(gloves.blood_DNA)
|
||||
if(green==1)
|
||||
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "xbloodyhands2")
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "xbloodyhands")
|
||||
else
|
||||
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "bloodyhands2")
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "bloodyhands")
|
||||
gloves.screen_loc = ui_gloves
|
||||
overlays_lying[GLOVES_LAYER] = lying
|
||||
overlays_standing[GLOVES_LAYER] = standing
|
||||
else
|
||||
if(blood_DNA)
|
||||
if (green)
|
||||
overlays_lying[GLOVES_LAYER] = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "xbloodyhands2")
|
||||
overlays_standing[GLOVES_LAYER] = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "xbloodyhands")
|
||||
else
|
||||
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_lying[GLOVES_LAYER] = null
|
||||
overlays_standing[GLOVES_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
@@ -617,23 +567,18 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
var/dmi='icons/mob/eyes.dmi'
|
||||
if(glasses.custom)
|
||||
dmi = glasses.icon
|
||||
overlays_lying[GLASSES_LAYER] = image("icon" = dmi, "icon_state" = "[glasses.icon_state]2")
|
||||
overlays_standing[GLASSES_LAYER] = image("icon" = dmi, "icon_state" = "[glasses.icon_state]")
|
||||
else
|
||||
overlays_lying[GLASSES_LAYER] = null
|
||||
overlays_standing[GLASSES_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_ears(var/update_icons=1)
|
||||
if(l_ear || r_ear)
|
||||
if(l_ear)
|
||||
overlays_lying[EARS_LAYER] = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[l_ear.icon_state]2")
|
||||
overlays_standing[EARS_LAYER] = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[l_ear.icon_state]")
|
||||
if(r_ear)
|
||||
overlays_lying[EARS_LAYER] = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[r_ear.icon_state]2")
|
||||
overlays_standing[EARS_LAYER] = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[r_ear.icon_state]")
|
||||
else
|
||||
overlays_lying[EARS_LAYER] = null
|
||||
overlays_standing[EARS_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
@@ -642,19 +587,14 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
var/dmi='icons/mob/feet.dmi'
|
||||
if(shoes.custom)
|
||||
dmi = shoes.icon
|
||||
var/image/lying = image("icon" = dmi, "icon_state" = "[shoes.icon_state]2")
|
||||
var/image/standing = image("icon" = dmi, "icon_state" = "[shoes.icon_state]")
|
||||
if(shoes.blood_DNA)
|
||||
if(green==1)
|
||||
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "xshoeblood2")
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "xshoeblood")
|
||||
else
|
||||
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "shoeblood2")
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "shoeblood")
|
||||
overlays_lying[SHOES_LAYER] = lying
|
||||
overlays_standing[SHOES_LAYER] = standing
|
||||
else
|
||||
overlays_lying[SHOES_LAYER] = null
|
||||
overlays_standing[SHOES_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
@@ -666,11 +606,9 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
var/dmi='icons/mob/belt_mirror.dmi'
|
||||
if(s_store.custom)
|
||||
dmi = s_store.icon
|
||||
overlays_lying[SUIT_STORE_LAYER] = image("icon" = dmi, "icon_state" = "[t_state]2")
|
||||
overlays_standing[SUIT_STORE_LAYER] = image("icon" = dmi, "icon_state" = "[t_state]")
|
||||
s_store.screen_loc = ui_sstore1 //TODO
|
||||
else
|
||||
overlays_lying[SUIT_STORE_LAYER] = null
|
||||
overlays_standing[SUIT_STORE_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
@@ -678,28 +616,21 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
/mob/living/carbon/human/update_inv_head(var/update_icons=1,var/green=0)
|
||||
if(head)
|
||||
head.screen_loc = ui_head //TODO
|
||||
var/image/lying
|
||||
var/image/standing
|
||||
if(istype(head,/obj/item/clothing/head/kitty))
|
||||
lying = image("icon" = head:mob2)
|
||||
standing = image("icon" = head:mob)
|
||||
else
|
||||
var/dmi='icons/mob/head.dmi'
|
||||
if(head.custom)
|
||||
dmi = head.icon
|
||||
lying = image("icon" = dmi, "icon_state" = "[head.icon_state]2")
|
||||
standing = image("icon" = dmi, "icon_state" = "[head.icon_state]")
|
||||
if(head.blood_DNA)
|
||||
if(green==1)
|
||||
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "xhelmetblood2")
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "xhelmetblood")
|
||||
else
|
||||
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
|
||||
else
|
||||
overlays_lying[HEAD_LAYER] = null
|
||||
overlays_standing[HEAD_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
@@ -712,10 +643,8 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
var/dmi='icons/mob/belt.dmi'
|
||||
if(belt.custom)
|
||||
dmi = belt.icon
|
||||
overlays_lying[BELT_LAYER] = image("icon" = dmi, "icon_state" = "[t_state]2")
|
||||
overlays_standing[BELT_LAYER] = image("icon" = dmi, "icon_state" = "[t_state]")
|
||||
else
|
||||
overlays_lying[BELT_LAYER] = null
|
||||
overlays_standing[BELT_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
@@ -727,7 +656,6 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
if(wear_suit.custom)
|
||||
dmi = wear_suit.icon
|
||||
|
||||
var/image/lying = image("icon" = dmi, "icon_state" = "[wear_suit.icon_state]2")
|
||||
var/image/standing = image("icon" = dmi, "icon_state" = "[wear_suit.icon_state]")
|
||||
|
||||
if( istype(wear_suit, /obj/item/clothing/suit/straight_jacket) )
|
||||
@@ -743,22 +671,18 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
t_state = "coat"
|
||||
else
|
||||
t_state = "suit"
|
||||
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[t_state]blood2")
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[t_state]blood")
|
||||
|
||||
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
|
||||
|
||||
update_tail_showing(0)
|
||||
|
||||
else
|
||||
overlays_lying[SUIT_LAYER] = null
|
||||
overlays_standing[SUIT_LAYER] = null
|
||||
|
||||
update_tail_showing(0)
|
||||
@@ -780,15 +704,11 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
var/dmi='icons/mob/mask.dmi'
|
||||
if(wear_mask.custom)
|
||||
dmi = wear_mask.icon
|
||||
var/image/lying = image("icon" = dmi, "icon_state" = "[wear_mask.icon_state]2")
|
||||
var/image/standing = image("icon" = dmi, "icon_state" = "[wear_mask.icon_state]")
|
||||
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
|
||||
else
|
||||
overlays_lying[FACEMASK_LAYER] = null
|
||||
overlays_standing[FACEMASK_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
@@ -799,10 +719,8 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
var/dmi='icons/mob/back.dmi'
|
||||
if(back.custom)
|
||||
dmi = back.icon
|
||||
overlays_lying[BACK_LAYER] = image("icon" = dmi, "icon_state" = "[back.icon_state]2")
|
||||
overlays_standing[BACK_LAYER] = image("icon" = dmi, "icon_state" = "[back.icon_state]")
|
||||
else
|
||||
overlays_lying[BACK_LAYER] = null
|
||||
overlays_standing[BACK_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
@@ -825,13 +743,10 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
R.overlays += image("icon"='icons/mob/screen_gen.dmi', "icon_state"="markus")
|
||||
L.overlays += image("icon"='icons/mob/screen_gen.dmi', "icon_state"="gabrielle")
|
||||
if(istype(handcuffed, /obj/item/weapon/handcuffs/pinkcuffs))
|
||||
overlays_lying[HANDCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "pinkcuff2")
|
||||
overlays_standing[HANDCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "pinkcuff1")
|
||||
else
|
||||
overlays_lying[HANDCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "handcuff2")
|
||||
overlays_standing[HANDCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "handcuff1")
|
||||
else
|
||||
overlays_lying[HANDCUFF_LAYER] = null
|
||||
overlays_standing[HANDCUFF_LAYER] = null
|
||||
if(hud_used)
|
||||
var/obj/screen/inventory/R = hud_used.adding[3]
|
||||
@@ -842,7 +757,6 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
|
||||
/mob/living/carbon/human/update_inv_legcuffed(var/update_icons=1)
|
||||
if(legcuffed)
|
||||
overlays_lying[LEGCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "legcuff2")
|
||||
overlays_standing[LEGCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "legcuff1")
|
||||
if(src.m_intent != "walk")
|
||||
src.m_intent = "walk"
|
||||
@@ -850,7 +764,6 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
src.hud_used.move_intent.icon_state = "walking"
|
||||
|
||||
else
|
||||
overlays_lying[LEGCUFF_LAYER] = null
|
||||
overlays_standing[LEGCUFF_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
@@ -887,12 +800,10 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/proc/update_tail_showing(var/update_icons=1)
|
||||
overlays_lying[TAIL_LAYER] = null
|
||||
overlays_standing[TAIL_LAYER] = null
|
||||
|
||||
if(species.tail && species.flags & HAS_TAIL)
|
||||
if(!wear_suit || !(wear_suit.flags_inv & HIDEJUMPSUIT) && !istype(wear_suit, /obj/item/clothing/suit/space))
|
||||
overlays_lying[TAIL_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_l")
|
||||
overlays_standing[TAIL_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_s")
|
||||
|
||||
if(update_icons)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
name = "diona nymph"
|
||||
voice_name = "diona nymph"
|
||||
speak_emote = list("chirrups")
|
||||
ico = "nymph"
|
||||
icon_state = "nymph1"
|
||||
var/list/donors = list()
|
||||
var/ready_evolve = 0
|
||||
|
||||
|
||||
@@ -10,28 +10,27 @@
|
||||
|
||||
var/obj/item/weapon/card/id/wear_id = null // Fix for station bounced radios -- Skie
|
||||
var/greaterform = "Human" // Used when humanizing a monkey.
|
||||
var/ico = "monkey" // Used when updating icons.
|
||||
var/uni_append = "12C4E2" // Small appearance modifier for different species.
|
||||
|
||||
/mob/living/carbon/monkey/tajara
|
||||
name = "farwa"
|
||||
voice_name = "farwa"
|
||||
speak_emote = list("mews")
|
||||
ico = "tajkey"
|
||||
icon_state = "tajkey1"
|
||||
uni_append = "0A0E00"
|
||||
|
||||
/mob/living/carbon/monkey/skrell
|
||||
name = "neaera"
|
||||
voice_name = "neaera"
|
||||
speak_emote = list("squicks")
|
||||
ico = "skrellkey"
|
||||
icon_state = "skrellkey1"
|
||||
uni_append = "01CC92"
|
||||
|
||||
/mob/living/carbon/monkey/unathi
|
||||
name = "stok"
|
||||
voice_name = "stok"
|
||||
speak_emote = list("hisses")
|
||||
ico = "stokkey"
|
||||
icon_state = "stokkey1"
|
||||
uni_append = "044C5D"
|
||||
|
||||
/mob/living/carbon/monkey/New()
|
||||
|
||||
@@ -30,25 +30,27 @@
|
||||
update_hud()
|
||||
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
|
||||
overlays.Cut()
|
||||
for(var/image/I in overlays_standing)
|
||||
overlays += I
|
||||
|
||||
|
||||
if(lying)
|
||||
icon_state = ico + "0"
|
||||
for(var/image/I in overlays_lying)
|
||||
overlays += I
|
||||
var/matrix/M = matrix()
|
||||
M.Turn(90)
|
||||
M.Translate(1,-6)
|
||||
src.transform = M
|
||||
else
|
||||
icon_state = ico + "1"
|
||||
for(var/image/I in overlays_standing)
|
||||
overlays += I
|
||||
var/matrix/M = matrix()
|
||||
src.transform = M
|
||||
|
||||
|
||||
|
||||
////////
|
||||
/mob/living/carbon/monkey/update_inv_wear_mask(var/update_icons=1)
|
||||
if( wear_mask && istype(wear_mask, /obj/item/clothing/mask) )
|
||||
overlays_lying[M_MASK_LAYER] = image("icon" = 'icons/mob/monkey.dmi', "icon_state" = "[wear_mask.icon_state]2")
|
||||
overlays_standing[M_MASK_LAYER] = image("icon" = 'icons/mob/monkey.dmi', "icon_state" = "[wear_mask.icon_state]")
|
||||
wear_mask.screen_loc = ui_monkey_mask
|
||||
else
|
||||
overlays_lying[M_MASK_LAYER] = null
|
||||
overlays_standing[M_MASK_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
@@ -79,11 +81,9 @@
|
||||
|
||||
/mob/living/carbon/monkey/update_inv_back(var/update_icons=1)
|
||||
if(back)
|
||||
overlays_lying[M_BACK_LAYER] = image("icon" = 'icons/mob/back.dmi', "icon_state" = "[back.icon_state]2")
|
||||
overlays_standing[M_BACK_LAYER] = image("icon" = 'icons/mob/back.dmi', "icon_state" = "[back.icon_state]")
|
||||
back.screen_loc = ui_monkey_back
|
||||
else
|
||||
overlays_lying[M_BACK_LAYER] = null
|
||||
overlays_standing[M_BACK_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
@@ -93,10 +93,8 @@
|
||||
drop_r_hand()
|
||||
drop_l_hand()
|
||||
stop_pulling()
|
||||
overlays_lying[M_HANDCUFF_LAYER] = image("icon" = 'icons/mob/monkey.dmi', "icon_state" = "handcuff2")
|
||||
overlays_standing[M_HANDCUFF_LAYER] = image("icon" = 'icons/mob/monkey.dmi', "icon_state" = "handcuff1")
|
||||
else
|
||||
overlays_lying[M_HANDCUFF_LAYER] = null
|
||||
overlays_standing[M_HANDCUFF_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
@@ -108,28 +106,20 @@
|
||||
//Call when target overlay should be added/removed
|
||||
/mob/living/carbon/monkey/update_targeted(var/update_icons=1)
|
||||
if (targeted_by && target_locked)
|
||||
overlays_lying[TARGETED_LAYER] = target_locked
|
||||
overlays_standing[TARGETED_LAYER] = target_locked
|
||||
else if (!targeted_by && target_locked)
|
||||
del(target_locked)
|
||||
if (!targeted_by)
|
||||
overlays_lying[TARGETED_LAYER] = null
|
||||
overlays_standing[TARGETED_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/monkey/update_fire()
|
||||
overlays -= overlays_lying[M_FIRE_LAYER]
|
||||
overlays -= overlays_standing[M_FIRE_LAYER]
|
||||
if(on_fire)
|
||||
overlays_lying[M_FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Lying", "layer"= -M_FIRE_LAYER)
|
||||
overlays_standing[M_FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing", "layer"= -M_FIRE_LAYER)
|
||||
if(src.lying)
|
||||
overlays += overlays_lying[M_FIRE_LAYER]
|
||||
else
|
||||
overlays += overlays_standing[M_FIRE_LAYER]
|
||||
overlays += overlays_standing[M_FIRE_LAYER]
|
||||
return
|
||||
else
|
||||
overlays_lying[M_FIRE_LAYER] = null
|
||||
overlays_standing[M_FIRE_LAYER] = null
|
||||
|
||||
//Monkey Overlays Indexes////////
|
||||
|
||||
Reference in New Issue
Block a user