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

[MIRROR] Adds Custom Announcement Dividers #189

Merged
merged 1 commit into from
Oct 20, 2023
Merged

Conversation

Steals-The-PRs
Copy link
Collaborator

Mirrored on Skyrat: Skyrat-SS13/Skyrat-tg#24471
Original PR: tgstation/tgstation#79071

This ports a whole bunch of various PRs and commits from https://github.com/effigy-se/effigy-se , with heavy refactoring to keep it fresh for /tg/'s code standards.

About The Pull Request

The whole slew of announcement touchups lately (as in #78995 (37db1ecbf8d7ceeaeb134c56b403339555f44cea) / #79052 (12308dbd3dae702a1c7b9f7f80d7859aea085c82)) have made me realize how much this stuff sucks. The author of these new spans was advertising these in coding general, so I sat down and coded it. Look at the spans, they're much nicer than what we had going on:

(ignore the capitalized alert status names, this was removed)

Dark Mode

image
image

Light Mode

image
image

This PR also features

  • Major announcement code handling cleanup and refactor! There was a lot of copypasta so let's distill it all down into one proc
  • Better cacheing! We were doing a shit load of new string generation needlessly! That's fixed now.
  • Better string concatenation! Lists are better for string tree reasons. It still works just as well, as you can see from the screenshots above. Best of all, no fucking <br> dogshit everywhere!
  • We don't use string equivalency in order to figure out the "type" of an announcement. It's all defines now. This was a bonus that I just coded in since it irritated me.
  • Minor spellcheck of "announcement".
  • All of our HTML string mangling stuff is now all span macros! I love macros.

Why It's Good For The Game

In the same vein of adding examine blocks (#67937 (b864589522f4f14183270a62dbea3df8028d2eb6)) because old examinations tended to blend in with the chat and everything chat-wise used to suck really hard- I think this is a really nice way to draw attention to announcements in the chat box without needing a shit load of line breaks that just really look ugly and have no real consistency. You can look at the PRs/commits I linked above for an idea of just how ugly it could be getting.

I haven't audited every announcement in this PR, we can tweak this down the line.

Changelog

🆑 LT3, san7890
add: Announcements have gotten a fresh coat of paint! They should be popping with splendid new colors and should have a lot less ugly linebreaks, while still managing to keep your attention at the screen.
/:cl:

I know we didn't need to port all the CSS themes but I added them anyways in case admins wanna have some fun.
There can probably be more code improvements, just figured I'd crack it out while I had time.
The colors also seem fine, let me know if we need more redness or something. It's okay for stuff to be toned down a bit imo, but that should be done after a hot second.

* Adds Custom Announcement Dividers

* Skyrat custom announcements

---------

Co-authored-by: san7890 <[email protected]>
Co-authored-by: lessthanthree <[email protected]>
@Iajret Iajret merged commit a71900e into master Oct 20, 2023
23 checks passed
@Iajret Iajret deleted the upstream-mirror-24471 branch October 20, 2023 23:10
AnywayFarus added a commit that referenced this pull request Oct 20, 2023
Iajret pushed a commit that referenced this pull request Jan 6, 2024
…ants of some missing them (#189)

* split \mob\mod.dmi into a mod_clothing and mod_module file as TG has

* it'd probably help for the module file to link to the module dmi

* rename this icon state since the test failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants