Gradual Research (#9342)

The RnD Console UI has been overhauled.
    RnD levels are now a gradual progress instead of just leveling up, not much has changed, but deconstructed items now give more * Data disks now tell you what they contain.
    The red scanning goggles now let you see examined items' tech levels.
    RnD consoles should now open on the main menu instead of the research menu.
    Ejected items from the RnD console and destructive analyzer now go into your hands if you're adjacent.
This commit is contained in:
Geeves
2020-07-18 22:36:06 +02:00
committed by GitHub
parent ca199c182c
commit 2cb2bce2af
57 changed files with 502 additions and 467 deletions

View File

@@ -315,6 +315,14 @@ BLIND // can't see anything
desc = "A very oddly shaped pair of goggles with bits of wire poking out the sides. A soft humming sound emanates from it."
icon_state = "scanning"
/obj/item/clothing/glasses/regular/scanners/glasses_examine_atom(var/atom/A, var/user)
if(isobj(A))
var/obj/O = A
if(length(O.origin_tech))
to_chat(user, FONT_SMALL("\The [O] grants these tech levels when deconstructed:"))
for(var/tech in O.origin_tech)
to_chat(user, FONT_SMALL("[capitalize_first_letters(tech)]: [O.origin_tech[tech]]"))
/obj/item/clothing/glasses/regular/hipster
name = "prescription glasses"
desc = "Made by Uncool. Co."

View File

@@ -58,10 +58,10 @@
if(response == "Sync")
var/success = FALSE
for(var/obj/machinery/r_n_d/server/S in SSmachinery.all_machines)
for(var/datum/tech/T in files.known_tech) //Uploading
for(var/id in files.known_tech) //Uploading
var/datum/tech/T = files.known_tech[id]
S.files.AddTech2Known(T)
for(var/datum/tech/T in S.files.known_tech) //Downloading
files.AddTech2Known(T)
files.known_tech = S.files.known_tech.Copy()
success = TRUE
files.RefreshResearch()
if(success)

View File

@@ -87,7 +87,7 @@
/obj/item/circuitboard/tesla_coil
name = "tesla coil circuitry"
desc = "The circuitboard for a tesla coil."
build_path = "/obj/machinery/power/tesla_coil"
build_path = /obj/machinery/power/tesla_coil
origin_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 2)
req_components = list("/obj/item/stock_parts/capacitor" = 1)
board_type = "machine"
@@ -95,7 +95,7 @@
/obj/item/circuitboard/grounding_rod
name = "grounding rod circuitry"
desc = "The circuitboard for a grounding rod."
build_path = "/obj/machinery/power/grounding_rod"
build_path = /obj/machinery/power/grounding_rod
origin_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 2)
req_components = list("/obj/item/stock_parts/capacitor" = 1)
board_type = "machine"

View File

@@ -1,12 +1,6 @@
/datum/design/circuit/aimodule
materials = list(MATERIAL_GLASS = 2000, MATERIAL_GOLD = 100)
design_order = 0
/datum/design/circuit/aimodule/AssembleDesignName()
name = "AI Law Board Design ([name])"
/datum/design/circuit/aimodule/AssembleDesignDesc()
desc = "Allows for the construction of \a '[name]' AI law boards."
p_category = "AI Law Board Designs"
/datum/design/circuit/aimodule/safeguard
name = "Safeguard"

View File

@@ -3,12 +3,13 @@
req_tech = list(TECH_DATA = 2)
materials = list(MATERIAL_GLASS = 2000)
chemicals = list(/datum/reagent/acid = 20)
design_order = 0
/datum/design/circuit/AssembleDesignName()
..()
name = "Circuit Design ([item_name])"
/datum/design/circuit/AssembleDesignDesc()
if(!desc)
desc = "Allows for the construction of \a [item_name] circuit board."
if(ispath(build_path, /obj/item/circuitboard))
var/obj/item/circuitboard/CB = build_path
var/atom/machine = initial(CB.build_path)
desc = "Used in the construction of a: <b>[capitalize_first_letters(initial(machine.name))]</b>, [initial(machine.desc)]"
else
var/atom/A = build_path
desc = initial(A.desc)

View File

@@ -1,9 +1,5 @@
/datum/design/circuit/computer
design_order = 1
/datum/design/circuit/computer/AssembleDesignName()
..()
name = "Computer Circuit Design ([item_name])"
p_category = "Computer Circuit Designs"
/datum/design/circuit/computer/seccamera
name = "Security Camera Monitor"

View File

@@ -1,11 +1,17 @@
/datum/design/circuit/exosuit
design_order = 2.5
/datum/design/circuit/exosuit/AssembleDesignName()
name = "Exosuit Software Design ([name])"
p_category = "Exosuit Software Designs"
/datum/design/circuit/exosuit/AssembleDesignDesc()
desc = "Allows for the construction of \a [name] module."
if(!build_path)
desc = "A circuitboard that contains exosystems software."
return
var/obj/item/circuitboard/exosystem/CB = new build_path
var/list/softwares = CB.contains_software
desc = "Contains software suited for: "
for(var/i = 1 to softwares.len)
desc += "<b>[capitalize_first_letters(softwares[i])]</b>"
if(length(softwares) != i)
desc += ", "
/datum/design/circuit/exosuit/engineering
name = "Engineering System Control"

View File

@@ -1,9 +1,8 @@
/datum/design/circuit/hardsuit
design_order = 2
p_category = "Hardsuit Circuit Designs"
/datum/design/circuit/hardsuit/AssembleDesignName()
..()
name = "Hardsuit Circuit Design ([item_name])"
/datum/design/circuit/hardsuit/AssembleDesignDesc()
desc = "Contains the software required to make this model of hardsuit."
/datum/design/circuit/hardsuit/industrial
name = "Industrial Suit Central Circuit Board"

View File

@@ -1,9 +1,5 @@
/datum/design/circuit/machine
design_order = 3
/datum/design/circuit/machine/AssembleDesignName()
..()
name = "Machine Circuit Design ([item_name])"
p_category = "Machine Circuit Designs"
/datum/design/circuit/machine/arcademachine
name = "Battle Arcade Machine"
@@ -162,7 +158,6 @@
/datum/design/circuit/machine/smes_cell
name = "'SMES' Superconductive Magnetic Energy Storage"
desc = "Allows for the construction of circuits used to build a SMES."
req_tech = list(TECH_POWER = 7, TECH_ENGINEERING = 5)
build_path = /obj/item/circuitboard/smes
@@ -188,6 +183,7 @@
/datum/design/circuit/machine/aicore
name = "AI Core"
desc = "Used in the construction of an: <b>AI core</b>, Secure housing for an AI, it provides power and protection to its inhabitant."
req_tech = list(TECH_DATA = 4, TECH_BIO = 3)
build_path = /obj/item/circuitboard/aicore

View File

@@ -1,10 +1,7 @@
/datum/design/circuit/exosuit_upgrade
design_order = 2.6
p_category = "Exosuit Hardware Upgrades"
/datum/design/circuit/exosuit_upgrade/AssembleDesignName()
name = "Exosuit Hardware Upgrade ([name])"
/datum/design/circuit/exosuit/AssembleDesignDesc()
/datum/design/circuit/exosuit_upgrade/AssembleDesignDesc()
desc = "Complex circuitry which unlock certain exosuit faculties."
/datum/design/circuit/exosuit_upgrade/remote

View File

@@ -1,9 +1,5 @@
/datum/design/circuit/electronics
design_order = 4
/datum/design/circuit/electronics/AssembleDesignName()
..()
name = "Electronics Design ([item_name])"
p_category = "Electronics Designs"
/datum/design/circuit/electronics/secure_airlock
name = "Secure Airlock Electronics"

View File

@@ -1,14 +1,7 @@
/datum/design/circuit/shield
req_tech = list(TECH_BLUESPACE = 4, TECH_PHORON = 3)
materials = list(MATERIAL_GLASS = 2000, MATERIAL_GOLD = 1000)
design_order = 5
/datum/design/circuit/shield/AssembleDesignName()
name = "Shield Generator Circuit Design ([name])"
/datum/design/circuit/shield/AssembleDesignDesc()
if(!desc)
desc = "Allows for the construction of \a [name] shield generator."
p_category = "Shield Generator Circuit Designs"
/datum/design/circuit/shield/bubble
name = "Bubble"

View File

@@ -1,12 +1,6 @@
/datum/design/circuit/tcom
req_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4)
design_order = 6
/datum/design/circuit/tcom/AssembleDesignName()
name = "Telecommunications Machinery Circuit Design ([name])"
/datum/design/circuit/tcom/AssembleDesignDesc()
desc = "Allows for the construction of a telecommunications [name] circuit board."
p_category = "Telecommunications Machinery Circuit Designs"
/datum/design/circuit/tcom/server
name = "Server Mainframe"

View File

@@ -30,8 +30,8 @@ other types of metals and chemistry for reagents).
var/list/chemicals = list() //List of chemicals.
var/build_path //The path of the object that gets created.
var/time = 10 //How many ticks it requires to build
var/p_category = "Misc"
var/category //Primarily used for Mech Fabricators, but can be used for anything.
var/design_order = 0 // How things are sorted, lower things are higher up
/datum/design/New()
..()
@@ -52,9 +52,9 @@ other types of metals and chemistry for reagents).
return
/datum/design/proc/AssembleDesignDesc()
if(!desc) //Try to make up a nice description if we don't have one
desc = "Allows for the construction of \a [item_name]."
return
if(!desc)
var/atom/build_item = build_path
desc = initial(build_item.desc)
//Returns a new instance of the item for this design
//This is to allow additional initialization to be performed, including possibly additional contructor arguments.

View File

@@ -1,8 +1,5 @@
/datum/design/item/deployable_kit
design_order = 11
/datum/design/item/deployable_kit/AssembleDesignName()
name = "Deployable Kit Design ([name])"
p_category = "Deployable Kit Designs"
/datum/design/item/deployable_kit/mech_chair
name = "Remote Mech Centre"

