Autolathes can now be EMAG'd + Adds Illegal Ammo Design Disk (#18559)

* autolathes can now be emagged

* fixes dumb dumb linter issues

* Update code/datums/wires/autolathe.dm

Co-authored-by: tattax <71668564+tattax@users.noreply.github.com>

* illegal ammo disk

* makes it so you don't lose disk designs if unhacked

---------

Co-authored-by: tattax <71668564+tattax@users.noreply.github.com>
This commit is contained in:
Skrem_7
2023-04-18 22:11:50 -05:00
committed by GitHub
parent b270f3b180
commit 15c64aff1a
5 changed files with 169 additions and 6 deletions

View File

@@ -19,15 +19,19 @@
var/obj/machinery/autolathe/A = holder
var/list/status = list()
status += "The red light is [A.disabled ? "on" : "off"]."
status += "The blue light is [A.hacked ? "on" : "off"]."
if(A.obj_flags & EMAGGED)
status += "The blue light is flickering rapidly."
else
status += "The blue light is [A.hacked ? "on" : "off"]."
return status
/datum/wires/autolathe/on_pulse(wire)
var/obj/machinery/autolathe/A = holder
switch(wire)
if(WIRE_HACK)
A.adjust_hacked(!A.hacked)
addtimer(CALLBACK(A, /obj/machinery/autolathe.proc/reset, wire), 60)
if(!(A.obj_flags & EMAGGED))
A.adjust_hacked(!A.hacked)
addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/autolathe, reset), wire), 6 SECONDS)
if(WIRE_SHOCK)
A.shocked = !A.shocked
addtimer(CALLBACK(A, /obj/machinery/autolathe.proc/reset, wire), 60)
@@ -39,10 +43,11 @@
var/obj/machinery/autolathe/A = holder
switch(wire)
if(WIRE_HACK)
A.adjust_hacked(!mend)
if(!(A.obj_flags & EMAGGED))
A.adjust_hacked(!mend)
if(WIRE_HACK)
A.shocked = !mend
if(WIRE_DISABLE)
A.disabled = !mend
if(WIRE_ZAP)
A.shock(usr, 50)
A.shock(usr, 50)