These are all essentially just random systems that scaled directly with
player count (or were on my list of the top 50 anyways). So just a
couple systems that had very inefficient enumerators being swapped out
with significantly more efficient ones, plus a few swaps from O(n) to
O(m) m << n. A big one was DrainSystem, which was querrying all possible
entities, rather than doing so from the "set of all static objects",
which is significantly smaller. Puddles are always static objects, so it
doesn't make sense to have the drains check for anything other than
static.
We can also use DirtyField to save on performance costs of Dirty(uid,
component) in cases where the Dirty is only networking a single
component field.
no CL this isn't player facing.
<!--
This is a semi-strict format, you can add/remove sections as needed but
the order/format should be kept the same
Remove these comments before submitting
-->
# Description
<!--
Explain this PR in as much detail as applicable
Some example prompts to consider:
How might this affect the game? The codebase?
What might be some alternatives to this?
How/Who does this benefit/hurt [the game/codebase]?
-->
Port nanochat lookup from Delta-v.
Pr: https://github.com/DeltaV-Station/Delta-v/pull/2794
---
# TODO
<!--
A list of everything you have to do before this PR is "complete"
You probably won't have to complete everything before merging but it's
good to leave future references
-->
- [x] Task
- [x] Completed Task
---
<!--
This is default collapsed, readers click to expand it and see all your
media
The PR media section can get very large at times, so this is a good way
to keep it clean
The title is written using HTML tags
The title must be within the <summary> tags or you won't see it
-->
<details><summary><h1>Media</h1></summary>
<p>




</p>
</details>
---
# Changelog
<!--
You can add an author after the `🆑` to change the name that appears
in the changelog (ex: `🆑 Death`)
Leaving it blank will default to your GitHub display name
This includes all available types for the changelog
-->
🆑 Toby222 and Will-Oliver-Br
add: Add Number lookup to NanoChat
---------
Co-authored-by: Tobias Berger <toby@tobot.dev>
(cherry picked from commit c3b6aeda090719cf82b132dcadebbe035a0da45a)
# Description
Fixes notifications so that they always trigger when the chat is not
open, fixes a possible exploit where a user can send a message that is
longer than the max message length, and improves the UX of NanoChat in a
few areas.
Original message from
https://github.com/Goob-Station/Goob-Station/pull/1313:
> Fixed NanoChat message notifications not showing up in situations
where you'd definitely expect them to occur.
>
> Now, for a chat to not send a notification upon a new message, three
conditions need to be fulfilled:
> - You don't have the chat muted
> - Your PDA UI is open
> - You have NanoChat as your open program
> - Your currently-selected chat is the aforementioned chat
More changes:
- Validate NanoChat message length & chat name/job title length on the
server
c063001ca9.
-If they are too long, they will be truncated to the maximum length.
- Improve the UI for editing a chat:
- Added a proper icon (used to be the letter E) for the Edit Chat
button.

- The Edit Chat popup now has correct text: the title is now "Edit a
contact", not "Add a new chat" and the Create button has been renamed to
the Confirm button.

- Editing a chat no longer deselects the current chat.
- This is done by adding a new NanoChatUiMessageType entry, `EditChat`
and a new server-side handler function just for chat edits. The previous
edit chat method simply *deleted* the chat from the client and created a
new one.
- Form validation is now more robust: you can now only submit the edit
if you've made changes to the name or job title.
- Fixed NanoChat not appearing in PDAs with more than 5 pre-installed
programs by increasing the PDA disk space (max program count) from 5 to
8, the current disk space in Wizden.

- The job title now appears on the notification title.

- The title will be truncated if it's too long.

- Improved form validation on the New Chat popup by only allowing users
to submit if the Number field is 4 numbers long. Previously, inputs like
"0" "12" "289" were valid which is ultimately incorrect as phone numbers
function more like strings that just happen to be digit-only and less
like actual numbers.

- The left chat list will now truncate names and job titles if they're
too long.

## Changelog
🆑 Skubman
- add: NanoChat message notifications will now show you the job title of
the sender alongside their name.
- add: The NanoChat edit button now has a proper icon.
- tweak: The disk space (max amount of installable programs) on PDAs has
been increased from 5 to 8. This also fixes a bug where NanoChat was not
being installed on PDAs with more than 5 pre-installed cartridges.
- tweak: The character limit for names and job titles in NanoChat has
been increased to their actual limit on ID cards (30 characters).
- tweak: NanoChat chat list names/titles and notification titles that
are too long will be shortened, indicated with "..." at the end.
- tweak: The NanoChat edit popup now displays the correct text, instead
of appearing identical to the new chat popup.
- fix: NanoChat will now send a new message notification no matter what
if you don't have the chat open.
- fix: Editing a chat in NanoChat no longer deselects that chat.
- fix: Fixed a issue where users could potentially send NanoChat
messages longer than the maximum allowed message length.
- fix: Fixed being able to create a new chat when you haven't typed in 4
digits in the number field.
(cherry picked from commit f11d2e7976491a5c95aeb36eaa7a313624197a88)
* Completely untested first commit
* Get basic program flow working
* Add Innocent
* Add Fancy Rich Text
* Icon
Thanks, IcedQuinn!
* Add Cartridge icons
* New image from IcedQuinn
* Add explanation on what a Sophont is, to be automatically appended to any text referencing a Sophont later on
* Convert tabs to spaces
* remove [bold] tags from loc
* Make text bold again
* Alter formatting, reduce text length for sophont explanation to fit it on the screen
* Update Resources/Locale/en-US/deltav/cartridge-loader/cartridges.ftl
Co-authored-by: Colin-Tel <113523727+Colin-Tel@users.noreply.github.com>
Signed-off-by: Tim Falken <timfalken@hotmail.com>
* Add program to more PDA's
* Add a tip about the app
* Recreate flow in yaml
todo: actually load and use this yaml
* Remove the old state machine, and add configurable yaml prototypes to define pages
* Move page to its own file
---------
Signed-off-by: Tim Falken <timfalken@hotmail.com>
Co-authored-by: Colin-Tel <113523727+Colin-Tel@users.noreply.github.com>