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
+2 -2
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)
+6 -14
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)
..()
+5 -12
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)
+6 -19
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."
+6 -23
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."
+1 -1
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)
+1 -2
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)
+5 -20
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.