Files
Bubberstation/code/modules/client/preferences/ui_style.dm
RimiNosha f58cf51ae4 [MODULARIZING] Partial Refactoring of Organic Interface Code (#16019)
This took a long time to review, but at long last, it's done.

* HUD clutter, good bye, you will not be missed.

* Oh my god so much pain

* No commented code. Bad.

* Uwaaaa

* Add a couple of warning messages for common scenarios, use defines

* AAAAA

* AAAAAAAAAAA

* UWAAAA

* UUUUWAAAA, DOCUMENTED SNOWFLAKE CODE

* FUCK

* Apply suggestions!

* Apply suggestions part one!

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Apply suggestions part two!

* Static list

I think this is how it works, it compiles, sooo

* Split the giga monolith that's known as technical_stuff_for_lewd into two parts, human_helpers, and whatever else isn't a human helper. Also add a helper proc for mass update_inv on organic interface slots.

* I can't believe you did this

* Did you know that organic interface code didn't clean up it's defines? Neither did I!

* Less ifs

* Apply last suggestion that I know how to

* That was a lie

* AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

I HAVEN'T EVEN TOUCHED THE WORST CODE

* Oops

* Pain

* No copypaste

* Proc is 🦀

* No, bad, no commenting code.

* List prittification for chems, reduces the sheer amount of update_body calls

* Allow non-lewd empath users to not have to suffer raunchy inspect messages

* Oop

* DEEEEEEEEEEEEFINES

* Oh yea, that review. Definitely remembered.

* Formatting

* Breast defines

* MUCH cleaner and MUCH MUCH EASIER to expand incubus draft code

* Credit myself if I'm gonna spend days of my time combing through this

* Oops

* Chems cleanup

* Whyyyyyyy

* Climax rework, suffering.

* Wtf is this name

* Oh yea, arousal clamping.

* Haha, oops

* Bad, this is stupid easy to modularize

* Why is body_size in here

* List formatting, grammar stuff, and also breast size is now letters

* This took too long for me to figure out and I'm not proud

* Even I can make shitcode!

* Oops, typo

* You know, this makes more sense.

* Mhhh, this shouldn't be named like this

* Wrong file

* Rename `adjustPain`

* Dead code go yeet

* Y U NO READ DOCS

* Doc proc, minor optimisation

* Reviews part 1

* Whoever made this should read good coding practices. For any language.

* DEEEEFINNNEEEEESSSS

* SUFFER

* No more fluids

* EEEEEEEEEEE

* AAAAAAAAAAAAAAA

* MOB IS 🦀

* AAAAAAAAAAAAAAAAAA

* AAAAAA

* UWA

* And also solve tastfish's reviews!

* Partial revert, cause DM hates that

* I am very smart

* EEE

* AAAAAA

* Haha keyboard go click clack

* CODE

* FUCK

* FUUUUUCK

* PERFORMANCE

* Reset horny to 0 if erp disabled

* Arousal minimum is now 0, cause negatives are dumb and I hate them

Also cuts out some code that isn't needed as far as I can tell.

* Apply suggestions!

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* AAAAA

* AAAAAAAAAA I CAN'T CODE

* Aaaaa

* WHY GIT

* I am very smart part... uh, four?

* Minor formatting changes

* Oops, fix potential cause of multiple climax attempts

* WAIT, WHY AREN'T YOU USING THE DEFINE?!

* Magic number slightly less magicky, sorta.

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2022-10-04 11:06:12 -04:00

27 lines
822 B
Plaintext

/// UI style preference
/datum/preference/choiced/ui_style
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_identifier = PREFERENCE_PLAYER
savefile_key = "UI_style"
should_generate_icons = TRUE
/datum/preference/choiced/ui_style/init_possible_values()
var/list/values = list()
for (var/style in GLOB.available_ui_styles)
var/icon/icons = GLOB.available_ui_styles[style]
var/icon/icon = icon(icons, "hand_r")
icon.Crop(1, 1, world.icon_size * 2, world.icon_size)
icon.Blend(icon(icons, "hand_l"), ICON_OVERLAY, world.icon_size)
values[style] = icon
return values
/datum/preference/choiced/ui_style/create_default_value()
return GLOB.available_ui_styles[1]
/datum/preference/choiced/ui_style/apply_to_client(client/client, value)
client.mob?.hud_used?.update_ui_style(ui_style2icon(value))