APC & Machinery Refactor + Local Powernets (#19991)

* local powernet and machine power refactor

* some fixes

* more tweaks + powerchange() refactor

* fixes var edited apcs on meatpackers.dmm

* fixes issue with power channels

* Reviews

* delta fix

* Update code/game/machinery/portable_turret.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* removed area power change proc

* damn morgues

* requested changes

* request changes

* deconfliction

* mapping fixes

* some fixes from TM

---------

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
This commit is contained in:
Ryan
2023-01-30 22:28:10 +00:00
committed by GitHub
co-authored by Henri215
parent caee0ec975
commit 7c3cd86f14
190 changed files with 2613 additions and 2556 deletions
+5 -6
View File
@@ -20,9 +20,8 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
var/long_range_enabled = FALSE
req_one_access = list(ACCESS_LAWYER, ACCESS_HEADS, ACCESS_ARMORY)
use_power = IDLE_POWER_USE
idle_power_usage = 30
active_power_usage = 200
idle_power_consumption = 30
active_power_consumption = 200
/// ID card inserted into the machine, used to log in with
var/obj/item/card/id/scan = null
@@ -286,7 +285,7 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
to_chat(usr, "There is nothing to remove from [src].")
/obj/machinery/photocopier/faxmachine/proc/sendfax(destination, mob/sender)
use_power(active_power_usage)
use_power(active_power_consumption)
var/success = 0
for(var/obj/machinery/photocopier/faxmachine/F in GLOB.allfaxes)
if(F.department == destination)
@@ -328,10 +327,10 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
else
return
use_power(active_power_usage)
use_power(active_power_consumption)
/obj/machinery/photocopier/faxmachine/proc/send_admin_fax(mob/sender, destination)
use_power(active_power_usage)
use_power(active_power_consumption)
if(!(istype(copyitem, /obj/item/paper) || istype(copyitem, /obj/item/paper_bundle) || istype(copyitem, /obj/item/photo)))
visible_message("[src] beeps, \"Error transmitting message.\"")
+6 -8
View File
@@ -9,10 +9,8 @@
anchored = TRUE
density = TRUE
use_power = IDLE_POWER_USE
idle_power_usage = 30
active_power_usage = 200
power_channel = EQUIP
idle_power_consumption = 30
active_power_consumption = 200
max_integrity = 300
integrity_failure = 100
atom_say_verb = "bleeps"
@@ -297,21 +295,21 @@
if(!papercopy(C))
break
toner -= 1
use_power(active_power_usage)
use_power(active_power_consumption)
sleep(PHOTOCOPIER_DELAY)
else if(istype(C, /obj/item/photo))
for(var/i in copies to 1 step -1)
if(!photocopy(C))
break
toner -= 5
use_power(active_power_usage)
use_power(active_power_consumption)
sleep(PHOTOCOPIER_DELAY)
else if(istype(C, /obj/item/paper_bundle))
var/obj/item/paper_bundle/B = C
for(var/i in copies to 1 step -1)
if(!bundlecopy(C, use_toner = TRUE))
break
use_power(active_power_usage)
use_power(active_power_consumption)
sleep(PHOTOCOPIER_DELAY * (B.amount + 1))
else if(check_mob()) //Once we've scanned the copy_mob's ass we do not need to again
for(var/i in copies to 1 step -1)
@@ -345,7 +343,7 @@
to_chat(usr, "<span class='warning'>\The [copyitem] can't be scanned by \the [src].</span>")
copying = FALSE
return
use_power(active_power_usage)
use_power(active_power_consumption)
sleep(PHOTOCOPIER_DELAY)
LAZYADD(saved_documents, O)
copying = FALSE