mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 09:42:29 +00:00
Fixes nonhuman meat being unusable for any material crafting (#92722)
## About The Pull Request A ton of mobs don't have blood types so this runtimes constantly and would produce broken material datums.
This commit is contained in:
@@ -173,11 +173,10 @@
|
||||
saturation = min(saturation, 1 - added_saturation)
|
||||
|
||||
var/list/new_matrix = list(
|
||||
0, 0, 0, 0, // Ignore original hue
|
||||
0, saturation, 0, 0, // Multiply the saturation by ours
|
||||
0, 0, 1 - deducted_light, 0, // If we're highly saturated then remove a bit of lightness to keep some color in
|
||||
0, 0, 0, 1, // Preserve alpha
|
||||
hue, added_saturation, 0, 0, // And apply our preferred hue and some saturation if we're oversaturated
|
||||
0, 0, 0, // Ignore original hue
|
||||
0, saturation, 0, // Multiply the saturation by ours
|
||||
0, 0, 1 - deducted_light, // If we're highly saturated then remove a bit of lightness to keep some color in
|
||||
hue, added_saturation, 0, // And apply our preferred hue and some saturation if we're oversaturated
|
||||
)
|
||||
return color_matrix_filter(new_matrix, FILTER_COLOR_HSL)
|
||||
|
||||
|
||||
@@ -134,9 +134,10 @@
|
||||
subjectname = source.name
|
||||
|
||||
var/datum/blood_type/blood_type = source.get_bloodtype()
|
||||
color = blood_type.get_color()
|
||||
|
||||
blood_dna = source.get_blood_dna_list()
|
||||
if (blood_type && blood_type.get_color() != BLOOD_COLOR_RED)
|
||||
var/list/transition_filter = color_transition_filter(blood_type.get_color())
|
||||
color = transition_filter["color"]
|
||||
blood_dna = source.get_blood_dna_list()
|
||||
|
||||
if(ishuman(source))
|
||||
var/mob/living/carbon/human/human_source = source
|
||||
@@ -155,8 +156,10 @@
|
||||
|
||||
if(source.exotic_bloodtype)
|
||||
var/datum/blood_type/blood_type = get_blood_type(source.exotic_bloodtype)
|
||||
color = blood_type.get_color()
|
||||
blood_dna = list("[blood_type.dna_string]" = blood_type)
|
||||
if (blood_type && blood_type.get_color() != BLOOD_COLOR_RED)
|
||||
var/list/transition_filter = color_transition_filter(blood_type.get_color())
|
||||
color = transition_filter["color"]
|
||||
blood_dna = list("[blood_type.dna_string]" = blood_type)
|
||||
|
||||
return ..()
|
||||
|
||||
@@ -170,8 +173,9 @@
|
||||
var/list/blood_data = source.data
|
||||
name = "[blood_data["real_name"] || "mystery"] [initial(name)]"
|
||||
var/datum/blood_type/blood_type = blood_data["blood_type"]
|
||||
if(blood_type)
|
||||
color = blood_type.get_color()
|
||||
if(blood_type && blood_type.get_color() != BLOOD_COLOR_RED)
|
||||
var/list/transition_filter = color_transition_filter(blood_type.get_color())
|
||||
color = transition_filter["color"]
|
||||
blood_dna = list("[blood_type.dna_string]" = blood_type)
|
||||
else
|
||||
color = source.color
|
||||
|
||||
Reference in New Issue
Block a user