View File

@@ -1,26 +1,20 @@
/datum/design/item/disk
design_order = 11
/datum/design/item/disk/AssembleDesignName()
name = "Data Disk Design ([name])"
p_category = "Data Disk Designs"
/datum/design/item/disk/design_disk
name = "Design Storage"
desc = "Produce additional disks for storing device designs."
req_tech = list(TECH_DATA = 1)
materials = list(DEFAULT_WALL_MATERIAL = 30, MATERIAL_GLASS = 10)
build_path = /obj/item/disk/design_disk
/datum/design/item/disk/tech_disk
name = "Technology Data Storage"
desc = "Produce additional disks for storing technology data."
req_tech = list(TECH_DATA = 1)
materials = list(DEFAULT_WALL_MATERIAL = 30, MATERIAL_GLASS = 10)
build_path = /obj/item/disk/tech_disk
/datum/design/item/disk/flora_disk
name = "Flora Data Storage"
desc = "Produce additional disks for storing flora data."
req_tech = list(TECH_DATA = 1)
materials = list(DEFAULT_WALL_MATERIAL = 30, MATERIAL_GLASS = 10)
build_path = /obj/item/disk/botany

View File

@@ -1,27 +1,17 @@
/datum/design/item/hud
materials = list(DEFAULT_WALL_MATERIAL = 50, MATERIAL_GLASS = 50)
design_order = 6
/datum/design/item/hud/AssembleDesignName()
..()
name = "HUD Glasses Design ([item_name])"
/datum/design/item/hud/AssembleDesignDesc()
desc = "Allows for the construction of \a [item_name] HUD glasses."
p_category = "HUD Glasses Designs"
/datum/design/item/hud/health
name = "Health"
req_tech = list(TECH_BIO = 2, TECH_MAGNET = 3)
build_path = /obj/item/clothing/glasses/hud/health
/datum/design/item/hud/security
name = "Security"
req_tech = list(TECH_MAGNET = 3, TECH_COMBAT = 2)
build_path = /obj/item/clothing/glasses/hud/security
/datum/design/item/hud/mesons
name = "Mesons"
desc = "Using the meson-scanning technology those glasses allow you to see through walls, floor or anything else."
desc = "These glasses make use of meson-scanning technology to allow the wearer to see through solid walls and floors."
req_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 2)
materials = list(DEFAULT_WALL_MATERIAL = 50, MATERIAL_GLASS = 50)
build_path = /obj/item/clothing/glasses/meson

View File

@@ -1,10 +1,6 @@
/datum/design/item/implant
materials = list(DEFAULT_WALL_MATERIAL = 50, MATERIAL_GLASS = 50)
design_order = 5
/datum/design/item/implant/AssembleDesignName()
..()
name = "Implantable Biocircuit Design ([item_name])"
p_category = "Implantable Biocircuit Designs"
/datum/design/item/implant/chemical
name = "Chemical"

View File

@@ -1,18 +1,12 @@
/datum/design/item/integrated_electronics
design_order = 8
/datum/design/item/integrated_electronics/AssembleDesignName()
..()
name = "Integrated Electronic Design ([item_name])"
p_category = "Integrated Electronics Designs"
/datum/design/item/integrated_electronics/wirer
name = "Custom Wirer Tool"
req_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
materials = list(DEFAULT_WALL_MATERIAL = 5000, MATERIAL_GLASS = 2500)
build_path = /obj/item/device/integrated_electronics/wirer
/datum/design/item/integrated_electronics/debugger
name = "Custom Circuit Debugger Tool"
req_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
materials = list(DEFAULT_WALL_MATERIAL = 5000, MATERIAL_GLASS = 2500)
build_path = /obj/item/device/integrated_electronics/debugger

View File

@@ -1,10 +1,6 @@
/datum/design/item/medical
materials = list(DEFAULT_WALL_MATERIAL = 30, MATERIAL_GLASS = 20)
design_order = 4
/datum/design/item/medical/AssembleDesignName()
..()
name = "Biotech Device Design ([item_name])"
p_category = "Biotech Device Designs"
/datum/design/item/medical/health_analyzer
name = "Health Analyzer"
@@ -115,20 +111,15 @@
build_path = /obj/item/reagent_containers/personal_inhaler_cartridge/bluespace
/datum/design/item/beaker
design_order = 4.1
/datum/design/item/beaker/AssembleDesignName()
name = "Advanced Beaker Design ([item_name])"
p_category = "Advanced Beaker Design"
/datum/design/item/beaker/noreact
name = "Cryostasis"
desc = "A cryostasis beaker that allows for chemical storage without reactions. Can hold up to 50 units."
req_tech = list(TECH_MATERIAL = 2)
materials = list(DEFAULT_WALL_MATERIAL = 3000)
build_path = /obj/item/reagent_containers/glass/beaker/noreact
/datum/design/item/beaker/bluespace
name = "Bluespace"
desc = "A bluespace beaker, powered by experimental bluespace technology and Element Cuban combined with the Compound Pete. Can hold up to 300 units."
req_tech = list(TECH_BLUESPACE = 2, TECH_MATERIAL = 6)
materials = list(DEFAULT_WALL_MATERIAL = 3000, MATERIAL_PHORON = 3000, MATERIAL_DIAMOND = 500)

View File

@@ -1,36 +1,27 @@
/datum/design/item/mining
design_order = 3
/datum/design/item/mining/AssembleDesignName()
..()
name = "Mining Equipment Design ([item_name])"
p_category = "Mining Equipment Designs"
/datum/design/item/mining/jackhammer
name = "Jackhammer"
req_tech = list(TECH_MATERIAL = 3, TECH_POWER = 2, TECH_ENGINEERING = 2)
materials = list(DEFAULT_WALL_MATERIAL = 2000, MATERIAL_GLASS = 500, MATERIAL_SILVER = 500)
build_path = /obj/item/pickaxe/jackhammer
/datum/design/item/mining/drill
name = "Drill"
req_tech = list(TECH_MATERIAL = 2, TECH_POWER = 3, TECH_ENGINEERING = 2)
materials = list(DEFAULT_WALL_MATERIAL = 6000, MATERIAL_GLASS = 1000) //expensive, but no need for miners.
build_path = /obj/item/pickaxe/drill
/datum/design/item/mining/plasmacutter
name = "Plasma Cutter"
req_tech = list(TECH_MATERIAL = 4, TECH_PHORON = 3, TECH_ENGINEERING = 3)
materials = list(DEFAULT_WALL_MATERIAL = 1500, MATERIAL_GLASS = 500, MATERIAL_GOLD = 500, MATERIAL_PHORON = 500)
build_path = /obj/item/gun/energy/plasmacutter
/datum/design/item/mining/pick_diamond
name = "Diamond Pickaxe"
req_tech = list(TECH_MATERIAL = 6)
materials = list(MATERIAL_DIAMOND = 3000)
build_path = /obj/item/pickaxe/diamond
/datum/design/item/mining/drill_diamond
name = "Diamond Drill"
req_tech = list(TECH_MATERIAL = 6, TECH_POWER = 4, TECH_ENGINEERING = 4)
materials = list(DEFAULT_WALL_MATERIAL = 3000, MATERIAL_GLASS = 1000, MATERIAL_DIAMOND = 2000)
build_path = /obj/item/pickaxe/diamonddrill

View File

