mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
- Instead of using auto_use_power to re-tally up machinery's power usage every cycle, track the steady "static" load separately from the transient "oneoff" usage. Machines then only need to inform the area when they use oneoff power or *change* their steady usage. - Remove auto_use_power and stop SSmachines from calling it. - Add vars to track "static" usage for each of the three power channels to /area - Rename the existing three vars to "oneoff" so its clear what they mean (and to catch people accidentally updating them directly) - Update area power procs and APCs to use the new variables. - Rename /area/proc/use_power() to use_power_oneoff() to make it clear what it is doing. - Deprecate /obj/machinery/use_power() in favor of use_power_oneoff() but don't delete yet. Can transition gradually. - Add logic to the update_power procs on machines to calculate the deltas and update static area power whenever their usage changes. - Add logic to machines to update area power when they are created, destroyed, or move. - Moved /obj/machinery procs related to area power usage into machinery_power.dm to make them easier to find. - Added or updated comments in several places to explain what is going on and how to use it.