More maintenance for turbine (#88254)

## About The Pull Request
**1. Fixes**
 - Fixes #88231. This is a 2 part fix as in
- For the UI side we first convert energy to power in the back end via
`energy_to_power()` proc & then use `formatPower()` proc in the client
side UI to display the correct SI units instead of always using KW
- The turbine now uses `SSMachines` subsytem for processing instead of
`SSAir`. This is because energy which is
[power x delta time] requires `seconds_per_tick` which isn't supplied by
`process_atmos()` so for correct conversion we have to switch over to
the machine subsystem
 
![Screenshot
(452)](https://github.com/user-attachments/assets/94fc207b-37d4-4f10-a984-b5d15e0644c6)


**2. Refactor**
- Merged procs like `power_on()` & `power_off()` both into
`toggle_power()` proc
  - Converted `attackby()` attack chain into `item_interaction()`
- `ui_data()` now won't update the UI if it encounters invalid data &
sends very little data if it's not connected to the turbine to reduce
bandwidth
  - Removes redundant vars, autodoc procs & much more

## Changelog
🆑
fix: Turbine converts energy to power correctly & shows correct reading
with multitool
refactor: turbine code has been overall improved. report bugs on github
/🆑
This commit is contained in:
SyncIt21
2024-12-15 04:27:37 +01:00
committed by GitHub
parent 67e03c4020
commit d1b842356e
7 changed files with 333 additions and 337 deletions
+2
View File
@@ -254,6 +254,8 @@ GLOBAL_VAR_INIT(focused_tests, focused_tests())
//Yet more templates
/obj/machinery/restaurant_portal,
//Template type
/obj/machinery/power/turbine,
//Template type
/obj/effect/mob_spawn,
//Template type
/obj/structure/holosign/robot_seat,