@@ -1,50 +1,39 @@
/datum/design/item/modularcomponent
design_order = 9
/datum/design/item/modularcomponent/AssembleDesignName()
..()
name = "Modular Computer Component Design ([item_name])"
p_category = "Modular Computer Component Designs"
// Hard drives
/datum/design/item/modularcomponent/disk/normal
name = "Basic Hard Drive"
req_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1)
materials = list(DEFAULT_WALL_MATERIAL = 400, MATERIAL_GLASS = 100)
build_path = /obj/item/computer_hardware/hard_drive/
build_path = /obj/item/computer_hardware/hard_drive
/datum/design/item/modularcomponent/disk/advanced
name = "Advanced Hard Drive"
req_tech = list(TECH_DATA = 2, TECH_ENGINEERING = 2)
materials = list(DEFAULT_WALL_MATERIAL = 800, MATERIAL_GLASS = 200)
build_path = /obj/item/computer_hardware/hard_drive/advanced
/datum/design/item/modularcomponent/disk/super
name = "Super Hard Drive"
req_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 3)
materials = list(DEFAULT_WALL_MATERIAL = 1600, MATERIAL_GLASS = 400)
build_path = /obj/item/computer_hardware/hard_drive/super
/datum/design/item/modularcomponent/disk/cluster
name = "Cluster Hard Drive"
req_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 4)
materials = list(DEFAULT_WALL_MATERIAL = 3200, MATERIAL_GLASS = 800)
build_path = /obj/item/computer_hardware/hard_drive/cluster
/datum/design/item/modularcomponent/disk/small
name = "Small Hard Drive"
req_tech = list(TECH_DATA = 2, TECH_ENGINEERING = 2)
materials = list(DEFAULT_WALL_MATERIAL = 800, MATERIAL_GLASS = 200)
build_path = /obj/item/computer_hardware/hard_drive/small
/datum/design/item/modularcomponent/disk/micro
name = "Micro Hard Drive"
req_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1)
materials = list(DEFAULT_WALL_MATERIAL = 400, MATERIAL_GLASS = 100)
build_path = /obj/item/computer_hardware/hard_drive/micro
// Network cards
/datum/design/item/modularcomponent/netcard/basic
name = "Basic Network Card"
req_tech = list(TECH_DATA = 2, TECH_ENGINEERING = 1)
build_type = IMPRINTER
materials = list(DEFAULT_WALL_MATERIAL = 250, MATERIAL_GLASS = 100)
@@ -52,7 +41,6 @@
build_path = /obj/item/computer_hardware/network_card
/datum/design/item/modularcomponent/netcard/advanced
name = "Advanced Network Card"
req_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 2)
build_type = IMPRINTER
materials = list(DEFAULT_WALL_MATERIAL = 500, MATERIAL_GLASS = 200)
@@ -60,7 +48,6 @@
build_path = /obj/item/computer_hardware/network_card/advanced
/datum/design/item/modularcomponent/netcard/wired
name = "Wired Network Card"
req_tech = list(TECH_DATA = 5, TECH_ENGINEERING = 3)
build_type = IMPRINTER
materials = list(DEFAULT_WALL_MATERIAL = 2500, MATERIAL_GLASS = 400)
@@ -69,7 +56,6 @@
// Data crystals (USB flash drives)
/datum/design/item/modularcomponent/portabledrive/basic
name = "Basic Data Crystal"
req_tech = list(TECH_DATA = 1)
build_type = IMPRINTER
materials = list(MATERIAL_GLASS = 800)
@@ -77,7 +63,6 @@
build_path = /obj/item/computer_hardware/hard_drive/portable
/datum/design/item/modularcomponent/portabledrive/advanced
name = "Advanced Data Crystal"
req_tech = list(TECH_DATA = 2)
build_type = IMPRINTER
materials = list(MATERIAL_GLASS = 1600)
@@ -85,7 +70,6 @@
build_path = /obj/item/computer_hardware/hard_drive/portable/advanced
/datum/design/item/modularcomponent/portabledrive/super
name = "Super Data Crystal"
req_tech = list(TECH_DATA = 4)
build_type = IMPRINTER
materials = list(MATERIAL_GLASS = 3200)
@@ -101,51 +85,43 @@
// Nano printer
/datum/design/item/modularcomponent/nanoprinter
name = "Nano Printer"
req_tech = list(TECH_DATA = 2, TECH_ENGINEERING = 2)
materials = list(DEFAULT_WALL_MATERIAL = 600)
build_path = /obj/item/computer_hardware/nano_printer
// Tesla Link
/datum/design/item/modularcomponent/teslalink
name = "Tesla Link"
req_tech = list(TECH_DATA = 2, TECH_POWER = 3, TECH_ENGINEERING = 2)
materials = list(DEFAULT_WALL_MATERIAL = 2000)
build_path = /obj/item/computer_hardware/tesla_link
// Batteries
/datum/design/item/modularcomponent/battery/normal
name = "Standard Battery Module"
req_tech = list(TECH_POWER = 1, TECH_ENGINEERING = 1)
materials = list(DEFAULT_WALL_MATERIAL = 400)
build_path = /obj/item/computer_hardware/battery_module
/datum/design/item/modularcomponent/battery/advanced
name = "Advanced Battery Module"
req_tech = list(TECH_POWER = 2, TECH_ENGINEERING = 2)
materials = list(DEFAULT_WALL_MATERIAL = 800)
build_path = /obj/item/computer_hardware/battery_module/advanced
/datum/design/item/modularcomponent/battery/super
name = "Super Battery Module"
req_tech = list(TECH_POWER = 3, TECH_ENGINEERING = 3)
materials = list(DEFAULT_WALL_MATERIAL = 1600)
build_path = /obj/item/computer_hardware/battery_module/super
/datum/design/item/modularcomponent/battery/ultra
name = "Ultra Battery Module"
req_tech = list(TECH_POWER = 5, TECH_ENGINEERING = 4)
materials = list(DEFAULT_WALL_MATERIAL = 3200)
build_path = /obj/item/computer_hardware/battery_module/ultra
/datum/design/item/modularcomponent/battery/nano
name = "Nano Battery Module"
req_tech = list(TECH_POWER = 1, TECH_ENGINEERING = 1)
materials = list(DEFAULT_WALL_MATERIAL = 200)
build_path = /obj/item/computer_hardware/battery_module/nano
/datum/design/item/modularcomponent/battery/micro
name = "Micro Battery Module"
req_tech = list(TECH_POWER = 2, TECH_ENGINEERING = 2)
build_type = PROTOLATHE
materials = list(DEFAULT_WALL_MATERIAL = 400)
@@ -153,7 +129,6 @@
// Processor unit
/datum/design/item/modularcomponent/cpu
name = "Computer Processor Unit"
req_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 2)
build_type = IMPRINTER
materials = list(DEFAULT_WALL_MATERIAL = 1600)
@@ -161,7 +136,6 @@
build_path = /obj/item/computer_hardware/processor_unit
/datum/design/item/modularcomponent/cpu/small
name = "Computer Microprocessor Unit"
req_tech = list(TECH_DATA = 2, TECH_ENGINEERING = 2)
build_type = IMPRINTER
materials = list(DEFAULT_WALL_MATERIAL = 800)
@@ -169,7 +143,6 @@
build_path = /obj/item/computer_hardware/processor_unit/small
/datum/design/item/modularcomponent/cpu/photonic
name = "Computer Photonic Processor Unit"
req_tech = list(TECH_DATA = 5, TECH_ENGINEERING = 4)
build_type = IMPRINTER
materials = list(DEFAULT_WALL_MATERIAL = 6400, MATERIAL_GLASS = 2000)
@@ -177,7 +150,6 @@
build_path = /obj/item/computer_hardware/processor_unit/photonic
/datum/design/item/modularcomponent/cpu/photonic/small
name = "Computer Photonic Microprocessor Unit"
req_tech = list(TECH_DATA = 4, TECH_ENGINEERING = 3)
build_type = IMPRINTER
materials = list(DEFAULT_WALL_MATERIAL = 3200, MATERIAL_GLASS = 1000)
@@ -186,7 +158,6 @@
// AI Slot
/datum/design/item/modularcomponent/aislot
name = "Intellicard Slot"
req_tech = list(TECH_POWER = 2, TECH_DATA = 3)
build_type = IMPRINTER
materials = list(DEFAULT_WALL_MATERIAL = 2000)

View File

@@ -1,9 +1,5 @@
/datum/design/item/modular_weapon
design_order = 2.5
/datum/design/item/modular_weapon/AssembleDesignName()
..()
name = "Modular Weapon Design ([capitalize_first_letters(item_name)])"
p_category = "Modular Weapon Designs"
/datum/design/item/modular_weapon/firing_pin
req_tech = list(TECH_MATERIAL = 1)

View File

@@ -1,15 +1,11 @@
/datum/design/item/pda
req_tech = list(TECH_ENGINEERING = 2, TECH_POWER = 3)
materials = list(DEFAULT_WALL_MATERIAL = 50, MATERIAL_GLASS = 50)
design_order = 10
/datum/design/item/pda/AssembleDesignName()
..()
name = "PDA Design ([item_name])"
p_category = "PDA Designs"
/datum/design/item/pda/pda
name = "PDA"
desc = "Cheaper than whiny non-digital assistants."
desc = "A baseline, unmodified PDA. To be given to those who lost theirs."
req_tech = list(TECH_ENGINEERING = 2, TECH_POWER = 3)
materials = list(DEFAULT_WALL_MATERIAL = 50, MATERIAL_GLASS = 50)
build_path = /obj/item/device/pda

View File

@@ -1,15 +1,12 @@
/datum/design/item/powercell
build_type = PROTOLATHE | MECHFAB
category = "Misc" // For the mechfab
design_order = 7
/datum/design/item/powercell/AssembleDesignName()
name = "Power Cell Design ([item_name])"
p_category = "Power Cell Designs"
/datum/design/item/powercell/AssembleDesignDesc()
if(build_path)
var/obj/item/cell/C = build_path
desc = "Allows the construction of power cells that can hold [initial(C.maxcharge)] units of energy."
..()
var/obj/item/cell/C = build_path
desc += " This level of power cell stores [initial(C.maxcharge)] units of energy."
/datum/design/item/powercell/Fabricate()
var/obj/item/cell/C = ..()

View File

