mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 10:11:09 +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)
|
saturation = min(saturation, 1 - added_saturation)
|
||||||
|
|
||||||
var/list/new_matrix = list(
|
var/list/new_matrix = list(
|
||||||
0, 0, 0, 0, // Ignore original hue
|
0, 0, 0, // Ignore original hue
|
||||||
0, saturation, 0, 0, // Multiply the saturation by ours
|
0, saturation, 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, 1 - deducted_light, // 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, // And apply our preferred hue and some saturation if we're oversaturated
|
||||||
hue, added_saturation, 0, 0, // And apply our preferred hue and some saturation if we're oversaturated
|
|
||||||
)
|
)
|
||||||
return color_matrix_filter(new_matrix, FILTER_COLOR_HSL)
|
return color_matrix_filter(new_matrix, FILTER_COLOR_HSL)
|
||||||
|
|
||||||
|
|||||||
@@ -134,8 +134,9 @@
|
|||||||
subjectname = source.name
|
subjectname = source.name
|
||||||
|
|
||||||
var/datum/blood_type/blood_type = source.get_bloodtype()
|
var/datum/blood_type/blood_type = source.get_bloodtype()
|
||||||
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 = source.get_blood_dna_list()
|
blood_dna = source.get_blood_dna_list()
|
||||||
|
|
||||||
if(ishuman(source))
|
if(ishuman(source))
|
||||||
@@ -155,7 +156,9 @@
|
|||||||
|
|
||||||
if(source.exotic_bloodtype)
|
if(source.exotic_bloodtype)
|
||||||
var/datum/blood_type/blood_type = get_blood_type(source.exotic_bloodtype)
|
var/datum/blood_type/blood_type = get_blood_type(source.exotic_bloodtype)
|
||||||
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)
|
blood_dna = list("[blood_type.dna_string]" = blood_type)
|
||||||
|
|
||||||
return ..()
|
return ..()
|
||||||
@@ -170,8 +173,9 @@
|
|||||||
var/list/blood_data = source.data
|
var/list/blood_data = source.data
|
||||||
name = "[blood_data["real_name"] || "mystery"] [initial(name)]"
|
name = "[blood_data["real_name"] || "mystery"] [initial(name)]"
|
||||||
var/datum/blood_type/blood_type = blood_data["blood_type"]
|
var/datum/blood_type/blood_type = blood_data["blood_type"]
|
||||||
if(blood_type)
|
if(blood_type && blood_type.get_color() != BLOOD_COLOR_RED)
|
||||||
color = blood_type.get_color()
|
var/list/transition_filter = color_transition_filter(blood_type.get_color())
|
||||||
|
color = transition_filter["color"]
|
||||||
blood_dna = list("[blood_type.dna_string]" = blood_type)
|
blood_dna = list("[blood_type.dna_string]" = blood_type)
|
||||||
else
|
else
|
||||||
color = source.color
|
color = source.color
|
||||||
|
|||||||
Reference in New Issue
Block a user