From 66c3a007a90d93f36e45a712c348139962673c9f Mon Sep 17 00:00:00 2001 From: SinTwo Date: Sat, 23 Jul 2016 23:45:24 -0400 Subject: [PATCH] frame cleanup fixes --- .../components/unary/cold_sink.dm | 1 - .../components/unary/heat_source.dm | 1 - code/game/machinery/Sleeper.dm | 1 - code/game/machinery/adv_med.dm | 1 - code/game/machinery/alarm.dm | 2 +- code/game/machinery/autolathe.dm | 1 - code/game/machinery/biogenerator.dm | 1 - code/game/machinery/cloning.dm | 1 - code/game/machinery/frame.dm | 183 +++++++++++++++++- code/game/machinery/jukebox.dm | 1 - code/game/machinery/kitchen/microwave.dm | 1 - code/game/machinery/machinery.dm | 26 ++- code/game/machinery/mass_driver.dm | 1 - code/game/machinery/recharger.dm | 1 - code/game/machinery/rechargestation.dm | 1 - code/game/machinery/teleporter.dm | 2 - code/game/machinery/wall_frames.dm | 174 ----------------- code/game/machinery/washing_machine.dm | 1 - code/game/mecha/mech_fabricator.dm | 1 - code/game/mecha/mech_prosthetics.dm | 1 - .../objects/items/devices/radio/intercom.dm | 7 +- .../weapons/circuitboards/circuitboard.dm | 4 +- .../detectivework/microscope/dnascanner.dm | 1 - code/modules/mining/drilling/drill.dm | 1 - code/modules/paperwork/photocopier.dm | 1 - code/modules/recycling/conveyor2.dm | 1 - code/modules/research/circuitprinter.dm | 1 - code/modules/research/destructive_analyzer.dm | 1 - code/modules/research/protolathe.dm | 1 - code/modules/research/server.dm | 1 - .../xenobio2/machinery/core_extractor.dm | 1 - .../xenobio2/machinery/gene_manipulators.dm | 2 - code/modules/xenobio2/machinery/injector.dm | 1 - .../xenobio2/machinery/slime_replicator.dm | 1 - 34 files changed, 200 insertions(+), 226 deletions(-) diff --git a/code/ATMOSPHERICS/components/unary/cold_sink.dm b/code/ATMOSPHERICS/components/unary/cold_sink.dm index 11777e51d2..faefa64883 100644 --- a/code/ATMOSPHERICS/components/unary/cold_sink.dm +++ b/code/ATMOSPHERICS/components/unary/cold_sink.dm @@ -24,7 +24,6 @@ /obj/machinery/atmospherics/unary/freezer/New() ..() initialize_directions = dir - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) component_parts += new /obj/item/weapon/stock_parts/capacitor(src) diff --git a/code/ATMOSPHERICS/components/unary/heat_source.dm b/code/ATMOSPHERICS/components/unary/heat_source.dm index 8ee9600606..c2daa2b6d1 100644 --- a/code/ATMOSPHERICS/components/unary/heat_source.dm +++ b/code/ATMOSPHERICS/components/unary/heat_source.dm @@ -24,7 +24,6 @@ /obj/machinery/atmospherics/unary/heater/New() ..() initialize_directions = dir - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) component_parts += new /obj/item/weapon/stock_parts/capacitor(src) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index b1acebc182..cc15c46e76 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -63,7 +63,6 @@ /obj/machinery/sleeper/New() ..() beaker = new /obj/item/weapon/reagent_containers/glass/beaker/large(src) - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(src) diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 454796d509..b82ef0cf61 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -25,7 +25,6 @@ if(C) C.connected = src - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index ce2dc22a4f..dd79632053 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -54,7 +54,7 @@ var/wiresexposed = 0 // If it's been screwdrivered open. var/aidisabled = 0 var/shorted = 0 - circuit = /obj/item/weapon/circuitboard/airalarm + circuit = /obj/item/weapon/circuitboard/airalarm var/datum/wires/alarm/wires diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 5901148603..30f8bfce47 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -26,7 +26,6 @@ /obj/machinery/autolathe/New() ..() wires = new(src) - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) diff --git a/code/game/machinery/biogenerator.dm b/code/game/machinery/biogenerator.dm index c6b6fabe1b..1a61ea53f3 100644 --- a/code/game/machinery/biogenerator.dm +++ b/code/game/machinery/biogenerator.dm @@ -23,7 +23,6 @@ R.my_atom = src beaker = new /obj/item/weapon/reagent_containers/glass/bottle(src) - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) component_parts += new /obj/item/weapon/stock_parts/manipulator(src) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 19d187ade4..b592738c95 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -47,7 +47,6 @@ /obj/machinery/clonepod/New() ..() - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/manipulator(src) component_parts += new /obj/item/weapon/stock_parts/manipulator(src) diff --git a/code/game/machinery/frame.dm b/code/game/machinery/frame.dm index 4faf8480e2..a9ca501664 100644 --- a/code/game/machinery/frame.dm +++ b/code/game/machinery/frame.dm @@ -1,3 +1,177 @@ +/var/global/list/construction_frame_wall +/var/global/list/construction_frame_floor + +/proc/populate_frame_types() + //Create global frame type list if it hasn't been made already. + construction_frame_wall = list() + construction_frame_floor = list() + for(var/R in typesof(/datum/frame/frame_types)-/datum/frame/frame_types) + var/datum/frame/frame_types/type = new R + if(type.frame_style == "wall") + construction_frame_wall += type + else + construction_frame_floor += type + + var/datum/frame/frame_types/cancel/cancel = new /datum/frame/frame_types/cancel + construction_frame_wall += cancel + construction_frame_floor += cancel + +/datum/frame/frame_types + var/name + var/frame_size = 5 + var/frame_class + var/circuit + var/frame_style = "floor" + var/x_offset + var/y_offset + +/datum/frame/frame_types/computer + name = "Computer" + frame_class = "computer" + +/datum/frame/frame_types/machine + name = "Machine" + frame_class = "machine" + +/datum/frame/frame_types/conveyor + name = "Conveyor" + frame_class = "machine" + circuit = /obj/item/weapon/circuitboard/conveyor + +/datum/frame/frame_types/photocopier + name = "Photocopier" + frame_class = "machine" + +/datum/frame/frame_types/washing_machine + name = "Washing Machine" + frame_class = "machine" + +/datum/frame/frame_types/medical_console + name = "Medical Console" + frame_class = "computer" + +/datum/frame/frame_types/medical_pod + name = "Medical Pod" + frame_class = "machine" + +/datum/frame/frame_types/dna_analyzer + name = "DNA Analyzer" + frame_class = "machine" + +/datum/frame/frame_types/mass_driver + name = "Mass Driver" + frame_class = "machine" + circuit = /obj/item/weapon/circuitboard/mass_driver + +/datum/frame/frame_types/holopad + name = "Holopad" + frame_class = "computer" + frame_size = 4 + +/datum/frame/frame_types/microwave + name = "Microwave" + frame_class = "machine" + frame_size = 4 + +/datum/frame/frame_types/fax + name = "Fax" + frame_class = "machine" + frame_size = 3 + +/datum/frame/frame_types/recharger + name = "Recharger" + frame_class = "machine" + circuit = /obj/item/weapon/circuitboard/recharger + frame_size = 3 + +/datum/frame/frame_types/grinder + name = "Grinder" + frame_class = "machine" + circuit = /obj/item/weapon/circuitboard/grinder + frame_size = 3 + +/datum/frame/frame_types/display + name = "Display" + frame_class = "display" + frame_style = "wall" + x_offset = 32 + y_offset = 32 + +/datum/frame/frame_types/supply_request_console + name = "Supply Request Console" + frame_class = "display" + frame_style = "wall" + x_offset = 32 + y_offset = 32 + +/datum/frame/frame_types/atm + name = "ATM" + frame_class = "display" + frame_size = 3 + frame_style = "wall" + x_offset = 32 + y_offset = 32 + +/datum/frame/frame_types/newscaster + name = "Newscaster" + frame_class = "display" + frame_size = 3 + frame_style = "wall" + x_offset = 28 + y_offset = 30 + +/datum/frame/frame_types/wall_charger + name = "Wall Charger" + frame_class = "machine" + circuit = /obj/item/weapon/circuitboard/recharger/wrecharger + frame_size = 3 + frame_style = "wall" + x_offset = 32 + y_offset = 32 + +/datum/frame/frame_types/fire_alarm + name = "Fire Alarm" + frame_class = "alarm" + frame_size = 2 + frame_style = "wall" + x_offset = 24 + y_offset = 24 + +/datum/frame/frame_types/air_alarm + name = "Air Alarm" + frame_class = "alarm" + frame_size = 2 + frame_style = "wall" + x_offset = 24 + y_offset = 24 + +/datum/frame/frame_types/guest_pass_console + name = "Guest Pass Console" + frame_class = "display" + frame_size = 2 + frame_style = "wall" + x_offset = 30 + y_offset = 30 + +/datum/frame/frame_types/intercom + name = "Intercom" + frame_class = "alarm" + frame_size = 2 + frame_style = "wall" + x_offset = 28 + y_offset = 28 + +/datum/frame/frame_types/keycard_authenticator + name = "Keycard Authenticator" + frame_class = "alarm" + frame_size = 1 + frame_style = "wall" + x_offset = 24 + y_offset = 24 + +/datum/frame/frame_types/cancel //used to get out of input dialogue + name = "Cancel" + /obj/structure/frame anchored = 0 name = "frame" @@ -112,7 +286,8 @@ else if(istype(P, /obj/item/weapon/circuitboard) && need_circuit && !circuit) if(state == 0 && anchored) var/obj/item/weapon/circuitboard/B = P - if(B.board_type == frame_type) + var/datum/frame/frame_types/board_type = B.board_type + if(board_type.name == frame_type.name) playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) user << "You place the circuit board inside the frame." circuit = P @@ -189,6 +364,8 @@ B.pixel_y = pixel_y B.set_dir(dir) circuit.construct(B) + circuit.loc = null + B.circuit = circuit qdel(src) return @@ -201,6 +378,8 @@ B.pixel_y = pixel_y B.set_dir(dir) circuit.construct(B) + circuit.loc = null + B.circuit = circuit qdel(src) return @@ -212,6 +391,8 @@ B.pixel_y = pixel_y B.set_dir(dir) circuit.construct(B) + circuit.loc = null + B.circuit = circuit qdel(src) return diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm index 3cc537be49..57e0e1b55a 100644 --- a/code/game/machinery/jukebox.dm +++ b/code/game/machinery/jukebox.dm @@ -38,7 +38,6 @@ datum/track/New(var/title_name, var/audio) /obj/machinery/media/jukebox/New() ..() - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/capacitor(src) component_parts += new /obj/item/weapon/stock_parts/console_screen(src) diff --git a/code/game/machinery/kitchen/microwave.dm b/code/game/machinery/kitchen/microwave.dm index 1be387f35f..a3b0f9fdd4 100644 --- a/code/game/machinery/kitchen/microwave.dm +++ b/code/game/machinery/kitchen/microwave.dm @@ -30,7 +30,6 @@ reagents = new/datum/reagents(100) reagents.my_atom = src - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/console_screen(src) component_parts += new /obj/item/weapon/stock_parts/motor(src) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index aa0dc07773..755fc1415e 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -123,6 +123,8 @@ Class Procs: else machines += src machinery_sort_required = 1 + if(circuit) + circuit = new circuit(src) /obj/machinery/Destroy() machines -= src @@ -358,7 +360,7 @@ Class Procs: /obj/machinery/proc/dismantle() playsound(loc, 'sound/items/Crowbar.ogg', 50, 1) - var/obj/structure/frame/A = new /obj/structure/frame( src.loc ) + var/obj/structure/frame/A = new /obj/structure/frame(loc) var/obj/item/weapon/circuitboard/M = circuit A.circuit = M A.anchored = 1 @@ -367,18 +369,15 @@ Class Procs: if(A.frame_type.circuit) A.need_circuit = 0 - for (var/obj/D in src.component_parts) - D.forceMove(loc) - - if(A.components) - A.components.Cut() - else - A.components = list() - - component_parts = list() - - for(var/obj/C in src) - C.forceMove(loc) + if(A.frame_type.frame_class == "machine") + for(var/obj/D in src.component_parts) + D.forceMove(loc) + if(A.components) + A.components.Cut() + else + A.components = list() + component_parts = list() + A.check_components() if(A.frame_type.frame_class == "alarm") A.state = 2 @@ -393,7 +392,6 @@ Class Procs: A.set_dir(dir) A.pixel_x = pixel_x A.pixel_y = pixel_y - A.check_components() A.update_desc() A.update_icon() M.loc = null diff --git a/code/game/machinery/mass_driver.dm b/code/game/machinery/mass_driver.dm index f563d9ef39..49082a7672 100644 --- a/code/game/machinery/mass_driver.dm +++ b/code/game/machinery/mass_driver.dm @@ -18,7 +18,6 @@ /obj/machinery/mass_driver/New() ..() - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/motor(src) component_parts += new /obj/item/weapon/stock_parts/motor(src) diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index 21f456d281..64dab26e76 100644 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -17,7 +17,6 @@ obj/machinery/recharger circuit = /obj/item/weapon/circuitboard/recharger obj/machinery/recharger/New() - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/capacitor(src) component_parts += new /obj/item/stack/cable_coil(src, 5) diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index b5f7e029a5..186f76b82e 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -24,7 +24,6 @@ /obj/machinery/recharge_station/New() ..() - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/manipulator(src) component_parts += new /obj/item/weapon/stock_parts/manipulator(src) diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index c9a42680f7..ac8ab29762 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -179,7 +179,6 @@ underlays.Cut() underlays += image('icons/obj/stationobjs.dmi', icon_state = "tele-wires") - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) @@ -329,7 +328,6 @@ overlays.Cut() overlays += image('icons/obj/stationobjs.dmi', icon_state = "controller-wires") - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/console_screen(src) component_parts += new /obj/item/weapon/stock_parts/capacitor(src) diff --git a/code/game/machinery/wall_frames.dm b/code/game/machinery/wall_frames.dm index 17d0ab3d7b..fb313477ac 100644 --- a/code/game/machinery/wall_frames.dm +++ b/code/game/machinery/wall_frames.dm @@ -1,177 +1,3 @@ -/var/global/list/construction_frame_wall -/var/global/list/construction_frame_floor - -/proc/populate_frame_types() - //Create global frame type list if it hasn't been made already. - construction_frame_wall = list() - construction_frame_floor = list() - for(var/R in typesof(/datum/frame/frame_types)-/datum/frame/frame_types) - var/datum/frame/frame_types/type = new R - if(type.frame_style == "wall") - construction_frame_wall += type - else - construction_frame_floor += type - - var/datum/frame/frame_types/cancel/cancel = new /datum/frame/frame_types/cancel - construction_frame_wall += cancel - construction_frame_floor += cancel - -/datum/frame/frame_types - var/name - var/frame_size = 5 - var/frame_class - var/circuit - var/frame_style = "floor" - var/x_offset - var/y_offset - -/datum/frame/frame_types/computer - name = "Computer" - frame_class = "computer" - -/datum/frame/frame_types/machine - name = "Machine" - frame_class = "machine" - -/datum/frame/frame_types/conveyor - name = "Conveyor" - frame_class = "machine" - circuit = /obj/item/weapon/circuitboard/conveyor - -/datum/frame/frame_types/photocopier - name = "Photocopier" - frame_class = "machine" - -/datum/frame/frame_types/washing_machine - name = "Washing Machine" - frame_class = "machine" - -/datum/frame/frame_types/medical_console - name = "Medical Console" - frame_class = "computer" - -/datum/frame/frame_types/medical_pod - name = "Medical Pod" - frame_class = "machine" - -/datum/frame/frame_types/dna_analyzer - name = "DNA Analyzer" - frame_class = "machine" - -/datum/frame/frame_types/mass_driver - name = "Mass Driver" - frame_class = "machine" - circuit = /obj/item/weapon/circuitboard/mass_driver - -/datum/frame/frame_types/holopad - name = "Holopad" - frame_class = "computer" - frame_size = 4 - -/datum/frame/frame_types/microwave - name = "Microwave" - frame_class = "machine" - frame_size = 4 - -/datum/frame/frame_types/fax - name = "Fax" - frame_class = "machine" - frame_size = 3 - -/datum/frame/frame_types/recharger - name = "Recharger" - frame_class = "machine" - circuit = /obj/item/weapon/circuitboard/recharger - frame_size = 3 - -/datum/frame/frame_types/grinder - name = "Grinder" - frame_class = "machine" - circuit = /obj/item/weapon/circuitboard/grinder - frame_size = 3 - -/datum/frame/frame_types/display - name = "Display" - frame_class = "display" - frame_style = "wall" - x_offset = 32 - y_offset = 32 - -/datum/frame/frame_types/supply_request_console - name = "Supply Request Console" - frame_class = "display" - frame_style = "wall" - x_offset = 32 - y_offset = 32 - -/datum/frame/frame_types/atm - name = "ATM" - frame_class = "display" - frame_size = 3 - frame_style = "wall" - x_offset = 32 - y_offset = 32 - -/datum/frame/frame_types/newscaster - name = "Newscaster" - frame_class = "display" - frame_size = 3 - frame_style = "wall" - x_offset = 28 - y_offset = 30 - -/datum/frame/frame_types/wall_charger - name = "Wall Charger" - frame_class = "machine" - circuit = /obj/item/weapon/circuitboard/recharger/wrecharger - frame_size = 3 - frame_style = "wall" - x_offset = 32 - y_offset = 32 - -/datum/frame/frame_types/fire_alarm - name = "Fire Alarm" - frame_class = "alarm" - frame_size = 2 - frame_style = "wall" - x_offset = 24 - y_offset = 24 - -/datum/frame/frame_types/air_alarm - name = "Air Alarm" - frame_class = "alarm" - frame_size = 2 - frame_style = "wall" - x_offset = 24 - y_offset = 24 - -/datum/frame/frame_types/guest_pass_console - name = "Guest Pass Console" - frame_class = "display" - frame_size = 2 - frame_style = "wall" - x_offset = 30 - y_offset = 30 - -/datum/frame/frame_types/intercom - name = "Intercom" - frame_class = "alarm" - frame_size = 2 - frame_style = "wall" - x_offset = 28 - y_offset = 28 - -/datum/frame/frame_types/keycard_authenticator - name = "Keycard Authenticator" - frame_class = "alarm" - frame_size = 1 - frame_style = "wall" - x_offset = 24 - y_offset = 24 - -/datum/frame/frame_types/cancel //used to get out of input dialogue - name = "Cancel" - /obj/item/frame name = "frame parts" desc = "Used for building frames." diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index d6bc38923c..a21298f924 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -27,7 +27,6 @@ /obj/machinery/washing_machine/New() ..() - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/motor(src) component_parts += new /obj/item/weapon/stock_parts/gear(src) diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index ee000d60be..da744422cf 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -27,7 +27,6 @@ /obj/machinery/mecha_part_fabricator/New() ..() - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) diff --git a/code/game/mecha/mech_prosthetics.dm b/code/game/mecha/mech_prosthetics.dm index 588fd402f3..634a239d82 100644 --- a/code/game/mecha/mech_prosthetics.dm +++ b/code/game/mecha/mech_prosthetics.dm @@ -28,7 +28,6 @@ /obj/machinery/pros_fabricator/New() ..() - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 512f3ba3fe..fcb8fb3d37 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -46,6 +46,7 @@ /obj/item/device/radio/intercom/New() ..() processing_objects += src + circuit = new circuit(src) /obj/item/device/radio/intercom/department/medbay/New() ..() @@ -96,20 +97,18 @@ else icon_state = "intercom" return - if (wiresexposed && istype(W, /obj/item/weapon/wirecutters)) + if(wiresexposed && istype(W, /obj/item/weapon/wirecutters)) user.visible_message("[user] has cut the wires inside \the [src]!", "You have cut the wires inside \the [src].") playsound(loc, 'sound/items/Wirecutter.ogg', 50, 1) new/obj/item/stack/cable_coil(get_turf(src), 5) var/obj/structure/frame/A = new /obj/structure/frame(loc) - var/obj/item/weapon/circuitboard/M = new circuit(A) + var/obj/item/weapon/circuitboard/M = circuit A.frame_type = M.board_type A.pixel_x = pixel_x A.pixel_y = pixel_y A.circuit = M A.set_dir(dir) A.anchored = 1 - for (var/obj/C in src) - C.forceMove(loc) A.state = 2 A.update_icon() M.deconstruct(src) diff --git a/code/game/objects/items/weapons/circuitboards/circuitboard.dm b/code/game/objects/items/weapons/circuitboards/circuitboard.dm index 8459370593..3711cf0690 100644 --- a/code/game/objects/items/weapons/circuitboards/circuitboard.dm +++ b/code/game/objects/items/weapons/circuitboards/circuitboard.dm @@ -25,13 +25,13 @@ //Called when the circuitboard is used to contruct a new machine. /obj/item/weapon/circuitboard/proc/construct(var/obj/machinery/M) - if (istype(M, build_path)) + if(istype(M, build_path)) return 1 return 0 //Called when a computer is deconstructed to produce a circuitboard. //Only used by computers, as other machines store their circuitboard instance. /obj/item/weapon/circuitboard/proc/deconstruct(var/obj/machinery/M) - if (istype(M, build_path)) + if(istype(M, build_path)) return 1 return 0 diff --git a/code/modules/detectivework/microscope/dnascanner.dm b/code/modules/detectivework/microscope/dnascanner.dm index 9fc49b1bf7..3d442dfb4a 100644 --- a/code/modules/detectivework/microscope/dnascanner.dm +++ b/code/modules/detectivework/microscope/dnascanner.dm @@ -17,7 +17,6 @@ var/report_num = 0 /obj/machinery/dnaforensics/New() - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/console_screen(src) component_parts += new /obj/item/weapon/stock_parts/micro_laser(src) diff --git a/code/modules/mining/drilling/drill.dm b/code/modules/mining/drilling/drill.dm index eeb7546211..7c964b9d4b 100644 --- a/code/modules/mining/drilling/drill.dm +++ b/code/modules/mining/drilling/drill.dm @@ -42,7 +42,6 @@ /obj/machinery/mining/drill/New() ..() - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) component_parts += new /obj/item/weapon/stock_parts/capacitor(src) diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index ec0d7acf19..c8942f0093 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -16,7 +16,6 @@ var/maxcopies = 10 //how many copies can be copied at once- idea shamelessly stolen from bs12's copier! /obj/machinery/photocopier/New() - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) component_parts += new /obj/item/weapon/stock_parts/motor(src) diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index 6296a8b951..8a5c8cc7b4 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -38,7 +38,6 @@ operating = 1 setmove() - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/gear(src) component_parts += new /obj/item/weapon/stock_parts/motor(src) diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index e444bcb8c1..6831034edf 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -24,7 +24,6 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid). /obj/machinery/r_n_d/circuit_imprinter/New() ..() - circuit = new circuit() component_parts = list() component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) component_parts += new /obj/item/weapon/stock_parts/manipulator(src) diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm index 686a273023..3fbb141f7e 100644 --- a/code/modules/research/destructive_analyzer.dm +++ b/code/modules/research/destructive_analyzer.dm @@ -18,7 +18,6 @@ Note: Must be placed within 3 tiles of the R&D Console /obj/machinery/r_n_d/destructive_analyzer/New() ..() - circuit = new circuit() component_parts = list() component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) component_parts += new /obj/item/weapon/stock_parts/manipulator(src) diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index 46b688929d..d5237e5a81 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -19,7 +19,6 @@ /obj/machinery/r_n_d/protolathe/New() ..() - circuit = new circuit() component_parts = list() component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index bf4cab0697..abcfdd0fa0 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -17,7 +17,6 @@ /obj/machinery/r_n_d/server/New() ..() - circuit = new circuit() component_parts = list() component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) component_parts += new /obj/item/stack/cable_coil(src) diff --git a/code/modules/xenobio2/machinery/core_extractor.dm b/code/modules/xenobio2/machinery/core_extractor.dm index b50e42acd6..2703f26337 100644 --- a/code/modules/xenobio2/machinery/core_extractor.dm +++ b/code/modules/xenobio2/machinery/core_extractor.dm @@ -21,7 +21,6 @@ /obj/machinery/slime/extractor/New() ..() update_light_color() - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/manipulator(src) component_parts += new /obj/item/weapon/stock_parts/manipulator(src) diff --git a/code/modules/xenobio2/machinery/gene_manipulators.dm b/code/modules/xenobio2/machinery/gene_manipulators.dm index c8bd8d374c..d5ee7d7d44 100644 --- a/code/modules/xenobio2/machinery/gene_manipulators.dm +++ b/code/modules/xenobio2/machinery/gene_manipulators.dm @@ -125,7 +125,6 @@ /obj/machinery/xenobio/extractor/New() ..() - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/manipulator(src) component_parts += new /obj/item/weapon/stock_parts/manipulator(src) @@ -268,7 +267,6 @@ /obj/machinery/xenobio/editor/New() ..() - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/manipulator(src) component_parts += new /obj/item/weapon/stock_parts/manipulator(src) diff --git a/code/modules/xenobio2/machinery/injector.dm b/code/modules/xenobio2/machinery/injector.dm index 7b482d5c1d..e2c68f8a27 100644 --- a/code/modules/xenobio2/machinery/injector.dm +++ b/code/modules/xenobio2/machinery/injector.dm @@ -25,7 +25,6 @@ reagents = R R.my_atom = src beaker = new /obj/item/weapon/reagent_containers/glass/beaker(src) - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) component_parts += new /obj/item/weapon/stock_parts/matter_bin(src) diff --git a/code/modules/xenobio2/machinery/slime_replicator.dm b/code/modules/xenobio2/machinery/slime_replicator.dm index 9faa4272b4..a3db42e437 100644 --- a/code/modules/xenobio2/machinery/slime_replicator.dm +++ b/code/modules/xenobio2/machinery/slime_replicator.dm @@ -19,7 +19,6 @@ /obj/machinery/slime/replicator/New() ..() - circuit = new circuit(src) component_parts = list() component_parts += new /obj/item/weapon/stock_parts/manipulator(src) component_parts += new /obj/item/weapon/stock_parts/manipulator(src)