@@ -1,13 +1,12 @@
/datum/design/item/stock_part
design_order = 0
/datum/design/item/stock_part/AssembleDesignName()
..()
name = "Machine Component Design ([capitalize_first_letters(item_name)])"
p_category = "Stock Parts Designs"
/datum/design/item/stock_part/AssembleDesignDesc()
if(!desc)
desc = "A stock part used in the construction of various devices."
..()
var/obj/item/stock_parts/build_item = build_path
desc += " It has a rating of [initial(build_item.rating)]."
if(initial(build_item.rating) > 1)
desc += " It is an upgraded variant of \a [initial(build_item.parent_stock_name)]."
/datum/design/item/stock_part/basic_capacitor
req_tech = list(TECH_POWER = 1)
@@ -84,44 +83,50 @@
materials = list(DEFAULT_WALL_MATERIAL = 50, MATERIAL_GLASS = 20, MATERIAL_SILVER = 10)
build_path = /obj/item/stock_parts/scanning_module/phasic
/datum/design/item/stock_part/RPED
name = "Rapid Part Exchange Device"
desc = "Special mechanical module made to store, sort, and apply standard machine parts."
/datum/design/item/stock_part/rped
desc = "A special mechanical device made to store, sort, and apply standard machine parts."
req_tech = list(TECH_ENGINEERING = 3, TECH_MATERIAL = 3)
materials = list(DEFAULT_WALL_MATERIAL = 15000, MATERIAL_GLASS = 5000)
build_path = /obj/item/storage/part_replacer
/datum/design/item/stock_part/subspace_ansible
desc = "A component used in telecomms machinery construction."
req_tech = list(TECH_DATA = 3, TECH_MAGNET = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2)
materials = list(DEFAULT_WALL_MATERIAL = 80, MATERIAL_SILVER = 20)
build_path = /obj/item/stock_parts/subspace/ansible
/datum/design/item/stock_part/hyperwave_filter
desc = "A component used in telecomms machinery construction."
req_tech = list(TECH_DATA = 3, TECH_MAGNET = 3)
materials = list(DEFAULT_WALL_MATERIAL = 40, MATERIAL_SILVER = 10)
build_path = /obj/item/stock_parts/subspace/filter
/datum/design/item/stock_part/subspace_amplifier
desc = "A component used in telecomms machinery construction."
req_tech = list(TECH_DATA = 3, TECH_MAGNET = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2)
materials = list(DEFAULT_WALL_MATERIAL = 10, MATERIAL_GOLD = 30, MATERIAL_URANIUM = 15)
build_path = /obj/item/stock_parts/subspace/amplifier
/datum/design/item/stock_part/subspace_treatment
desc = "A component used in telecomms machinery construction."
req_tech = list(TECH_DATA = 3, TECH_MAGNET = 2, TECH_MATERIAL = 4, TECH_BLUESPACE = 2)
materials = list(DEFAULT_WALL_MATERIAL = 10, MATERIAL_SILVER = 20)
build_path = /obj/item/stock_parts/subspace/treatment
/datum/design/item/stock_part/subspace_analyzer
desc = "A component used in telecomms machinery construction."
req_tech = list(TECH_DATA = 3, TECH_MAGNET = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2)
materials = list(DEFAULT_WALL_MATERIAL = 10, MATERIAL_GOLD = 15)
build_path = /obj/item/stock_parts/subspace/analyzer
/datum/design/item/stock_part/subspace_crystal
desc = "A component used in telecomms machinery construction."
req_tech = list(TECH_MAGNET = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2)
materials = list(MATERIAL_GLASS = 1000, MATERIAL_SILVER = 20, MATERIAL_GOLD = 20)
build_path = /obj/item/stock_parts/subspace/crystal
/datum/design/item/stock_part/subspace_transmitter
desc = "A component used in telecomms machinery construction."
req_tech = list(TECH_MAGNET = 5, TECH_MATERIAL = 5, TECH_BLUESPACE = 3)
materials = list(MATERIAL_GLASS = 100, MATERIAL_SILVER = 10, MATERIAL_URANIUM = 15)
build_path = /obj/item/stock_parts/subspace/transmitter

View File

@@ -1,34 +1,24 @@
/datum/design/item/tool
design_order = 1
/datum/design/item/tool/AssembleDesignName()
..()
name = "Advanced Tool Design ([item_name])"
p_category = "Advanced Tool Designs"
/datum/design/item/tool/powerdrill
name = "Power Drill"
desc = "An advanced drill designed to be faster than other drills." // my sides - Geeves
req_tech = list(TECH_MAGNET = 3, TECH_ENGINEERING = 3)
materials = list(DEFAULT_WALL_MATERIAL = 60, MATERIAL_GLASS = 50)
build_path = /obj/item/powerdrill
/datum/design/item/tool/experimental_welder
name = "Experimental Welding Tool"
desc = "A scientifically-enhanced welding tool that uses fuel-producing microbes to gradually replenish its fuel supply."
req_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 4)
materials = list(DEFAULT_WALL_MATERIAL = 500)
build_path = /obj/item/weldingtool/experimental
datum/design/item/tool/advanced_light_replacer
name = "Advanced Light Replacer"
desc = "A specialised light replacer which stores more lights, refills faster from boxes, and sucks up broken bulbs."
req_tech = list(TECH_MAGNET = 3, TECH_MATERIAL = 4)
materials = list(DEFAULT_WALL_MATERIAL = 500)
build_path = /obj/item/device/lightreplacer/advanced
/datum/design/item/tool/advmop
name = "Advanced Mop"
desc = "The most advanced tool in a custodian's arsenal, complete with a condenser for self-wetting! Just think of all the viscera you will clean up with this!"
materials = list(DEFAULT_WALL_MATERIAL = 2500, MATERIAL_GLASS = 200)
build_path = /obj/item/mop/advanced
@@ -54,81 +44,66 @@ datum/design/item/tool/advanced_light_replacer
build_path = /obj/item/device/mmi/radio_enabled
/datum/design/item/tool/beacon
name = "Bluespace Tracking Beacon"
req_tech = list(TECH_BLUESPACE = 1)
materials = list (DEFAULT_WALL_MATERIAL = 20, MATERIAL_GLASS = 10)
build_path = /obj/item/device/radio/beacon
/datum/design/item/tool/bag_holding
name = "Bag of Holding"
desc = "Using localized pockets of bluespace this bag prototype offers incredible storage capacity with the contents weighting nothing. It's a shame the bag itself is pretty heavy."
desc = "Using localized pockets of bluespace, this bag prototype offers incredible storage capacity, while the contents apply no weight to the external user. It's a shame the bag itself is pretty heavy."
req_tech = list(TECH_BLUESPACE = 4, TECH_MATERIAL = 6)
materials = list(MATERIAL_GOLD = 3000, MATERIAL_DIAMOND = 1500, MATERIAL_URANIUM = 250)
build_path = /obj/item/storage/backpack/holding
/datum/design/item/tool/power_cell_backpack
name = "Power Cell Backpack"
desc = "A backpack specially designed to hold power cells, includes a holographic display to show current charge."
req_tech = list(TECH_MATERIAL = 4, TECH_MAGNET = 2, TECH_POWER = 4)
materials = list(DEFAULT_WALL_MATERIAL = 7500, MATERIAL_GLASS = 2500)
build_path = /obj/item/storage/backpack/cell
/datum/design/item/tool/bluespace_crystal
name = "Artificial Bluespace Crystal"
desc = "An artificially made bluespace crystal."
req_tech = list(TECH_BLUESPACE = 4, TECH_MATERIAL = 6)
materials = list(MATERIAL_GOLD = 1500, MATERIAL_DIAMOND = 1500, MATERIAL_PHORON = 1500)
build_path = /obj/item/bluespace_crystal/artificial
/datum/design/item/tool/binaryencrypt
name = "Binary Encryption Key"
desc = "Allows for deciphering the binary channel on-the-fly."
desc = "Allows for deciphering the stationbound binary channel on-the-fly."
req_tech = list(TECH_ILLEGAL = 2)
materials = list(DEFAULT_WALL_MATERIAL = 300, MATERIAL_GLASS = 300)
build_path = /obj/item/device/encryptionkey/binary
/datum/design/item/tool/pin_extractor
name = "Pin Extraction Device"
req_tech = list(TECH_MATERIAL = 3, TECH_ENGINEERING = 3, TECH_MAGNET = 4, TECH_ILLEGAL = 4)
materials = list(DEFAULT_WALL_MATERIAL = 5000, MATERIAL_GLASS = 2500)
build_path = /obj/item/device/pin_extractor
/datum/design/item/tool/analyzer
desc = "A hand-held environmental scanner which reports current gas levels."
req_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 3)
materials = list(DEFAULT_WALL_MATERIAL = 30, MATERIAL_GLASS = 20)
build_path = /obj/item/device/analyzer
/datum/design/item/tool/tag_scanner
name = "Tag Scanner"
desc = "A hand-held scanner used to scan IPCs and receive data from their tags."
req_tech = list(TECH_MAGNET = 3, TECH_ENGINEERING = 3)
materials = list(DEFAULT_WALL_MATERIAL = 5000, MATERIAL_GLASS = 2500)
build_path = /obj/item/ipc_tag_scanner
/datum/design/item/tool/plant_analyzer
name = "Plant Analyzer"
desc = "A hand-held plant scanner for hydroponicists and xenobotanists."
req_tech = list(TECH_MAGNET = 2, TECH_BIO = 3)
materials = list(DEFAULT_WALL_MATERIAL = 80, MATERIAL_GLASS = 20)
build_path = /obj/item/device/analyzer/plant_analyzer
/datum/design/item/tool/implanter
name = "Implanter"
desc = "A specialized syringe for inserting implants to subjects."
req_tech = list(TECH_BIO = 5)
materials = list(DEFAULT_WALL_MATERIAL = 320, MATERIAL_GLASS = 800)
build_path = /obj/item/implanter
/datum/design/item/tool/paicard
name = "pAI"
req_tech = list(TECH_DATA = 2)
materials = list(MATERIAL_GLASS = 500, DEFAULT_WALL_MATERIAL = 500)
build_path = /obj/item/device/paicard
/datum/design/item/tool/intellicard
name = "intelliCard"
desc = "Allows for the construction of an intelliCard."
req_tech = list(TECH_DATA = 4, TECH_MATERIAL = 4)
materials = list(MATERIAL_GLASS = 1000, MATERIAL_GOLD = 200)

View File

@@ -1,16 +1,5 @@
/datum/design/item/weapon
design_order = 2
/datum/design/item/weapon/AssembleDesignName()
..()
name = "Advanced Weapon Design ([capitalize_first_letters(item_name)])"
/datum/design/item/weapon/AssembleDesignDesc()
if(!desc)
if(build_path)
var/obj/item/I = build_path
desc = initial(I.desc)
..()
p_category = "Advanced Weapon Designs"
/datum/design/item/weapon/gun/Fabricate()
var/obj/item/gun/C = ..()
@@ -32,7 +21,6 @@
build_path = /obj/item/ammo_casing/shotgun/stunshell
/datum/design/item/weapon/chemsprayer
desc = "An advanced chem spraying device."
req_tech = list(TECH_MATERIAL = 3, TECH_ENGINEERING = 3, TECH_BIO = 2)
materials = list(DEFAULT_WALL_MATERIAL = 5000, MATERIAL_GLASS = 1000)
build_path = /obj/item/reagent_containers/spray/chemsprayer
@@ -59,14 +47,12 @@
build_path = /obj/item/melee/energy/glaive
/datum/design/item/weapon/forcegloves
name = "Force Gloves"
desc = "These gloves bend gravity and bluespace, dampening inertia and augmenting the wearer's melee capabilities."
req_tech = list(TECH_COMBAT = 3, TECH_BLUESPACE = 3, TECH_ENGINEERING = 3, TECH_MAGNET = 3)
materials = list(DEFAULT_WALL_MATERIAL = 4000)
build_path = /obj/item/clothing/gloves/force/basic
/datum/design/item/weapon/eshield
name = "Energy Shield"
desc = "A shield capable of stopping most projectile and melee attacks. It can be retracted, expanded, and stored anywhere."
req_tech = list(TECH_MAGNET = 3, TECH_MATERIAL = 4, TECH_ILLEGAL = 4)
materials = list(DEFAULT_WALL_MATERIAL = 1000, MATERIAL_GLASS = 3000, MATERIAL_PHORON = 1000)

