Chinese Sweatshop Update:

- Fixed some machine-board design issues. Mainly that they make the machine rather then the board :x
- Autolathe, Protolathe and Circuit Imprinter now dump out any materials you stored in it if you dismantle them. Reagents get dumped into any beakers that were required to make the damn thing in the first place.
- AI upload computer can now be deconstructed. However, it can't be deconstructed unless you right click and select "accessinternals." Otherwise, it disassembles like a normal computer.
- Circuit Imprinter now accepts gold and diamond sheets. Bling bling.
- AI modules now require gold and/or diamond to be constructed.
- Server Room rearrange. Also, server room has a "lobby" area where you can go without freezing/suffocating.
- New "R&D Server" and "Server Control" control computer added to the server room. Instead of uploading to eachother, R&D consoles now upload to all servers they have access rights to and download from all servers they have download rights from. New R&D consoles have no upload or download rights but any that start on the map at round start do. The new console allows for the changing of server access and manipulation of server data. Servers can also be hacked. This can result in either the device being disabled (can't upload/download data), hacked (any console can download data from it), or electrified (derp, ow). The Server Control console also can delete data from servers.
- R&D Console's "Connect/Disconnect" from network setting determines whether it shows up on the Server Control's menu when looking at what devices it can give/take server access from. Note: The server room and the server control needs RD access. If you don't have that, that's what emags are for :3
- ADMIN NOTE: There is also a master Server and Server Control on centcom. Whenever data is sync'ed to the network, it automatically uploads (but not downloads) data from the centcom server. This is so that if a griffan destroys the servers on the station, you can restore the lost progress. Only the centcom Server control can transfer data between servers.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1140 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
morikou@gmail.com
2011-02-26 21:14:29 +00:00
parent be1048e170
commit 9dada054bd
15 changed files with 5085 additions and 4553 deletions
+1 -1
View File
@@ -310,7 +310,7 @@ datum
required_reagents = list("aluminium" = 1, "plasma" = 1, "acid" = 1 )
result_amount = 1
on_reaction(var/datum/reagents/holder, var/created_volume)
var/location = get_turf(holder.my_atom.loc)
var/turf/location = get_turf(holder.my_atom.loc)
for(var/turf/simulated/floor/target_tile in range(0,location))
if(target_tile.parent && target_tile.parent.group_processing)
target_tile.parent.suspend_group_processing()
+1
View File
@@ -43,6 +43,7 @@
name = "AI Upload"
icon_state = "aiupload"
var/mob/living/silicon/ai/current = null
var/opened = 0
/obj/machinery/computer/borgupload
name = "Cyborg Upload"
+8 -2
View File
@@ -3,7 +3,6 @@
var/max_m_amount = 150000.0
var/max_g_amount = 75000.0
/obj/machinery/autolathe/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (stat)
return 1
@@ -27,8 +26,15 @@
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)
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)
return 1
else
user << "\red You can't load the autolathe while it's opened."
@@ -121,6 +121,9 @@
/obj/item/weapon/circuitboard/mecha_control
name = "Circuit Board (Exosuit Control Console)"
build_path = "/obj/machinery/computer/mecha"
/obj/item/weapon/circuitboard/rdservercontrol
name = "Circuit Board (R&D Server Control)"
build_path = "/obj/machinery/computer/rdservercontrol"
+10 -1
View File
@@ -181,4 +181,13 @@ to destroy them and players will be able to make replacements.
/obj/item/weapon/circuitboard/pacman/mrs
name = "Circuit Board (MRSPACMAN-type Generator)"
origin_tech = "powerstorage=5;plasmatech=6"
origin_tech = "powerstorage=5;plasmatech=6"
obj/item/weapon/circuitboard/rdserver
name = "Circuit Board (R&D Server)"
build_path = "/obj/machinery/r_n_d/server"
board_type = "machine"
origin_tech = "programming=3"
req_components = list(
"/obj/item/weapon/cable_coil" = 2,
"/obj/item/weapon/stock_parts/scanning_module" = 1)
+43 -3
View File
@@ -20,9 +20,49 @@ AI MODULES
throw_range = 15
origin_tech = "programming=3"
/obj/machinery/computer/aiupload/attackby(obj/item/weapon/aiModule/module as obj, mob/user as mob)
if(istype(module, /obj/item/weapon/aiModule))
module.install(src)
/obj/machinery/computer/aiupload/verb/AccessInternals()
set src in oview(1)
if(get_dist(src, usr) > 1 || usr.restrained() || usr.lying || usr.stat || istype(usr, /mob/living/silicon))
return
opened = !opened
if(opened)
usr << "\blue The access panel is now open."
else
usr << "\blue The access panel is now closed."
return
/obj/machinery/computer/aiupload/attackby(obj/item/weapon/O as obj, mob/user as mob)
if(istype(O, /obj/item/weapon/screwdriver) && opened)
playsound(src.loc, 'Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/computerframe/A = new /obj/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
var/obj/item/weapon/circuitboard/aiupload/M = new /obj/item/weapon/circuitboard/aiupload( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.state = 3
A.icon_state = "3"
A.anchored = 1
del(src)
else
user << "\blue You disconnect the monitor."
var/obj/computerframe/A = new /obj/computerframe( src.loc )
var/obj/item/weapon/circuitboard/aiupload/M = new /obj/item/weapon/circuitboard/aiupload( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.state = 4
A.icon_state = "4"
A.anchored = 1
del(src)
else if(istype(O, /obj/item/weapon/aiModule))
var/obj/item/weapon/aiModule/M = O
M.install(src)
else
return ..()
+37 -18
View File
@@ -10,7 +10,9 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
flags = OPENCONTAINER
var
g_amount = 0
max_g_amount = 75000.0
gold_amount = 0
diamond_amount = 0
max_material_amount = 75000.0
New()
..()
@@ -32,7 +34,7 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
T = 0
for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
T += M.rating
max_g_amount = T * 75000.0
max_material_amount = T * 75000.0
blob_act()
@@ -43,9 +45,10 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
del(src)
return
proc/TotalMaterials()
return g_amount + gold_amount + diamond_amount
attackby(var/obj/item/O as obj, var/mob/user as mob)
if (disabled)
return
if (shocked)
shock(user,50)
if (istype(O, /obj/item/weapon/screwdriver))
@@ -68,18 +71,27 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
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(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)
return 1
else
user << "\red You can't load the [src.name] while it's opened."
return 1
if (disabled)
return
if (!linked_console)
user << "\The [name] must be linked to an R&D console first!"
return 1
if (O.is_open_container())
return 1
if (!istype(O, /obj/item/stack/sheet/glass))
if (!istype(O, /obj/item/stack/sheet/glass) && !istype(O, /obj/item/stack/sheet/gold) && !istype(O, /obj/item/stack/sheet/diamond))
user << "\red You cannot insert this item into the [name]!"
return 1
if (stat)
@@ -87,24 +99,31 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
if (busy)
user << "\red The [name] is busy. Please wait for completion of previous operation."
return 1
if (src.g_amount + O.g_amt > max_g_amount)
if ((TotalMaterials() + 3750) > max_material_amount)
user << "\red The [name] is full. Please remove glass from the protolathe in order to insert more."
return 1
var/obj/item/stack/stack = O
var/amount = 1
var/obj/item/stack/sheet/glass/stack
var/g_amt = O.g_amt
stack = O
amount = stack.amount
if (g_amt)
amount = min(amount, round((max_g_amount-src.g_amount)/g_amt))
stack.use(amount)
var/title = "[stack.name]: [stack.amount] sheet\s left"
switch(alert(title, "How many sheets do you want to load?", "one", "max", "cancel", null))
if("one")
amount = 1
if("max")
amount = min(stack.amount, round((max_material_amount-TotalMaterials())/3750))
else
return 1
busy = 1
use_power(max(1000, (g_amt)*amount/10))
use_power(max(1000, (3750*amount/10)))
spawn(16)
src.g_amount += g_amt * amount
if (O && O.loc == src)
del(O)
user << "\blue You add [amount] sheets to the [src.name]."
if(istype(stack, /obj/item/stack/sheet/glass))
g_amount += amount * 3750
else if(istype(stack, /obj/item/stack/sheet/gold))
gold_amount += amount * 3750
else if(istype(stack, /obj/item/stack/sheet/diamond))
diamond_amount += amount * 3750
stack.use(amount)
busy = 0
src.updateUsrDialog()
return
+35 -17
View File
@@ -245,7 +245,7 @@ datum
id = "safeguard_module"
req_tech = list("programming" = 3)
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
materials = list("$glass" = 2000, "acid" = 20, "$gold" = 100)
build_path = "/obj/item/weapon/aiModule/safeguard"
onehuman_module
@@ -254,7 +254,7 @@ datum
id = "onehuman_module"
req_tech = list("programming" = 4)
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
materials = list("$glass" = 2000, "acid" = 20, "$diamond" = 100)
build_path = "/obj/item/weapon/aiModule/oneHuman"
protectstation_module
@@ -263,7 +263,7 @@ datum
id = "protectstation_module"
req_tech = list("programming" = 3)
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
materials = list("$glass" = 2000, "acid" = 20, "$gold" = 100)
build_path = "/obj/item/weapon/aiModule/protectStation"
notele_module
@@ -272,14 +272,14 @@ datum
id = "notele_module"
req_tech = list("programming" = 3)
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
materials = list("$glass" = 2000, "acid" = 20, "$gold" = 100)
build_path = "/obj/item/weapon/aiModule/teleporterOffline"
quarantine_module
name = "Module Design (Quarantine)"
desc = "Allows for the construction of a Quarantine AI Module."
id = "quarantine_module"
req_tech = list("programming" = 3, "biotech" = 2)
req_tech = list("programming" = 3, "biotech" = 2, "$gold" = 100)
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
build_path = "/obj/item/weapon/aiModule/quarantine"
@@ -288,7 +288,7 @@ datum
name = "Module Design (OxygenIsToxicToHumans)"
desc = "Allows for the construction of a Safeguard AI Module."
id = "oxygen_module"
req_tech = list("programming" = 3, "biotech" = 2)
req_tech = list("programming" = 3, "biotech" = 2, "$gold" = 100)
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
build_path = "/obj/item/weapon/aiModule/oxygen"
@@ -299,7 +299,7 @@ datum
id = "freeform_module"
req_tech = list("programming" = 4)
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
materials = list("$glass" = 2000, "acid" = 20, "$gold" = 100)
build_path = "/obj/item/weapon/aiModule/freeform"
reset_module
@@ -308,7 +308,7 @@ datum
id = "reset_module"
req_tech = list("programming" = 3)
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
materials = list("$glass" = 2000, "acid" = 20, "$gold" = 100)
build_path = "/obj/item/weapon/aiModule/reset"
purge_module
@@ -317,7 +317,7 @@ datum
id = "purge_module"
req_tech = list("programming" = 4)
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
materials = list("$glass" = 2000, "acid" = 20, "$diamond" = 100)
build_path = "/obj/item/weapon/aiModule/purge"
freeformcore_module
@@ -326,7 +326,7 @@ datum
id = "freeformcore_module"
req_tech = list("programming" = 4)
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
materials = list("$glass" = 2000, "acid" = 20, "$diamond" = 100)
build_path = "/obj/item/weapon/aiModule/freeformcore"
asimov
@@ -335,7 +335,7 @@ datum
id = "asimov_module"
req_tech = list("programming" = 3)
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
materials = list("$glass" = 2000, "acid" = 20, "$diamond" = 100)
build_path = "/obj/item/weapon/aiModule/asimov"
paladin_module
@@ -344,7 +344,7 @@ datum
id = "paladin_module"
req_tech = list("programming" = 4)
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
materials = list("$glass" = 2000, "acid" = 20, "$diamond" = 100)
build_path = "/obj/item/weapon/aiModule/paladin"
tyrant_module
@@ -353,7 +353,7 @@ datum
id = "tyrant_module"
req_tech = list("programming" = 4, "syndicate" = 2)
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
materials = list("$glass" = 2000, "acid" = 20, "$diamond" = 100)
build_path = "/obj/item/weapon/aiModule/tyrant"
@@ -655,7 +655,7 @@ datum
req_tech = list("materials" = 2, "magnets" = 2)
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
build_path = "/obj/machinery/r_n_d/destructive_analyzer"
build_path = "/obj/item/weapon/circuitboard/destructive_analyzer"
protolathe
name = "Protolathe Board"
@@ -664,7 +664,7 @@ datum
req_tech = list("materials" = 3)
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
build_path = "/obj/machinery/r_n_d/protolathe"
build_path = "/obj/item/weapon/circuitboard/protolathe"
circuit_imprinter
name = "Circuit Imprinter Board"
@@ -673,7 +673,7 @@ datum
req_tech = list("materials" = 2)
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
build_path = "/obj/machinery/r_n_d/circuit_imprinter"
build_path = "/obj/item/weapon/circuitboard/circuit_imprinter"
autolathe
name = "Atuolathe Board"
@@ -682,7 +682,25 @@ datum
req_tech = list("materials" = 2)
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
build_path = "/obj/machinery/autolathe"
build_path = "/obj/item/weapon/circuitboard/autolathe"
rdservercontrol
name = "R&D Server Control Console Board"
desc = "The circuit board for a R&D Server Control Console"
id = "rdservercontrol"
req_tech = list("programming" = 2)
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
build_path = "/obj/item/weapon/circuitboard/rdservercontrol"
rdserver
name = "R&D Server Board"
desc = "The circuit board for an R&D Server"
id = "rdserver"
req_tech = list("programming" = 2)
build_type = IMPRINTER
materials = list("$glass" = 2000, "acid" = 20)
build_path = "/obj/item/weapon/circuitboard/rdserver"
/////////////////////////////////////////
////////////Power Stuff//////////////////
+2 -2
View File
@@ -40,8 +40,6 @@ Note: Must be placed within 3 tiles of the R&D Console
attackby(var/obj/O as obj, var/mob/user as mob)
if (disabled)
return
if (shocked)
shock(user,50)
if (istype(O, /obj/item/weapon/screwdriver))
@@ -70,6 +68,8 @@ Note: Must be placed within 3 tiles of the R&D Console
else
user << "\red You can't load the [src.name] while it's opened."
return 1
if (disabled)
return
if (!linked_console)
user << "\red The protolathe must be linked to an R&D console first!"
return
+31 -2
View File
@@ -51,8 +51,6 @@ Note: Must be placed west/left of and R&D console to function.
max_material_storage = T * 75000
attackby(var/obj/item/O as obj, var/mob/user as mob)
if (disabled)
return
if (shocked)
shock(user,50)
if (O.is_open_container())
@@ -77,12 +75,42 @@ Note: Must be placed west/left of and R&D console to function.
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 / 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)
if(plasma_amount >= 3750)
var/obj/item/stack/sheet/plasma/G = new /obj/item/stack/sheet/plasma(src.loc)
G.amount = round(plasma_amount / 3750)
if(silver_amount >= 3750)
var/obj/item/stack/sheet/silver/G = new /obj/item/stack/sheet/silver(src.loc)
G.amount = round(silver_amount / 3750)
if(gold_amount >= 3750)
var/obj/item/stack/sheet/gold/G = new /obj/item/stack/sheet/gold(src.loc)
G.amount = round(gold_amount / 3750)
if(uranium_amount >= 3750)
var/obj/item/stack/sheet/uranium/G = new /obj/item/stack/sheet/uranium(src.loc)
G.amount = round(uranium_amount / 3750)
if(diamond_amount >= 3750)
var/obj/item/stack/sheet/diamond/G = new /obj/item/stack/sheet/diamond(src.loc)
G.amount = round(diamond_amount / 3750)
if(clown_amount >= 3750)
var/obj/item/stack/sheet/clown/G = new /obj/item/stack/sheet/clown(src.loc)
G.amount = round(clown_amount / 3750)
del(src)
return 1
else
user << "\red You can't load the [src.name] while it's opened."
return 1
if (disabled)
return
if (!linked_console)
user << "\The protolathe must be linked to an R&D console first!"
return 1
@@ -118,6 +146,7 @@ Note: Must be placed west/left of and R&D console to function.
busy = 1
use_power(max(1000, (3750*amount/10)))
spawn(16)
user << "\blue You add [amount] sheets to the [src.name]."
icon_state = "protolathe"
flick("protolathe_o",src)
if(istype(stack, /obj/item/stack/sheet/metal))
+250 -175
View File
@@ -42,7 +42,9 @@ won't update every console in existence) but it's more of a hassle to do. Also,
obj/machinery/r_n_d/circuit_imprinter/linked_imprinter = null //Linked Circuit Imprinter
screen = 1.0 //Which screen is currently showing.
sync = 1 //Will it get updated when the R&D console does it's syncing process.
id = 0 //ID of the computer (for server restrictions).
sync = 1 //If sync = 0, it doesn't show up on Server Control Console
emagged = 0 //Turns off ID check
req_access = list(access_tox) //Data and setting manipulation requires scientist access.
@@ -116,6 +118,10 @@ won't update every console in existence) but it's more of a hassle to do. Also,
New()
..()
files = new /datum/research(src) //Setup the research data holder.
if(!id)
for(var/obj/machinery/r_n_d/server/centcom/S in world)
S.initialize()
break
initialize()
SyncRDevices()
@@ -162,6 +168,10 @@ won't update every console in existence) but it's more of a hassle to do. Also,
user.drop_item()
D.loc = src
user << "\blue You add the disk to the machine!"
else if(istype(D, /obj/item/weapon/card/emag) && !emagged)
playsound(src.loc, 'sparks4.ogg', 75, 1)
emagged = 1
user << "\blue You you disable the security protocols"
src.updateUsrDialog()
return
@@ -174,7 +184,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
usr.machine = src
if(href_list["menu"]) //Switches menu screens. Converts a sent text string into a number. Saves a LOT of code.
var/temp_screen = text2num(href_list["menu"])
if(screen <= 1.1 || (3 <= temp_screen && 4.9 >= temp_screen) || temp_screen == 1.0 || src.allowed(usr)) //Unless you are making something, you need access.
if(temp_screen <= 1.1 || (3 <= temp_screen && 4.9 >= temp_screen) || src.allowed(usr) || emagged) //Unless you are making something, you need access.
screen = temp_screen
else
usr << "Unauthorized Access."
@@ -224,46 +234,48 @@ won't update every console in existence) but it's more of a hassle to do. Also,
screen = 1.4
else if(href_list["eject_item"]) //Eject the item inside the destructive analyzer.
if(linked_destroy.busy)
usr << "\red The destructive analyzer is busy at the moment."
if(linked_destroy)
if(linked_destroy.busy)
usr << "\red The destructive analyzer is busy at the moment."
else if(linked_destroy.loaded_item)
linked_destroy.loaded_item.loc = linked_destroy.loc
linked_destroy.loaded_item = null
linked_destroy.icon_state = "d_analyzer"
screen = 2.1
else if(linked_destroy.loaded_item)
linked_destroy.loaded_item.loc = linked_destroy.loc
linked_destroy.loaded_item = null
linked_destroy.icon_state = "d_analyzer"
screen = 2.1
else if(href_list["deconstruct"]) //Deconstruct the item in the destructive analyzer and update the research holder.
if(linked_destroy.busy)
usr << "\red The destructive analyzer is busy at the moment."
else
var/choice = input("Proceeding will destroy loaded item.") in list("Proceed", "Cancel")
linked_destroy.busy = 1
if(choice == "Cancel") return
screen = 0.1
updateUsrDialog()
flick("d_analyzer_process", linked_destroy)
spawn(24)
linked_destroy.busy = 0
if(!linked_destroy.hacked)
if(linked_destroy.loaded_item.reliability >= 90)
var/list/temp_tech = linked_destroy.ConvertReqString2List(linked_destroy.loaded_item.origin_tech)
for(var/T in temp_tech)
files.UpdateTech(T, temp_tech[T])
if(linked_destroy.loaded_item.reliability < 100 && linked_destroy.loaded_item.crit_fail)
files.UpdateDesign(linked_destroy.loaded_item.type)
if(linked_lathe) //Also sends salvaged materials to a linked autolathe, if any.
linked_lathe.m_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.m_amt*linked_destroy.decon_mod))
linked_lathe.g_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.g_amt*linked_destroy.decon_mod))
linked_destroy.loaded_item = null
for(var/obj/I in linked_destroy.contents)
for(var/mob/M in I.contents)
M.death()
del(I)
use_power(250)
linked_destroy.icon_state = "d_analyzer"
screen = 1.0
if(linked_destroy)
if(linked_destroy.busy)
usr << "\red The destructive analyzer is busy at the moment."
else
var/choice = input("Proceeding will destroy loaded item.") in list("Proceed", "Cancel")
linked_destroy.busy = 1
if(choice == "Cancel") return
screen = 0.1
updateUsrDialog()
flick("d_analyzer_process", linked_destroy)
spawn(24)
linked_destroy.busy = 0
if(!linked_destroy.hacked)
if(linked_destroy.loaded_item.reliability >= 90)
var/list/temp_tech = linked_destroy.ConvertReqString2List(linked_destroy.loaded_item.origin_tech)
for(var/T in temp_tech)
files.UpdateTech(T, temp_tech[T])
if(linked_destroy.loaded_item.reliability < 100 && linked_destroy.loaded_item.crit_fail)
files.UpdateDesign(linked_destroy.loaded_item.type)
if(linked_lathe) //Also sends salvaged materials to a linked protolathe, if any.
linked_lathe.m_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.m_amt*linked_destroy.decon_mod))
linked_lathe.g_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.g_amt*linked_destroy.decon_mod))
linked_destroy.loaded_item = null
for(var/obj/I in linked_destroy.contents)
for(var/mob/M in I.contents)
M.death()
del(I)
use_power(250)
linked_destroy.icon_state = "d_analyzer"
screen = 1.0
updateUsrDialog()
else if(href_list["lock"]) //Lock the console from use by anyone without tox access.
if(src.allowed(usr))
@@ -273,135 +285,165 @@ won't update every console in existence) but it's more of a hassle to do. Also,
else if(href_list["sync"]) //Sync the research holder with all the R&D consoles in the game that aren't sync protected.
screen = 0.0
spawn(30)
for(var/obj/machinery/computer/rdconsole/C in world)
if(C.sync)
for(var/datum/tech/T in files.known_tech)
C.files.AddTech2Known(T)
for(var/datum/design/D in files.known_designs)
C.files.AddDesign2Known(D)
C.files.RefreshResearch()
screen = 1.6
updateUsrDialog()
if(!sync)
usr << "\red You must connect to the network first!"
else
spawn(30)
for(var/obj/machinery/r_n_d/server/S in world)
var/server_processed = 0
if(S.disabled)
continue
if((id in S.id_with_upload) || istype(S, /obj/machinery/r_n_d/server/centcom))
for(var/datum/tech/T in files.known_tech)
S.files.AddTech2Known(T)
for(var/datum/design/D in files.known_designs)
S.files.AddDesign2Known(D)
S.files.RefreshResearch()
server_processed = 1
if(((id in S.id_with_download) && !istype(S, /obj/machinery/r_n_d/server/centcom)) || S.hacked)
for(var/datum/tech/T in S.files.known_tech)
files.AddTech2Known(T)
for(var/datum/design/D in S.files.known_designs)
files.AddDesign2Known(D)
files.RefreshResearch()
server_processed = 1
if(!istype(S, /obj/machinery/r_n_d/server/centcom) && server_processed)
S.produce_heat(100)
screen = 1.6
updateUsrDialog()
else if(href_list["togglesync"]) //Prevents the console from being synced by other consoles. Can still send data.
sync = !sync
else if(href_list["build"]) //Causes the Protolathe to build something.
var/datum/design/being_built = null
for(var/datum/design/D in files.known_designs)
if(D.id == href_list["build"])
being_built = D
break
var/power = max(2000, (text2num(href_list["metal"])+text2num(href_list["glass"]))/5)
for(var/M in being_built.materials)
power += being_built.materials[M]
power = max(2000, power)
screen = 0.3
linked_lathe.busy = 1
flick("protolathe_n",linked_lathe)
spawn(16)
use_power(power)
if(linked_lathe)
var/datum/design/being_built = null
for(var/datum/design/D in files.known_designs)
if(D.id == href_list["build"])
being_built = D
break
var/power = 2000
for(var/M in being_built.materials)
power += round(being_built.materials[M] / 5)
power = max(2000, power)
screen = 0.3
linked_lathe.busy = 1
flick("protolathe_n",linked_lathe)
spawn(16)
for(var/M in being_built.materials)
switch(M)
if("$metal")
linked_lathe.m_amount = max(0, (linked_lathe.m_amount-being_built.materials[M]))
if("$glass")
linked_lathe.g_amount = max(0, (linked_lathe.g_amount-being_built.materials[M]))
if("$gold")
linked_lathe.gold_amount = max(0, (linked_lathe.gold_amount-being_built.materials[M]))
if("$silver")
linked_lathe.silver_amount = max(0, (linked_lathe.silver_amount-being_built.materials[M]))
if("$plasma")
linked_lathe.plasma_amount = max(0, (linked_lathe.plasma_amount-being_built.materials[M]))
if("$uranium")
linked_lathe.uranium_amount = max(0, (linked_lathe.uranium_amount-being_built.materials[M]))
if("$diamond")
linked_lathe.diamond_amount = max(0, (linked_lathe.diamond_amount-being_built.materials[M]))
if("$clown")
linked_lathe.clown_amount = max(0, (linked_lathe.clown_amount-being_built.materials[M]))
else
linked_lathe.reagents.remove_reagent(M, being_built.materials[M])
var/obj/new_item = new being_built.build_path(src)
new_item.reliability = being_built.reliability
if(linked_lathe.hacked) being_built.reliability = max((reliability / 2), 0)
new_item.loc = linked_lathe.loc
linked_lathe.busy = 0
screen = 3.1
updateUsrDialog()
use_power(power)
spawn(16)
for(var/M in being_built.materials)
switch(M)
if("$metal")
linked_lathe.m_amount = max(0, (linked_lathe.m_amount-being_built.materials[M]))
if("$glass")
linked_lathe.g_amount = max(0, (linked_lathe.g_amount-being_built.materials[M]))
if("$gold")
linked_lathe.gold_amount = max(0, (linked_lathe.gold_amount-being_built.materials[M]))
if("$silver")
linked_lathe.silver_amount = max(0, (linked_lathe.silver_amount-being_built.materials[M]))
if("$plasma")
linked_lathe.plasma_amount = max(0, (linked_lathe.plasma_amount-being_built.materials[M]))
if("$uranium")
linked_lathe.uranium_amount = max(0, (linked_lathe.uranium_amount-being_built.materials[M]))
if("$diamond")
linked_lathe.diamond_amount = max(0, (linked_lathe.diamond_amount-being_built.materials[M]))
if("$clown")
linked_lathe.clown_amount = max(0, (linked_lathe.clown_amount-being_built.materials[M]))
else
linked_lathe.reagents.remove_reagent(M, being_built.materials[M])
var/obj/new_item = new being_built.build_path(src)
new_item.reliability = being_built.reliability
if(linked_lathe.hacked) being_built.reliability = max((reliability / 2), 0)
new_item.loc = linked_lathe.loc
linked_lathe.busy = 0
screen = 3.1
updateUsrDialog()
else if(href_list["imprint"]) //Causes the Circuit Imprinter to build something.
linked_imprinter.busy = 1
screen = 0.4
updateUsrDialog()
flick("circuit_imprinter_ani", linked_imprinter)
spawn(16)
if(linked_imprinter)
var/datum/design/being_built = null
for(var/datum/design/D in files.known_designs)
if(D.id == href_list["imprint"])
being_built = D
break
var/power = 0
for(var/I in being_built.materials)
switch(I)
if("$glass")
linked_imprinter.g_amount -= being_built.materials[I]
power += being_built.materials[I] / 5
if(linked_imprinter.g_amount < 0)
linked_imprinter.g_amount = 0
if("$metal")
continue
else
linked_imprinter.reagents.remove_reagent(I, being_built.materials[I])
power += being_built.materials[I]
var/obj/new_item = new being_built.build_path(src)
new_item.reliability = being_built.reliability
if(linked_imprinter.hacked) being_built.reliability = max((reliability / 2), 0)
use_power(power)
new_item.loc = linked_imprinter.loc
linked_imprinter.busy = 0
screen = 4.1
updateUsrDialog()
var/power = 2000
for(var/M in being_built.materials)
power += round(being_built.materials[M] / 5)
power = max(2000, power)
screen = 0.4
linked_imprinter.busy = 1
flick("circuit_imprinter_ani",linked_lathe)
spawn(16)
use_power(power)
for(var/M in being_built.materials)
switch(M)
if("$glass")
linked_imprinter.g_amount = max(0, (linked_imprinter.g_amount-being_built.materials[M]))
if("$gold")
linked_imprinter.gold_amount = max(0, (linked_imprinter.gold_amount-being_built.materials[M]))
if("$diamond")
linked_imprinter.diamond_amount = max(0, (linked_imprinter.diamond_amount-being_built.materials[M]))
else
linked_imprinter.reagents.remove_reagent(M, being_built.materials[M])
var/obj/new_item = new being_built.build_path(src)
new_item.reliability = being_built.reliability
if(linked_imprinter.hacked) being_built.reliability = max((reliability / 2), 0)
new_item.loc = linked_imprinter.loc
linked_imprinter.busy = 0
screen = 4.1
updateUsrDialog()
else if(href_list["disposeI"]) //Causes the circuit imprinter to dispose of a single reagent (all of it)
else if(href_list["disposeI"] && linked_imprinter) //Causes the circuit imprinter to dispose of a single reagent (all of it)
linked_imprinter.reagents.del_reagent(href_list["dispose"])
else if(href_list["disposeallI"]) //Causes the circuit imprinter to dispose of all it's reagents.
else if(href_list["disposeallI"] && linked_imprinter) //Causes the circuit imprinter to dispose of all it's reagents.
linked_imprinter.reagents.clear_reagents()
else if(href_list["disposeP"]) //Causes the protolathe to dispose of a single reagent (all of it)
else if(href_list["disposeP"] && linked_lathe) //Causes the protolathe to dispose of a single reagent (all of it)
linked_lathe.reagents.del_reagent(href_list["dispose"])
else if(href_list["disposeallP"]) //Causes the protolathe to dispose of all it's reagents.
else if(href_list["disposeallP"] && linked_lathe) //Causes the protolathe to dispose of all it's reagents.
linked_lathe.reagents.clear_reagents()
else if(href_list["ejectsheet"]) //Causes the protolathe to eject a sheet of material
switch(href_list["ejectsheet"])
else if(href_list["lathe_ejectsheet"] && linked_lathe) //Causes the protolathe to eject a sheet of material
switch(href_list["lathe_ejectsheet"])
if("metal")
new /obj/item/stack/sheet/metal(linked_lathe.loc, text2num(href_list["ejectsheet_amt"]))
linked_lathe.m_amount = max(0, (linked_lathe.m_amount-(text2num(href_list["ejectsheet_amt"]) * 3750)))
new /obj/item/stack/sheet/metal(linked_lathe.loc, text2num(href_list["lathe_ejectsheet_amt"]))
linked_lathe.m_amount = max(0, (linked_lathe.m_amount-(text2num(href_list["lathe_ejectsheet_amt"]) * 3750)))
if("glass")
new /obj/item/stack/sheet/glass(linked_lathe.loc, text2num(href_list["ejectsheet_amt"]))
linked_lathe.g_amount = max(0, (linked_lathe.g_amount-(text2num(href_list["ejectsheet_amt"]) * 3750)))
new /obj/item/stack/sheet/glass(linked_lathe.loc, text2num(href_list["lathe_ejectsheet_amt"]))
linked_lathe.g_amount = max(0, (linked_lathe.g_amount-(text2num(href_list["lathe_ejectsheet_amt"]) * 3750)))
if("gold")
new /obj/item/stack/sheet/gold(linked_lathe.loc, text2num(href_list["ejectsheet_amt"]))
linked_lathe.gold_amount = max(0, (linked_lathe.gold_amount-(text2num(href_list["ejectsheet_amt"]) * 3750)))
new /obj/item/stack/sheet/gold(linked_lathe.loc, text2num(href_list["lathe_ejectsheet_amt"]))
linked_lathe.gold_amount = max(0, (linked_lathe.gold_amount-(text2num(href_list["lathe_ejectsheet_amt"]) * 3750)))
if("silver")
new /obj/item/stack/sheet/silver(linked_lathe.loc, text2num(href_list["ejectsheet_amt"]))
linked_lathe.silver_amount = max(0, (linked_lathe.silver_amount-(text2num(href_list["ejectsheet_amt"]) * 3750)))
new /obj/item/stack/sheet/silver(linked_lathe.loc, text2num(href_list["lathe_ejectsheet_amt"]))
linked_lathe.silver_amount = max(0, (linked_lathe.silver_amount-(text2num(href_list["lathe_ejectsheet_amt"]) * 3750)))
if("plasma")
new /obj/item/stack/sheet/plasma(linked_lathe.loc, text2num(href_list["ejectsheet_amt"]))
linked_lathe.plasma_amount = max(0, (linked_lathe.plasma_amount-(text2num(href_list["ejectsheet_amt"]) * 3750)))
new /obj/item/stack/sheet/plasma(linked_lathe.loc, text2num(href_list["lathe_ejectsheet_amt"]))
linked_lathe.plasma_amount = max(0, (linked_lathe.plasma_amount-(text2num(href_list["lathe_ejectsheet_amt"]) * 3750)))
if("uranium")
new /obj/item/stack/sheet/uranium(linked_lathe.loc, text2num(href_list["ejectsheet_amt"]))
linked_lathe.uranium_amount = max(0, (linked_lathe.uranium_amount-(text2num(href_list["ejectsheet_amt"]) * 3750)))
new /obj/item/stack/sheet/uranium(linked_lathe.loc, text2num(href_list["lathe_ejectsheet_amt"]))
linked_lathe.uranium_amount = max(0, (linked_lathe.uranium_amount-(text2num(href_list["lathe_ejectsheet_amt"]) * 3750)))
if("diamond")
new /obj/item/stack/sheet/diamond(linked_lathe.loc, text2num(href_list["ejectsheet_amt"]))
linked_lathe.diamond_amount = max(0, (linked_lathe.diamond_amount-(text2num(href_list["ejectsheet_amt"]) * 3750)))
new /obj/item/stack/sheet/diamond(linked_lathe.loc, text2num(href_list["lathe_ejectsheet_amt"]))
linked_lathe.diamond_amount = max(0, (linked_lathe.diamond_amount-(text2num(href_list["lathe_ejectsheet_amt"]) * 3750)))
if("clown")
new /obj/item/stack/sheet/clown(linked_lathe.loc, text2num(href_list["ejectsheet_amt"]))
linked_lathe.clown_amount = max(0, (linked_lathe.clown_amount-(text2num(href_list["ejectsheet_amt"]) * 3750)))
new /obj/item/stack/sheet/clown(linked_lathe.loc, text2num(href_list["lathe_ejectsheet_amt"]))
linked_lathe.clown_amount = max(0, (linked_lathe.clown_amount-(text2num(href_list["lathe_ejectsheet_amt"]) * 3750)))
else if(href_list["imprinter_ejectsheet"] && linked_imprinter) //Causes the protolathe to eject a sheet of material
switch(href_list["imprinter_ejectsheet"])
if("glass")
new /obj/item/stack/sheet/glass(linked_imprinter.loc, text2num(href_list["imprinter_ejectsheet"]))
linked_imprinter.g_amount = max(0, (linked_imprinter.g_amount-(text2num(href_list["imprinter_ejectsheet_amt"]) * 3750)))
if("gold")
new /obj/item/stack/sheet/gold(linked_imprinter.loc, text2num(href_list["imprinter_ejectsheet"]))
linked_imprinter.gold_amount = max(0, (linked_imprinter.gold_amount-(text2num(href_list["imprinter_ejectsheet_amt"]) * 3750)))
if("diamond")
new /obj/item/stack/sheet/diamond(linked_imprinter.loc, text2num(href_list["imprinter_ejectsheet"]))
linked_imprinter.diamond_amount = max(0, (linked_imprinter.diamond_amount-(text2num(href_list["imprinter_ejectsheet_amt"]) * 3750)))
else if(href_list["find_device"]) //The R&D console looks for devices nearby to link up with.
screen = 0.0
@@ -547,9 +589,11 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(1.6) //R&D console settings
dat += "R&D Console Setting:<BR><BR>"
dat += "<A href='?src=\ref[src];sync=1'>Sync Database with Network</A><BR>"
if(sync) dat += "<A href='?src=\ref[src];togglesync=1'>Disconnect from Research Network</A><BR>"
else dat += "<A href='?src=\ref[src];togglesync=1'>Connect to Research Network</A><BR>"
if(sync)
dat += "<A href='?src=\ref[src];sync=1'>Sync Database with Network</A><BR>"
dat += "<A href='?src=\ref[src];togglesync=1'>Disconnect from Research Network</A><BR>"
else
dat += "<A href='?src=\ref[src];togglesync=1'>Connect to Research Network</A><BR>"
dat += "<A href='?src=\ref[src];menu=1.7'>Device Linkage Menu</A><BR>"
dat += "<A href='?src=\ref[src];lock=0.2'>Lock Console</A><BR>"
dat += "<A href='?src=\ref[src];reset=1'>Reset R&D Database.</A><BR>"
@@ -571,7 +615,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += "* Circuit Imprinter <A href='?src=\ref[src];disconnect=imprinter'>(Disconnect)</A><BR>"
else
dat += "* (No Circuit Imprinter Linked)<BR>"
dat += "<HR><A href='?src=\ref[src];menu=1.6'>Settings Menu</A>"
dat += "<HR><A href='?src=\ref[src];menu=1.6'>Settings Menu</A> || "
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A>"
////////////////////DESTRUCTIVE ANALYZER SCREENS////////////////////////////
@@ -643,58 +687,58 @@ won't update every console in existence) but it's more of a hassle to do. Also,
//Metal
dat += "* [linked_lathe.m_amount] cm<sup>3</sup> of Metal || "
dat += "Eject: "
if(linked_lathe.m_amount > 3750) dat += "<A href='?src=\ref[src];ejectsheet=metal;ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_lathe.m_amount > 18750) dat += "<A href='?src=\ref[src];ejectsheet=metal;ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_lathe.m_amount > 3750) dat += "<A href='?src=\ref[src];ejectsheet=metal;ejectsheet_amt=50'>(Max Sheets)</A>"
if(linked_lathe.m_amount > 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=metal;lathe_ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_lathe.m_amount > 18750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=metal;lathe_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_lathe.m_amount > 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=metal;lathe_ejectsheet_amt=50'>(Max Sheets)</A>"
dat += "<BR>"
//Glass
dat += "* [linked_lathe.g_amount] cm<sup>3</sup> of Glass || "
dat += "Eject: "
if(linked_lathe.g_amount > 3750) dat += "<A href='?src=\ref[src];ejectsheet=glass;ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_lathe.g_amount > 18750) dat += "<A href='?src=\ref[src];ejectsheet=glass;ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_lathe.g_amount > 3750) dat += "<A href='?src=\ref[src];ejectsheet=glass;ejectsheet_amt=50'>(Max Sheets)</A>"
if(linked_lathe.g_amount > 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=glass;lathe_ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_lathe.g_amount > 18750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=glass;lathe_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_lathe.g_amount > 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=glass;lathe_ejectsheet_amt=50'>(Max Sheets)</A>"
dat += "<BR>"
//Gold
dat += "* [linked_lathe.gold_amount] cm<sup>3</sup> of Gold || "
dat += "Eject: "
if(linked_lathe.gold_amount > 3750) dat += "<A href='?src=\ref[src];ejectsheet=gold;ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_lathe.gold_amount > 18750) dat += "<A href='?src=\ref[src];ejectsheet=gold;ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_lathe.gold_amount > 3750) dat += "<A href='?src=\ref[src];ejectsheet=gold;ejectsheet_amt=50'>(Max Sheets)</A>"
if(linked_lathe.gold_amount > 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=gold;lathe_ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_lathe.gold_amount > 18750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=gold;lathe_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_lathe.gold_amount > 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=gold;lathe_ejectsheet_amt=50'>(Max Sheets)</A>"
dat += "<BR>"
//Silver
dat += "* [linked_lathe.silver_amount] cm<sup>3</sup> of Silver || "
dat += "Eject: "
if(linked_lathe.silver_amount > 3750) dat += "<A href='?src=\ref[src];ejectsheet=silver;ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_lathe.silver_amount > 18750) dat += "<A href='?src=\ref[src];ejectsheet=silver;ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_lathe.silver_amount > 3750) dat += "<A href='?src=\ref[src];ejectsheet=silver;ejectsheet_amt=50'>(Max Sheets)</A>"
if(linked_lathe.silver_amount >= 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=silver;lathe_ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_lathe.silver_amount >= 18750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=silver;lathe_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_lathe.silver_amount >= 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=silver;lathe_ejectsheet_amt=50'>(Max Sheets)</A>"
dat += "<BR>"
//Plasma
dat += "* [linked_lathe.plasma_amount] cm<sup>3</sup> of Solid Plasma || "
dat += "Eject: "
if(linked_lathe.plasma_amount > 3750) dat += "<A href='?src=\ref[src];ejectsheet=plasma;ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_lathe.plasma_amount > 18750) dat += "<A href='?src=\ref[src];ejectsheet=plasma;ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_lathe.plasma_amount > 3750) dat += "<A href='?src=\ref[src];ejectsheet=plasmaejectsheet_amt=50'>(Max Sheets)</A>"
if(linked_lathe.plasma_amount >= 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=plasma;lathe_ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_lathe.plasma_amount >= 18750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=plasma;lathe_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_lathe.plasma_amount >= 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=plasmalathe_ejectsheet_amt=50'>(Max Sheets)</A>"
dat += "<BR>"
//Uranium
dat += "* [linked_lathe.uranium_amount] cm<sup>3</sup> of Uranium || "
dat += "Eject: "
if(linked_lathe.uranium_amount > 3750) dat += "<A href='?src=\ref[src];ejectsheet=uranium;ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_lathe.uranium_amount > 18750) dat += "<A href='?src=\ref[src];ejectsheet=uranium;ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_lathe.uranium_amount > 3750) dat += "<A href='?src=\ref[src];ejectsheet=uranium;ejectsheet_amt=50'>(Max Sheets)</A>"
if(linked_lathe.uranium_amount >= 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=uranium;lathe_ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_lathe.uranium_amount >= 18750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=uranium;lathe_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_lathe.uranium_amount >= 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=uranium;lathe_ejectsheet_amt=50'>(Max Sheets)</A>"
dat += "<BR>"
//Diamond
dat += "* [linked_lathe.diamond_amount] cm<sup>3</sup> of Diamond || "
dat += "Eject: "
if(linked_lathe.diamond_amount > 3750) dat += "<A href='?src=\ref[src];ejectsheet=diamond;ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_lathe.diamond_amount > 18750) dat += "<A href='?src=\ref[src];ejectsheet=diamond;ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_lathe.diamond_amount > 3750) dat += "<A href='?src=\ref[src];ejectsheet=diamond;ejectsheet_amt=50'>(Max Sheets)</A>"
if(linked_lathe.diamond_amount >= 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=diamond;lathe_ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_lathe.diamond_amount >= 18750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=diamond;lathe_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_lathe.diamond_amount >= 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=diamond;lathe_ejectsheet_amt=50'>(Max Sheets)</A>"
dat += "<BR>"
//Bananium
dat += "* [linked_lathe.clown_amount] cm<sup>3</sup> of Bananium || "
dat += "Eject: "
if(linked_lathe.clown_amount > 3750) dat += "<A href='?src=\ref[src];ejectsheet=clown;ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_lathe.clown_amount > 18750) dat += "<A href='?src=\ref[src];ejectsheet=clown;ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_lathe.clown_amount > 3750) dat += "<A href='?src=\ref[src];ejectsheet=clown;ejectsheet_amt=50'>(Max Sheets)</A>"
if(linked_lathe.clown_amount >= 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=clown;lathe_ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_lathe.clown_amount >= 18750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=clown;lathe_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_lathe.clown_amount >= 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=clown;lathe_ejectsheet_amt=50'>(Max Sheets)</A>"
dat += "<BR>"
dat += "<HR><A href='?src=\ref[src];menu=3.1'>Protolathe Menu</A> | "
@@ -716,27 +760,32 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(4.1)
dat += "Circuit Imprinter Menu:<BR><BR>"
dat += "Glass Amount: [linked_imprinter.g_amount] cm<sup>3</sup><BR>"
dat += "Material Amount: [linked_imprinter.TotalMaterials()] cm<sup>3</sup><BR>"
dat += "Chemical Volume: [linked_imprinter.reagents.total_volume]<HR>"
for(var/datum/design/D in files.known_designs)
if(!(D.build_type & IMPRINTER))
continue
var/temp_dat = "[D.name]"
var/temp_glass = 0
var/check_reagents = 1
var/check_materials = 1
for(var/M in D.materials)
temp_dat += " [D.materials[M]] [CallMaterialName(M)]"
if(M == "$glass")
temp_glass = D.materials[M]
else if (copytext(M, 1, 2) != "$" && !linked_imprinter.reagents.has_reagent(M, D.materials[M]))
check_reagents = 0
if ((linked_imprinter.g_amount >= temp_glass) && check_reagents)
if(copytext(M, 1, 2) == "$")
switch(M)
if("$glass")
if(D.materials[M] > linked_imprinter.g_amount) check_materials = 0
if("$gold")
if(D.materials[M] > linked_imprinter.gold_amount) check_materials = 0
if("$diamond")
if(D.materials[M] > linked_imprinter.diamond_amount) check_materials = 0
else if (!linked_imprinter.reagents.has_reagent(M, D.materials[M]))
check_materials = 0
if (check_materials)
dat += "* <A href='?src=\ref[src];imprint=[D.id]'>[temp_dat]</A><BR>"
else
dat += "* [temp_dat]<BR>"
dat += "<HR><A href='?src=\ref[src];menu=4.2'>Chemical Storage</A> | "
dat += "<HR><A href='?src=\ref[src];menu=4.3'>Material Storage</A> || "
dat += "<A href='?src=\ref[src];menu=4.2'>Chemical Storage</A> || "
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A>"
if(4.2)
@@ -748,5 +797,31 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += "<HR><A href='?src=\ref[src];menu=4.1'>Imprinter Menu</A> | "
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A>"
if(4.3)
dat += "Material Storage<BR><HR>"
//Glass
dat += "* [linked_imprinter.g_amount] cm<sup>3</sup> of Glass || "
dat += "Eject: "
if(linked_imprinter.g_amount > 3750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=glass;imprinter_ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_imprinter.g_amount > 18750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=glass;imprinter_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_imprinter.g_amount > 3750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=glass;imprinter_ejectsheet_amt=50'>(Max Sheets)</A>"
dat += "<BR>"
//Gold
dat += "* [linked_imprinter.gold_amount] cm<sup>3</sup> of Gold || "
dat += "Eject: "
if(linked_imprinter.gold_amount > 3750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=gold;imprinter_ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_imprinter.gold_amount > 18750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=gold;imprinter_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_imprinter.gold_amount > 3750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=gold;imprinter_ejectsheet_amt=50'>(Max Sheets)</A>"
dat += "<BR>"
//Diamond
dat += "* [linked_imprinter.diamond_amount] cm<sup>3</sup> of Diamond || "
dat += "Eject: "
if(linked_imprinter.diamond_amount > 3750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=diamond;imprinter_ejectsheet_amt=1'>(1 Sheet)</A> "
if(linked_imprinter.diamond_amount > 18750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=diamond;imprinter_ejectsheet_amt=5'>(5 Sheets)</A> "
if(linked_imprinter.diamond_amount > 3750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=diamond;imprinter_ejectsheet_amt=50'>(Max Sheets)</A>"
dat += "<BR>"
dat += "<HR><A href='?src=\ref[src];menu=4.1'>Circuit Imprinter Menu</A> | "
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A>"
user << browse("<TITLE>Research and Development Console</TITLE><HR>[dat]", "window=rdconsole;size=575x400")
onclose(user, "rdconsole")
+324
View File
@@ -0,0 +1,324 @@
/obj/machinery/r_n_d/server
name = "R&D Server"
icon_state = "server"
var
datum/research/files
health = 100
list
id_with_upload = list() //List of R&D consoles with upload to server access.
id_with_download = list() //List of R&D consoles with download from server access.
id_with_upload_string = "" //String versions for easy editing in map editor.
id_with_download_string = ""
server_id = 0
heat_gen = 100
heating_power = 40000
delay = 10
req_access = list(access_rd) //Only the R&D can change server settings.
New()
..()
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)
RefreshParts()
RefreshParts()
var/tot_rating = 0
for(var/obj/item/weapon/stock_parts/SP in src)
tot_rating += SP.rating
heat_gen /= max(1, tot_rating)
initialize()
if(!files) files = new /datum/research(src)
var/list/temp_list
if(!id_with_upload.len)
temp_list = list()
temp_list = dd_text2list(id_with_upload_string, ";")
for(var/N in temp_list)
id_with_upload += text2num(N)
if(!id_with_download.len)
temp_list = list()
temp_list = dd_text2list(id_with_download_string, ";")
for(var/N in temp_list)
id_with_download += text2num(N)
process()
var/datum/gas_mixture/environment = loc.return_air()
switch(environment.temperature)
if(0 to T0C)
health = min(100, health + 1)
if(T0C to (T20C + 20))
health = between(0, health, 100)
if((T20C + 20) to (T0C + 70))
health = max(0, health - 1)
if(health <= 0)
files.known_designs = list()
for(var/datum/tech/T in files.known_tech)
if(prob(1))
T.level--
files.RefreshResearch()
if(delay)
delay--
else
produce_heat(heat_gen)
delay = initial(delay)
proc
produce_heat(heat_amt)
if(!(stat & (NOPOWER|BROKEN))) //Blatently stolen from space heater.
var/turf/simulated/L = loc
if(istype(L))
var/datum/gas_mixture/env = L.return_air()
if(env.temperature < (heat_amt+T0C))
var/transfer_moles = 0.25 * env.total_moles()
var/datum/gas_mixture/removed = env.remove(transfer_moles)
if(removed)
var/heat_capacity = removed.heat_capacity()
if(heat_capacity == 0 || heat_capacity == null)
heat_capacity = 1
removed.temperature = min((removed.temperature*heat_capacity + heating_power)/heat_capacity, 1000)
env.merge(removed)
attackby(var/obj/item/O as obj, var/mob/user as mob)
if (disabled)
return
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]."
return
if (opened)
if(istype(O, /obj/item/weapon/crowbar))
playsound(src.loc, '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)
return 1
/obj/machinery/r_n_d/server/centcom
name = "Centcom Central R&D Database"
server_id = -1
initialize()
..()
var/list/no_id_servers = list()
var/list/server_ids = list()
for(var/obj/machinery/r_n_d/server/S in world)
switch(S.server_id)
if(-1)
continue
if(0)
no_id_servers += S
else
server_ids += S.server_id
for(var/obj/machinery/r_n_d/server/S in no_id_servers)
var/num = 1
while(!S.server_id)
if(num in server_ids)
num++
else
S.server_id = num
server_ids += num
no_id_servers -= S
process()
return
/obj/machinery/computer/rdservercontrol
name = "R&D Server Controller"
icon_state = "rdcomp"
var
screen = 0
obj/machinery/r_n_d/server/temp_server
list
servers = list()
consoles = list()
badmin = 0
emagged = 0
Topic(href, href_list)
if(..())
return
add_fingerprint(usr)
usr.machine = src
if(!src.allowed(usr) && !emagged)
usr << "\red You do not have the required access level"
return
if(href_list["main"])
screen = 0
else if(href_list["access"] || href_list["data"] || href_list["transfer"])
temp_server = null
consoles = list()
servers = list()
for(var/obj/machinery/r_n_d/server/S in world)
if(S.server_id == text2num(href_list["access"]) || S.server_id == text2num(href_list["data"]) || S.server_id == text2num(href_list["transfer"]))
temp_server = S
break
if(href_list["access"])
screen = 1
for(var/obj/machinery/computer/rdconsole/C in world)
if(C.sync)
consoles += C
else if(href_list["data"])
screen = 2
else if(href_list["transfer"])
screen = 3
for(var/obj/machinery/r_n_d/server/S in world)
if(S == src)
continue
servers += S
else if(href_list["upload_toggle"])
var/num = text2num(href_list["upload_toggle"])
if(num in temp_server.id_with_upload)
temp_server.id_with_upload -= num
else
temp_server.id_with_upload += num
else if(href_list["download_toggle"])
var/num = text2num(href_list["download_toggle"])
if(num in temp_server.id_with_download)
temp_server.id_with_download -= num
else
temp_server.id_with_download += num
else if(href_list["reset_tech"])
var/choice = alert("Technology Data Rest", "Are you sure you want to reset this technology to it's default data? Data lost cannot be recovered.", "Continue", "Cancel")
if(choice == "Continue")
for(var/datum/tech/T in temp_server.files.known_tech)
if(T.id == href_list["reset_tech"])
T.level = 1
break
temp_server.files.RefreshResearch()
else if(href_list["reset_design"])
var/choice = alert("Design Data Deletion", "Are you sure you want to delete this design? If you still have the prerequisites for the design, it'll reset to it's base reliability. Data lost cannot be recovered.", "Continue", "Cancel")
if(choice == "Continue")
for(var/datum/design/D in temp_server.files.known_designs)
if(D.id == href_list["reset_design"])
D.reliability_mod = 0
temp_server.files.known_designs -= D
break
temp_server.files.RefreshResearch()
updateUsrDialog()
return
attack_hand(mob/user as mob)
if(stat & (BROKEN|NOPOWER))
return
user.machine = src
var/dat = ""
switch(screen)
if(0) //Main Menu
dat += "Connected Servers:<BR><BR>"
for(var/obj/machinery/r_n_d/server/S in world)
if(istype(S, /obj/machinery/r_n_d/server/centcom) && !badmin)
continue
dat += "[S.name] || "
dat += "<A href='?src=\ref[src];access=[S.server_id]'> Access Rights</A> | "
dat += "<A href='?src=\ref[src];data=[S.server_id]'>Data Management</A>"
if(badmin) dat += " | <A href='?src=\ref[src];transfer=[S.server_id]'>Server-to-Server Transfer</A>"
dat += "<BR>"
if(1) //Access rights menu
dat += "[temp_server.name] Access Rights<BR><BR>"
dat += "Consoles with Upload Access<BR>"
for(var/obj/machinery/computer/rdconsole/C in consoles)
var/turf/console_turf = get_turf(C)
dat += "* <A href='?src=\ref[src];upload_toggle=[C.id]'>[console_turf.loc]" //FYI, these are all numeric ids, eventually.
if(C.id in temp_server.id_with_upload)
dat += " (Remove)</A><BR>"
else
dat += " (Add)</A><BR>"
dat += "Consoles with Download Access<BR>"
for(var/obj/machinery/computer/rdconsole/C in consoles)
var/turf/console_turf = get_turf(C)
dat += "* <A href='?src=\ref[src];download_toggle=[C.id]'>[console_turf.loc]"
if(C.id in temp_server.id_with_download)
dat += " (Remove)</A><BR>"
else
dat += " (Add)</A><BR>"
dat += "<HR><A href='?src=\ref[src];main=1'>Main Menu</A>"
if(2) //Data Management menu
dat += "[temp_server.name] Data ManagementP<BR><BR>"
dat += "Known Technologies<BR>"
for(var/datum/tech/T in temp_server.files.known_tech)
dat += "* [T.name] "
dat += "<A href='?src=\ref[src];reset_tech=[T.id]'>(Reset)</A><BR>" //FYI, these are all strings.
dat += "Known Designs<BR>"
for(var/datum/design/D in temp_server.files.known_designs)
dat += "* [D.name] "
dat += "<A href='?src=\ref[src];reset_design=[D.id]'>(Delete)</A><BR>"
dat += "<HR><A href='?src=\ref[src];main=1'>Main Menu</A>"
if(3) //Server Data Transfer
dat += "[temp_server.name] Server to Server Transfer<BR><BR>"
dat += "Send Data to what server?<BR>"
for(var/obj/machinery/r_n_d/server/S in servers)
dat += "[S.name] <A href='?src=\ref[src];send_to=[S.server_id]'> (Transfer)</A><BR>"
dat += "<HR><A href='?src=\ref[src];main=1'>Main Menu</A>"
user << browse("<TITLE>R&D Server Control</TITLE><HR>[dat]", "window=server_control;size=575x400")
onclose(user, "server_control")
return
attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
if(istype(D, /obj/item/weapon/screwdriver))
playsound(src.loc, 'Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/computerframe/A = new /obj/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
var/obj/item/weapon/circuitboard/rdservercontrol/M = new /obj/item/weapon/circuitboard/rdservercontrol( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.state = 3
A.icon_state = "3"
A.anchored = 1
del(src)
else
user << "\blue You disconnect the monitor."
var/obj/computerframe/A = new /obj/computerframe( src.loc )
var/obj/item/weapon/circuitboard/rdservercontrol/M = new /obj/item/weapon/circuitboard/rdservercontrol( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.state = 4
A.icon_state = "4"
A.anchored = 1
del(src)
else if(istype(D, /obj/item/weapon/card/emag) && !emagged)
playsound(src.loc, 'sparks4.ogg', 75, 1)
emagged = 1
user << "\blue You you disable the security protocols"
src.updateUsrDialog()
return