Makes Circuits Make Their Own Research Designs

Circuits generate a research design datum when the game starts up instead of me having to manually define them every time I make a new circuit.  Hopefully this reduces missing circuits due to mistakes.  The circuit box also spawns specific circuits using a similar method for similar reasons.

Other things this does:
Splits the reagent related manipulation circuits to their own category, which cleans up a few repeated New()s.
This commit is contained in:
Neerti
2016-12-30 02:41:11 -05:00
parent ee9b49ce89
commit cefd8029f7
16 changed files with 292 additions and 630 deletions
@@ -5,6 +5,15 @@
#define DATA_CHANNEL "data channel"
#define PULSE_CHANNEL "pulse channel"
#define IC_SPAWN_DEFAULT 1 // If the circuit comes in the default circuit box.
#define IC_SPAWN_RESEARCH 2 // If the circuit design will be autogenerated for RnD.
var/list/all_integrated_circuits = list()
/proc/initialize_integrated_circuits_list()
for(var/thing in typesof(/obj/item/integrated_circuit))
all_integrated_circuits += new thing()
/obj/item/integrated_circuit
name = "integrated circuit"
desc = "It's a tiny chip! This one doesn't seem to do much, however."
@@ -18,7 +27,8 @@
var/next_use = 0 //Uses world.time
var/complexity = 1 //This acts as a limitation on building machines, more resource-intensive components cost more 'space'.
var/cooldown_per_use = 1 SECOND
var/category = /obj/item/integrated_circuit // Used by the toolsets to filter out category types
var/spawn_flags = null // Used for world initializing, see the #defines above.
var/category_text = "NO CATEGORY" // To show up on circuit printer, and perhaps other places.
/obj/item/integrated_circuit/examine(mob/user)
..()