Commit Graph

11 Commits

Author SHA1 Message Date
lessthanthree
ce3d863d32 Combine roundstart intercept and security level announcements (#80475)
## About The Pull Request

At roundstart when the intercept report is sent, two announcements are
created at the same time. It's loud and overlaps. This combines them
into a single announcement.

Before:


![image](https://github.com/tgstation/tgstation/assets/83487515/024e783a-65d9-4c28-8850-f114b1f020ad)

After:


![image](https://github.com/tgstation/tgstation/assets/83487515/7272f82f-23b4-4e90-99a2-1b590c7d56cf)

## Why It's Good For The Game

Two Centcom or any other announcements playing at the same time
(especially with two different sound files) can be annoying and the
sounds distort each other.

## Changelog

🆑 LT3
qol: Roundstart intercept report and security level announcements are
combined into a single announcement
/🆑
2023-12-20 19:59:42 -05:00
lessthanthree
43d0367eee Improved nightshift check on security level change (#79369)
## About The Pull Request

Modifies the security level change proc to only fire the nightshift
subsystem if the subsystem is running, and if a lighting change is
required. If a lighting change is required, nightshift has its next fire
set 7 seconds after, so announcements and sounds don't stack.

## Why It's Good For The Game

Nightshift is only updated when required, eliminating nuisance
announcements when levels unrelated to red/delta are selected.

## Changelog

🆑 LT3
code: Changing security levels will only trigger the nightshift
subsystem if lighting changes are required
/🆑
2023-10-31 15:54:22 +00:00
san7890
30bac3a301 Adds Custom Announcement Dividers (#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
(37db1ecbf8) / #79052
(12308dbd3d)) 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)

<details>
<summary>Dark Mode</summary>


![image](https://github.com/tgstation/tgstation/assets/34697715/107b8efb-b7a1-41ff-9d16-358c4dc3738d)

![image](https://github.com/tgstation/tgstation/assets/34697715/9e730dfe-7ba3-4edd-96bb-0630fe5e85cf)
</details>

<details>
<summary>Light Mode</summary>


![image](https://github.com/tgstation/tgstation/assets/34697715/57f642f9-ee17-4b16-8027-00a9350e9059)

![image](https://github.com/tgstation/tgstation/assets/34697715/b28b7f49-fd4f-420a-9313-e16b9781c07c)
</details>

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
(b864589522)) 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.
/🆑

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.

---------

Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
2023-10-20 21:35:20 +02:00
lessthanthree
29cb4b5f35 Emergency shuttle is aware of security level (#78271)
## About The Pull Request

The emergency shuttle maintains its security level coefficient and does
the calculation instead of outside procs that aren't aware of what alert
it was when the shuttle was first called.

If the shuttle auto-call timer should be capped at the current security
level timer, that can be done in a different PR.

## Why It's Good For The Game

Fixes https://github.com/tgstation/tgstation/issues/78159

## Changelog

🆑 LT3
fix: Emergency shuttle should correctly scale timer up/down when
changing security levels
/🆑
2023-09-13 23:06:22 +01:00
Tastyfish
4733643f39 Clean up subsystem Initialize(), require an explicit result returned, give a formal way to fail (for SSlua) (#69775)
* cleanup SS API, give SSlua a proper way to error out

* New SS_INIT_ system
2022-09-14 23:52:10 -04:00
ShizCalev
d4c93490ec Fixes login() runtime when players connect before SSsecurity_level finishes initializing (#69152)
Fixes login() runtime when players connect before SSsecurity_level finished initializing
2022-08-18 22:11:29 -04:00
MrMelbert
627de6f1cf Fixes security level alerts playing the incorrect sounds (#68620)
* Fixes security level sounds not playing.
- The sound var was never set, turns out it used the default announcement sounds for alert or no alert.

* Documentation tweak

* Thank you san

Co-authored-by: san7890 <the@san7890.com>

Co-authored-by: san7890 <the@san7890.com>
2022-07-22 10:05:39 -04:00
ShizCalev
8c907cf2c0 Tweaks response provided by sssecurity_level during initialization (#68500) 2022-07-17 18:55:48 -07:00
LemonInTheDark
8ac99b9452 Fixes world status runtiming during initialize (#68364)
I hate it here
2022-07-16 20:09:08 -04:00
Gandalf
110edaa153 Security Level Datums (#67949) 2022-06-24 17:01:45 -07:00
Arkatos1
c19b7c0787 Security Level subsystem (#58248)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-04-10 15:10:40 -07:00