Revert "Frame Cleanup"

This commit is contained in:
Yoshax
2016-08-06 00:27:03 +01:00
committed by GitHub
parent 9f7b77d933
commit 82722ba42f
69 changed files with 913 additions and 665 deletions

View File

@@ -17,6 +17,7 @@
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)

View File

@@ -80,7 +80,24 @@ log transactions
return 1
/obj/machinery/atm/attackby(obj/item/I as obj, mob/user as mob)
if(computer_deconstruction_screwdriver(user, I))
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
user << "<span class='notice'>You start disconnecting the monitor.</span>"
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
var/obj/item/weapon/circuitboard/M = new circuit( A )
A.frame_type = "atm"
A.pixel_x = pixel_x
A.pixel_y = pixel_y
A.circuit = M
A.anchored = 1
for (var/obj/C in src)
C.forceMove(loc)
user << "<span class='notice'>You disconnect the monitor.</span>"
A.state = 4
A.icon_state = "atm_4"
M.deconstruct(src)
qdel(src)
return
if(istype(I, /obj/item/weapon/card))
if(emagged > 0)

View File

@@ -42,6 +42,7 @@
/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)

View File

@@ -24,11 +24,13 @@
/obj/structure/filingcabinet/filingcabinet //not changing the path to avoid unecessary map issues, but please don't name stuff like this in the future -Pete
icon_state = "tallcabinet"
/obj/structure/filingcabinet/initialize()
for(var/obj/item/I in loc)
if(istype(I, /obj/item/weapon/paper) || istype(I, /obj/item/weapon/folder) || istype(I, /obj/item/weapon/photo) || istype(I, /obj/item/weapon/paper_bundle))
I.loc = src
/obj/structure/filingcabinet/attackby(obj/item/P as obj, mob/user as mob)
if(istype(P, /obj/item/weapon/paper) || istype(P, /obj/item/weapon/folder) || istype(P, /obj/item/weapon/photo) || istype(P, /obj/item/weapon/paper_bundle))
user << "<span class='notice'>You put [P] in [src].</span>"
@@ -55,6 +57,7 @@
else
user << "<span class='notice'>You can't put [P] in [src]!</span>"
/obj/structure/filingcabinet/attack_hand(mob/user as mob)
if(contents.len <= 0)
user << "<span class='notice'>\The [src] is empty.</span>"
@@ -100,12 +103,14 @@
sleep(5)
icon_state = initial(icon_state)
/*
* Security Record Cabinets
*/
/obj/structure/filingcabinet/security
var/virgin = 1
/obj/structure/filingcabinet/security/proc/populate()
if(virgin)
for(var/datum/data/record/G in data_core.general)

View File

@@ -16,6 +16,7 @@
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)

View File

@@ -38,6 +38,7 @@
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)

View File

@@ -24,6 +24,7 @@ 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)

View File

@@ -18,6 +18,7 @@ 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)

View File

@@ -19,6 +19,7 @@
/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)

View File

@@ -17,6 +17,7 @@
/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)

View File

@@ -76,20 +76,19 @@
scanner_seal_integrity = round(scanner_seal_integrity + amount_used * 10)
return
if(istype(I, /obj/item/weapon/reagent_containers/glass))
var/obj/item/weapon/reagent_containers/glass/G = I
if(!G.is_open_container())
return
var/choice = alert("What do you want to do with the container?","Radiometric Scanner","Add coolant","Empty coolant","Scan container")
if(choice == "Add coolant")
var/obj/item/weapon/reagent_containers/glass/G = I
var/amount_transferred = min(src.reagents.maximum_volume - src.reagents.total_volume, G.reagents.total_volume)
var/trans = G.reagents.trans_to_obj(src, amount_transferred)
user << "<span class='info'>You empty [trans ? trans : 0]u of coolant into [src].</span>"
G.reagents.trans_to(src, amount_transferred)
user << "<span class='info'>You empty [amount_transferred]u of coolant into [src].</span>"
update_coolant()
return
else if(choice == "Empty coolant")
var/obj/item/weapon/reagent_containers/glass/G = I
var/amount_transferred = min(G.reagents.maximum_volume - G.reagents.total_volume, src.reagents.total_volume)
var/trans = src.reagents.trans_to(G, amount_transferred)
user << "<span class='info'>You remove [trans ? trans : 0]u of coolant from [src].</span>"
src.reagents.trans_to(G, amount_transferred)
user << "<span class='info'>You remove [amount_transferred]u of coolant from [src].</span>"
update_coolant()
return
if(scanned_item)
@@ -149,15 +148,15 @@
data["radiation"] = round(radiation)
data["t_left_radspike"] = round(t_left_radspike)
data["rad_shield_on"] = rad_shield
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "geoscanner.tmpl", "High Res Radiocarbon Spectrometer", 900, 825)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick

