* Properly cache regexes in chat sanitization/accents
Wow I wonder if `new Regex()` has a cost to it *looks at server profile*.
* Avoid lag caused by Tippy command completions
CompletionHelper.PrototypeIDs explicitly says *not* to use it with EntityPrototype. Unsurprisingly, reporting a completion result for every entity prototype in the game is a *bad idea*.
* Add active count metrics to some high-load systems
Mover & NPCs
I suspect the thing that caused the Leviathan round to shit itself on performance is NPC spam in space or something. So let's verify that.
* Enable parallel processing on pow3r again
Originally disabled due to a theory of it causing bugs, it was re-enabled on Vulture, and I'm not aware of it having caused any issues there.
* Replace hashset with bitflags for AtmosMonitor alert types.
Allocating these hashsets was like 20% of the CPU of atmos, somehow.
* Cache HashSet used for space movement collider checks
Turns out this was a ton of server allocations. Huh.
* Do not wake up NPC if there is still a mind attached.
This became apparent with diona nymphs (?) and slime gyras (?). This caused players that disconnected while a nymph, gyras or other npc to resume their NPC behavior. Which I would call unwanted. This fixes that.
* Zombies become AI anyway
* Update Content.Server/NPC/Systems/NPCSystem.cs
---------
Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
* Use new Subs.CVar helper
Removes manual config OnValueChanged calls, removes need to remember to manually unsubscribe.
This both reduces boilerplate and fixes many issues where subscriptions weren't removed on entity system shutdown.
* Fix a bunch of warnings
* More warning fixes
* Use new DateTime serializer to get rid of ISerializationHooks in changelog code.
* Get rid of some more ISerializationHooks for enums
* And a little more
* Apply suggestions from code review
Co-authored-by: 0x6273 <0x40@keemail.me>
---------
Co-authored-by: 0x6273 <0x40@keemail.me>