mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-17 13:42:44 +00:00
- 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.
44 lines
1.2 KiB
Plaintext
44 lines
1.2 KiB
Plaintext
// the underfloor wiring terminal for the APC
|
|
// autogenerated when an APC is placed
|
|
// all conduit connects go to this object instead of the APC
|
|
// using this solves the problem of having the APC in a wall yet also inside an area
|
|
|
|
/obj/machinery/power/terminal
|
|
name = "terminal"
|
|
icon_state = "term"
|
|
desc = "It's an underfloor wiring terminal for power equipment."
|
|
level = 1
|
|
var/obj/machinery/power/master = null
|
|
anchored = 1
|
|
plane = PLATING_PLANE
|
|
layer = WIRES_LAYER+0.01
|
|
|
|
|
|
/obj/machinery/power/terminal/New()
|
|
..()
|
|
var/turf/T = src.loc
|
|
if(level==1) hide(!T.is_plating())
|
|
return
|
|
|
|
/obj/machinery/power/terminal/Destroy()
|
|
if(master)
|
|
master.disconnect_terminal(src)
|
|
master = null
|
|
return ..()
|
|
|
|
/obj/machinery/power/terminal/hide(var/i)
|
|
invisibility = i ? 101 : 0
|
|
icon_state = i ? "term-f" : "term"
|
|
|
|
/obj/machinery/power/terminal/hides_under_flooring()
|
|
return 1
|
|
|
|
// Needed so terminals are not removed from machines list.
|
|
// Powernet rebuilds need this to work properly.
|
|
/obj/machinery/power/terminal/process()
|
|
return 1
|
|
|
|
/obj/machinery/power/terminal/overload(var/obj/machinery/power/source)
|
|
if(master)
|
|
master.overload(source)
|