[Ready to merge] Au-toy-lathe (#5534)

* Autoylathe Complete.

All the errors with the autoylathe should be fixed for now

* Toylathe Tweaking and plastic's initializing.

Well, this gets plastics halfway there. The toylathe now has 8 categories to choose from and some other sutff. It's all coming back.

* TOY LATHE NOW ACCEPTING PLASTIC

TOYLATHE IS WORKING AND RUNNING PROPERLY. SOME GUNS HAVE BEEN ADDED AND WILL NEED MORE TIME TO ADD MORE GUNS.

* Toy Datum construction.

Building some datums for the toys for the autoylathe to print.

* Toys toys toys

Adding toys to the list woo

* Autoylathe complete.

Holy shit it's fucking done.

* Fixes a duplicate id.

Also adds some shit to the hacked list.

* Okay this shit needs to stop

Rogue indentations? Nani?

* ugh

fuck

* Rogue indents

* Power issues

Fixes power scaling and the draining an APC

* Rogue File deletion.

Part of an early experiment that didn't work out.

* Some other tweaks and shit

Moves datums to the autoylathe designs and also fixes a dumb mistake I made.

* Clamps?

Added a clamp. Who knew?

* Shit.

Won't compile if it keeps looking for a file that doesn't exist

* Woops

Deleted a line not paying attention

* reworked initialize

I think I did this right.

* Revert "reworked initialize"

This reverts commit 649c156baebd64b6cd84e95f2f4c3cbd70dabce7.

* Odd variables that don't have any other references in the coding.

Why are these even here? Seriously.

* UNUSED VARIABLE?!

NANI?! Deleted. Don't need em.
This commit is contained in:
Zna12
2018-02-17 19:18:22 -06:00
committed by kevinz000
parent 1447d4106f
commit 1585de0687
14 changed files with 1096 additions and 81 deletions
@@ -0,0 +1,48 @@
/datum/wires/autoylathe
holder_type = /obj/machinery/autoylathe
proper_name = "Autoylathe"
/datum/wires/autoylathe/New(atom/holder)
wires = list(
WIRE_HACK, WIRE_DISABLE,
WIRE_SHOCK, WIRE_ZAP
)
add_duds(6)
..()
/datum/wires/autoylathe/interactable(mob/user)
var/obj/machinery/autoylathe/A = holder
if(A.panel_open)
return TRUE
/datum/wires/autoylathe/get_status()
var/obj/machinery/autoylathe/A = holder
var/list/status = list()
status += "The red light is [A.disabled ? "on" : "off"]."
status += "The blue light is [A.hacked ? "on" : "off"]."
return status
/datum/wires/autoylathe/on_pulse(wire)
var/obj/machinery/autoylathe/A = holder
switch(wire)
if(WIRE_HACK)
A.adjust_hacked(!A.hacked)
addtimer(CALLBACK(A, /obj/machinery/autoylathe.proc/reset, wire), 60)
if(WIRE_SHOCK)
A.shocked = !A.shocked
addtimer(CALLBACK(A, /obj/machinery/autoylathe.proc/reset, wire), 60)
if(WIRE_DISABLE)
A.disabled = !A.disabled
addtimer(CALLBACK(A, /obj/machinery/autoylathe.proc/reset, wire), 60)
/datum/wires/autoylathe/on_cut(wire, mend)
var/obj/machinery/autoylathe/A = holder
switch(wire)
if(WIRE_HACK)
A.adjust_hacked(!mend)
if(WIRE_HACK)
A.shocked = !mend
if(WIRE_DISABLE)
A.disabled = !mend
if(WIRE_ZAP)
A.shock(usr, 50)