mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 07:38:05 +01:00
Speeds up area power usage handling, and apc process(). Cleans up related code (#51002)
About The Pull Request /area/proc/usage() attempts to give list-like access to a bunch of vars. Why not make it a list instead and avoid all the proc calls? Might be room for followup here, to do something to powered(), use_power() etc. Some legacy machinery was ignoring the default machinery use_power pulling from the machine's power channel by default Total power usage was unused, APCs ignored it in favor of calculating it themselves :) I also renamed the defines because they were in the danger zone of being very common words. Changelog cl Naksu code: optimized area power usage calculations. /cl
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 30
|
||||
active_power_usage = 200
|
||||
power_channel = EQUIP
|
||||
power_channel = AREA_USAGE_EQUIP
|
||||
max_integrity = 300
|
||||
integrity_failure = 0.33
|
||||
var/obj/item/paper/copy = null //what's in the copier!
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
/obj/machinery/photocopier/ui_interact(mob/user)
|
||||
. = ..()
|
||||
var/dat = "Photocopier<BR><BR>"
|
||||
var/list/dat = list("Photocopier<BR><BR>")
|
||||
if(copy || photocopy || doccopy || (ass && (ass.loc == src.loc)))
|
||||
dat += "<a href='byond://?src=[REF(src)];remove=1'>Remove Paper</a><BR>"
|
||||
if(toner)
|
||||
@@ -48,7 +48,7 @@
|
||||
dat += "Current toner level: [toner]"
|
||||
if(!toner)
|
||||
dat +="<BR>Please insert a new toner cartridge!"
|
||||
user << browse(dat, "window=copier")
|
||||
user << browse(dat.Join(""), "window=copier")
|
||||
onclose(user, "copier")
|
||||
|
||||
/obj/machinery/photocopier/Topic(href, href_list)
|
||||
|
||||
Reference in New Issue
Block a user