Revert "12/21 modernizations from TG live"

This commit is contained in:
LetterJay
2016-12-22 22:35:44 -06:00
committed by GitHub
parent cf59ac1c3d
commit ae40d4134e
2215 changed files with 86928 additions and 707332 deletions
+10 -43
View File
@@ -4,8 +4,6 @@
icon_state = "box_0"
density = 1
anchored = 1
obj_integrity = 250
max_integrity = 250
var/obj/item/weapon/circuitboard/circuit = null
var/state = 1
@@ -14,16 +12,6 @@
if(circuit)
user << "It has \a [circuit] installed."
/obj/structure/frame/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
new /obj/item/stack/sheet/metal(loc, 5)
if(circuit)
circuit.forceMove(loc)
circuit = null
qdel(src)
/obj/structure/frame/machine
name = "machine frame"
var/list/components = null
@@ -78,16 +66,16 @@
if(1)
if(istype(P, /obj/item/weapon/circuitboard/machine))
user << "<span class='warning'>The frame needs wiring first!</span>"
return
else if(istype(P, /obj/item/weapon/circuitboard))
user << "<span class='warning'>This frame does not accept circuit boards of this type!</span>"
return
if(istype(P, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = P
if(C.get_amount() >= 5)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "<span class='notice'>You start to add cables to the frame...</span>"
if(do_after(user, 20*P.toolspeed, target = src))
if(do_after(user, 20/P.toolspeed, target = src))
if(C.get_amount() >= 5 && state == 1)
C.use(5)
user << "<span class='notice'>You add cables to the frame.</span>"
@@ -95,35 +83,32 @@
icon_state = "box_1"
else
user << "<span class='warning'>You need five length of cable to wire the frame!</span>"
return
return
if(istype(P, /obj/item/weapon/screwdriver) && !anchored)
playsound(src.loc, P.usesound, 50, 1)
user.visible_message("<span class='warning'>[user] disassembles the frame.</span>", \
"<span class='notice'>You start to disassemble the frame...</span>", "You hear banging and clanking.")
if(do_after(user, 40*P.toolspeed, target = src))
if(do_after(user, 40/P.toolspeed, target = src))
if(state == 1)
user << "<span class='notice'>You disassemble the frame.</span>"
var/obj/item/stack/sheet/metal/M = new (loc, 5)
M.add_fingerprint(user)
qdel(src)
return
if(istype(P, /obj/item/weapon/wrench))
user << "<span class='notice'>You start [anchored ? "un" : ""]securing [name]...</span>"
playsound(src.loc, P.usesound, 75, 1)
if(do_after(user, 40*P.toolspeed, target = src))
if(do_after(user, 40/P.toolspeed, target = src))
if(state == 1)
user << "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>"
anchored = !anchored
return
if(2)
if(istype(P, /obj/item/weapon/wrench))
user << "<span class='notice'>You start [anchored ? "un" : ""]securing [name]...</span>"
playsound(src.loc, P.usesound, 75, 1)
if(do_after(user, 40*P.toolspeed, target = src))
if(do_after(user, 40/P.toolspeed, target = src))
user << "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>"
anchored = !anchored
return
if(istype(P, /obj/item/weapon/circuitboard/machine))
if(!anchored)
@@ -141,11 +126,9 @@
components = list()
req_components = B.req_components.Copy()
update_namelist()
return
else if(istype(P, /obj/item/weapon/circuitboard))
user << "<span class='warning'>This frame does not accept circuit boards of this type!</span>"
return
if(istype(P, /obj/item/weapon/wirecutters))
playsound(src.loc, P.usesound, 50, 1)
@@ -154,7 +137,6 @@
icon_state = "box_0"
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( src.loc )
A.amount = 5
return
if(3)
if(istype(P, /obj/item/weapon/crowbar))
@@ -173,7 +155,6 @@
req_components = null
components = null
icon_state = "box_1"
return
if(istype(P, /obj/item/weapon/screwdriver))
var/component_check = 1
@@ -184,7 +165,7 @@
if(component_check)
playsound(src.loc, P.usesound, 50, 1)
var/obj/machinery/new_machine = new src.circuit.build_path(src.loc, 1)
new_machine.on_construction()
new_machine.construction()
for(var/obj/O in new_machine.component_parts)
qdel(O)
new_machine.component_parts = list()
@@ -194,7 +175,6 @@
circuit.loc = null
new_machine.RefreshParts()
qdel(src)
return
if(istype(P, /obj/item/weapon/storage/part_replacer) && P.contents.len && get_req_components_amt())
var/obj/item/weapon/storage/part_replacer/replacer = P
@@ -244,25 +224,12 @@
if(!user.drop_item())
break
user << "<span class='notice'>You add [P] to [src].</span>"
P.forceMove(src)
P.loc = src
components += P
req_components[I]--
return 1
user << "<span class='warning'>You cannot add that to the machine!</span>"
return 0
if(user.a_intent == INTENT_HARM)
return ..()
/obj/structure/frame/machine/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
if(state >= 2)
new /obj/item/stack/cable_coil(loc , 5)
for(var/X in components)
var/obj/item/I = X
I.forceMove(loc)
..()
//Machine Frame Circuit Boards
@@ -309,4 +276,4 @@ micro-manipulator, console screen, beaker, Microlaser, matter bin, power cells.
/obj/item/weapon/circuitboard/machine/clockwork
name = "clockwork board (Report This)"
icon_state = "clock_mod"
icon_state = "clock_mod"