Wrong colors - Blood
Created by: eplgr
Note: I am currently trying to find a way to fix this, but it may take ages as I'm new at this. Or not. I found the bug while coding a feature for bloodpacks and basically this is my last unchecked item in my to-do list. So basically I am opening this issue thread as a way to ask for your help.
Note 2: I wrote about where I think the bug is. I may or may not be right. I am new at this, so yeah.
Description of issue
if(istype(src,/mob/living/carbon/human)) var/mob/living/carbon/human/H = src B.data["blood_colour"] = H.species.blood_color B.color = B.data["blood_colour"]
The part that says
B.color=B.data["blood_colour"] is NOT working. Those lines of code are from [blood.dm], which is the main blood file, and that specific part is where it states how drawing blood from vessels is handled, preserving all data, etcetera. Clearly not all data is preserved successfully, though.
This means a few things:
- Blood in every single container will use the default blood color, which is way brighter than what you find in, for example, blood splatters/drips on the floor.
- Nonhuman blood (vox and other species) looks RED (default color).
- Information gets lost.
Difference between expected and actual behavior
color should be whatever
data["blood_colour"] is. Currently, it isn't;
color is always
DEFAULT_BLOOD which somewhere is defined as the color you will find if you VV anything with blood.
Steps to reproduce
Use a syringe to draw blood from a vox. Look, it's red. Put it in a container. Still red.
In the same file,
proc/blood_splatter is defined, which succesfully does get the color data.
if(source.data["blood_colour"]) B.basecolor = source.data["blood_colour"] B.update_icon()
This works and as you know, blood splatters look like what they are supposed to look like.
basecolor is a
var used in decals to change their color.