mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-02 13:33:29 +00:00
Made blood overlays respect blood color
This commit is contained in:
@@ -362,7 +362,9 @@ its easier to just keep the beam vertical.
|
||||
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.
|
||||
blood_DNA = list()
|
||||
|
||||
blood_color = "#A10808"
|
||||
if (M.species)
|
||||
blood_color = M.species.blood_color
|
||||
//adding blood to humans
|
||||
else if (istype(src, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/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/image/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
|
||||
@@ -569,6 +569,7 @@
|
||||
|
||||
//apply the blood-splatter overlay if it isn't already in there
|
||||
if(!blood_DNA.len)
|
||||
blood_overlay.color = blood_color
|
||||
overlays += blood_overlay
|
||||
|
||||
//if this blood isn't already in the list, add it
|
||||
@@ -589,7 +590,7 @@
|
||||
//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 == type && !A.blood_overlay)
|
||||
A.blood_overlay = I
|
||||
A.blood_overlay = image(I)
|
||||
|
||||
/obj/item/proc/showoff(mob/user)
|
||||
for (var/mob/M in view(user))
|
||||
|
||||
@@ -470,7 +470,9 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
standing.icon = ((w_uniform.icon_override) ? w_uniform.icon_override : 'icons/mob/uniform.dmi')
|
||||
|
||||
if(w_uniform.blood_DNA)
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "uniformblood")
|
||||
var/image/bloodsies = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "uniformblood")
|
||||
bloodsies.color = w_uniform.blood_color
|
||||
standing.overlays += bloodsies
|
||||
|
||||
if(w_uniform:hastie) //WE CHECKED THE TYPE ABOVE. THIS REALLY SHOULD BE FINE.
|
||||
var/tie_color = w_uniform:hastie.item_color
|
||||
@@ -510,12 +512,16 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
if(!t_state) t_state = gloves.icon_state
|
||||
var/image/standing = image("icon" = ((gloves.icon_override) ? gloves.icon_override : 'icons/mob/hands.dmi'), "icon_state" = "[t_state]")
|
||||
if(gloves.blood_DNA)
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "bloodyhands")
|
||||
var/image/bloodsies = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "bloodyhands")
|
||||
bloodsies.color = gloves.blood_color
|
||||
standing.overlays += bloodsies
|
||||
gloves.screen_loc = ui_gloves
|
||||
overlays_standing[GLOVES_LAYER] = standing
|
||||
else
|
||||
if(blood_DNA)
|
||||
overlays_standing[GLOVES_LAYER] = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "bloodyhands")
|
||||
var/image/bloodsies = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "bloodyhands")
|
||||
bloodsies.color = blood_color
|
||||
overlays_standing[GLOVES_LAYER] = bloodsies
|
||||
else
|
||||
overlays_standing[GLOVES_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
@@ -542,7 +548,9 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
if(shoes)
|
||||
var/image/standing = image("icon" = ((shoes.icon_override) ? shoes.icon_override : 'icons/mob/feet.dmi'), "icon_state" = "[shoes.icon_state]")
|
||||
if(shoes.blood_DNA)
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "shoeblood")
|
||||
var/image/bloodsies = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "shoeblood")
|
||||
bloodsies.color = shoes.blood_color
|
||||
standing.overlays += bloodsies
|
||||
overlays_standing[SHOES_LAYER] = standing
|
||||
else
|
||||
overlays_standing[SHOES_LAYER] = null
|
||||
@@ -568,7 +576,9 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
else
|
||||
standing = image("icon" = ((head.icon_override) ? head.icon_override : 'icons/mob/head.dmi'), "icon_state" = "[head.icon_state]")
|
||||
if(head.blood_DNA)
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "helmetblood")
|
||||
var/image/bloodsies = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "helmetblood")
|
||||
bloodsies.color = head.blood_color
|
||||
standing.overlays += bloodsies
|
||||
overlays_standing[HEAD_LAYER] = standing
|
||||
else
|
||||
overlays_standing[HEAD_LAYER] = null
|
||||
@@ -597,7 +607,9 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
|
||||
if(wear_suit.blood_DNA)
|
||||
var/obj/item/clothing/suit/S = wear_suit
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[S.blood_overlay_type]blood")
|
||||
var/image/bloodsies = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[S.blood_overlay_type]blood")
|
||||
bloodsies.color = wear_suit.blood_color
|
||||
standing.overlays += bloodsies
|
||||
|
||||
overlays_standing[SUIT_LAYER] = standing
|
||||
|
||||
@@ -621,7 +633,9 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
wear_mask.screen_loc = ui_mask //TODO
|
||||
var/image/standing = image("icon" = ((wear_mask.icon_override) ? wear_mask.icon_override : 'icons/mob/mask.dmi'), "icon_state" = "[wear_mask.icon_state]")
|
||||
if( !istype(wear_mask, /obj/item/clothing/mask/cigarette) && wear_mask.blood_DNA )
|
||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "maskblood")
|
||||
var/image/bloodsies = image("icon" = 'icons/effects/blood.dmi', "icon_state" = "maskblood")
|
||||
bloodsies.color = wear_mask.blood_color
|
||||
standing.overlays += bloodsies
|
||||
overlays_standing[FACEMASK_LAYER] = standing
|
||||
else
|
||||
overlays_standing[FACEMASK_LAYER] = null
|
||||
|
||||
Reference in New Issue
Block a user