[MIRROR] 81182 81367 81399 (#26492)

* Implements rgb2num, uses it to replace all our manual rgb reading. Redoes HSV management (#81182)

[Converts all manual extraction of rbg with rgb2num. It's just
better](https://github.com/tgstation/tgstation/commit/ae798eabd5aa94dd577169553905d3efd7a7136d)

[Yanks out old HSV management, replaces it with list
stuff](https://github.com/tgstation/tgstation/commit/4997e86051d6388e495524dccba1f3258a47bb48)

There's this old lummy era clunky code that passed HSV as text

We can now cleanly replace it with passing hsv as lists from a rgb2hsv
proc

So let's just do that.

Also, cleans up spraytan code (and ethereal lighting)

Code better

* Refactors fire overlays once again to make it not get stuck so often (#81367)

Maybe finally fixes #77701

A big reason why this kept happening is because fire uses standing
overlays. But fire isn't managed by mobs anymore. Meaning in some
situations, fire can cease to exist but the overlay can still be on the
mob. So it gets stuck.

So like, why use standing overlays anymore? We can just hook
`update_overlays` signal.
Isn't that neat.

🆑 Melbert
refactor: Fire effects get added to mobs in a different way now. Maybe
it will get stuck less. Report any oddities.
/🆑

* Fix Flaky Failure From Fire  (#81399)

## About The Pull Request

Closes #81396 , Closes #81391 , Closes #81403, Closes #81402

I don't know why but I thought this proc was only called once, when the
mob entered the turf. That was silly.

And going back at it, I'm not entirely sure why I tied
`TRAIT_NO_EXTINGUISH` to the element anyways, rather than the lava like
it originally was.

While going back over this, I cleaned up the proc a bit. 

## Changelog

Not necessary

* There we go?

* Bruh moment

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
This commit is contained in:
Useroth
2024-02-13 01:03:58 +01:00
committed by GitHub
parent 3d9735a577
commit 7bb2f5055e
39 changed files with 317 additions and 655 deletions
+2 -3
View File
@@ -180,12 +180,11 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror/broken, 28)
else if(HAS_TRAIT(race_changer, TRAIT_MUTANT_COLORS) && !HAS_TRAIT(race_changer, TRAIT_FIXED_MUTANT_COLORS))
var/new_mutantcolor = input(race_changer, "Choose your skin color:", "Race change", race_changer.dna.features["mcolor"]) as color|null
if(new_mutantcolor)
var/temp_hsv = RGBtoHSV(new_mutantcolor)
var/list/mutant_hsv = rgb2hsv(new_mutantcolor)
if(ReadHSV(temp_hsv)[3] >= ReadHSV("#7F7F7F")[3]) // mutantcolors must be bright
if(mutant_hsv[3] >= 50) // mutantcolors must be bright
race_changer.dna.features["mcolor"] = sanitize_hexcolor(new_mutantcolor)
race_changer.dna.update_uf_block(DNA_MUTANT_COLOR_BLOCK)
else
to_chat(race_changer, span_notice("Invalid color. Your color is not bright enough."))
return TRUE