- In short, delamination changed to more or less mirror effects it has on Bay.
- All of the new delamination effects can be easily tweaked in the future using set of defines.
- In general, aim is to make supermatter delamination a more or less "recoverable" event with enough materials and manpower. Before it was just a mangled irrepairable mess of scuttled steel.
- This brings a LOT of performance improvements and runtime error fixes (grav pull of anchored items which were never meant to move tends to cause runtimes)
Detailed changes:
- Supermatter (and also S5/S6 singularity in the event someone manages to build one, they share the proc) no longer pull anchored items. This brings a MASSIVE reduction in delamination lag (from few second freezes to quite smooth) and prevents things from breaking (i saw dozens of various runtimes when delamination occured as it forcibly dragged things around that weren't supposed to be dragged).
- Delamination crashes the station's power grid, shutting down all APCs for few minutes. Critical areas get shut down only for fraction of that time (we don't want to one-hit the AI). This includes healthcare facilities, which are likely to be very important given the other effects.
- Delamination irradiates and briefly weakens all mobs on the station (not only on the same Z level). I have verified that this is enough to kill an unprotected human if no kind of medical care (at least dylovene, ideally something against rads) is administered.
- Delamination will break a bunch of lights. Nuisance, but easily repairable. Adds to the atmosphere.
- Delamination breaks part of the solar arrays, reducing their output by roughly 60%. This is way less than required to run the station. Puts more emphasis on delamination being engineering-centric emergency, with power rationing being a necessity until solars can be fixed, or other power source secured. Rewards engineering if they managed to stockpile some energy in the SMESes around the station.
- Delamination's explosion is quite weaker than it used to be. It should still be enough to pretty much destroy the engine room (see attached screenshots below), and cause some minor damage in adjacent rooms. It should still, however, be repairable with enough resources and some time.
- Supermatter no longer has additional 99% flat modifier to miss a station Z level when ejected. Emergency core ejection is a last resort measure. It does have its risks. With other changes in this PR, delamination on outer hull is significantly less dangerous than it would be before. It still has various secondary risks, however, such as the radiation or temporary power outage, but with considerably mitigated damage (explosion in space, mostly on outer grilles is generally weaker)
Screenshots:
https://i.imgur.com/K7nBd8a.png (Standing directly where the core was. Engine room has heavy structural damage and all pipes/machinery are pretty much devastated)
https://i.imgur.com/SGBdTRo.png (Standing in engine control room. Damage nearby is quite minor (occassional snapped wire or wall panel), but quite widespread).
https://i.imgur.com/JqzF4pW.png (Solar arrays are heavily damaged. They still provide /some/ power but only a fraction of the original)
- Infinite powersource, Infinite grid load (powersink without boom) and APC dummy load.
- Not buildable, intended primarily for debugging or admin shenanigans. For mapped-in variants setting show_extended_information = FALSE is recommended.
- Adds the update_idle_power_usage() and update_active_power_usage() procs for the respective vars.
- Switches all places modifying those vars directly to call the procs instead.
- This will let us react to the change appropriately, paving the way towards static area power.
- Adds update_power_channel proc for the sake of completeness, but no machines actually modify it so far.
- Refactors some code to more modern standards, fixes problem with PSUs not reacting to UI input.
- Adds cable coil recoloring using multitool (Bay went the path of having dedicated cable painter device but that really feels as too much of a hassle having to carry another device for this - lets just say the paint is electrically reactive in some way).
- Adds changelog
- Please fasten your seatbelts, this will be a long one as it joins few older Bay PRs into one.
1. Ports https://github.com/Baystation12/Baystation12/pull/12626
- SMES units may now be damaged and destroyed. Charged SMES units fail quite violently. Damage can be fixed by welding tool.
- PSUs completely refactored, ghetto variant no longer exists.
- Cell rack PSUs now can be considered a hybrid between large battery charger and a SMES. They actually use the cells to store power (so you can hot-swap the cells to get more juice simply via the UI without deconstructing the whole machine), but in comparison to SMES have poor throughput and capacity in general (cells are simply too small). They are also somewhat limited in configuration options (lacks the precision electronics of a SMES). Better matter bin lets you put in more cells, up to 9.
- Cell rack PSU also has a mode that allows charge-balancing all inserted batteries (moves energy around so each battery has the same charge %)
2. Ports https://github.com/Baystation12/Baystation12/pull/11977
- SMES units now have full load balancing capability, getting rid of that annoying "One SMES charges at full, other SMES gets nothing" problem. If insufficient power is available on input, all inputting SMESes will now charge at same percentage. If more SMESes power a single output, they will all output equal percentage of their setting.
- This appears to have a pleasant side effect of fixing the issue where SMESes could starve APCs of energy. SMESes are ALWAYS last to input power on a powernet.
- This also appears to have fixed weird values displayed in SMES output/input load readings in the UI. By weird values i mostly mean inputs/outputs actually higher than the SMES is set to have.
3. Ports https://github.com/Baystation12/Baystation12/pull/18137
- SMES units (and subtypes, therefore effectively also PSUs from previous entry) can now have more than one terminal. This effectively allows a setup where two (or more) sources feed a single SMES, which then feeds the output. SMESes can not exceed input setting even with multiple terminals.
- Typical example of use in practice would be SMES that runs something important (for example an AI, telecomms, pick whatever you want). It could have one input from the power grid, and second input from a PACMAN generator set up nearby as a backup. Before the generator would have to be wired into main grid, therefore main grid would siphon off power from it. Now the generator can be separate and dedicated for whatever use you want.
- This mirrors original sources from Bay. Nano file was apparently moved from there, but code file was not.
- As for intent of this function (i coded it originally on Bay), EPR can be considered "Amount of canisters worth of gas in the core chamber", hence the weird 23.1 constant. Unlike pressure reading, this does not change with temperature, so it can be used to accurately monitor actual amount of gas in the chamber without having to take temperature in effect.
- I know the constant is kind of shady. It could possibly be recalculated using atmos constants, but i suck at math too much to do that. If anyone who knows atmos math can find a better alternative, i will gladly toss it in instead.
- This will let us react to the change appropriately.
- While we're here, lets define some constants so we can stop using bare numbers.
- Always use those constants when calling update_use_power()
Fixes power cells and device cells not having the empty-charge icon when made.
Tweaks the protolathe so all items that come with power cells start empty (such as energy weapons)