View File

@@ -42,25 +42,22 @@
broadcast_request() //This is the device making the initial event request. It needs to broadcast to other devices
if(istype(W, /obj/item/weapon/screwdriver))
user << "You begin removing the faceplate from the [src]"
if(do_after(user, 10))
user << "You remove the faceplate from the [src]"
var/obj/structure/frame/A = new /obj/structure/frame(loc)
var/obj/item/weapon/circuitboard/M = new circuit(A)
A.frame_type = M.board_type
A.need_circuit = 0
A.pixel_x = pixel_x
A.pixel_y = pixel_y
A.set_dir(dir)
A.circuit = M
A.anchored = 1
for (var/obj/C in src)
C.forceMove(loc)
A.state = 3
A.update_icon()
M.deconstruct(src)
qdel(src)
return
user << "You remove the faceplate from the [src]"
var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
var/obj/item/weapon/circuitboard/M = new circuit( A )
A.frame_type = "keycard"
A.pixel_x = pixel_x
A.pixel_y = pixel_y
A.set_dir(dir)
A.circuit = M
A.anchored = 1
for (var/obj/C in src)
C.forceMove(loc)
A.state = 3
A.icon_state = "keycard_3"
M.deconstruct(src)
qdel(src)
return
/obj/machinery/keycard_auth/power_change()
..()

View File

@@ -21,6 +21,7 @@
/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)

View File

@@ -125,6 +125,7 @@
/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)
@@ -267,6 +268,7 @@
/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)

View File

@@ -25,6 +25,7 @@
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)
@@ -74,7 +75,7 @@
if(occupant)
occupant.forceMove(loc)
occupant = null
/obj/machinery/xenobio2/manualinjector/proc/eject_beaker()
if(beaker)
var/obj/item/weapon/reagent_containers/glass/beaker/B = beaker
@@ -136,9 +137,10 @@
move_into_injector(user,G.affecting)
/obj/item/weapon/circuitboard/xenobioinjectormachine
name = T_BOARD("biological injector")
build_path = /obj/machinery/xenobio2/manualinjector
board_type = /datum/frame/frame_types/machine
build_path = "/obj/machinery/xenobio2/manualinjector"
board_type = "machine"
origin_tech = list() //To be filled,
req_components = list() //To be filled,

View File

@@ -61,7 +61,7 @@
if(isxeno(injector.occupant))
var/mob/living/simple_animal/xeno/X = injector.occupant
data["compatible"] = 1
data["instability"] = 100 * (X.mut_level / X.mut_max)
data["instability"] = 100 * (X.mut_level / X.mut_max)
else
data["compatible"] = null
@@ -109,5 +109,6 @@
/obj/item/weapon/circuitboard/xenobio2computer
name = T_BOARD("injector control console")
build_path = /obj/item/weapon/circuitboard/xenobio2computer
build_path = "/obj/item/weapon/circuitboard/xenobio2computer"
board_type = "computer"
origin_tech = list() //To be filled,

View File

@@ -19,6 +19,7 @@
/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)