Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silverscale blood runtime fixes and tweaks #628

Merged
merged 2 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions code/game/objects/effects/decals/cleanable/humans.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
// (at any given moment, there may be like... 200 blood decals on your screen at once
// byond is, apparently, pretty bad at handling that many color matrix operations,
// especially in a filter or while animating)
var/list/starting_color_rgb = ReadRGB(color)
var/list/starting_color_rgb = ReadRGB(color) || list(255, 255, 255, alpha)
// we want a fixed offset for a fixed drop in color intensity, plus a scaling offset based on our strongest color
// the scaling offset helps keep dark colors from turning black, while also ensurse bright colors don't stay super bright
var/max_color = max(starting_color_rgb[1], starting_color_rgb[2], starting_color_rgb[3])
Expand All @@ -83,7 +83,7 @@
clamp(starting_color_rgb[1] - red_offset, 0, 255),
clamp(starting_color_rgb[2] - green_offset, 0, 255),
clamp(starting_color_rgb[3] - blue_offset, 0, 255),
length(starting_color_rgb) >= 4 ? starting_color_rgb[4] : 255, // maintain alpha! (if it has it)
length(starting_color_rgb) >= 4 ? starting_color_rgb[4] : alpha, // maintain alpha! (if it has it)
)
// if it's dried (or about to dry) we can just set color directly
if(dried || drying_progress >= drying_time)
Expand Down
17 changes: 11 additions & 6 deletions maplestation_modules/code/modules/mob/living/blood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -279,16 +279,21 @@ PROCESSING_SUBSYSTEM_DEF(blood_drying)
/datum/blood_type/crew/lizard
name = "L"
color = "#047200" // Some species of lizards have mutated green blood due to biliverdin build up
compatible_types = list(/datum/blood_type/crew/lizard/silver)
compatible_types = list(/datum/blood_type/silver/lizard)

/datum/blood_type/crew/lizard/silver
color = "#ffffff9c"
compatible_types = list(/datum/blood_type/crew/lizard)
/datum/blood_type/silver
name = "Ag"
color = "#c9c9c99c"
reagent_type = /datum/reagent/silver

/datum/blood_type/crew/lizard/silver/set_up_blood(obj/effect/decal/cleanable/blood/blood, new_splat)
blood.add_filter("silver_glint", 3, list("type" = "outline", "color" = "#c9c9c99c", "size" = 1.5))
/datum/blood_type/silver/set_up_blood(obj/effect/decal/cleanable/blood/blood, new_splat)
blood.can_dry = FALSE
blood.emissive_alpha = max(blood.emissive_alpha, new_splat ? 125 : 63)

/datum/blood_type/silver/lizard
name = "sL"
compatible_types = list(/datum/blood_type/crew/lizard)

/datum/blood_type/crew/skrell
name = "S"
color = "#009696" // Did you know octopi have blue blood, as it contains hemocyanin rather than hemoglobin? It binds to copper instead of Iron
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
he_who_was_blessed_with_silver.add_filter("silver_glint", 2, list("type" = "outline", "color" = "#ffffff63", "size" = 2))

he_who_was_blessed_with_silver.physiology?.damage_resistance += 10
he_who_was_blessed_with_silver.dna.species.exotic_bloodtype = /datum/blood_type/crew/lizard/silver
he_who_was_blessed_with_silver.dna.species.exotic_bloodtype = /datum/blood_type/silver/lizard
organ_owner.update_body(TRUE)

/obj/item/organ/internal/tongue/lizard/silver/on_mob_remove(mob/living/carbon/organ_owner, special)
Expand Down
Loading