In particular, charge costs were chosen so that mounted energy guns
drain 80% of a default rig's power cell in 40 shots, and mounted laser
cannons drain the same in 20 shots.
Adds a type of smaller power cell for powering devices. Not used by much
at the moment, but it's one step closer to a more coherent picture of
power cells.
- Malfunction gamemode should now be startable. Probably not the nicest way to do it, but since the antag system is not documented at all i have no idea how to do it in nicer way.
- Fixes powersinks lasting for infinite duration before exploding.
- Minor adjustment to powersink drain rates. Powersink now drains up to 1.5MW instead of 1MW. It also attempts to drain up to 5kW instead of 2kW from each APC, unless powernet supplies enough power. They can still be overpowered by pumping more than 1.5MW into the grid, which is possible if you either install more coils into main SMES, or use the solars. Even 1MW of default SMES is enough to slow the drain effect considerably, espicially if you can isolate it with breakers.
- Fixes "APC Flickering" issues caused by powersinks. Powersinks are now processed immediately after powernets, which ensures they are first to take power from that powernet. This is unfortunately necessary as APCs would take power first, which is not desired.
- Minor refactor while i was at it - absolute paths, span classes, visible_message() instead of for cycle. No gameplay effect.
Adds partial caching for some of the smaller HUD additions of the mobs to allow for less processing needed to constantly update the icons when needed.
Code has been tested on a live server for several weeks prior to it's shutdown, so it should work as great as it has worked for us.
In my tests a while ago, I found that the battery racks came quite high in the profiler. So I decided to see if I could alleviate some of that trouble.
Very simple, caches the icons based off of previous work done on the APC, requires less processing for the icon updates.
Function has been tested and has been used on a live server for a few weeks prior to said server's shutdown.
Will make a 2nd PR following another like this except for HUD icons.