mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
SCIENCE! Update:
- More R&D stuff. Moved code from code/datums/technology to code/game/research (more apt and it isn't JUST datums now). Still very WIP. - Circuit printer now requires Sulfuric Acid instead of H2SO4. (Yes, I get the irony) - New helper proc: between(low, middle, high). It returns middle unless it is greater than high (in which case, it returns high) or less than low (in which case it returns low). It's a fairly simple proc but it cleans up some bits of code I am working on. - Changeling chem regeneration is now a curve rather then a flat amount. At low amounts (<20) it's faster then in r917, at high amounts it's slower (>20). This means you can use cheap abilities more often and expensive abilities less. - Changeling "Dart" abilities now named "sting" abilities to (Hopefully) cause less confusion. "Boost Dart Range" renamed "Ranged Sting." - Changeling "Absorb DNA" ability now not only doesn't cost chem to use, it actually regenerates a small amount (if successful). git-svn-id: http://tgstation13.googlecode.com/svn/trunk@929 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -1,207 +0,0 @@
|
||||
/***************************************************************
|
||||
Science Research and Development System (Designed and Developed by the /tg/station crew)
|
||||
|
||||
*insert stuff here later*
|
||||
|
||||
*****************************************
|
||||
|
||||
Integrating Objects into the Science Research and Development System
|
||||
|
||||
First of all, the root /obj/ define has to have two variables added to it if it doesn't have them already:
|
||||
var/list/origin_tech = list()
|
||||
var/reliability = 100
|
||||
|
||||
* The origin_tech list is a list of all the technolgies (by ID) and their level at the time the object was created (format: "ID" = #).
|
||||
If an object can't be reversed engineered, you're just going to leave this variable alone.
|
||||
* The relability var is the reliability of an object before tech modifiers. Items that start spawned and items that aren't part of the
|
||||
R&D system should just leave the reliability var at 100 and ignore it. Otherwise, you'll want to adjust it down based on the
|
||||
pre-technology-modifier reliability you want for the object. You'd also want to add some sort of mechanic that deals with that
|
||||
var as well.
|
||||
*SPECIAL NOTE: For non-carriable objects that you can deconstruct into RE'able parts, make sure to include some way of passing on
|
||||
the data from the components to the finished procuct and back again.
|
||||
|
||||
***************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
/***************************************************************
|
||||
** Master Types **
|
||||
** Includes all the helper procs and basic tech processing. **
|
||||
***************************************************************/
|
||||
|
||||
/datum/research //Holder for all the existing, archived, and known tech. Individual to console.
|
||||
var
|
||||
list //Datum/tech go here.
|
||||
possible_tech = list() //List of all tech in the game that players have access to (barring special events).
|
||||
known_tech = list() //List of locally known tech.
|
||||
|
||||
New() //Insert techs into possible_tech and known_tech at start here.
|
||||
|
||||
|
||||
proc
|
||||
|
||||
//Checks to see if tech has all the required pre-reqs. Input: Tech datum/tech; Output: 0/1 (false/true)
|
||||
HasTechReqs(var/datum/tech/T)
|
||||
if(T.req_tech.len == 0)
|
||||
return 1
|
||||
var/matches = 0
|
||||
for(var/req in T.req_tech)
|
||||
for(var/known in known_tech)
|
||||
if(req == known && T.req_tech[req] <= known_tech[known])
|
||||
matches++
|
||||
if(matches == T.req_tech.len)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
//Adds a tech to known_tech list. Checks to make sure there aren't duplicates. Input: datum/tech; Output: Null
|
||||
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
|
||||
known_tech += T
|
||||
RefreshKnownTech()
|
||||
return
|
||||
|
||||
|
||||
//Refreshes known_tech list with entries in archived and possible techs. Input/Output: Null.
|
||||
RefreshKnownTech()
|
||||
for(var/datum/tech/P in possible_tech - known_tech)
|
||||
if(HasTechReqs(P, possible_tech))
|
||||
AddTech2Known(P)
|
||||
RefreshKnownTech()
|
||||
return
|
||||
|
||||
//Makes a new instance of a tech with inputed ID. Input: ID; Output: /datum/tech
|
||||
NewTech(var/ID)
|
||||
for(var/datum/tech/newtech in typesof(/datum/tech) - /datum/tech)
|
||||
if(newtech.id == ID)
|
||||
return newtech
|
||||
return null
|
||||
|
||||
|
||||
//Finds the reliability of a given object based on it's base reliablity and related technologies.
|
||||
//Input: Object; Output: Number
|
||||
//CompositeReliability() //Saving until I get a better guideline of how reliability should calculate.
|
||||
|
||||
|
||||
|
||||
/***************************************************************
|
||||
** Technology Datums **
|
||||
** Includes all the various technoliges and what they make. **
|
||||
***************************************************************/
|
||||
|
||||
/datum/tech //Datum of individual technologies.
|
||||
var
|
||||
name = "name" //Name of the technology.
|
||||
desc = "description" //General description of what it does and what it makes.
|
||||
id = "id" //An easily referenced ID. Must be alphanumeric, lower-case, and no symbols.
|
||||
level = 1 //A simple number scale of the research level. 1 = theoretical, 10 = tried-and-true.
|
||||
list/req_tech = list() //List of ids associated values of techs required to research this tech. "id" = #
|
||||
|
||||
//Trunk Technologies (don't actually build anything and don't require any other techs).
|
||||
|
||||
materials
|
||||
name = "Materials Research"
|
||||
desc = "Development of new and improved materials."
|
||||
id = "materials"
|
||||
|
||||
plasmatech
|
||||
name = "Plasma Research"
|
||||
desc = "Research into the mysterious substance colloqually known as 'plasma'"
|
||||
id = "plasmatech"
|
||||
|
||||
powerstorage
|
||||
name = "Power Storage Technology"
|
||||
desc = "The various technologies behind the storage of electicity."
|
||||
id = "powerstorage"
|
||||
|
||||
bluespace
|
||||
name = "'Blue-space' Research"
|
||||
desc = "Research into the sub-reality of 'blue-space'"
|
||||
id = "bluespace"
|
||||
|
||||
biotech
|
||||
name = "Biological Technology"
|
||||
desc = "Research into the deeper mysteries of life and organic substances."
|
||||
id = "biotech"
|
||||
|
||||
magnets
|
||||
name = "Electromagnetic Spectrum Research"
|
||||
desc = "Research into the electromagnetic spectrum. No clue how they actually work, though."
|
||||
id = "magnets"
|
||||
|
||||
programming
|
||||
name = "Data Theory Research"
|
||||
desc = "The development of new computer and artificial intelligence systems."
|
||||
id = "programming"
|
||||
|
||||
//Branch Tech: Materials
|
||||
metaltech
|
||||
name = "Metallurgy Research"
|
||||
desc = "Development of new and improved metal alloys for different purposes."
|
||||
id = "metaltech"
|
||||
req_tech = list("materials" = 2)
|
||||
|
||||
glasstech
|
||||
name = "Transparent Material Research"
|
||||
desc = "Development of new and stronger transparent materials (glass, crystal, transparent aluminum, etc)."
|
||||
id = "glasstech"
|
||||
req_tech = list("materials" = 2)
|
||||
|
||||
explosives
|
||||
name = "Explosives Research"
|
||||
desc = "The creation and application of explosive materials."
|
||||
id = "explosives"
|
||||
req_tech = list("materials" = 3)
|
||||
|
||||
//Branch Tech: Power Storage and Generation
|
||||
generators
|
||||
name = "Power Generation Technology"
|
||||
desc = "Research into more powerful and more reliable sources."
|
||||
id = "generators"
|
||||
req_tech = list("powerstorage" = 2)
|
||||
|
||||
celltech
|
||||
name = "Power Cell Technology"
|
||||
desc = "Design better, portable power cells for use in devices."
|
||||
id = "celltech"
|
||||
req_tech = list("powerstorage" = 2)
|
||||
|
||||
smestech
|
||||
name = "Super-Magnetic Energy Storage Technology"
|
||||
desc = "Design better, stationary power storage devices."
|
||||
id = "smestech"
|
||||
req_tech = list("powerstorage" = 3, "magnets" = 3)
|
||||
|
||||
//Major Branch: Biotechnology
|
||||
cybernetics
|
||||
name = "Cybernetic Technology"
|
||||
desc = "The development of advanced man/machine interfaces."
|
||||
id = "cybernetics"
|
||||
req_tech = list("biotech" = 3, "programming" = 3)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/***************************************************************
|
||||
** Design Datums **
|
||||
** All the data for building stuff and tracking reliability. **
|
||||
***************************************************************/
|
||||
|
||||
#define IMPRINTER 1 //For circuits.
|
||||
#define PROTOLATHE 2 //For stuff with reliability issues.
|
||||
#define AUTOLATHE 4 //For general use or 100% reliability items.
|
||||
|
||||
/datum/design //Datum for object designs, used in construction
|
||||
var
|
||||
name = "Name" //Name of the created object.
|
||||
id = "id" //ID of the created object for easy refernece. Alphanumeric, lower-case, no symbols
|
||||
req_tech = list() //IDs of that techs the object originated from and the minimum level requirements.
|
||||
reliability = 100 //Reliability of the device.
|
||||
build_type = PROTOLATHE //Flag as to what kind machine the design is built in. See defines.
|
||||
build_path = "" //The file path of the object that gets created.
|
||||
@@ -172,7 +172,7 @@
|
||||
var/changeling_level = 0
|
||||
var/list/absorbed_dna = list()
|
||||
var/changeling_fakedeath = 0
|
||||
var/chem_charges = 10.00
|
||||
var/chem_charges = 20.00
|
||||
var/sting_range = 1
|
||||
|
||||
|
||||
|
||||
@@ -829,4 +829,8 @@
|
||||
else
|
||||
dir = null
|
||||
return dir
|
||||
*/
|
||||
*/
|
||||
|
||||
//Makes sure MIDDLE is between LOW and HIGH. If not, it adjusts it. Returns the adjusted value.
|
||||
/proc/between(var/low, var/middle, var/high)
|
||||
return max(min(middle, high), low)
|
||||
@@ -2,9 +2,9 @@
|
||||
src.verbs += /client/proc/changeling_lesser_transform
|
||||
src.verbs += /client/proc/changeling_fakedeath
|
||||
|
||||
src.verbs += /client/proc/changeling_blind_dart
|
||||
src.verbs += /client/proc/changeling_deaf_dart
|
||||
src.verbs += /client/proc/changeling_silence_dart
|
||||
src.verbs += /client/proc/changeling_blind_sting
|
||||
src.verbs += /client/proc/changeling_deaf_sting
|
||||
src.verbs += /client/proc/changeling_silence_sting
|
||||
|
||||
src.changeling_level = 1
|
||||
return
|
||||
@@ -15,11 +15,11 @@
|
||||
src.verbs += /client/proc/changeling_lesser_form
|
||||
src.verbs += /client/proc/changeling_fakedeath
|
||||
|
||||
src.verbs += /client/proc/changeling_deaf_dart
|
||||
src.verbs += /client/proc/changeling_blind_dart
|
||||
src.verbs += /client/proc/changeling_paralysis_dart
|
||||
src.verbs += /client/proc/changeling_silence_dart
|
||||
src.verbs += /client/proc/changeling_transformation_dart
|
||||
src.verbs += /client/proc/changeling_deaf_sting
|
||||
src.verbs += /client/proc/changeling_blind_sting
|
||||
src.verbs += /client/proc/changeling_paralysis_sting
|
||||
src.verbs += /client/proc/changeling_silence_sting
|
||||
src.verbs += /client/proc/changeling_transformation_sting
|
||||
src.verbs += /client/proc/changeling_boost_range
|
||||
|
||||
src.changeling_level = 2
|
||||
@@ -38,16 +38,16 @@
|
||||
src.verbs -= /client/proc/changeling_lesser_form
|
||||
src.verbs -= /client/proc/changeling_lesser_transform
|
||||
src.verbs -= /client/proc/changeling_fakedeath
|
||||
src.verbs -= /client/proc/changeling_deaf_dart
|
||||
src.verbs -= /client/proc/changeling_blind_dart
|
||||
src.verbs -= /client/proc/changeling_paralysis_dart
|
||||
src.verbs -= /client/proc/changeling_silence_dart
|
||||
src.verbs -= /client/proc/changeling_deaf_sting
|
||||
src.verbs -= /client/proc/changeling_blind_sting
|
||||
src.verbs -= /client/proc/changeling_paralysis_sting
|
||||
src.verbs -= /client/proc/changeling_silence_sting
|
||||
src.verbs -= /client/proc/changeling_boost_range
|
||||
usr.verbs -= /client/proc/changeling_transformation_dart
|
||||
usr.verbs -= /client/proc/changeling_transformation_sting
|
||||
|
||||
/client/proc/changeling_absorb_dna()
|
||||
set category = "Changeling"
|
||||
set name = "Absorb DNA (5)"
|
||||
set name = "Absorb DNA"
|
||||
|
||||
if(usr.stat)
|
||||
usr << "\red Not when we are incapacitated."
|
||||
@@ -57,10 +57,6 @@
|
||||
usr << "\red We must be grabbing a creature in our active hand to absorb them."
|
||||
return
|
||||
|
||||
if(usr.chem_charges < 5)
|
||||
usr << "\red We don't have enough stored chemicals to do that!"
|
||||
return
|
||||
|
||||
var/obj/item/weapon/grab/G = usr.equipped()
|
||||
var/mob/M = G.affecting
|
||||
|
||||
@@ -72,7 +68,7 @@
|
||||
usr << "\red We must have a tighter grip to absorb this creature."
|
||||
return
|
||||
|
||||
usr.chem_charges -= 5
|
||||
usr.chem_charges += 5
|
||||
|
||||
var/mob/living/carbon/human/T = M
|
||||
|
||||
@@ -103,6 +99,8 @@
|
||||
T << "\red <B>You have been absorbed by the changeling!</B>"
|
||||
|
||||
usr.absorbed_dna[T.real_name] = T.dna
|
||||
if(usr.nutrition < 400) usr.nutrition = min((usr.nutrition + T.nutrition), 400)
|
||||
usr.chem_charges += 5
|
||||
|
||||
T.death(0)
|
||||
T.real_name = "Unknown"
|
||||
@@ -374,8 +372,8 @@
|
||||
|
||||
/client/proc/changeling_boost_range()
|
||||
set category = "Changeling"
|
||||
set name = "Boost Dart Range (10)"
|
||||
set desc="Boosts dart range by 1."
|
||||
set name = "Ranged Sting (10)"
|
||||
set desc="Your next sting ability can be used against targets 3 squares away."
|
||||
|
||||
if(usr.stat)
|
||||
usr << "\red Not when we are incapacitated."
|
||||
@@ -385,14 +383,10 @@
|
||||
usr << "\red We don't have enough stored chemicals to do that!"
|
||||
return
|
||||
|
||||
if(usr.sting_range >= 3)
|
||||
usr << "\red We can't boost the range anymore!"
|
||||
return
|
||||
|
||||
usr.chem_charges -= 10
|
||||
|
||||
usr << "\blue Your throat adjusts to launch the dart."
|
||||
usr.sting_range++
|
||||
usr << "\blue Your throat adjusts to launch the sting."
|
||||
usr.sting_range = 3
|
||||
|
||||
usr.verbs -= /client/proc/changeling_boost_range
|
||||
|
||||
@@ -401,10 +395,10 @@
|
||||
|
||||
return
|
||||
|
||||
/client/proc/changeling_silence_dart(mob/T as mob in oview(usr.sting_range))
|
||||
/client/proc/changeling_silence_sting(mob/T as mob in oview(usr.sting_range))
|
||||
set category = "Changeling"
|
||||
set name = "Silence Dart (10)"
|
||||
set desc="Sting target:"
|
||||
set name = "Silence sting (10)"
|
||||
set desc="Sting target"
|
||||
|
||||
if(usr.stat)
|
||||
usr << "\red Not when we are incapacitated."
|
||||
@@ -422,17 +416,17 @@
|
||||
|
||||
T.silent += 30
|
||||
|
||||
usr.verbs -= /client/proc/changeling_silence_dart
|
||||
usr.verbs -= /client/proc/changeling_silence_sting
|
||||
|
||||
spawn(5)
|
||||
usr.verbs += /client/proc/changeling_silence_dart
|
||||
usr.verbs += /client/proc/changeling_silence_sting
|
||||
|
||||
return
|
||||
|
||||
/client/proc/changeling_blind_dart(mob/T as mob in oview(usr.sting_range))
|
||||
/client/proc/changeling_blind_sting(mob/T as mob in oview(usr.sting_range))
|
||||
set category = "Changeling"
|
||||
set name = "Blind Dart (20)"
|
||||
set desc="Sting target:"
|
||||
set name = "Blind sting (20)"
|
||||
set desc="Sting target"
|
||||
|
||||
if(usr.stat)
|
||||
usr << "\red Not when we are incapacitated."
|
||||
@@ -465,16 +459,16 @@
|
||||
T.eye_blind = 10
|
||||
T.eye_blurry = 20
|
||||
|
||||
usr.verbs -= /client/proc/changeling_blind_dart
|
||||
usr.verbs -= /client/proc/changeling_blind_sting
|
||||
|
||||
spawn(5)
|
||||
usr.verbs += /client/proc/changeling_blind_dart
|
||||
usr.verbs += /client/proc/changeling_blind_sting
|
||||
|
||||
return
|
||||
|
||||
/client/proc/changeling_deaf_dart(mob/T as mob in oview(usr.sting_range))
|
||||
/client/proc/changeling_deaf_sting(mob/T as mob in oview(usr.sting_range))
|
||||
set category = "Changeling"
|
||||
set name = "Deaf Dart (5)"
|
||||
set name = "Deaf sting (5)"
|
||||
set desc="Sting target:"
|
||||
|
||||
if(usr.stat)
|
||||
@@ -494,17 +488,17 @@
|
||||
spawn(300)
|
||||
T.sdisabilities &= ~4
|
||||
|
||||
usr.verbs -= /client/proc/changeling_deaf_dart
|
||||
usr.verbs -= /client/proc/changeling_deaf_sting
|
||||
|
||||
spawn(5)
|
||||
usr.verbs += /client/proc/changeling_deaf_dart
|
||||
usr.verbs += /client/proc/changeling_deaf_sting
|
||||
|
||||
return
|
||||
|
||||
/client/proc/changeling_paralysis_dart(mob/T as mob in oview(usr.sting_range))
|
||||
/client/proc/changeling_paralysis_sting(mob/T as mob in oview(usr.sting_range))
|
||||
set category = "Changeling"
|
||||
set name = "Paralysis Dart (30)"
|
||||
set desc="Sting target:"
|
||||
set name = "Paralysis sting (30)"
|
||||
set desc="Sting target"
|
||||
|
||||
if(usr.stat)
|
||||
usr << "\red Not when we are incapacitated."
|
||||
@@ -523,17 +517,17 @@
|
||||
if (T.reagents)
|
||||
T.reagents.add_reagent("zombiepowder", 20)
|
||||
|
||||
usr.verbs -= /client/proc/changeling_paralysis_dart
|
||||
usr.verbs -= /client/proc/changeling_paralysis_sting
|
||||
|
||||
spawn(5)
|
||||
usr.verbs += /client/proc/changeling_paralysis_dart
|
||||
usr.verbs += /client/proc/changeling_paralysis_sting
|
||||
|
||||
return
|
||||
|
||||
/client/proc/changeling_transformation_dart(mob/T as mob in oview(usr.sting_range))
|
||||
/client/proc/changeling_transformation_sting(mob/T as mob in oview(usr.sting_range))
|
||||
set category = "Changeling"
|
||||
set name = "Transformation Dart (30)"
|
||||
set desc="Sting target:"
|
||||
set name = "Transformation sting (30)"
|
||||
set desc="Sting target"
|
||||
|
||||
if(usr.stat)
|
||||
usr << "\red Not when we are incapacitated."
|
||||
@@ -564,9 +558,9 @@
|
||||
updateappearance(T, T.dna.uni_identity)
|
||||
domutcheck(T, null)
|
||||
|
||||
usr.verbs -= /client/proc/changeling_transformation_dart
|
||||
usr.verbs -= /client/proc/changeling_transformation_sting
|
||||
|
||||
spawn(5)
|
||||
usr.verbs += /client/proc/changeling_transformation_dart
|
||||
usr.verbs += /client/proc/changeling_transformation_sting
|
||||
|
||||
return
|
||||
@@ -78,7 +78,7 @@ datum/controller/game_controller
|
||||
M.Life()
|
||||
if (M.mind)
|
||||
if (M.mind.special_role == "Changeling")
|
||||
M.chem_charges = max(min((M.chem_charges+0.25), 50), 0)
|
||||
M.chem_charges = between(0, (max((0.9 - (M.chem_charges / 50)), 0.1) + M.chem_charges), 50)
|
||||
sleep(-1)
|
||||
|
||||
for(var/datum/disease/D in active_diseases)
|
||||
|
||||
390
code/game/research/designs.dm
Normal file
390
code/game/research/designs.dm
Normal file
@@ -0,0 +1,390 @@
|
||||
/***************************************************************
|
||||
** Design Datums **
|
||||
** All the data for building stuff and tracking reliability. **
|
||||
***************************************************************/
|
||||
/*
|
||||
For the materials datum, it assumes you need reagents unless specified otherwise. To designate a material that isn't a reagent,
|
||||
you use one of the material IDs below. These are NOT ids in the usual sense (they aren't defined in the object or part of a datum),
|
||||
they are simply references used as part of a "has materials?" type proc. They all start with a $ to denote that they aren't reagents.
|
||||
The currently supporting non-reagent materials:
|
||||
- $metal (/obj/item/stack/metal). One sheet = 3750 units.
|
||||
- $glass (/obj/item/stack/metal). One sheet = 3750 units.
|
||||
(Insert new ones here)
|
||||
|
||||
Don't add new keyword/IDs if they are made from an existing one (such as rods which are made from metal). Only add raw materials.
|
||||
|
||||
Reliabilitity Guidelines:
|
||||
- The more dangerous the malfunctions are, the higher the base reliabliity (otherwise, people will just skip that tech).
|
||||
- High base reliability = High material cost; Low base reliability = Low material cost.
|
||||
|
||||
*/
|
||||
#define IMPRINTER 1 //For circuits.
|
||||
#define PROTOLATHE 2 //For stuff with reliability issues.
|
||||
#define AUTOLATHE 4 //For general use or 100% reliability items.
|
||||
//Note: More then one of these can be added to a design but it isn't suggested.
|
||||
|
||||
datum
|
||||
design //Datum for object designs, used in construction
|
||||
var
|
||||
name = "Name" //Name of the created object.
|
||||
desc = "Desc" //Description of the created object.
|
||||
id = "id" //ID of the created object for easy refernece. Alphanumeric, lower-case, no symbols
|
||||
list/req_tech = list() //IDs of that techs the object originated from and the minimum level requirements.
|
||||
reliability = 100 //Reliability of the device.
|
||||
build_type = null //Flag as to what kind machine the design is built in. See defines.
|
||||
list/materials = list() //List of materials. Format: "id" = amount.
|
||||
build_path = "" //The file path of the object that gets created
|
||||
|
||||
seccamera
|
||||
name = "Circuit Design (Security)"
|
||||
desc = "Allows for the construction of circuit boards used to build security camera computers."
|
||||
id = "seccamera"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/security"
|
||||
|
||||
aicore
|
||||
name = "Circuit Design (AI Core)"
|
||||
desc = "Allows for the construction of circuit boards used to build new AI cores."
|
||||
id = "aicore"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/aicore"
|
||||
|
||||
aiupload
|
||||
name = "Circuit Design (AI Upload)"
|
||||
desc = "Allows for the construction of circuit boards used to build an AI Upload Console."
|
||||
id = "aiupload"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/aiupload"
|
||||
|
||||
med_data
|
||||
name = "Circuit Design (Medical Records)"
|
||||
desc = "Allows for the construction of circuit boards used to build a medical records console."
|
||||
id = "med_data"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/med_data"
|
||||
|
||||
pandemic
|
||||
name = "Circuit Design (PanD.E.M.I.C. 2200)"
|
||||
desc = "Allows for the construction of circuit boards used to build a PanD.E.M.I.C. 2200 console."
|
||||
id = "pandemic"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/pandemic"
|
||||
|
||||
scan_console
|
||||
name = "Circuit Design (DNA Machine)"
|
||||
desc = "Allows for the construction of circuit boards used to build a new DNA scanning console."
|
||||
id = "scan_console"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/machinery/scan_consolenew"
|
||||
|
||||
comconsole
|
||||
name = "Circuit Design (Communications)"
|
||||
desc = "Allows for the construction of circuit boards used to build a communications console."
|
||||
id = "comconsole"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/communications"
|
||||
|
||||
idcardconsole
|
||||
name = "Circuit Design (ID Computer)"
|
||||
desc = "Allows for the construction of circuit boards used to build an ID computer."
|
||||
id = "idcardconsole"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/card"
|
||||
|
||||
teleconsole
|
||||
name = "Circuit Design (Teleporter Console)"
|
||||
desc = "Allows for the construction of circuit boards used to build a teleporter control console."
|
||||
id = "teleconsole"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/teleporter"
|
||||
|
||||
secdata
|
||||
name = "Circuit Design (Security Records Console)"
|
||||
desc = "Allows for the construction of circuit boards used to build a security records console."
|
||||
id = "secdata"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/secure_data"
|
||||
|
||||
atmosalerts
|
||||
name = "Circuit Design (Atmosphere Alerts Console)"
|
||||
desc = "Allows for the construction of circuit boards used to build an atmosphere alert console.."
|
||||
id = "atmosalerts"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/atmosphere/alerts"
|
||||
|
||||
air_management
|
||||
name = "Circuit Design (Atmospheric Monitor)"
|
||||
desc = "Allows for the construction of circuit boards used to build an Atmospheric Monitor."
|
||||
id = "air_management"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/general_air_control"
|
||||
|
||||
general_alert
|
||||
name = "Circuit Design (General Alert Console)"
|
||||
desc = "Allows for the construction of circuit boards used to build a General Alert console."
|
||||
id = "general_alert"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/general_alert"
|
||||
|
||||
robocontrol
|
||||
name = "Circuit Design (Robotics Control Console)"
|
||||
desc = "Allows for the construction of circuit boards used to build a Robotics Control console."
|
||||
id = "robocontrol"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/robotics"
|
||||
|
||||
clonecontrol
|
||||
name = "Circuit Design (Cloning Machine Console)"
|
||||
desc = "Allows for the construction of circuit boards used to build a new Cloning Machine console."
|
||||
id = "clonecontrol"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/cloning"
|
||||
|
||||
arcademachine
|
||||
name = "Circuit Design (Arcade Machine)"
|
||||
desc = "Allows for the construction of circuit boards used to build a new arcade machine."
|
||||
id = "arcademachine"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/arcade"
|
||||
|
||||
powermonitor
|
||||
name = "Circuit Design (Power Monitor)"
|
||||
desc = "Allows for the construction of circuit boards used to build a new power monitor"
|
||||
id = "powermonitor"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/machinery/power/monitor"
|
||||
|
||||
prisonmanage
|
||||
name = "Circuit Design (Prisoner Management Console)"
|
||||
desc = "Allows for the construction of circuit boards used to build a prisoner management console."
|
||||
id = "prisonmanage"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/prisoner"
|
||||
|
||||
///////////////////////////////////
|
||||
//////////AI Module Disks//////////
|
||||
///////////////////////////////////
|
||||
safeguard_module
|
||||
name = "Module Design (Safeguard)"
|
||||
desc = "Allows for the construction of a Safeguard AI Module."
|
||||
id = "safeguard_module"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/aiModule/safeguard"
|
||||
|
||||
onehuman_module
|
||||
name = "Module Design (OneHuman)"
|
||||
desc = "Allows for the construction of a OneHuman AI Module."
|
||||
id = "onehuman_module"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/aiModule/oneHuman"
|
||||
|
||||
protectstation_module
|
||||
name = "Module Design (ProtectStation)"
|
||||
desc = "Allows for the construction of a ProtectStation AI Module."
|
||||
id = "protectstation_module"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/aiModule/protectStation"
|
||||
|
||||
notele_module
|
||||
name = "Module Design (TeleporterOffline Module)"
|
||||
desc = "Allows for the construction of a TeleporterOffline AI Module."
|
||||
id = "notele_module"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
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()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/aiModule/quarantine"
|
||||
|
||||
oxygen_module
|
||||
name = "Module Design (OxygenIsToxicToHumans)"
|
||||
desc = "Allows for the construction of a Safeguard AI Module."
|
||||
id = "oxygen_module"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/aiModule/oxygen"
|
||||
|
||||
freeform_module
|
||||
name = "Module Design (Freeform)"
|
||||
desc = "Allows for the construction of a Freeform AI Module."
|
||||
id = "freeform_module"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/aiModule/freeform"
|
||||
|
||||
reset_module
|
||||
name = "Module Design (Reset)"
|
||||
desc = "Allows for the construction of a Reset AI Module."
|
||||
id = "reset_module"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/aiModule/reset"
|
||||
|
||||
purge_module
|
||||
name = "Module Design (Purge)"
|
||||
desc = "Allows for the construction of a Purge AI Module."
|
||||
id = "purge_module"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/aiModule/purge"
|
||||
|
||||
freeformcore_module
|
||||
name = "Core Module Design (Freeform)"
|
||||
desc = "Allows for the construction of a Freeform AI Core Module."
|
||||
id = "freeformcore_module"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/aiModule/freeformcore"
|
||||
|
||||
asimov
|
||||
name = "Core Module Design (Asimov)"
|
||||
desc = "Allows for the construction of a Asimov AI Core Module."
|
||||
id = "asimov_module"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/aiModule/asimov"
|
||||
|
||||
paladin_module
|
||||
name = "Core Module Design (P.A.L.A.D.I.N.)"
|
||||
desc = "Allows for the construction of a P.A.L.A.D.I.N. AI Core Module."
|
||||
id = "paladin_module"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/aiModule/paladin"
|
||||
|
||||
tyrant_module
|
||||
name = "Core Module Design (T.Y.R.A.N.T.)"
|
||||
desc = "Allows for the construction of a T.Y.R.A.N.T. AI Module."
|
||||
id = "tyrant_module"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/weapon/aiModule/tyrant"
|
||||
|
||||
///////////////////////////////////
|
||||
//////////Mecha Module Disks///////
|
||||
///////////////////////////////////
|
||||
|
||||
ripley_main
|
||||
name = "Circuit Design (APLU \"Ripley\" Central Control module)"
|
||||
desc = "Allows for the construction of a Safeguard AI Module."
|
||||
id = "ripley_main"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/mecha_parts/circuitboard/ripley/main"
|
||||
|
||||
ripley_peri
|
||||
name = "Circuit Design (APLU \"Ripley\" Peripherals Control module)"
|
||||
desc = "Allows for the construction of a Safeguard AI Module."
|
||||
id = "ripley_peri"
|
||||
req_tech = list()
|
||||
reliability = 100
|
||||
build_type = IMPRINTER
|
||||
materials = list("$metal" = 2000, "acid" = 20)
|
||||
build_path = "/obj/item/mecha_parts/circuitboard/ripley/peripherals"
|
||||
|
||||
|
||||
////////////////////////////////////////
|
||||
//Disks for transporting design datums//
|
||||
////////////////////////////////////////
|
||||
|
||||
/obj/item/weapon/disk/design_disk
|
||||
name = "Component Design Disk"
|
||||
desc = "A disk for storing device design data for construction in lathes."
|
||||
icon = 'cloning.dmi'
|
||||
icon_state = "datadisk2"
|
||||
item_state = "card-id"
|
||||
w_class = 1.0
|
||||
var/datum/design/blueprint
|
||||
New()
|
||||
src.pixel_x = rand(-5.0, 5)
|
||||
src.pixel_y = rand(-5.0, 5)
|
||||
181
code/game/research/rdconsole.dm
Normal file
181
code/game/research/rdconsole.dm
Normal file
@@ -0,0 +1,181 @@
|
||||
/obj/machinery/computer/rdconsole
|
||||
name = "R&D Console"
|
||||
icon_state = "rdcomp"
|
||||
var
|
||||
datum/research/files
|
||||
obj/item/weapon/disk/tech_disk/t_disk = null
|
||||
obj/item/weapon/disk/design_disk/d_disk = null
|
||||
|
||||
screen = 1.0 //1 = MAIN,
|
||||
|
||||
New()
|
||||
files = new /datum/research(src)
|
||||
|
||||
meteorhit()
|
||||
del(src)
|
||||
return
|
||||
|
||||
blob_act()
|
||||
if (prob(50))
|
||||
del(src)
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
del(src)
|
||||
return
|
||||
|
||||
attackby(var/obj/item/weapon/disk/D as obj, var/mob/user as mob)
|
||||
if(istype(D, /obj/item/weapon/disk/tech_disk))
|
||||
if(t_disk)
|
||||
user << "A disk is already loaded into the machine."
|
||||
return
|
||||
t_disk = D
|
||||
else if (istype(D, /obj/item/weapon/disk/design_disk))
|
||||
if(d_disk)
|
||||
user << "A disk is already loaded into the machine."
|
||||
return
|
||||
d_disk = D
|
||||
user.drop_item()
|
||||
D.loc = src
|
||||
user << "You add the disk to the machine!"
|
||||
src.updateUsrDialog()
|
||||
//Insert icon change here.
|
||||
|
||||
Topic(href, href_list)
|
||||
if(stat & BROKEN) return
|
||||
if(usr.stat || usr.restrained()) return
|
||||
if(!in_range(src, usr)) return
|
||||
|
||||
add_fingerprint(usr)
|
||||
|
||||
usr.machine = src
|
||||
if(href_list["menu"])
|
||||
screen = text2num(href_list["menu"])
|
||||
|
||||
else if(href_list["updt_tech"])
|
||||
screen = 0.0
|
||||
spawn(50)
|
||||
screen = 3.0
|
||||
files.AddTech2Known(t_disk.stored)
|
||||
updateUsrDialog()
|
||||
|
||||
else if(href_list["clear_tech"])
|
||||
t_disk.stored = null
|
||||
|
||||
else if(href_list["eject_tech"])
|
||||
t_disk:loc = src.loc
|
||||
t_disk = null
|
||||
screen = 1.0
|
||||
|
||||
else if(href_list["copy_tech"])
|
||||
for(var/datum/tech/T in files.known_tech)
|
||||
if(href_list["copy_tech_ID"] == T.id)
|
||||
t_disk.stored = T
|
||||
break
|
||||
screen = 3.0
|
||||
|
||||
else if(href_list["clear_design"])
|
||||
d_disk.blueprint = null
|
||||
|
||||
else if(href_list["eject_design"])
|
||||
d_disk:loc = src.loc
|
||||
d_disk = null
|
||||
screen = 1.0
|
||||
|
||||
else if(href_list["copy_design"])
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
if(href_list["copy_design_ID"] == D.id)
|
||||
d_disk.blueprint = D
|
||||
break
|
||||
screen = 4.0
|
||||
|
||||
updateUsrDialog()
|
||||
|
||||
attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
user.machine = src
|
||||
var/dat = ""
|
||||
switch(screen)
|
||||
if(0.0)
|
||||
dat += "Updating Database...."
|
||||
if(1.0) //Main Menu
|
||||
dat += "Main Menu:<BR><BR>"
|
||||
dat += "<A href='?src=\ref[src];menu=2.0'>Current Research Levels</A><BR>"
|
||||
if(t_disk) dat += "<A href='?src=\ref[src];menu=3.0'>Disk Operations</A><BR>"
|
||||
else if(d_disk) dat += "<A href='?src=\ref[src];menu=4.0'>Disk Operations</A><BR>"
|
||||
else dat += "(Please Insert Disk)<BR>"
|
||||
|
||||
if(2.0) //Research viewer
|
||||
dat += "Current Research Levels:<BR><BR>"
|
||||
for(var/datum/tech/T in files.known_tech)
|
||||
dat += "[T.name]<BR>"
|
||||
dat += "* Level: [T.level]<BR>"
|
||||
dat += "* Summary: [T.desc]<HR>"
|
||||
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A>"
|
||||
|
||||
if(3.0) //Technology Disk Menu
|
||||
dat += "Disk Contents: (Technology Data Disk)<BR><BR>"
|
||||
if(t_disk.stored == null)
|
||||
dat += "The disk has no data stored on it.<HR>"
|
||||
dat += "Operations: "
|
||||
dat += "<A href='?src=\ref[src];menu=3.1'>Load Tech to Disk</A> || "
|
||||
else
|
||||
dat += "Name: [t_disk.stored.name]<BR>"
|
||||
dat += "Level: [t_disk.stored.level]<BR>"
|
||||
dat += "Description: [t_disk.stored.desc]<HR>"
|
||||
dat += "Operations: "
|
||||
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><HR>"
|
||||
dat += "<BR><A href='?src=\ref[src];menu=1.0'>Main Menu</A>"
|
||||
if(3.1) //Technology Disk submenu
|
||||
dat += "Load Technology to Disk:<BR><BR>"
|
||||
for(var/datum/tech/T in files.known_tech)
|
||||
dat += "[T.name] "
|
||||
dat += "<A href='?src=\ref[src];copy_tech=1;copy_tech_ID=[T.id]'>(Copy to Disk)</A><BR>"
|
||||
dat += "<HR><BR><A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
|
||||
dat += "<A href='?src=\ref[src];menu=3.0'>Return to Disk Operations</A>"
|
||||
|
||||
if(4.0) //Design Disk menu.
|
||||
if(d_disk.blueprint == null)
|
||||
dat += "The disk has no data stored on it.<HR>"
|
||||
dat += "Operations: "
|
||||
dat += "<A href='?src=\ref[src];menu=4.1'>Load Design to Disk</A> || "
|
||||
else
|
||||
dat += "Name: [d_disk.blueprint.name]<BR>"
|
||||
dat += "Level: [between(0, (d_disk.blueprint.reliability + rand(-15,15)), 100)]<BR>"
|
||||
switch(d_disk.blueprint.build_type)
|
||||
if(IMPRINTER) dat += "Lathe Type: Circuit Imprinter<BR>"
|
||||
if(PROTOLATHE) dat += "Lathe Type: Proto-lathe<BR>"
|
||||
if(AUTOLATHE) dat += "Lathe Type: Auto-lathe<BR>"
|
||||
dat += "Required Materials:<BR>"
|
||||
for(var/M in d_disk.blueprint.materials)
|
||||
if(copytext(M, 1, 2) == "$") dat += "* [copytext(M, 2)] x [d_disk.blueprint.materials[M]]<BR>"
|
||||
else dat += "* [M] x [d_disk.blueprint.materials[M]]<BR>"
|
||||
dat += "<HR>Operations: "
|
||||
dat += "<A href='?src=\ref[src];clear_design=1'>Clear Disk</A> || "
|
||||
dat += "<A href='?src=\ref[src];eject_design=1'>Eject Disk</A><HR>"
|
||||
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A>"
|
||||
if(4.1) //Technology disk submenu
|
||||
dat += "Load Design to Disk:<BR><BR>"
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
dat += "[D.name] "
|
||||
dat += "<A href='?src=\ref[src];copy_design=1;copy_design_ID=[D.id]'>(Copy to Disk)</A><BR>"
|
||||
dat += "<HR><A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
|
||||
dat += "<A href='?src=\ref[src];menu=3.0'>Return to Disk Operations</A>"
|
||||
|
||||
|
||||
user << browse("<TITLE>Research and Development Console</TITLE><HR>[dat]", "window=rdconsole;size=575x400")
|
||||
onclose(user, "rdconsole")
|
||||
227
code/game/research/research.dm
Normal file
227
code/game/research/research.dm
Normal file
@@ -0,0 +1,227 @@
|
||||
/***************************************************************
|
||||
Science Research and Development System (Designed and Developed by the /tg/station crew)
|
||||
|
||||
*insert stuff here later*
|
||||
|
||||
*****************************************
|
||||
|
||||
Integrating Objects into the Science Research and Development System
|
||||
|
||||
First of all, the root /obj/ define has to have two variables added to it if it doesn't have them already:
|
||||
var/list/origin_tech = list()
|
||||
var/reliability = 100
|
||||
|
||||
* The origin_tech list is a list of all the technolgies (by ID) and their level at the time the object was created (format: "ID" = #).
|
||||
If an object can't be reversed engineered, you're just going to leave this variable alone.
|
||||
* The relability var is the reliability of an object before tech modifiers. Items that start spawned and items that aren't part of the
|
||||
R&D system should just leave the reliability var at 100 and ignore it. Otherwise, you'll want to adjust it down based on the
|
||||
pre-technology-modifier reliability you want for the object. You'd also want to add some sort of mechanic that deals with that
|
||||
var as well.
|
||||
*SPECIAL NOTE: For non-carriable objects that you can deconstruct into RE'able parts, make sure to include some way of passing on
|
||||
the data from the components to the finished procuct and back again.
|
||||
|
||||
***************************************************************/
|
||||
|
||||
/*
|
||||
To Do List:
|
||||
- Need stuff to research!
|
||||
- Add various vars to base /obj/ type to list what techs were required to make it. Also add malfuction variables.
|
||||
|
||||
*/
|
||||
|
||||
/***************************************************************
|
||||
** Master Types **
|
||||
** Includes all the helper procs and basic tech processing. **
|
||||
***************************************************************/
|
||||
|
||||
/datum/research //Holder for all the existing, archived, and known tech. Individual to console.
|
||||
var
|
||||
list //Datum/tech go here.
|
||||
possible_tech = list() //List of all tech in the game that players have access to (barring special events).
|
||||
known_tech = list() //List of locally known tech.
|
||||
possible_designs = list() //List of all designs (at base reliability).
|
||||
known_designs = list() //List of available designs (at base reliability).
|
||||
|
||||
New() //Insert techs into possible_tech here. Known_tech automatically updated.
|
||||
for(var/T in typesof(/datum/tech) - /datum/tech)
|
||||
possible_tech += new T(src)
|
||||
for(var/D in typesof(/datum/design) - /datum/design)
|
||||
possible_designs += new D(src)
|
||||
RefreshResearch()
|
||||
|
||||
proc
|
||||
|
||||
//Checks to see if tech has all the required pre-reqs.
|
||||
//Input: datum/tech; Output: 0/1 (false/true)
|
||||
TechHasReqs(var/datum/tech/T)
|
||||
if(T.req_tech.len == 0)
|
||||
return 1
|
||||
var/matches = 0
|
||||
for(var/req in T.req_tech)
|
||||
for(var/datum/tech/known in known_tech)
|
||||
if(req == known && T.req_tech[req] <= known_tech[known])
|
||||
matches++
|
||||
if(matches == T.req_tech.len)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
//Checks to see if design has all the required pre-reqs.
|
||||
//Input: datum/design; Output: 0/1 (false/true)
|
||||
DesignHasReqs(var/datum/design/D)
|
||||
if(D.req_tech.len == 0)
|
||||
return 1
|
||||
var/matches
|
||||
for(var/req in D.req_tech)
|
||||
for(var/datum/tech/known in known_tech)
|
||||
if(req == known && D.req_tech[req] <= known_tech[known])
|
||||
matches++
|
||||
if(matches == D.req_tech.len)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
//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
|
||||
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
|
||||
known_tech += T
|
||||
RefreshResearch()
|
||||
return
|
||||
|
||||
AddDesign2Known(var/datum/design/D)
|
||||
for(var/datum/design/known in known_designs)
|
||||
if(D.id == known.id)
|
||||
if(D.reliability > known.reliability)
|
||||
known.reliability = D.reliability
|
||||
return
|
||||
known_designs += D
|
||||
RefreshResearch()
|
||||
return
|
||||
|
||||
//Refreshes known_tech list with entries in archived and possible techs.
|
||||
//Input/Output: n/a
|
||||
RefreshResearch()
|
||||
for(var/datum/tech/PT in possible_tech - known_tech)
|
||||
if(TechHasReqs(PT))
|
||||
AddTech2Known(PT)
|
||||
for(var/datum/design/PD in possible_designs - known_designs)
|
||||
if(DesignHasReqs(PD))
|
||||
AddDesign2Known(PD)
|
||||
return
|
||||
|
||||
//Finds the reliability of a given object based on it's base reliablity and related technologies.
|
||||
//Input: Object; Output: Number
|
||||
//CompositeReliability() //Saving until I get a better idea of how reliability should calculate.
|
||||
|
||||
|
||||
|
||||
/***************************************************************
|
||||
** Technology Datums **
|
||||
** Includes all the various technoliges and what they make. **
|
||||
***************************************************************/
|
||||
|
||||
datum
|
||||
tech //Datum of individual technologies.
|
||||
var
|
||||
name = "name" //Name of the technology.
|
||||
desc = "description" //General description of what it does and what it makes.
|
||||
id = "id" //An easily referenced ID. Must be alphanumeric, lower-case, and no symbols.
|
||||
level = 1 //A simple number scale of the research level. Level 0 = Secret tech.
|
||||
list/req_tech = list() //List of ids associated values of techs required to research this tech. "id" = #
|
||||
|
||||
|
||||
//Trunk Technologies (don't actually build anything and don't require any other techs).
|
||||
|
||||
materials
|
||||
name = "Materials Research"
|
||||
desc = "Development of new and improved materials."
|
||||
id = "materials"
|
||||
|
||||
plasmatech
|
||||
name = "Plasma Research"
|
||||
desc = "Research into the mysterious substance colloqually known as 'plasma'"
|
||||
id = "plasmatech"
|
||||
|
||||
powerstorage
|
||||
name = "Power Storage Technology"
|
||||
desc = "The various technologies behind the storage of electicity."
|
||||
id = "powerstorage"
|
||||
|
||||
bluespace
|
||||
name = "'Blue-space' Research"
|
||||
desc = "Research into the sub-reality known as 'blue-space'"
|
||||
id = "bluespace"
|
||||
|
||||
biotech
|
||||
name = "Biological Technology"
|
||||
desc = "Research into the deeper mysteries of life and organic substances."
|
||||
id = "biotech"
|
||||
|
||||
magnets
|
||||
name = "Electromagnetic Spectrum Research"
|
||||
desc = "Research into the electromagnetic spectrum. No clue how they actually work, though."
|
||||
id = "magnets"
|
||||
|
||||
programming
|
||||
name = "Data Theory Research"
|
||||
desc = "The development of new computer and artificial intelligence systems."
|
||||
id = "programming"
|
||||
|
||||
syndicate
|
||||
name = "Illegal Technologies Research"
|
||||
desc = "The study of technologies that violate Nanotrassen regulations."
|
||||
id = "syndicate"
|
||||
|
||||
//Branch Techs
|
||||
metaltech
|
||||
name = "Metallurgy Research"
|
||||
desc = "Development of new and improved metal alloys for different purposes."
|
||||
id = "metaltech"
|
||||
req_tech = list("materials" = 2)
|
||||
|
||||
glasstech
|
||||
name = "Transparent Material Research"
|
||||
desc = "Development of new and stronger transparent materials (glass, crystal, transparent aluminum, etc)."
|
||||
id = "glasstech"
|
||||
req_tech = list("materials" = 2)
|
||||
|
||||
explosives
|
||||
name = "Explosives Research"
|
||||
desc = "The creation and application of explosive materials."
|
||||
id = "explosives"
|
||||
req_tech = list("materials" = 3)
|
||||
|
||||
generators
|
||||
name = "Power Generation Technology"
|
||||
desc = "Research into more powerful and more reliable sources."
|
||||
id = "generators"
|
||||
req_tech = list("powerstorage" = 2)
|
||||
|
||||
smestech
|
||||
name = "Super-Magnetic Energy Storage Technology"
|
||||
desc = "Design better, stationary power storage devices."
|
||||
id = "smestech"
|
||||
req_tech = list("powerstorage" = 3, "magnets" = 3)
|
||||
|
||||
cybernetics
|
||||
name = "Cybernetic Technology"
|
||||
desc = "The development of advanced man/machine interfaces."
|
||||
id = "cybernetics"
|
||||
req_tech = list("biotech" = 3, "programming" = 3)
|
||||
|
||||
/obj/item/weapon/disk/tech_disk
|
||||
name = "Technology Disk"
|
||||
desc = "A disk for storing technology data for further research."
|
||||
icon = 'cloning.dmi'
|
||||
icon_state = "datadisk2"
|
||||
item_state = "card-id"
|
||||
w_class = 1.0
|
||||
var/datum/tech/stored
|
||||
New()
|
||||
src.pixel_x = rand(-5.0, 5)
|
||||
src.pixel_y = rand(-5.0, 5)
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 39 KiB |
@@ -75,6 +75,7 @@
|
||||
#define FILE_DIR "code/game/objects/spawners"
|
||||
#define FILE_DIR "code/game/objects/stacks"
|
||||
#define FILE_DIR "code/game/objects/storage"
|
||||
#define FILE_DIR "code/game/research"
|
||||
#define FILE_DIR "code/game/spacecraft"
|
||||
#define FILE_DIR "code/game/verbs"
|
||||
#define FILE_DIR "code/modules"
|
||||
@@ -211,7 +212,6 @@
|
||||
#include "code\datums\spells\magic_missile.dm"
|
||||
#include "code\datums\spells\mutate.dm"
|
||||
#include "code\datums\spells\teleport.dm"
|
||||
#include "code\datums\technology\technology.dm"
|
||||
#include "code\defines\atom.dm"
|
||||
#include "code\defines\client.dm"
|
||||
#include "code\defines\global.dm"
|
||||
@@ -564,6 +564,9 @@
|
||||
#include "code\game\objects\storage\kit.dm"
|
||||
#include "code\game\objects\storage\storage.dm"
|
||||
#include "code\game\objects\storage\toolbox.dm"
|
||||
#include "code\game\research\designs.dm"
|
||||
#include "code\game\research\rdconsole.dm"
|
||||
#include "code\game\research\research.dm"
|
||||
#include "code\game\spacecraft\manufacturing.dm"
|
||||
#include "code\game\spacecraft\shipcore.dm"
|
||||
#include "code\game\spacecraft\syndicatebeacon.dm"
|
||||
|
||||
Reference in New Issue
Block a user