Merge pull request #1989 from Perakp/dnaDecon

DNA scanner and cloning pod deconstruction
This commit is contained in:
Aranclanos
2013-12-17 20:44:16 -08:00
19 changed files with 202 additions and 203 deletions

View File

@@ -240,54 +240,54 @@
if(blocks[NEARSIGHTEDBLOCK])
M.disabilities |= NEARSIGHTED
M << "\red Your eyes feel strange."
M << "<span class='danger'>Your eyes feel strange.</span>"
if(blocks[EPILEPSYBLOCK])
M.disabilities |= EPILEPSY
M << "\red You get a headache."
M << "<span class='danger'>You get a headache.</span>"
if(blocks[STRANGEBLOCK])
M << "\red You feel strange."
M << "<span class='danger'>You feel strange.</span>"
if(prob(95))
if(prob(50)) randmutb(M)
else randmuti(M)
else randmutg(M)
if(blocks[COUGHBLOCK])
M.disabilities |= COUGHING
M << "\red You start coughing."
M << "<span class='danger'>You start coughing.</span>"
if(blocks[CLUMSYBLOCK])
M << "\red You feel lightheaded."
M << "<span class='danger'>You feel lightheaded.</span>"
M.mutations |= CLUMSY
if(blocks[TOURETTESBLOCK])
M.disabilities |= TOURETTES
M << "\red You twitch."
M << "<span class='danger'>You twitch.</span>"
if(blocks[NERVOUSBLOCK])
M.disabilities |= NERVOUS
M << "\red You feel nervous."
M << "<span class='danger'>You feel nervous.</span>"
if(blocks[DEAFBLOCK])
M.sdisabilities |= DEAF
M.ear_deaf = 1
M << "\red You can't seem to hear anything..."
M << "<span class='danger'>You can't seem to hear anything.</span>"
if(blocks[BLINDBLOCK])
M.sdisabilities |= BLIND
M << "\red You can't seem to see anything."
M << "<span class='danger'>You can't seem to see anything.</span>"
if(blocks[HULKBLOCK])
if(inj || prob(10))
M.mutations |= HULK
M << "\blue Your muscles hurt."
M << "<span class='notice'>Your muscles hurt.</span>"
if(blocks[XRAYBLOCK])
if(inj || prob(30))
M.mutations |= XRAY
M << "\blue The walls suddenly disappear."
M << "<span class='notice'>The walls suddenly disappear.</span>"
M.sight |= SEE_MOBS|SEE_OBJS|SEE_TURFS
M.see_in_dark = 8
M.see_invisible = SEE_INVISIBLE_LEVEL_TWO
if(blocks[FIREBLOCK])
if(inj || prob(30))
M.mutations |= COLD_RESISTANCE
M << "\blue Your body feels warm."
M << "<span class='notice'>Your body feels warm.</span>"
if(blocks[TELEBLOCK])
if(inj || prob(25))
M.mutations |= TK
M << "\blue You feel smarter."
M << "<span class='notice'>You feel smarter.</span>"
/* If you want the new mutations to work, UNCOMMENT THIS.
@@ -339,20 +339,21 @@
/obj/machinery/dna_scannernew/New()
..()
component_parts = newlist(
/obj/item/weapon/circuitboard/clonescanner,
/obj/item/weapon/stock_parts/scanning_module,
/obj/item/weapon/stock_parts/manipulator,
/obj/item/weapon/stock_parts/micro_laser,
/obj/item/weapon/stock_parts/console_screen,
/obj/item/weapon/cable_coil,
/obj/item/weapon/cable_coil
)
RefreshParts()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/clonescanner(null)
component_parts += new /obj/item/weapon/stock_parts/scanning_module(null)
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(null)
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
component_parts += new /obj/item/weapon/cable_coil(null, 1)
component_parts += new /obj/item/weapon/cable_coil(null, 1)
/obj/machinery/dna_scannernew/proc/toggle_open()
if(open) return close()
else return open()
/obj/machinery/dna_scannernew/proc/toggle_open(mob/user=usr)
if(!user)
return
if(open) return close(user)
else return open(user)
/obj/machinery/dna_scannernew/container_resist()
var/mob/living/user = usr
@@ -363,8 +364,7 @@
user.next_move = world.time + 100
user.last_special = world.time + 100
user << "<span class='notice'>You lean on the back of [src] and start pushing the door open. (this will take about [breakout_time] minutes.)</span>"
for(var/mob/O in viewers(src))
O << "<span class='warning'>You hear a metallic creaking from [src]!</span>"
user.visible_message("<span class='warning'>You hear a metallic creaking from [src]!</span>")
if(do_after(user,(breakout_time*60*10))) //minutes * 60seconds * 10deciseconds
if(!user || user.stat != CONSCIOUS || user.loc != src || open || !locked)
@@ -374,10 +374,13 @@
visible_message("<span class='danger'>[user] successfully broke out of [src]!</span>")
user << "<span class='notice'>You successfully break out of [src]!</span>"
open()
open(user)
/obj/machinery/dna_scannernew/proc/close()
/obj/machinery/dna_scannernew/proc/close(mob/user)
if(open)
if(panel_open)
user << "<span class='notice'>Close the maintenance panel first.</span>"
return 0
open = 0
density = 1
for(var/mob/living/carbon/C in loc)
@@ -407,10 +410,13 @@
return 1
/obj/machinery/dna_scannernew/proc/open()
/obj/machinery/dna_scannernew/proc/open(mob/user)
if(!open)
if(panel_open)
user << "<span class='notice'>Close the maintenance panel first.</span>"
return
if(locked)
usr << "<span class='notice'>The bolts are locked down, securing the door shut.</span>"
user << "<span class='notice'>The bolts are locked down, securing the door shut.</span>"
return
var/turf/T = get_turf(src)
if(T)
@@ -428,10 +434,35 @@
/obj/machinery/dna_scannernew/relaymove(mob/user as mob)
if(user.stat)
return
open()
open(user)
return
/obj/machinery/dna_scannernew/attackby(obj/item/weapon/grab/G, mob/user)
if(istype(G, /obj/item/weapon/screwdriver))
if(occupant)
user << "<span class='notice'>The maintenance panel is locked.</span>"
return
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
panel_open = !panel_open
if(panel_open)
icon_state = "[icon_state]_maintenance"
user << "<span class='notice'>You open the maintenance panel of [src].</span>"
else
if(open)
icon_state = "[initial(icon_state)]_open"
else
icon_state = "[initial(icon_state)]"
user << "<span class='notice'>You close the maintenance panel of [src].</span>"
return
if(istype(G, /obj/item/weapon/crowbar))
if(panel_open)
for(var/obj/I in contents) // in case there is something in the scanner
I.loc = src.loc
default_deconstruction_crowbar()
return
if(!istype(G, /obj/item/weapon/grab) || !ismob(G.affecting))
return
if(!open)
@@ -443,8 +474,9 @@
del(G)
/obj/machinery/dna_scannernew/attack_hand(mob/user)
if(..()) return
toggle_open()
if(..())
return
toggle_open(user)
add_fingerprint(user)
@@ -482,6 +514,7 @@
del(src)
//DNA COMPUTER
/obj/machinery/computer/scan_consolenew
name = "\improper DNA scanner access console"
desc = "Scan DNA."
@@ -509,7 +542,7 @@
user.drop_item()
I.loc = src
src.diskette = I
user << "You insert [I]."
user << "<span class='notice'>You insert [I].</span>"
src.updateUsrDialog()
return
else
@@ -749,7 +782,7 @@
if("togglelock")
if(connected) connected.locked = !connected.locked
if("toggleopen")
if(connected) connected.toggle_open()
if(connected) connected.toggle_open(usr)
if("setduration")
if(!num)
num = round(input(usr, "Choose pulse duration:", "Input an Integer", null) as num|null)

View File

@@ -176,21 +176,13 @@ var/global/list/autolathe_recipes_hidden = list( \
return 1
if (opened)
if(istype(O, /obj/item/weapon/crowbar))
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
M.state = 2
M.icon_state = "box_1"
for(var/obj/I in component_parts)
if(I.reliability != 100 && crit_fail)
I.crit_fail = 1
I.loc = src.loc
if(m_amount >= 3750)
var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src.loc)
G.amount = round(m_amount / 3750)
if(g_amount >= 3750)
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc)
G.amount = round(g_amount / 3750)
del(src)
default_deconstruction_crowbar()
return 1
else
user.set_machine(src)

View File

@@ -14,7 +14,6 @@
var/c_tag_order = 999
var/status = 1.0
anchored = 1.0
var/panel_open = 0 // 0 = Closed / 1 = Open
var/invuln = null
var/obj/item/device/camera_bug/bug = null
var/obj/item/weapon/camera_assembly/assembly = null

View File

@@ -19,6 +19,19 @@
var/attempting = 0 //One clone attempt at a time thanks
var/eject_wait = 0 //Don't eject them as soon as they are created fuckkk
/obj/machinery/clonepod/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/clonepod(src)
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
component_parts += new /obj/item/weapon/cable_coil(src, 1)
component_parts += new /obj/item/weapon/cable_coil(src, 1)
//The return of data disks?? Just for transferring between genetics machine/cloning machine.
//TO-DO: Make the genetics machine accept them.
/obj/item/weapon/disk/data
@@ -98,6 +111,8 @@
//Start growing a human clone in the pod!
/obj/machinery/clonepod/proc/growclone(var/ckey, var/clonename, var/ui, var/se, var/mindref, var/mrace)
if(panel_open)
return 0
if(mess || attempting)
return 0
var/datum/mind/clonemind = locate(mindref)
@@ -217,7 +232,7 @@
src.occupant = null
if (src.locked)
src.locked = 0
if (!src.mess)
if (!src.mess && !panel_open)
icon_state = "pod_0"
use_power(200)
return
@@ -226,14 +241,27 @@
//Let's unlock this early I guess. Might be too early, needs tweaking.
/obj/machinery/clonepod/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/screwdriver))
if(occupant || mess || locked)
user << "<span class='notice'>The maintenance panel is locked.</span>"
return
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
default_deconstruction_screwdriver(user, "[icon_state]_maintenance", "[initial(icon_state)]")
return
if(istype(W, /obj/item/weapon/crowbar))
if(panel_open)
default_deconstruction_crowbar()
return
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if (!src.check_access(W))
user << "\red Access Denied."
user << "<span class='danger'>Access Denied.</span>"
return
if ((!src.locked) || (isnull(src.occupant)))
return
if ((src.occupant.health < -20) && (src.occupant.stat != 2))
user << "\red Access Refused."
user << "<span class='danger'>Access Refused.</span>"
return
else
src.locked = 0
@@ -264,6 +292,8 @@
set category = "Object"
set src in oview(1)
if(!usr)
return
if (usr.stat != 0)
return
src.go_out()

View File

@@ -49,7 +49,7 @@
/obj/machinery/constructable_frame/machine_frame/attackby(obj/item/P as obj, mob/user as mob)
if(P.crit_fail)
user << "\red This part is faulty, you cannot add this to the machine!"
user << "<span class='danger'>This part is faulty, you cannot add this to the machine!</span>"
return
switch(state)
if(1)
@@ -57,17 +57,17 @@
var/obj/item/weapon/cable_coil/C = P
if(C.amount >= 5)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "\blue You start to add cables to the frame."
user << "<span class='notice'>You start to add cables to the frame.</span>"
if(do_after(user, 20))
if(C)
C.amount -= 5
if(!C.amount) del(C)
user << "\blue You add cables to the frame."
user << "<span class='notice'>You add cables to the frame.</span>"
state = 2
icon_state = "box_1"
if(istype(P, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
user << "\blue You dismantle the frame"
user << "<span class='notice'>You dismantle the frame.</span>"
new /obj/item/stack/sheet/metal(src.loc, 5)
del(src)
if(2)
@@ -75,7 +75,7 @@
var/obj/item/weapon/circuitboard/B = P
if(B.board_type == "machine")
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "\blue You add the circuit board to the frame."
user << "<span class='notice'>You add the circuit board to the frame.</span>"
circuit = P
user.drop_item()
P.loc = src
@@ -86,10 +86,10 @@
update_namelist()
update_req_desc()
else
user << "\red This frame does not accept circuit boards of this type!"
user << "<span class='danger'>This frame does not accept circuit boards of this type!</span>"
if(istype(P, /obj/item/weapon/wirecutters))
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
user << "\blue You remove the cables."
user << "<span class='notice'>You remove the cables.</span>"
state = 1
icon_state = "box_0"
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( src.loc )
@@ -102,9 +102,9 @@
circuit.loc = src.loc
circuit = null
if(components.len == 0)
user << "\blue You remove the circuit board."
user << "<span class='notice'>You remove the circuit board.</span>"
else
user << "\blue You remove the circuit board and other components."
user << "<span class='notice'>You remove the circuit board and other components.</span>"
for(var/obj/item/weapon/W in components)
W.loc = src.loc
desc = initial(desc)
@@ -125,32 +125,33 @@
del(O)
new_machine.component_parts = list()
for(var/obj/O in src)
O.loc = new_machine
O.loc = null
new_machine.component_parts += O
circuit.loc = new_machine
circuit.loc = null
new_machine.RefreshParts()
del(src)
if(istype(P, /obj/item/weapon))
var/success
for(var/I in req_components)
if(istype(P, text2path(I)) && (req_components[I] > 0))
success=1
if(istype(P, /obj/item/weapon/cable_coil))
var/obj/item/weapon/cable_coil/CP = P
if(CP.amount > 1)
var/obj/item/weapon/cable_coil/CC = new /obj/item/weapon/cable_coil(src)
CC.amount = 1
var/obj/item/weapon/cable_coil/CC = new /obj/item/weapon/cable_coil(src, 1, CP.item_color)
if(CP.use(1))
components += CC
req_components[I]--
update_req_desc()
break
break
user.drop_item()
P.loc = src
components += P
req_components[I]--
update_req_desc()
break
if(P.loc != src && !istype(P, /obj/item/weapon/cable_coil))
user << "\red You cannot add that component to the machine!"
if(!success)
user << "<span class='danger'>You cannot add that to the machine!</span>"
//Machine Frame Circuit Boards

View File

@@ -108,6 +108,7 @@ Class Procs:
var/uid
var/manual = 0
var/global/gl_uid = 1
var/panel_open = 0
/obj/machinery/New()
..()
@@ -211,7 +212,7 @@ Class Procs:
if ( ! (istype(usr, /mob/living/carbon/human) || \
istype(usr, /mob/living/silicon) || \
istype(usr, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
usr << "\red You don't have the dexterity to do this!"
usr << "<span class='danger'>You don't have the dexterity to do this!</span>"
return 1
/*
//distance checks are made by atom/proc/DblClick
@@ -224,7 +225,7 @@ Class Procs:
visible_message("\red [H] stares cluelessly at [src] and drools.")
return 1
else if(prob(H.getBrainLoss()))
user << "\red You momentarily forget how to use [src]."
user << "<span class='danger'>You momentarily forget how to use [src].</span>"
return 1
src.add_fingerprint(user)
@@ -238,3 +239,23 @@ Class Procs:
uid = gl_uid
gl_uid++
/obj/machinery/proc/default_deconstruction_crowbar()
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
M.state = 2
M.icon_state = "box_1"
for(var/obj/I in component_parts)
if(I.reliability != 100 && crit_fail)
I.crit_fail = 1
I.loc = src.loc
del(src)
/obj/machinery/proc/default_deconstruction_screwdriver(var/mob/user, var/icon_state_open, var/icon_state_closed)
if (!panel_open)
panel_open = 1
icon_state = icon_state_open
user << "<span class='notice'>You open the maintenance hatch of [src].</span>"
else
panel_open = 0
icon_state = icon_state_closed
user << "<span class='notice'>You close the maintenance hatch of [src].</span>"

View File

@@ -24,26 +24,26 @@
switch(construct_op)
if(0)
if(istype(P, /obj/item/weapon/screwdriver))
user << "You unfasten the bolts."
user << "<span class='notice'>You unfasten the bolts.</span>"
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
construct_op ++
if(1)
if(istype(P, /obj/item/weapon/screwdriver))
user << "You fasten the bolts."
user << "<span class='notice'>You fasten the bolts.</span>"
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
construct_op --
if(istype(P, /obj/item/weapon/wrench))
user << "You dislodge the external plating."
user << "<span class='notice'>You dislodge the external plating.</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
construct_op ++
if(2)
if(istype(P, /obj/item/weapon/wrench))
user << "You secure the external plating."
user << "<span class='notice'>You secure the external plating.</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
construct_op --
if(istype(P, /obj/item/weapon/wirecutters))
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
user << "You remove the cables."
user << "<span class='notice'>You remove the cables.</span>"
construct_op ++
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( user.loc )
A.amount = 5
@@ -51,26 +51,25 @@
if(3)
if(istype(P, /obj/item/weapon/cable_coil))
var/obj/item/weapon/cable_coil/A = P
if(A.amount >= 5)
user << "You insert the cables."
A.amount -= 5
if(A.amount <= 0)
user.drop_item()
del(A)
if(A.use(5))
user << "<span class='notice'>You insert the cables.</span>"
construct_op --
stat &= ~BROKEN // the machine's not borked anymore!
else
user << "You need more cable"
user << "<span class='danger'>You need more cable to do that.</span>"
if(istype(P, /obj/item/weapon/crowbar))
user << "You begin prying out the circuit board and components..."
user << "<span class='notice'>You begin prying out the circuit board and components...</span>"
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
if(do_after(user,60))
user << "You finish prying out the components."
user << "<span class='notice'>You finish prying out the components.</span>"
// Drop all the component stuff
if(contents.len > 0)
for(var/obj/x in src)
x.loc = user.loc
if(component_parts)
for(var/obj/I in component_parts)
if(I.reliability != 100 && crit_fail)
I.crit_fail = 1
I.loc = src.loc
else
// If the machine wasn't made during runtime, probably doesn't have components:
@@ -81,13 +80,14 @@
for(var/i = 1, i <= C.req_components[I], i++)
newpath = text2path(I)
var/obj/item/s = new newpath
s.loc = user.loc
if(istype(P, /obj/item/weapon/cable_coil))
var/obj/item/weapon/cable_coil/A = P
s.loc = src.loc
if(istype(s, /obj/item/weapon/cable_coil))
var/obj/item/weapon/cable_coil/A = s
A.amount = 1
A.update_icon()
// Drop a circuit board too
C.loc = user.loc
C.loc = src.loc
// Create a machine frame and delete the current machine
var/obj/machinery/constructable_frame/machine_frame/F = new

View File

@@ -40,7 +40,6 @@
var/shoot_inventory = 0 //Fire items at customers! We're broken!
var/shut_up = 0 //Stop spouting those godawful pitches!
var/extended_inventory = 0 //can we access the hidden inventory?
var/panel_open = 0 //Hacking that vending machine. Gonna get a free candy bar.
var/scan_id = 1
var/obj/item/weapon/coin/coin
var/datum/wires/vending/wires = null

View File

@@ -34,7 +34,6 @@
var/list/queue = list()
var/processing_queue = 0
var/screen = "main"
var/opened = 0
var/temp
var/list/part_sets = list( //set names must be unique
"Cyborg"=list(
@@ -701,25 +700,11 @@
/obj/machinery/mecha_part_fabricator/attackby(obj/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/screwdriver))
if (!opened)
opened = 1
icon_state = "fab-o"
user << "You open the maintenance hatch of [src]."
else
opened = 0
icon_state = "fab-idle"
user << "You close the maintenance hatch of [src]."
default_deconstruction_screwdriver(user, "fab-o", "fab-idle")
return
if (opened)
if (panel_open)
if(istype(W, /obj/item/weapon/crowbar))
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
M.state = 2
M.icon_state = "box_1"
for(var/obj/I in component_parts)
if(I.reliability != 100 && crit_fail)
I.crit_fail = 1
I.loc = src.loc
if(src.resources["metal"] >= 3750)
var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src.loc)
G.amount = round(src.resources["metal"] / G.perunit)
@@ -744,7 +729,7 @@
if(src.resources["bananium"] >= 2000)
var/obj/item/stack/sheet/mineral/clown/G = new /obj/item/stack/sheet/mineral/clown(src.loc)
G.amount = round(src.resources["bananium"] / G.perunit)
del(src)
default_deconstruction_crowbar()
return 1
else
user << "\red You can't load the [src.name] while it's opened."

View File

@@ -302,8 +302,8 @@
if(src.amount < used)
return 0
else if (src.amount == used)
//handle mob icon update
if(ismob(loc))
.=1 //Because del(src) stops the proc, set the default return value to 1
if(ismob(loc)) //handle mob icon update
var/mob/M = loc
M.u_equip(src)
del(src)

View File

@@ -53,7 +53,6 @@ display round(lastgen) and plasmatank amount
var/active = 0
var/power_gen = 5000
var/open = 0
var/recent_fault = 0
var/power_output = 1
@@ -115,8 +114,8 @@ display round(lastgen) and plasmatank amount
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)
component_parts += new /obj/item/weapon/cable_coil(src)
component_parts += new /obj/item/weapon/cable_coil(src)
component_parts += new /obj/item/weapon/cable_coil(src, 1)
component_parts += new /obj/item/weapon/cable_coil(src, 1)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new board_path(src)
var/obj/sheet = new sheet_path(null)
@@ -231,21 +230,14 @@ display round(lastgen) and plasmatank amount
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
else if(istype(O, /obj/item/weapon/screwdriver))
open = !open
panel_open = !panel_open
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(open)
if(panel_open)
user << "\blue You open the access panel."
else
user << "\blue You close the access panel."
else if(istype(O, /obj/item/weapon/crowbar) && !open)
var/obj/machinery/constructable_frame/machine_frame/new_frame = new /obj/machinery/constructable_frame/machine_frame(src.loc)
for(var/obj/item/I in component_parts)
if(I.reliability < 100)
I.crit_fail = 1
I.loc = src.loc
new_frame.state = 2
new_frame.icon_state = "box_1"
del(src)
else if(istype(O, /obj/item/weapon/crowbar) && panel_open)
default_deconstruction_crowbar()
/obj/machinery/power/port_gen/pacman/attack_hand(mob/user as mob)
..()

View File

@@ -52,19 +52,12 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
if (shocked)
shock(user,50)
if (istype(O, /obj/item/weapon/screwdriver))
if (!opened)
opened = 1
if(linked_console)
linked_console.linked_imprinter = null
linked_console = null
icon_state = "circuit_imprinter_t"
user << "You open the maintenance hatch of [src]."
else
opened = 0
icon_state = "circuit_imprinter"
user << "You close the maintenance hatch of [src]."
if(linked_console)
linked_console.linked_imprinter = null
linked_console = null
default_deconstruction_screwdriver(user, "circuit_imprinter_t", "circuit_imprinter")
return
if (opened)
if (panel_open)
if(istype(O, /obj/item/weapon/crowbar))
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)

View File

@@ -44,27 +44,14 @@ Note: Must be placed within 3 tiles of the R&D Console
if (shocked)
shock(user,50)
if (istype(O, /obj/item/weapon/screwdriver))
if (!opened)
opened = 1
if(linked_console)
linked_console.linked_destroy = null
linked_console = null
icon_state = "d_analyzer_t"
user << "You open the maintenance hatch of [src]."
else
opened = 0
icon_state = "d_analyzer"
user << "You close the maintenance hatch of [src]."
if(linked_console)
linked_console.linked_destroy = null
linked_console = null
default_deconstruction_screwdriver(user, "d_analyzer_t", "d_analyzer")
return
if (opened)
if (panel_open)
if(istype(O, /obj/item/weapon/crowbar))
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
M.state = 2
M.icon_state = "box_1"
for(var/obj/I in component_parts)
I.loc = src.loc
del(src)
default_deconstruction_crowbar()
return 1
else
user << "\red You can't load the [src.name] while it's opened."

View File

@@ -57,30 +57,13 @@ Note: Must be placed west/left of and R&D console to function.
if (O.is_open_container())
return 1
if (istype(O, /obj/item/weapon/screwdriver))
if (!opened)
opened = 1
if(linked_console)
linked_console.linked_lathe = null
linked_console = null
icon_state = "protolathe_t"
user << "You open the maintenance hatch of [src]."
else
opened = 0
icon_state = "protolathe"
user << "You close the maintenance hatch of [src]."
if(linked_console)
linked_console.linked_lathe = null
linked_console = null
default_deconstruction_screwdriver(user, "protolathe_t", "protolathe")
return
if (opened)
if (panel_open)
if(istype(O, /obj/item/weapon/crowbar))
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
M.state = 2
M.icon_state = "box_1"
for(var/obj/I in component_parts)
if(istype(I, /obj/item/weapon/reagent_containers/glass/beaker))
reagents.trans_to(I, reagents.total_volume)
if(I.reliability != 100 && crit_fail)
I.crit_fail = 1
I.loc = src.loc
if(m_amount >= 3750)
var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src.loc)
G.amount = round(m_amount / G.perunit)
@@ -108,7 +91,7 @@ Note: Must be placed west/left of and R&D console to function.
if(adamantine_amount >= 2000)
var/obj/item/stack/sheet/mineral/adamantine/G = new /obj/item/stack/sheet/mineral/adamantine(src.loc)
G.amount = round(adamantine_amount / G.perunit)
del(src)
default_deconstruction_crowbar()
return 1
else
user << "\red You can't load the [src.name] while it's opened."

View File

@@ -99,7 +99,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
/obj/machinery/computer/rdconsole/proc/SyncRDevices() //Makes sure it is properly sync'ed up with the devices attached to it (if any).
for(var/obj/machinery/r_n_d/D in oview(3,src))
if(D.linked_console != null || D.disabled || D.opened)
if(D.linked_console != null || D.disabled || D.panel_open)
continue
if(istype(D, /obj/machinery/r_n_d/destructive_analyzer))
if(linked_destroy == null)

View File

@@ -17,7 +17,6 @@
var/hack_wire
var/disable_wire
var/shock_wire
var/opened = 0
var/obj/machinery/computer/rdconsole/linked_console
/obj/machinery/r_n_d/New()
@@ -53,7 +52,7 @@
/obj/machinery/r_n_d/attack_hand(mob/user as mob)
if (shocked)
shock(user,50)
if(opened)
if(panel_open)
var/dat as text
dat += "[src.name] Wires:<BR>"
for(var/wire in src.wires)

View File

@@ -19,8 +19,8 @@
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/rdserver(src)
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
component_parts += new /obj/item/weapon/cable_coil(src)
component_parts += new /obj/item/weapon/cable_coil(src)
component_parts += new /obj/item/weapon/cable_coil(src, 1)
component_parts += new /obj/item/weapon/cable_coil(src, 1)
RefreshParts()
src.initialize(); //Agouri
@@ -131,27 +131,12 @@
if (shocked)
shock(user,50)
if (istype(O, /obj/item/weapon/screwdriver))
if (!opened)
opened = 1
icon_state = "server_o"
user << "You open the maintenance hatch of [src]."
else
opened = 0
icon_state = "server"
user << "You close the maintenance hatch of [src]."
default_deconstruction_screwdriver(user, "server_o", "server")
return
if (opened)
if (panel_open)
if(istype(O, /obj/item/weapon/crowbar))
griefProtection()
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
M.state = 2
M.icon_state = "box_1"
for(var/obj/I in component_parts)
if(I.reliability != 100 && crit_fail)
I.crit_fail = 1
I.loc = src.loc
del(src)
default_deconstruction_crowbar()
return 1
/obj/machinery/r_n_d/server/attack_hand(mob/user as mob) // I guess only exists to stop ninjas or hell does it even work I dunno. See also ninja gloves.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB