- 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.
- 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.
* Fix Runtime in atoms_movable.dm,597: list index out of bounds
* Fix Runtime in floor_attackby.dm,118: Cannot execute 0.is crowbar().
* Fix null values being present in mob_list.
* Another fix for Runtime in update_icons.dm,254: Cannot execute null.GetUIState().
- This time lets just ensure dna is instantiated no matter who is calling dress_preview_mob().
* Fix Runtime in suit_storage_unit.dm,792: Cannot execute null.set machine().
- Also fixed other mixups of usr vs. user that I found in the same file.
* Fixes Runtime in find_spawning.dm,688: Cannot read null.origin_tech
- if this else if block is reached, new_item must not exist, so we obviously can't set origin_tech on it. Examination of the code seems to suggest the original author intended that for any "talking" items to have arcane and precursor tech; since src is now being made talking, src should get the tech.
* Fix talking artifacts downgrading arcane/precursor tech
- Bump up the values by one for talking artifact items instead of overwriting whatever the value was.