View File

@@ -160,11 +160,9 @@
/obj/machinery/r_n_d/protolathe/proc/addToQueue(var/datum/design/D)
queue += D
return
/obj/machinery/r_n_d/protolathe/proc/removeFromQueue(var/index)
queue.Cut(index, index + 1)
return
/obj/machinery/r_n_d/protolathe/proc/canBuild(var/datum/design/D)
for(var/M in D.materials)

View File

@@ -25,7 +25,7 @@ Destructive Analyzer. By themselves, they don't do a whole lot. However, they un
by the circuit imprinter and the protolathe to produce objects. It also tracks the current reliability of that particular design.
//EXISTING TECH
Each tech path should have at LEAST one item at every level (levels 1 - 20). This is to allow for a more fluid progression of the
Each tech path should have at LEAST one item at every level (levels 1 - 15). This is to allow for a more fluid progression of the
researching. Existing tech (ie, anything you can find on the station or get from the quartermaster) shouldn't go higher then
level 5 or 7. Everything past that should be stuff you research.

View File

@@ -49,6 +49,9 @@ won't update every console in existence) but it's more of a hassle to do. Also,
var/id = 0 //ID of the computer (for server restrictions).
var/sync = 1 //If sync = 0, it doesn't show up on Server Control Console
var/protolathe_category = "All"
var/imprinter_category = "All"
req_access = list(access_tox) //Data and setting manipulation requires scientist access.
/obj/machinery/computer/rdconsole/proc/CallMaterialName(var/ID)
@@ -97,19 +100,12 @@ won't update every console in existence) but it's more of a hassle to do. Also,
for(var/obj/machinery/r_n_d/server/S in SSmachinery.all_machines)
var/server_processed = 0
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)
for(var/tech_id in files.known_tech)
var/datum/tech/T = files.known_tech[tech_id]
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))
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
files.known_tech = S.files.known_tech.Copy()
if(!istype(S, /obj/machinery/r_n_d/server/centcom) && server_processed)
S.produce_heat()
screen = 1.6
@@ -117,21 +113,24 @@ won't update every console in existence) but it's more of a hassle to do. Also,
/obj/machinery/computer/rdconsole/proc/griefProtection() //Have it automatically push research to the centcomm server so wild griffins can't fuck up R&D's work
for(var/obj/machinery/r_n_d/server/centcom/C in SSmachinery.all_machines)
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)
for(var/tech_id in files.known_tech)
var/datum/tech/T = files.known_tech[tech_id]
C.files.AddTech2Known(files.known_tech[T])
C.files.RefreshResearch()
/obj/machinery/computer/rdconsole/Initialize()
. = ..()
..()
files = new /datum/research(src) //Setup the research data holder.
if(!id)
for(var/obj/machinery/r_n_d/server/centcom/S in SSmachinery.all_machines)
S.setup()
break
SyncRDevices()
addtimer(CALLBACK(src, .proc/SyncTechs), 30)
return INITIALIZE_HINT_LATELOAD
/obj/machinery/computer/rdconsole/LateInitialize()
SyncTechs()
screen = 1.0
/obj/machinery/computer/rdconsole/Destroy()
if(linked_destroy != null)
@@ -199,14 +198,13 @@ won't update every console in existence) but it's more of a hassle to do. Also,
else if(href_list["eject_tech"]) //Eject the technology disk.
t_disk.forceMove(loc)
usr.put_in_hands(t_disk)
t_disk = null
screen = 1.0
else if(href_list["copy_tech"]) //Copys some technology data from the research holder to the disk.
for(var/datum/tech/T in files.known_tech)
if(href_list["copy_tech_ID"] == T.id)
t_disk.stored = T
break
var/datum/tech/T = files.known_tech[href_list["copy_tech_sent"]]
t_disk.stored = T
screen = 1.2
else if(href_list["updt_design"]) //Updates the research holder with design data from the design disk.
@@ -222,14 +220,14 @@ won't update every console in existence) but it's more of a hassle to do. Also,
else if(href_list["eject_design"]) //Eject the design disk.
d_disk.forceMove(loc)
usr.put_in_hands(d_disk)
d_disk = null
screen = 1.0
else if(href_list["copy_design"]) //Copy design data from the research holder to the design disk.
for(var/datum/design/D in files.known_designs)
if("[D.type]" == href_list["copy_design_ID"])
d_disk.blueprint = D
break
var/path = text2path(href_list["copy_design_sent"])
var/datum/design/D = files.known_designs[path]
d_disk.blueprint = D
screen = 1.4
else if(href_list["eject_item"]) //Eject the item inside the destructive analyzer.
@@ -239,6 +237,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
else if(linked_destroy.loaded_item)
linked_destroy.loaded_item.forceMove(linked_destroy.loc)
if(linked_destroy.Adjacent(usr))
usr.put_in_hands(linked_destroy.loaded_item)
linked_destroy.loaded_item = null
linked_destroy.icon_state = "d_analyzer"
screen = 2.1
@@ -308,28 +308,33 @@ won't update every console in existence) but it's more of a hassle to do. Also,
else if(href_list["togglesync"]) //Prevents the console from being synced by other consoles. Can still send data.
sync = !sync
else if(href_list["protolathe_category"])
var/choice = input("Which category do you wish to display?") as null|anything in files.protolathe_categories+"All"
if(!choice)
return
protolathe_category = choice
updateUsrDialog()
else if(href_list["imprinter_category"])
var/choice = input("Which category do you wish to display?") as null|anything in files.imprinter_categories+"All"
if(!choice)
return
imprinter_category = choice
updateUsrDialog()
else if(href_list["build"]) //Causes the Protolathe to build something.
if(linked_lathe)
var/datum/design/being_built = null
for(var/datum/design/D in files.known_designs)
if("[D.type]" == href_list["build"])
being_built = D
break
if(being_built)
linked_lathe.addToQueue(being_built)
var/path = text2path(href_list["build"])
var/datum/design/D = files.known_designs[path]
linked_lathe.addToQueue(D)
screen = 3.1
updateUsrDialog()
else if(href_list["imprint"]) //Causes the Circuit Imprinter to build something.
if(linked_imprinter)
var/datum/design/being_built = null
for(var/datum/design/D in files.known_designs)
if("[D.type]" == href_list["imprint"])
being_built = D
break
if(being_built)
linked_imprinter.addToQueue(being_built)
var/path = text2path(href_list["imprint"])
var/datum/design/D = files.known_designs[path]
linked_imprinter.addToQueue(D)
screen = 4.1
updateUsrDialog()
@@ -430,13 +435,18 @@ won't update every console in existence) but it's more of a hassle to do. Also,
/obj/machinery/computer/rdconsole/proc/GetResearchLevelsInfo()
var/dat
dat += "<UL>"
for(var/datum/tech/T in files.known_tech)
for(var/tech_id in files.known_tech)
var/datum/tech/T = files.known_tech[tech_id]
if(T.level < 1)
continue
dat += "<LI>"
dat += "[T.name]"
dat += "<u><b>[T.name]</b></u>"
dat += "<UL>"
dat += "<LI>Level: [T.level]"
if(T.level == 15)
dat += "<LI>Progress: Complete"
else
dat += "<LI>Progress: [T.next_level_progress]/[T.next_level_threshold]"
dat += "<LI>Summary: [T.desc]"
dat += "</UL>"
return dat
@@ -444,7 +454,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
/obj/machinery/computer/rdconsole/proc/GetResearchListInfo()
var/dat
dat += "<UL>"
for(var/datum/design/D in files.known_designs)
for(var/path in files.known_designs)
var/datum/design/D = files.known_designs[path]
if(D.build_path)
dat += "<LI><B>[D.name]</B>: [D.desc]"
dat += "</UL>"
@@ -495,9 +506,9 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += "Printing Research Information. Please Wait..."
if(1.0) //Main Menu
dat += "Main Menu:<BR><BR>"
dat += "<b><u>Main Menu:</b></u><HR><div class='menu'>"
dat += "Loaded disk: "
dat += (t_disk || d_disk) ? (t_disk ? "technology storage disk" : "design storage disk") : "none"
dat += (t_disk || d_disk) ? (t_disk ? "technology storage disk" : "design storage disk") : "None"
dat += "<HR><UL>"
dat += "<LI><A href='?src=\ref[src];menu=1.1'>Current Research Levels</A>"
dat += "<LI><A href='?src=\ref[src];menu=5.0'>View Researched Technologies</A>"
@@ -506,7 +517,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
else if(d_disk)
dat += "<LI><A href='?src=\ref[src];menu=1.4'>Disk Operations</A>"
else
dat += "<LI>Disk Operations"
dat += "<LI><div class='no-build'>Disk Operations</div>"
if(linked_destroy)
dat += "<LI><A href='?src=\ref[src];menu=2.2'>Destructive Analyzer Menu</A>"
if(linked_lathe)
@@ -515,11 +526,12 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += "<LI><A href='?src=\ref[src];menu=4.1'>Circuit Construction Menu</A>"
dat += "<LI><A href='?src=\ref[src];menu=1.6'>Settings</A>"
dat += "</UL>"
dat += "</div>"
if(1.1) //Research viewer
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
dat += "<A href='?src=\ref[src];print=1'>Print This Page</A><HR>"
dat += "Current Research Levels:<BR><BR>"
dat += "<b><u>Current Research Levels:</u></b><HR>"
dat += GetResearchLevelsInfo()
dat += "</UL>"
@@ -527,6 +539,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A><HR>"
dat += "Disk Contents: (Technology Data Disk)<BR><BR>"
dat += "<div class='menu'>"
if(t_disk.stored == null)
dat += "The disk has no data stored on it.<HR>"
dat += "Operations: "
@@ -539,19 +552,24 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += "<A href='?src=\ref[src];updt_tech=1'>Upload to Database</A> || "
dat += "<A href='?src=\ref[src];clear_tech=1'>Clear Disk</A> || "
dat += "<A href='?src=\ref[src];eject_tech=1'>Eject Disk</A>"
dat += "</div>"
if(1.3) //Technology Disk submenu
dat += "<BR><A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
dat += "<A href='?src=\ref[src];menu=1.2'>Return to Disk Operations</A><HR>"
dat += "<div class='menu'>"
dat += "Load Technology to Disk:<BR><BR>"
dat += "<UL>"
for(var/datum/tech/T in files.known_tech)
for(var/tech_id in files.known_tech)
var/datum/tech/T = files.known_tech[tech_id]
dat += "<LI>[T.name] "
dat += "\[<A href='?src=\ref[src];copy_tech=1;copy_tech_ID=[T.id]'>copy to disk</A>\]"
dat += "\[<A href='?src=\ref[src];copy_tech=1;copy_tech_sent=[T.id]'>copy to disk</A>\]"
dat += "</UL>"
dat += "</div>"
if(1.4) //Design Disk menu.
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A><HR>"
dat += "<div class='menu'>"
if(d_disk.blueprint == null)
dat += "The disk has no data stored on it.<HR>"
dat += "Operations: "
@@ -569,21 +587,26 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += "<A href='?src=\ref[src];updt_design=1'>Upload to Database</A> || "
dat += "<A href='?src=\ref[src];clear_design=1'>Clear Disk</A> || "
dat += "<A href='?src=\ref[src];eject_design=1'>Eject Disk</A>"
dat += "</div>"
if(1.5) //Technology disk submenu
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
dat += "<A href='?src=\ref[src];menu=1.4'>Return to Disk Operations</A><HR>"
dat += "<div class='menu'>"
dat += "Load Design to Disk:<BR><BR>"
dat += "<UL>"
for(var/datum/design/D in files.known_designs)
for(var/path in files.known_designs)
var/datum/design/D = files.known_designs[path]
if(D.build_path)
dat += "<LI>[D.name] "
dat += "<A href='?src=\ref[src];copy_design=1;copy_design_ID=[D.type]'>\[copy to disk\]</A>"
dat += "<A href='?src=\ref[src];copy_design=1;copy_design_sent=[D.type]'>\[copy to disk\]</A>"
dat += "</UL>"
dat += "</div>"
if(1.6) //R&D console settings
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A><HR>"
dat += "R&D Console Setting:<HR>"
dat += "<b><u>R&D Console Setting:</u></b><HR>"
dat += "<div class='menu'>"
dat += "<UL>"
if(sync)
dat += "<LI><A href='?src=\ref[src];sync=1'>Sync Database with Network</A><BR>"
@@ -594,33 +617,36 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += "<LI><A href='?src=\ref[src];lock=0.2'>Lock Console</A><BR>"
dat += "<LI><A href='?src=\ref[src];reset=1'>Reset R&D Database</A><BR>"
dat += "<UL>"
dat += "</div>"
if(1.7) //R&D device linkage
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
dat += "<A href='?src=\ref[src];menu=1.6'>Settings Menu</A><HR>"
dat += "R&D Console Device Linkage Menu:<BR><BR>"
dat += "<b><u>R&D Console Device Linkage Menu:</u></b><HR>"
dat += "<div class='menu'>"
dat += "<A href='?src=\ref[src];find_device=1'>Re-sync with Nearby Devices</A><HR>"
dat += "Linked Devices:"
dat += "<UL>"
if(allow_analyzer)
if(linked_destroy)
dat += "<LI>Destructive Analyzer <A href='?src=\ref[src];disconnect=destroy'>(Disconnect)</A>"
dat += "<LI>Destructive Analyzer <A href='?src=\ref[src];disconnect=destroy'>Disconnect</A>"
else
dat += "<LI>(No Destructive Analyzer Linked)"
if(allow_lathe)
if(linked_lathe)
dat += "<LI>Protolathe <A href='?src=\ref[src];disconnect=lathe'>(Disconnect)</A>"
dat += "<LI>Protolathe <A href='?src=\ref[src];disconnect=lathe'>Disconnect</A>"
else
dat += "<LI>(No Protolathe Linked)"
if(allow_imprinter)
if(linked_imprinter)
dat += "<LI>Circuit Imprinter <A href='?src=\ref[src];disconnect=imprinter'>(Disconnect)</A>"
dat += "<LI>Circuit Imprinter <A href='?src=\ref[src];disconnect=imprinter'>Disconnect</A>"
else
dat += "<LI>(No Circuit Imprinter Linked)"
dat += "</UL>"
dat += "</div>"
////////////////////DESTRUCTIVE ANALYZER SCREENS////////////////////////////
if(2.0)
@@ -633,19 +659,20 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(2.2)
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A><HR>"
dat += "Deconstruction Menu<HR>"
dat += "<b><u>Deconstruction Menu</u></b><HR>"
dat += "Name: [linked_destroy.loaded_item.name]<BR>"
dat += "Origin Tech:"
dat += "<UL>"
for(var/T in linked_destroy.loaded_item.origin_tech)
dat += "<LI>[CallTechName(T)] [linked_destroy.loaded_item.origin_tech[T]]"
for(var/datum/tech/F in files.known_tech)
if(F.name == CallTechName(T))
dat += " (Current: [F.level])"
break
for(var/tech_id in linked_destroy.loaded_item.origin_tech)
var/datum/tech/T = files.known_tech[tech_id]
dat += "<LI>[capitalize_first_letters(T.name)]: \[Level: [linked_destroy.loaded_item.origin_tech[tech_id]] || Progress Contribution: [files.get_level_value(linked_destroy.loaded_item.origin_tech[tech_id])]\]"
dat += " (Current Level: [T.level] || Current Progress: [T.next_level_progress]/[T.next_level_threshold])"
dat += "</UL>"
dat += "<HR><A href='?src=\ref[src];deconstruct=1'>Deconstruct Item</A> || "
dat += "<A href='?src=\ref[src];eject_item=1'>Eject Item</A> || "
if(!istype(linked_destroy.loaded_item, /obj/item/stack))
dat += "<HR><A href='?src=\ref[src];deconstruct=1'>Deconstruct Item</A> || "
else
dat += "<HR><A href='?src=\ref[src];deconstruct=1'>Deconstruct One In Stack</A> || "
dat += "<A href='?src=\ref[src];eject_item=1'>Eject Item</A>"
/////////////////////PROTOLATHE SCREENS/////////////////////////
if(3.0)
@@ -657,13 +684,22 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += "<A href='?src=\ref[src];menu=3.4'>View Queue</A> || "
dat += "<A href='?src=\ref[src];menu=3.2'>Material Storage</A> || "
dat += "<A href='?src=\ref[src];menu=3.3'>Chemical Storage</A><HR>"
dat += "Protolathe Menu:<BR><BR>"
dat += "<b><u>Protolathe Menu:</u></b><HR>"
dat += "<B>Material Amount:</B> [linked_lathe.TotalMaterials()] cm<sup>3</sup> (MAX: [linked_lathe.max_material_storage])<BR>"
dat += "<B>Chemical Volume:</B> [linked_lathe.reagents.total_volume] (MAX: [linked_lathe.reagents.maximum_volume])<HR>"
dat += "<UL>"
for(var/datum/design/D in files.known_designs)
dat += "<font size='3'; color='#5c87a8'><b>Category:</b></font> <a href='?src=\ref[src];protolathe_category=1'>[protolathe_category]</a><hr>"
dat += "<div class='rdconsole-build'>"
dat += "<ul>"
var/last_category = ""
for(var/path in files.known_designs)
var/datum/design/D = files.known_designs[path]
if(!D.build_path || !(D.build_type & PROTOLATHE))
continue
if(protolathe_category != "All" && D.p_category != protolathe_category)
continue
if(protolathe_category == "All" && D.p_category != last_category)
last_category = D.p_category
dat += "<li><h3>[last_category]</h3>"
var/temp_dat
for(var/M in D.materials)
temp_dat += ", [D.materials[M]] [CallMaterialName(M)]"
@@ -672,15 +708,17 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(temp_dat)
temp_dat = " \[[copytext(temp_dat, 3)]\]"
if(linked_lathe.canBuild(D))
dat += "<LI><B><A href='?src=\ref[src];build=[D.type]'>[D.name]</A></B>[temp_dat]"
dat += "<li class='highlight'><b><a href='?src=\ref[src];build=[D.type]'>[capitalize_first_letters(D.name)]</a></b>"
else
dat += "<LI><B>[D.name]</B>[temp_dat]"
dat += "</UL>"
dat += "<li class='highlight'><b><div class='no-build'>[capitalize_first_letters(D.name)]</div></b>"
dat += "[temp_dat]<br><i>[D.desc]</i>"
dat += "</ul>"
dat += "</div>"
if(3.2) //Protolathe Material Storage Sub-menu
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
dat += "<A href='?src=\ref[src];menu=3.1'>Protolathe Menu</A><HR>"
dat += "Material Storage<BR><HR>"
dat += "<b><u>Material Storage</u></b><BR><HR>"
dat += "<UL>"
for(var/M in linked_lathe.materials)
var/amount = linked_lathe.materials[M]
@@ -699,7 +737,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(3.3) //Protolathe Chemical Storage Submenu
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
dat += "<A href='?src=\ref[src];menu=3.1'>Protolathe Menu</A><HR>"
dat += "Chemical Storage<BR><HR>"
dat += "<b><u>Chemical Storage</u></b><BR><HR>"
for(var/datum/reagent/R in linked_lathe.reagents.reagent_list)
dat += "Name: [R.name] | Units: [R.volume] "
dat += "<A href='?src=\ref[src];disposeP=[R.type]'>(Purge)</A><BR>"
@@ -708,7 +746,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(3.4) // Protolathe queue
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
dat += "<A href='?src=\ref[src];menu=3.1'>Protolathe Menu</A><HR>"
dat += "Queue<BR><HR>"
dat += "<b><u>Queue</u></b><BR><HR>"
if(!linked_lathe.queue.len)
dat += "Empty"
else
@@ -718,9 +756,9 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(linked_lathe.busy)
dat += "<B>1: [D.name]</B><BR>"
else
dat += "<B>1: [D.name]</B> (Awaiting materials) <A href='?src=\ref[src];removeP=[tmp]'>(Remove)</A><BR>"
dat += "<B>1: [D.name]</B> (Awaiting materials) <A href='?src=\ref[src];removeP=[tmp]'>Remove</A><BR>"
else
dat += "[tmp]: [D.name] <A href='?src=\ref[src];removeP=[tmp]'>(Remove)</A><BR>"
dat += "[tmp]: [D.name] <A href='?src=\ref[src];removeP=[tmp]'>Remove</A><BR>"
++tmp
///////////////////CIRCUIT IMPRINTER SCREENS////////////////////
@@ -733,13 +771,22 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += "<A href='?src=\ref[src];menu=4.4'>View Queue</A> || "
dat += "<A href='?src=\ref[src];menu=4.3'>Material Storage</A> || "
dat += "<A href='?src=\ref[src];menu=4.2'>Chemical Storage</A><HR>"
dat += "Circuit Imprinter Menu:<BR><BR>"
dat += "<b><u>Circuit Imprinter Menu:</u></b><BR><HR>"
dat += "Material Amount: [linked_imprinter.TotalMaterials()] cm<sup>3</sup><BR>"
dat += "Chemical Volume: [linked_imprinter.reagents.total_volume]<HR>"
dat += "<UL>"
for(var/datum/design/D in files.known_designs)
dat += "<font size='3'; color='#5c87a8'><b>Category:</b></font> <a href='?src=\ref[src];imprinter_category=1'>[imprinter_category]</a><hr>"
dat += "<div class='rdconsole-build'>"
dat += "<ul>"
var/last_category = ""
for(var/path in files.known_designs)
var/datum/design/D = files.known_designs[path]
if(!D.build_path || !(D.build_type & IMPRINTER))
continue
if(imprinter_category != "All" && D.p_category != imprinter_category)
continue
if(imprinter_category == "All" && D.p_category != last_category)
last_category = D.p_category
dat += "<li><h3>[last_category]</h3>"
var/temp_dat
for(var/M in D.materials)
temp_dat += ", [D.materials[M]*linked_imprinter.mat_efficiency] [CallMaterialName(M)]"
@@ -748,15 +795,17 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(temp_dat)
temp_dat = " \[[copytext(temp_dat,3)]\]"
if(linked_imprinter.canBuild(D))
dat += "<LI><B><A href='?src=\ref[src];imprint=[D.type]'>[D.name]</A></B>[temp_dat]"
dat += "<li class='highlight'><b><a href='?src=\ref[src];imprint=[D.type]'>[D.name]</a></b>"
else
dat += "<LI><B>[D.name]</B>[temp_dat]"
dat += "</UL>"
dat += "<li class='highlight'><b><div class='no-build'>[D.name]</div></b>"
dat += "[temp_dat]<br><i>[D.desc]</i>"
dat += "</ul>"
dat += "</div>"
if(4.2)
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
dat += "<A href='?src=\ref[src];menu=4.1'>Imprinter Menu</A><HR>"
dat += "Chemical Storage<BR><HR>"
dat += "<b><u>Chemical Storage</u></b><BR><HR>"
for(var/datum/reagent/R in linked_imprinter.reagents.reagent_list)
dat += "Name: [R.name] | Units: [R.volume] "
dat += "<A href='?src=\ref[src];disposeI=[R.type]'>(Purge)</A><BR>"
@@ -765,7 +814,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(4.3)
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
dat += "<A href='?src=\ref[src];menu=4.1'>Circuit Imprinter Menu</A><HR>"
dat += "Material Storage<BR><HR>"
dat += "<b><u>Material Storage</u></b><BR><HR>"
dat += "<UL>"
for(var/M in linked_imprinter.materials)
var/amount = linked_imprinter.materials[M]
@@ -784,7 +833,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(4.4)
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
dat += "<A href='?src=\ref[src];menu=4.1'>Circuit Imprinter Menu</A><HR>"
dat += "Queue<BR><HR>"
dat += "<b><u>Queue</u></b><BR><HR>"
if(linked_imprinter.queue.len == 0)
dat += "Empty"
else
@@ -793,18 +842,20 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(tmp == 1)
dat += "<B>1: [D.name]</B><BR>"
else
dat += "[tmp]: [D.name] <A href='?src=\ref[src];removeI=[tmp]'>(Remove)</A><BR>"
dat += "[tmp]: [D.name] <A href='?src=\ref[src];removeI=[tmp]'>Remove</A><BR>"
++tmp
///////////////////Research Information Browser////////////////////
if(5.0)
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
dat += "<A href='?src=\ref[src];print=2'>Print This Page</A><HR>"
dat += "List of Researched Technologies and Designs:"
dat += "<b><u>List of Researched Technologies and Designs:</u></b><HR>"
dat += GetResearchListInfo()
user << browse("<TITLE>Research and Development Console</TITLE><HR>[dat]", "window=rdconsole;size=850x600")
onclose(user, "rdconsole")
var/datum/browser/rdconsole = new(user, "rdconsole", "Research and Development Console", 850, 600)
rdconsole.add_stylesheet("rdconsole", 'html/browser/rdconsole.css')
rdconsole.set_content(dat)
rdconsole.open()
/obj/machinery/computer/rdconsole/robotics
name = "robotics R&D console"

