mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-25 08:34:23 +00:00
## About The Pull Request The high luminosity eyes item was extremely out of date, broken, and full of copy paste code from atom lighting. Which is a shame because they were cool. On top of all that it was using a special light effect that was not very performant. I got rid of all that, hooked it into atom lighting as a new light type, and gave it a new TGUI as well because the old ui prompts were not great either. You can now pick a color at random if you want. You can also set the color and range before surgically implanting them. No more being forced to go through the color picker when you just want to change the range. Functionally they should pretty much should be the same as before with some bonus features (see below).  Closes https://github.com/tgstation/tgstation/issues/61041 Closes https://github.com/Skyrat-SS13/Skyrat-tg/issues/14685 This is 100% completed. I just finished fixing the slight translation bug when going from 0->1 range (see above gif) and that was the last thing on my bucket list. I happy enough with this at this point in time. --- EDIT: I have decided to add in one last new feature, and that is... independent settings for eye color. <details> <summary>You can now set eye color independently if you wish</summary>  </details> The eye color does not modify the light color in any way when set in this manner, but it can be used for cosmetic purposes. Kind of makes the item more like cybereyes from cyberpunk, which I think are pretty neat! </details> ### What I've done, in more detail: - refactored high luminosity eyes so they use the atom lighting system instead of the way they were doing it before - the new light type, `MOVABLE_LIGHT_BEAM` behaves similarly to directional lights, with some slight differences. it reuses the same lighting overlay sprites but scales them vertically to produce a more focused effect. The result can be seen above. This is in contrast to the old way, which spawned `range` number of individual 32x32 overlays and moved them around. This way should perform better as well as be more maintainable. - added a new TGUI interface for high luminosity eyes with buttons for range, a text field for a color hex, a color picker and randomizer - made the eye overlay emissive when the light is turned on - range goes from 0 to 5. at range 0, the light overlay is turned off and you are left with just the emissive eyes. - added a cosmetic functionality to this item that lets you change the color of your eyes independently of the lighting (and each other) - fixed a bug with directional flashlights sometimes not updating their lighting overlay if you pick them up without changing your direction --- ### Other Misc Fixes Being able to dynamically set range back and forth exposed some logic issues that had existed with directional light overlays and I have fixed those. That is why there are some edits in that file that may not appear readily obvious why they are there. Apart from that, two other bugs that come to mind: 1) eye code was supposed to keep track of the eye color you had before you got new eyes, but it was overwriting that every time you ran refresh(). 2) lighting was supposed to be turning off the light when range is set to 0, but it was not doing that properly. And of course besides that, there may have been a few instances of finding typos/tidying up code ## Why It's Good For The Game The code for this was like 6 years old and in desperate need of updating. Now it works, and has a nicer UI. ## Changelog 🆑 fix: high luminosity eyes light overlays now follow the user correctly qol: high luminosity eyes now have a tgui menu so you no longer have to go through the color picker every time you want to change the range. they also have a new setting that lets you change the color of your eyes independently of the light color. You can now have cybernetic heterochromia if you want fix: directional flashlights when picked up will now always update their cast light direction correctly no matter what dir you are facing refactor: refactors high luminosity eye code to better make use of the atom lighting system, adding a new light type 'MOVABLE_LIGHT_BEAM' /🆑