View File

@@ -33,7 +33,7 @@ The tech datums are the actual "tech trees" that you improve through researching
- Name: Pretty obvious. This is often viewable to the players.
- Desc: Pretty obvious. Also player viewable.
- ID: This is the unique ID of the tech that is used by the various procs to find and/or maniuplate it.
- Level: This is the current level of the tech. All techs start at 1 and have a max of 20. Devices and some techs require a certain
- Level: This is the current level of the tech. All techs start at 1 and have a max of 15. Devices and some techs require a certain
level in specific techs before you can produce them.
- Req_tech: This is a list of the techs required to unlock this tech path. If left blank, it'll automatically be loaded into the
research holder datum.
@@ -47,101 +47,117 @@ research holder datum.
/datum/research //Holder for all the existing, archived, and known tech. Individual to console.
var/list/known_tech = list() //List of locally known tech. Datum/tech go here.
var/list/possible_designs = list() //List of all designs.
var/list/protolathe_categories = list()
var/list/imprinter_categories = list()
var/list/known_designs = list() //List of available designs.
var/standard_start_level // The level non-antag techs are set at
var/antag_start_level // ditto but antag
var/load_tech = TRUE // Whether we should gather the techs
var/load_designs = TRUE // ditto but designs
/datum/research/New() //Insert techs into possible_tech here. Known_tech automatically updated.
for(var/T in typesof(/datum/tech) - /datum/tech)
known_tech += new T(src)
for(var/D in typesof(/datum/design) - /datum/design)
possible_designs += new D(src)
if(load_tech)
for(var/tech_path in subtypesof(/datum/tech))
var/datum/tech/T = new tech_path(src)
known_tech[T.id] = T
if(!T.antag_tech)
if(standard_start_level)
T.level = standard_start_level
else
if(antag_start_level)
T.level = antag_start_level
if(load_designs)
for(var/design_path in subtypesof(/datum/design))
var/datum/design/D = new design_path(src)
if(D.build_type & PROTOLATHE)
protolathe_categories |= D.p_category
if(D.build_type & IMPRINTER)
imprinter_categories |= D.p_category
possible_designs[D.type] = D
RefreshResearch()
/datum/research/techonly
/datum/research/techonly/New()
for(var/T in typesof(/datum/tech) - /datum/tech)
known_tech += new T(src)
RefreshResearch()
load_designs = FALSE
/datum/research/hightech
/datum/research/hightech/New()
for(var/T in typesof(/datum/tech) - /datum/tech)
known_tech += new T(src)
for(var/D in typesof(/datum/design) - /datum/design)
possible_designs += new D(src)
for(var/datum/tech/known in known_tech)
if(istype(known,/datum/tech/syndicate) || istype(known,/datum/tech/arcane)) //illegal or antag shit we don't want to start with
known.level = 0
else
known.level = 3
RefreshResearch()
standard_start_level = 3
//Checks to see if design has all the required pre-reqs.
//Input: datum/design; Output: 0/1 (false/true)
/datum/research/proc/DesignHasReqs(var/datum/design/D)
if(D.req_tech.len == 0)
return 1
var/list/k_tech = list()
for(var/datum/tech/known in known_tech)
k_tech[known.id] = known.level
if(!D.req_tech.len)
return TRUE
for(var/req in D.req_tech)
if(isnull(k_tech[req]) || k_tech[req] < D.req_tech[req])
return 0
var/datum/tech/T = known_tech[req]
if(isnull(T))
return FALSE
if(T.level < D.req_tech[req])
return FALSE
return 1
return TRUE
//Adds a tech to known_tech list. Checks to make sure there aren't duplicates and updates existing tech's levels if needed.
//Input: datum/tech; Output: Null
/datum/research/proc/AddTech2Known(var/datum/tech/T)
for(var/datum/tech/known in known_tech)
if(T.id == known.id)
if(T.level > known.level)
known.level = T.level
return
return
if(isnull(T))
return
var/datum/tech/known = known_tech[T.id]
var/will_update_progress = FALSE
if(T.level > known.level)
known.level = T.level
known.next_level_threshold = T.next_level_threshold
known.next_level_progress = 0
will_update_progress = TRUE
else if (T.level == known.level && T.next_level_progress > known.next_level_progress)
will_update_progress = TRUE
if(will_update_progress)
known.next_level_progress = T.next_level_progress
/datum/research/proc/AddDesign2Known(var/datum/design/D)
if(!known_designs.len) // Special case
known_designs.Add(D)
return
for(var/i = 1 to known_designs.len)
var/datum/design/A = known_designs[i]
if("[A.type]" == "[D.type]") // We are guaranteed to reach this if the ids are the same, because sort_string will also be the same
return
if(A.design_order > D.design_order)
known_designs.Insert(i, D)
return
known_designs.Add(D)
return
known_designs[D.type] = D
//Refreshes known_tech and known_designs list
//Input/Output: n/a
/datum/research/proc/RefreshResearch()
for(var/datum/design/PD in possible_designs)
known_designs.Cut() // this is to refresh the ordering of the designs, the alternative is an expensive insertion or sorting proc
for(var/path in possible_designs)
var/datum/design/PD = possible_designs[path]
if(DesignHasReqs(PD))
AddDesign2Known(PD)
for(var/datum/tech/T in known_tech)
T = between(0, T.level, 20)
return
for(var/id in known_tech)
var/datum/tech/T = known_tech[id]
T.level = between(0, T.level, MAX_TECH_LEVEL)
T.next_level_threshold = get_level_value(T.level)
/datum/research/proc/get_level_value(var/level)
return 5 ** level
//Refreshes the levels of a given tech.
//Input: Tech's ID and Level; Output: null
/datum/research/proc/UpdateTech(var/ID, var/level)
for(var/datum/tech/KT in known_tech)
if(KT.id == ID && KT.level <= level)
KT.level = max(KT.level + 1, level - 1)
return
/datum/research/proc/UpdateTech(var/ID, var/update_level)
var/datum/tech/KT = known_tech[ID]
var/progress = get_level_value(update_level)
while(progress > 0)
if(KT.level >= MAX_TECH_LEVEL)
break
if(KT.next_level_progress + progress >= KT.next_level_threshold)
progress -= KT.next_level_threshold - KT.next_level_progress
KT.level++
KT.level = clamp(KT.level, 0, MAX_TECH_LEVEL)
KT.next_level_threshold = get_level_value(KT.level)
continue
KT.next_level_progress += progress
break
// A simple helper proc to find the name of a tech with a given ID.
/proc/CallTechName(var/ID)
/proc/CallTechName(var/ID)
for(var/T in subtypesof(/datum/tech))
var/datum/tech/check_tech = T
if(initial(check_tech.id) == ID)
return initial(check_tech.name)
return initial(check_tech.name)
/***************************************************************
** Technology Datums **
@@ -152,7 +168,10 @@ research holder datum.
var/name = "name" //Name of the technology.
var/desc = "description" //General description of what it does and what it makes.
var/id = "id" //An easily referenced ID. Must be alphanumeric, lower-case, and no symbols.
var/antag_tech
var/level = 1 //A simple number scale of the research level. Level 0 = Secret tech.
var/next_level_progress = 0 // The research progress until the next level is reached, makes things more gradual
var/next_level_threshold = 10 // The next threshold that must be reached before it ticks to the next level
/datum/tech/materials
name = "Materials Research"
@@ -203,12 +222,14 @@ research holder datum.
name = "Illegal Technologies Research"
desc = "The study of technologies that violate standard government regulations."
id = TECH_ILLEGAL
antag_tech = TRUE
level = 0
/datum/tech/arcane
name = "Arcane Research"
desc = "Research into the occult and arcane field for use in practical science"
id = TECH_ARCANE
antag_tech = TRUE
level = 0
/obj/item/disk/tech_disk
@@ -221,9 +242,19 @@ research holder datum.
matter = list(DEFAULT_WALL_MATERIAL = 30, MATERIAL_GLASS = 10)
var/datum/tech/stored
/obj/item/disk/tech_disk/New()
pixel_x = rand(-5.0, 5)
pixel_y = rand(-5.0, 5)
/obj/item/disk/tech_disk/Initialize(mapload)
. = ..()
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
/obj/item/disk/tech_disk/examine(mob/user, distance)
. = ..()
if(distance <= 1)
if(stored)
to_chat(user, FONT_SMALL("It is storing the following tech:"))
to_chat(user, FONT_SMALL(" - [stored.name]: Level - [stored.level] | Progress - [stored.next_level_progress]/[stored.next_level_threshold]"))
else
to_chat(user, FONT_SMALL("It doesn't have any tech stored."))
/obj/item/disk/design_disk
name = "component design disk"
@@ -235,6 +266,16 @@ research holder datum.
matter = list(DEFAULT_WALL_MATERIAL = 30, MATERIAL_GLASS = 10)
var/datum/design/blueprint
/obj/item/disk/design_disk/New()
pixel_x = rand(-5.0, 5)
pixel_y = rand(-5.0, 5)
/obj/item/disk/design_disk/Initialize(mapload)
. = ..()
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
/obj/item/disk/design_disk/examine(mob/user, distance)
. = ..()
if(distance <= 1)
if(blueprint)
to_chat(user, FONT_SMALL("It is storing the following design:"))
to_chat(user, FONT_SMALL(" - [blueprint.name]"))
else
to_chat(user, FONT_SMALL("It doesn't have any blueprint stored."))

View File

@@ -62,7 +62,8 @@
if(health <= 0)
griefProtection() //I dont like putting this in process() but it's the best I can do without re-writing a chunk of rd servers.
files.known_designs = list()
for(var/datum/tech/T in files.known_tech)
for(var/id in files.known_tech)
var/datum/tech/T = files.known_tech[id]
if(prob(1))
T.level--
files.RefreshResearch()
@@ -83,10 +84,9 @@
//Backup files to centcomm to help admins recover data after greifer attacks
/obj/machinery/r_n_d/server/proc/griefProtection()
for(var/obj/machinery/r_n_d/server/centcom/C in SSmachinery.all_machines)
for(var/datum/tech/T in files.known_tech)
for(var/id in files.known_tech)
var/datum/tech/T = files.known_tech[id]
C.files.AddTech2Known(T)
for(var/datum/design/D in files.known_designs)
C.files.AddDesign2Known(D)
C.files.RefreshResearch()
/obj/machinery/r_n_d/server/proc/produce_heat()
@@ -240,11 +240,8 @@
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 its 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.type]" == href_list["reset_design"])
temp_server.files.known_designs -= D
break
temp_server.files.RefreshResearch()
temp_server.files.known_designs -= href_list["reset_design"]
temp_server.files.RefreshResearch()
updateUsrDialog()
return
@@ -291,13 +288,15 @@
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)
for(var/path in temp_server.files.known_tech)
var/datum/tech/T = temp_server.files.known_tech[path]
dat += "* [T.name] "
dat += "<A href='?src=\ref[src];reset_tech=[T.id]'>(Reset)</A><BR>" //FYI, these are all strings.
dat += "<A href='?src=\ref[src];reset_tech=[T.id]'>(Reset)</A><BR>"
dat += "Known Designs<BR>"
for(var/datum/design/D in temp_server.files.known_designs)
for(var/path in temp_server.files.known_designs)
var/datum/design/D = temp_server.files.known_designs[path]
dat += "* [D.name] "
dat += "<A href='?src=\ref[src];reset_design=[D.type]'>(Delete)</A><BR>"
dat += "<A href='?src=\ref[src];reset_design=[path]'>(Delete)</A><BR>"
dat += "<HR><A href='?src=\ref[src];main=1'>Main Menu</A>"
if(3) //Server Data Transfer

View File

@@ -67,6 +67,7 @@
/obj/item/stock_parts
name = "stock part"
var/parent_stock_name = "stock part" // this will show up on the protolathe to show what the base version was called
desc = "What?"
gender = PLURAL
icon = 'icons/obj/stock_parts.dmi'
@@ -91,6 +92,7 @@
/obj/item/stock_parts/capacitor
name = "capacitor"
parent_stock_name = "capacitor"
desc = "A basic capacitor used in the construction of a variety of devices."
icon_state = "capacitor"
origin_tech = list(TECH_POWER = 1)
@@ -98,6 +100,7 @@
/obj/item/stock_parts/scanning_module
name = "scanning module"
parent_stock_name = "scanning module"
desc = "A compact, high resolution scanning module used in the construction of certain devices."
icon_state = "scan_module"
origin_tech = list(TECH_MAGNET = 1)
@@ -105,6 +108,7 @@
/obj/item/stock_parts/manipulator
name = "micro-manipulator"
parent_stock_name = "micro-manipulator"
desc = "A tiny little manipulator used in the construction of certain devices."
icon_state = "micro_mani"
origin_tech = list(TECH_MATERIAL = 1, TECH_DATA = 1)
@@ -112,6 +116,7 @@
/obj/item/stock_parts/micro_laser
name = "micro-laser"
parent_stock_name = "micro-laser"
desc = "A tiny laser used in certain devices."
icon_state = "micro_laser"
origin_tech = list(TECH_MAGNET = 1)
@@ -119,6 +124,7 @@
/obj/item/stock_parts/matter_bin
name = "matter bin"
parent_stock_name = "matter bin"
desc = "A container for hold compressed matter awaiting re-construction."
icon_state = "matter_bin"
origin_tech = list(TECH_MATERIAL = 1)