mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-06 07:22:42 +00:00
Merge pull request #2880 from Neerti/12/29/2016_circuit_autoresearch
Makes Circuits Make Their Own Research Designs
This commit is contained in:
@@ -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)
|
||||
..()
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
inputs = list("A","B","C","D","E","F","G","H")
|
||||
outputs = list("result")
|
||||
activators = list("compute")
|
||||
category = /obj/item/integrated_circuit/arithmetic
|
||||
category_text = "Arithmetic"
|
||||
|
||||
// +Adding+ //
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
result = ((((A + B) + C) + D) ... ) and so on, until all pins have been added. \
|
||||
Null pins are ignored."
|
||||
icon_state = "addition"
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/arithmetic/addition/do_work()
|
||||
var/result = 0
|
||||
@@ -36,6 +37,7 @@
|
||||
result = ((((A - B) - C) - D) ... ) and so on, until all pins have been subtracted. \
|
||||
Null pins are ignored. Pin A <b>must</b> be a number or the circuit will not function."
|
||||
icon_state = "subtraction"
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/arithmetic/subtraction/do_work()
|
||||
var/datum/integrated_io/A = inputs[1]
|
||||
@@ -63,6 +65,7 @@
|
||||
result = ((((A * B) * C) * D) ... ) and so on, until all pins have been multiplied. \
|
||||
Null pins are ignored. Pin A <b>must</b> be a number or the circuit will not function."
|
||||
icon_state = "multiplication"
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
|
||||
/obj/item/integrated_circuit/arithmetic/multiplication/do_work()
|
||||
@@ -90,6 +93,7 @@
|
||||
result = ((((A / B) / C) / D) ... ) and so on, until all pins have been divided. \
|
||||
Null pins, and pins containing 0, are ignored. Pin A <b>must</b> be a number or the circuit will not function."
|
||||
icon_state = "division"
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/arithmetic/division/do_work()
|
||||
var/datum/integrated_io/A = inputs[1]
|
||||
@@ -115,6 +119,7 @@
|
||||
desc = "Outputs A to the power of B."
|
||||
icon_state = "exponent"
|
||||
inputs = list("A", "B")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/arithmetic/exponent/do_work()
|
||||
var/result = 0
|
||||
@@ -135,6 +140,7 @@
|
||||
extended_desc = "Will output 1, -1, or 0, depending on if A is a postive number, a negative number, or zero, respectively."
|
||||
icon_state = "sign"
|
||||
inputs = list("A")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/arithmetic/sign/do_work()
|
||||
var/result = 0
|
||||
@@ -159,6 +165,7 @@
|
||||
extended_desc = "If B is not given a number, it will output the floor of A instead."
|
||||
icon_state = "round"
|
||||
inputs = list("A", "B")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/arithmetic/round/do_work()
|
||||
var/result = 0
|
||||
@@ -182,6 +189,7 @@
|
||||
desc = "This outputs a non-negative version of the number you put in. This may also be thought of as its distance from zero."
|
||||
icon_state = "absolute"
|
||||
inputs = list("A")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/arithmetic/absolute/do_work()
|
||||
var/result = 0
|
||||
@@ -201,6 +209,7 @@
|
||||
desc = "This circuit is of average quality, however it will compute the average for numbers you give it."
|
||||
extended_desc = "Note that null pins are ignored, where as a pin containing 0 is included in the averaging calculation."
|
||||
icon_state = "average"
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/arithmetic/average/do_work()
|
||||
var/result = 0
|
||||
@@ -224,6 +233,7 @@
|
||||
desc = "Not recommended for cooking. Outputs '3.14159' when it receives a pulse."
|
||||
icon_state = "pi"
|
||||
inputs = list()
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/arithmetic/pi/do_work()
|
||||
var/datum/integrated_io/output/O = outputs[1]
|
||||
@@ -235,9 +245,10 @@
|
||||
name = "random number generator circuit"
|
||||
desc = "This gives a random (integer) number between values A and B inclusive."
|
||||
extended_desc = "'Inclusive' means that the upper bound is included in the range of numbers, e.g. L = 1 and H = 3 will allow \
|
||||
for outputs of 1, 2, or 3. L being the higher number is not <i>strictly</i> required."
|
||||
for outputs of 1, 2, or 3. H being the higher number is not <i>strictly</i> required."
|
||||
icon_state = "random"
|
||||
inputs = list("L","H")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/arithmetic/random/do_work()
|
||||
var/result = 0
|
||||
|
||||
@@ -4,12 +4,13 @@
|
||||
inputs = list("input")
|
||||
outputs = list("output")
|
||||
activators = list("convert")
|
||||
category = /obj/item/integrated_circuit/converter
|
||||
category_text = "Converter"
|
||||
|
||||
/obj/item/integrated_circuit/converter/num2text
|
||||
name = "number to string"
|
||||
desc = "This circuit can convert a number variable into a string."
|
||||
icon_state = "num-string"
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/converter/num2text/do_work()
|
||||
var/result = null
|
||||
@@ -25,6 +26,7 @@
|
||||
name = "string to number"
|
||||
desc = "This circuit can convert a string variable into a number."
|
||||
icon_state = "string-num"
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/converter/text2num/do_work()
|
||||
var/result = null
|
||||
@@ -40,6 +42,7 @@
|
||||
name = "reference to string"
|
||||
desc = "This circuit can convert a reference to something else to a string, specifically the name of that reference."
|
||||
icon_state = "ref-string"
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/converter/ref2text/do_work()
|
||||
var/result = null
|
||||
@@ -55,6 +58,7 @@
|
||||
name = "lowercase string converter"
|
||||
desc = "this will cause a string to come out in all lowercase."
|
||||
icon_state = "lowercase"
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/converter/lowercase/do_work()
|
||||
var/result = null
|
||||
@@ -70,6 +74,7 @@
|
||||
name = "uppercase string converter"
|
||||
desc = "THIS WILL CAUSE A STRING TO COME OUT IN ALL UPPERCASE."
|
||||
icon_state = "uppercase"
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/converter/uppercase/do_work()
|
||||
var/result = null
|
||||
@@ -88,6 +93,7 @@
|
||||
inputs = list("A","B","C","D","E","F","G","H")
|
||||
outputs = list("result")
|
||||
activators = list("concatenate")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/converter/concatenatior/do_work()
|
||||
var/result = null
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
inputs = list()
|
||||
outputs = list("X (abs)", "Y (abs)")
|
||||
activators = list("get coordinates")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
category_text = "Coords"
|
||||
|
||||
/obj/item/integrated_circuit/gps/do_work()
|
||||
var/turf/T = get_turf(src)
|
||||
@@ -31,6 +33,8 @@
|
||||
inputs = list("X1 (abs)", "Y1 (abs)", "X2 (abs)", "Y2 (abs)")
|
||||
outputs = list("X (rel)", "Y (rel)")
|
||||
activators = list("compute rel coordinates")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
category_text = "Coords"
|
||||
|
||||
/obj/item/integrated_circuit/abs_to_rel_coords/do_work()
|
||||
var/datum/integrated_io/x1 = inputs[1]
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/obj/item/integrated_circuit/transfer
|
||||
category_text = "Data Transfer"
|
||||
|
||||
/obj/item/integrated_circuit/transfer/splitter
|
||||
name = "splitter"
|
||||
desc = "Splits incoming data into all of the output pins."
|
||||
@@ -5,18 +8,21 @@
|
||||
complexity = 3
|
||||
inputs = list("data to split")
|
||||
outputs = list("A","B")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/transfer/splitter/medium
|
||||
name = "four splitter"
|
||||
icon_state = "splitter4"
|
||||
complexity = 5
|
||||
outputs = list("A","B","C","D")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/transfer/splitter/large
|
||||
name = "eight splitter"
|
||||
icon_state = "splitter8"
|
||||
complexity = 9
|
||||
outputs = list("A","B","C","D","E","F","G","H")
|
||||
spawn_flags = IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/transfer/splitter/do_work()
|
||||
var/datum/integrated_io/I = inputs[1]
|
||||
@@ -33,6 +39,7 @@
|
||||
"outgoing pulse A",
|
||||
"outgoing pulse B"
|
||||
)
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/transfer/activator_splitter/do_work()
|
||||
for(var/datum/integrated_io/activate/A in outputs)
|
||||
@@ -53,6 +60,7 @@
|
||||
"outgoing pulse C",
|
||||
"outgoing pulse D"
|
||||
)
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/transfer/activator_splitter/large
|
||||
name = "eight activator splitter"
|
||||
@@ -68,4 +76,5 @@
|
||||
"outgoing pulse F",
|
||||
"outgoing pulse G",
|
||||
"outgoing pulse H"
|
||||
)
|
||||
)
|
||||
spawn_flags = IC_SPAWN_RESEARCH
|
||||
@@ -1,5 +1,6 @@
|
||||
/obj/item/integrated_circuit/input
|
||||
var/can_be_asked_input = 0
|
||||
category_text = "Input"
|
||||
|
||||
/obj/item/integrated_circuit/input/proc/ask_for_input(mob/user)
|
||||
return
|
||||
@@ -13,6 +14,7 @@
|
||||
inputs = list()
|
||||
outputs = list()
|
||||
activators = list("on pressed")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/input/button/ask_for_input(mob/user) //Bit misleading name for this specific use.
|
||||
var/datum/integrated_io/A = activators[1]
|
||||
@@ -30,6 +32,7 @@
|
||||
inputs = list()
|
||||
outputs = list("number entered")
|
||||
activators = list("on entered")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/input/numberpad/ask_for_input(mob/user)
|
||||
var/new_input = input(user, "Enter a number, please.","Number pad") as null|num
|
||||
@@ -49,6 +52,7 @@
|
||||
inputs = list()
|
||||
outputs = list("string entered")
|
||||
activators = list("on entered")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/input/textpad/ask_for_input(mob/user)
|
||||
var/new_input = input(user, "Enter some words, please.","Number pad") as null|text
|
||||
@@ -67,6 +71,8 @@
|
||||
inputs = list("target ref")
|
||||
outputs = list("total health %", "total missing health")
|
||||
activators = list("scan")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2)
|
||||
|
||||
/obj/item/integrated_circuit/input/med_scanner/do_work()
|
||||
var/datum/integrated_io/I = inputs[1]
|
||||
@@ -103,6 +109,8 @@
|
||||
"clone damage"
|
||||
)
|
||||
activators = list("scan")
|
||||
spawn_flags = IC_SPAWN_RESEARCH
|
||||
origin_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 3, TECH_BIO = 4)
|
||||
|
||||
/obj/item/integrated_circuit/input/adv_med_scanner/do_work()
|
||||
var/datum/integrated_io/I = inputs[1]
|
||||
@@ -139,6 +147,7 @@
|
||||
inputs = list()
|
||||
outputs = list("located ref")
|
||||
activators = list("locate")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/input/local_locator/do_work()
|
||||
var/datum/integrated_io/O = outputs[1]
|
||||
@@ -160,6 +169,7 @@
|
||||
inputs = list("desired type ref")
|
||||
outputs = list("located ref")
|
||||
activators = list("locate")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/input/adjacent_locator/do_work()
|
||||
var/datum/integrated_io/I = inputs[1]
|
||||
@@ -194,6 +204,8 @@
|
||||
inputs = list("frequency","code")
|
||||
outputs = list()
|
||||
activators = list("send signal","on signal received")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_MAGNETS = 2)
|
||||
|
||||
var/frequency = 1457
|
||||
var/code = 30
|
||||
@@ -274,6 +286,8 @@
|
||||
inputs = list("target EPv2 address", "data to send", "secondary text")
|
||||
outputs = list("address received", "data received", "secondary text received")
|
||||
activators = list("send data", "on data received")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_MAGNETS = 2, TECH_BLUESPACE = 2)
|
||||
var/datum/exonet_protocol/exonet = null
|
||||
|
||||
/obj/item/integrated_circuit/input/EPv2/New()
|
||||
@@ -307,6 +321,9 @@
|
||||
data_received.write_data_to_pin(message)
|
||||
text_received.write_data_to_pin(text)
|
||||
|
||||
/obj/item/integrated_circuit/output
|
||||
category_text = "Output"
|
||||
|
||||
/obj/item/integrated_circuit/output/screen
|
||||
name = "screen"
|
||||
desc = "This small screen can display a single piece of data, when the machine is examined closely."
|
||||
@@ -314,6 +331,7 @@
|
||||
inputs = list("displayed data")
|
||||
outputs = list()
|
||||
activators = list("load data")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
var/stuff_to_display = null
|
||||
|
||||
/obj/item/integrated_circuit/output/screen/do_work()
|
||||
@@ -328,11 +346,12 @@
|
||||
/obj/item/integrated_circuit/output/light
|
||||
name = "light"
|
||||
desc = "This light can turn on and off on command."
|
||||
icon_state = "light_adv"
|
||||
icon_state = "light"
|
||||
complexity = 4
|
||||
inputs = list()
|
||||
outputs = list()
|
||||
activators = list("toggle light")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
var/light_toggled = 0
|
||||
var/light_brightness = 3
|
||||
var/light_rgb = "#FFFFFF"
|
||||
@@ -375,6 +394,8 @@
|
||||
"Brightness"
|
||||
)
|
||||
outputs = list()
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
origin_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 3)
|
||||
|
||||
/obj/item/integrated_circuit/output/light/advanced/on_data_written()
|
||||
update_lighting()
|
||||
@@ -393,7 +414,6 @@
|
||||
outputs = list()
|
||||
activators = list("play sound")
|
||||
var/list/sounds = list()
|
||||
category = /obj/item/integrated_circuit/output/sound
|
||||
|
||||
/obj/item/integrated_circuit/output/sound/New()
|
||||
..()
|
||||
@@ -431,6 +451,7 @@
|
||||
"synth no" = 'sound/machines/synth_no.ogg',
|
||||
"warning buzz" = 'sound/machines/warning-buzzer.ogg'
|
||||
)
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/output/sound/beepsky
|
||||
name = "securitron sound circuit"
|
||||
@@ -444,4 +465,6 @@
|
||||
"insult" = 'sound/voice/binsult.ogg',
|
||||
"radio" = 'sound/voice/bradio.ogg',
|
||||
"secure day" = 'sound/voice/bsecureday.ogg',
|
||||
)
|
||||
)
|
||||
spawn_flags = IC_SPAWN_RESEARCH
|
||||
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_ILLEGAL = 1)
|
||||
@@ -5,7 +5,7 @@
|
||||
complexity = 3
|
||||
outputs = list("result")
|
||||
activators = list("compare", "on true result")
|
||||
category = /obj/item/integrated_circuit/logic
|
||||
category_text = "Logic"
|
||||
|
||||
/obj/item/integrated_circuit/logic/do_work()
|
||||
var/datum/integrated_io/O = outputs[1]
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
/obj/item/integrated_circuit/logic/binary
|
||||
inputs = list("A","B")
|
||||
category = /obj/item/integrated_circuit/logic/binary
|
||||
|
||||
/obj/item/integrated_circuit/logic/binary/do_work()
|
||||
var/datum/integrated_io/A = inputs[1]
|
||||
@@ -30,7 +29,6 @@
|
||||
|
||||
/obj/item/integrated_circuit/logic/unary
|
||||
inputs = list("A")
|
||||
category = /obj/item/integrated_circuit/logic/unary
|
||||
|
||||
/obj/item/integrated_circuit/logic/unary/do_work()
|
||||
var/datum/integrated_io/A = inputs[1]
|
||||
@@ -45,6 +43,7 @@
|
||||
name = "equal gate"
|
||||
desc = "This gate compares two values, and outputs the number one if both are the same."
|
||||
icon_state = "equal"
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/logic/binary/equals/do_compare(var/datum/integrated_io/A, var/datum/integrated_io/B)
|
||||
return A.data == B.data
|
||||
@@ -53,6 +52,7 @@
|
||||
name = "and gate"
|
||||
desc = "This gate will output 'one' if both inputs evaluate to true."
|
||||
icon_state = "and"
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/logic/binary/and/do_compare(var/datum/integrated_io/A, var/datum/integrated_io/B)
|
||||
return A.data && B.data
|
||||
@@ -61,6 +61,7 @@
|
||||
name = "or gate"
|
||||
desc = "This gate will output 'one' if one of the inputs evaluate to true."
|
||||
icon_state = "or"
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/logic/binary/or/do_compare(var/datum/integrated_io/A, var/datum/integrated_io/B)
|
||||
return A.data || B.data
|
||||
@@ -69,6 +70,7 @@
|
||||
name = "less than gate"
|
||||
desc = "This will output 'one' if the first input is less than the second input."
|
||||
icon_state = "less_than"
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/logic/binary/less_than/do_compare(var/datum/integrated_io/A, var/datum/integrated_io/B)
|
||||
return A.data < B.data
|
||||
@@ -77,6 +79,7 @@
|
||||
name = "less than or equal gate"
|
||||
desc = "This will output 'one' if the first input is less than, or equal to the second input."
|
||||
icon_state = "less_than_or_equal"
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/logic/binary/less_than_or_equal/do_compare(var/datum/integrated_io/A, var/datum/integrated_io/B)
|
||||
return A.data <= B.data
|
||||
@@ -85,6 +88,7 @@
|
||||
name = "greater than gate"
|
||||
desc = "This will output 'one' if the first input is greater than the second input."
|
||||
icon_state = "greater_than"
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/logic/binary/greater_than/do_compare(var/datum/integrated_io/A, var/datum/integrated_io/B)
|
||||
return A.data > B.data
|
||||
@@ -93,6 +97,7 @@
|
||||
name = "greater_than or equal gate"
|
||||
desc = "This will output 'one' if the first input is greater than, or equal to the second input."
|
||||
icon_state = "greater_than_or_equal"
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/logic/binary/greater_than_or_equal/do_compare(var/datum/integrated_io/A, var/datum/integrated_io/B)
|
||||
return A.data >= B.data
|
||||
@@ -101,6 +106,7 @@
|
||||
name = "not gate"
|
||||
desc = "This gate inverts what's fed into it."
|
||||
icon_state = "not"
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/logic/unary/not/do_check(var/datum/integrated_io/A)
|
||||
return !A.data
|
||||
@@ -1,3 +1,6 @@
|
||||
/obj/item/integrated_circuit/manipulation
|
||||
category_text = "Manipulation"
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/weapon_firing
|
||||
name = "weapon firing mechanism"
|
||||
desc = "This somewhat complicated system allows one to slot in a gun, direct it towards a position, and remotely fire it."
|
||||
@@ -15,6 +18,8 @@
|
||||
"fire"
|
||||
)
|
||||
var/obj/item/weapon/gun/installed_gun = null
|
||||
spawn_flags = IC_SPAWN_RESEARCH
|
||||
origin_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 3, TECH_COMBAT = 4)
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/weapon_firing/Destroy()
|
||||
qdel(installed_gun)
|
||||
@@ -85,150 +90,6 @@
|
||||
return
|
||||
installed_gun.Fire_userless(T)
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/smoke
|
||||
name = "smoke generator"
|
||||
desc = "Unlike most electronics, creating smoke is completely intentional."
|
||||
icon_state = "smoke"
|
||||
extended_desc = "This smoke generator creates clouds of smoke on command. It can also hold liquids inside, which will go \
|
||||
into the smoke clouds when activated."
|
||||
flags = OPENCONTAINER
|
||||
complexity = 20
|
||||
cooldown_per_use = 30 SECONDS
|
||||
inputs = list()
|
||||
outputs = list()
|
||||
activators = list("create smoke")
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/smoke/New()
|
||||
..()
|
||||
create_reagents(100)
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/smoke/do_work()
|
||||
playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
|
||||
var/datum/effect/effect/system/smoke_spread/chem/smoke_system = new()
|
||||
smoke_system.set_up(reagents, 10, 0, get_turf(src))
|
||||
spawn(0)
|
||||
for(var/i = 1 to 8)
|
||||
smoke_system.start()
|
||||
reagents.clear_reagents()
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/injector
|
||||
name = "integrated hypo-injector"
|
||||
desc = "This scary looking thing is able to pump liquids into whatever it's pointed at."
|
||||
icon_state = "injector"
|
||||
extended_desc = "This autoinjector can push reagents into another container or someone else outside of the machine. The target \
|
||||
must be adjacent to the machine, and if it is a person, they cannot be wearing thick clothing."
|
||||
flags = OPENCONTAINER
|
||||
complexity = 20
|
||||
cooldown_per_use = 6 SECONDS
|
||||
inputs = list("target ref", "injection amount" = 5)
|
||||
outputs = list()
|
||||
activators = list("inject")
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/injector/New()
|
||||
..()
|
||||
create_reagents(30)
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/injector/proc/inject_amount()
|
||||
var/datum/integrated_io/amount = inputs[2]
|
||||
if(isnum(amount.data))
|
||||
return Clamp(amount.data, 0, 30)
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/injector/do_work()
|
||||
set waitfor = 0 // Don't sleep in a proc that is called by a processor without this set, otherwise it'll delay the entire thing
|
||||
|
||||
var/datum/integrated_io/target = inputs[1]
|
||||
var/atom/movable/AM = target.data_as_type(/atom/movable)
|
||||
if(!istype(AM)) //Invalid input
|
||||
return
|
||||
if(!reagents.total_volume) // Empty
|
||||
return
|
||||
if(AM.can_be_injected_by(src))
|
||||
if(isliving(AM))
|
||||
var/turf/T = get_turf(AM)
|
||||
T.visible_message("<span class='warning'>[src] is trying to inject [AM]!</span>")
|
||||
sleep(3 SECONDS)
|
||||
if(!AM.can_be_injected_by(src))
|
||||
return
|
||||
var/contained = reagents.get_reagents()
|
||||
var/trans = reagents.trans_to_mob(target, inject_amount(), CHEM_BLOOD)
|
||||
message_admins("[src] injected \the [AM] with [trans]u of [contained].")
|
||||
to_chat(AM, "<span class='notice'>You feel a tiny prick!</span>")
|
||||
visible_message("<span class='warning'>[src] injects [AM]!</span>")
|
||||
else
|
||||
reagents.trans_to(AM, inject_amount())
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/reagent_pump
|
||||
name = "reagent pump"
|
||||
desc = "Moves liquids safely inside a machine, or even nearby it."
|
||||
icon_state = "reagent_pump"
|
||||
extended_desc = "This is a pump, which will move liquids from the source ref to the target ref. The third pin determines \
|
||||
how much liquid is moved per pulse, between 0 and 50. The pump can move reagents to any open container inside the machine, or \
|
||||
outside the machine if it is next to the machine. Note that this cannot be used on entities."
|
||||
flags = OPENCONTAINER
|
||||
complexity = 8
|
||||
inputs = list("source ref", "target ref", "injection amount" = 10)
|
||||
outputs = list()
|
||||
activators = list("transfer reagents")
|
||||
var/transfer_amount = 10
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/reagent_pump/on_data_written()
|
||||
var/datum/integrated_io/amount = inputs[3]
|
||||
if(isnum(amount.data))
|
||||
amount.data = Clamp(amount.data, 0, 50)
|
||||
transfer_amount = amount.data
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/reagent_pump/do_work()
|
||||
var/datum/integrated_io/A = inputs[1]
|
||||
var/datum/integrated_io/B = inputs[2]
|
||||
var/atom/movable/source = A.data_as_type(/atom/movable)
|
||||
var/atom/movable/target = B.data_as_type(/atom/movable)
|
||||
if(!istype(source) || !istype(target)) //Invalid input
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
if(source.Adjacent(T) && target.Adjacent(T))
|
||||
if(!source.reagents || !target.reagents)
|
||||
return
|
||||
if(ismob(source) || ismob(target))
|
||||
return
|
||||
if(!source.is_open_container() || !target.is_open_container())
|
||||
return
|
||||
if(!source.reagents.get_free_space() || !target.reagents.get_free_space())
|
||||
return
|
||||
|
||||
source.reagents.trans_to(target, transfer_amount)
|
||||
|
||||
// May make a reagent subclass of circuits in future.
|
||||
/obj/item/integrated_circuit/manipulation/reagent_storage
|
||||
name = "reagent storage"
|
||||
desc = "Stores liquid inside, and away from electrical components. Can store up to 60u."
|
||||
icon_state = "reagent_storage"
|
||||
extended_desc = "This is effectively an internal beaker."
|
||||
flags = OPENCONTAINER
|
||||
complexity = 4
|
||||
inputs = list()
|
||||
outputs = list("volume used")
|
||||
activators = list()
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/reagent_storage/New()
|
||||
..()
|
||||
create_reagents(60)
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/reagent_storage/on_reagent_change()
|
||||
var/datum/integrated_io/A = outputs[1]
|
||||
A.data = reagents.total_volume
|
||||
A.push_data()
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/reagent_storage/cryo
|
||||
name = "cryo reagent storage"
|
||||
desc = "Stores liquid inside, and away from electrical components. Can store up to 60u. This will also suppress reactions."
|
||||
icon_state = "reagent_storage_cryo"
|
||||
extended_desc = "This is effectively an internal cryo beaker."
|
||||
flags = OPENCONTAINER | NOREACT
|
||||
complexity = 8
|
||||
inputs = list()
|
||||
outputs = list("volume used")
|
||||
activators = list()
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/locomotion
|
||||
name = "locomotion circuit"
|
||||
desc = "This allows a machine to move in a given direction."
|
||||
@@ -249,6 +110,7 @@
|
||||
inputs = list("dir num")
|
||||
outputs = list()
|
||||
activators = list("step towards dir")
|
||||
spawn_flags = IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/locomotion/do_work()
|
||||
..()
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
inputs = list("input pin 1")
|
||||
outputs = list("output pin 1")
|
||||
activators = list("set")
|
||||
category = /obj/item/integrated_circuit/memory
|
||||
category_text = "Memory"
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/memory/examine(mob/user)
|
||||
..()
|
||||
@@ -35,6 +36,7 @@
|
||||
complexity = 4
|
||||
inputs = list("input pin 1","input pin 2","input pin 3","input pin 4")
|
||||
outputs = list("output pin 1","output pin 2","output pin 3","output pin 4")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/memory/large
|
||||
name = "large memory circuit"
|
||||
@@ -59,6 +61,8 @@
|
||||
"output pin 6",
|
||||
"output pin 7",
|
||||
"output pin 8")
|
||||
spawn_flags = IC_SPAWN_RESEARCH
|
||||
origin_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 3)
|
||||
|
||||
/obj/item/integrated_circuit/memory/huge
|
||||
name = "large memory stick"
|
||||
@@ -100,6 +104,8 @@
|
||||
"output pin 14",
|
||||
"output pin 15",
|
||||
"output pin 16")
|
||||
spawn_flags = IC_SPAWN_RESEARCH
|
||||
origin_tech = list(TECH_ENGINEERING = 4, TECH_DATA = 4)
|
||||
|
||||
/obj/item/integrated_circuit/memory/constant
|
||||
name = "constant chip"
|
||||
@@ -110,6 +116,7 @@
|
||||
outputs = list("output pin")
|
||||
activators = list("push data")
|
||||
var/accepting_refs = 0
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/memory/constant/do_work()
|
||||
var/datum/integrated_io/O = outputs[1]
|
||||
|
||||
149
code/modules/integrated_electronics/reagents.dm
Normal file
149
code/modules/integrated_electronics/reagents.dm
Normal file
@@ -0,0 +1,149 @@
|
||||
/obj/item/integrated_circuit/reagent
|
||||
category_text = "Reagent"
|
||||
var/volume = 0
|
||||
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2)
|
||||
|
||||
/obj/item/integrated_circuit/reagent/New()
|
||||
..()
|
||||
if(volume)
|
||||
create_reagents(volume)
|
||||
|
||||
/obj/item/integrated_circuit/reagent/smoke
|
||||
name = "smoke generator"
|
||||
desc = "Unlike most electronics, creating smoke is completely intentional."
|
||||
icon_state = "smoke"
|
||||
extended_desc = "This smoke generator creates clouds of smoke on command. It can also hold liquids inside, which will go \
|
||||
into the smoke clouds when activated."
|
||||
flags = OPENCONTAINER
|
||||
complexity = 20
|
||||
cooldown_per_use = 30 SECONDS
|
||||
inputs = list()
|
||||
outputs = list()
|
||||
activators = list("create smoke")
|
||||
spawn_flags = IC_SPAWN_RESEARCH
|
||||
origin_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 3, TECH_BIO = 3)
|
||||
volume = 100
|
||||
|
||||
/obj/item/integrated_circuit/reagent/smoke/do_work()
|
||||
playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
|
||||
var/datum/effect/effect/system/smoke_spread/chem/smoke_system = new()
|
||||
smoke_system.set_up(reagents, 10, 0, get_turf(src))
|
||||
spawn(0)
|
||||
for(var/i = 1 to 8)
|
||||
smoke_system.start()
|
||||
reagents.clear_reagents()
|
||||
|
||||
/obj/item/integrated_circuit/reagent/injector
|
||||
name = "integrated hypo-injector"
|
||||
desc = "This scary looking thing is able to pump liquids into whatever it's pointed at."
|
||||
icon_state = "injector"
|
||||
extended_desc = "This autoinjector can push reagents into another container or someone else outside of the machine. The target \
|
||||
must be adjacent to the machine, and if it is a person, they cannot be wearing thick clothing."
|
||||
flags = OPENCONTAINER
|
||||
complexity = 20
|
||||
cooldown_per_use = 6 SECONDS
|
||||
inputs = list("target ref", "injection amount" = 5)
|
||||
outputs = list()
|
||||
activators = list("inject")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
volume = 30
|
||||
|
||||
/obj/item/integrated_circuit/reagent/injector/proc/inject_amount()
|
||||
var/datum/integrated_io/amount = inputs[2]
|
||||
if(isnum(amount.data))
|
||||
return Clamp(amount.data, 0, 30)
|
||||
|
||||
/obj/item/integrated_circuit/reagent/injector/do_work()
|
||||
set waitfor = 0 // Don't sleep in a proc that is called by a processor without this set, otherwise it'll delay the entire thing
|
||||
|
||||
var/datum/integrated_io/target = inputs[1]
|
||||
var/atom/movable/AM = target.data_as_type(/atom/movable)
|
||||
if(!istype(AM)) //Invalid input
|
||||
return
|
||||
if(!reagents.total_volume) // Empty
|
||||
return
|
||||
if(AM.can_be_injected_by(src))
|
||||
if(isliving(AM))
|
||||
var/turf/T = get_turf(AM)
|
||||
T.visible_message("<span class='warning'>[src] is trying to inject [AM]!</span>")
|
||||
sleep(3 SECONDS)
|
||||
if(!AM.can_be_injected_by(src))
|
||||
return
|
||||
var/contained = reagents.get_reagents()
|
||||
var/trans = reagents.trans_to_mob(target, inject_amount(), CHEM_BLOOD)
|
||||
message_admins("[src] injected \the [AM] with [trans]u of [contained].")
|
||||
to_chat(AM, "<span class='notice'>You feel a tiny prick!</span>")
|
||||
visible_message("<span class='warning'>[src] injects [AM]!</span>")
|
||||
else
|
||||
reagents.trans_to(AM, inject_amount())
|
||||
|
||||
/obj/item/integrated_circuit/reagent/pump
|
||||
name = "reagent pump"
|
||||
desc = "Moves liquids safely inside a machine, or even nearby it."
|
||||
icon_state = "reagent_pump"
|
||||
extended_desc = "This is a pump, which will move liquids from the source ref to the target ref. The third pin determines \
|
||||
how much liquid is moved per pulse, between 0 and 50. The pump can move reagents to any open container inside the machine, or \
|
||||
outside the machine if it is next to the machine. Note that this cannot be used on entities."
|
||||
flags = OPENCONTAINER
|
||||
complexity = 8
|
||||
inputs = list("source ref", "target ref", "injection amount" = 10)
|
||||
outputs = list()
|
||||
activators = list("transfer reagents")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2)
|
||||
var/transfer_amount = 10
|
||||
|
||||
/obj/item/integrated_circuit/reagent/pump/on_data_written()
|
||||
var/datum/integrated_io/amount = inputs[3]
|
||||
if(isnum(amount.data))
|
||||
amount.data = Clamp(amount.data, 0, 50)
|
||||
transfer_amount = amount.data
|
||||
|
||||
/obj/item/integrated_circuit/reagent/pump/do_work()
|
||||
var/datum/integrated_io/A = inputs[1]
|
||||
var/datum/integrated_io/B = inputs[2]
|
||||
var/atom/movable/source = A.data_as_type(/atom/movable)
|
||||
var/atom/movable/target = B.data_as_type(/atom/movable)
|
||||
if(!istype(source) || !istype(target)) //Invalid input
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
if(source.Adjacent(T) && target.Adjacent(T))
|
||||
if(!source.reagents || !target.reagents)
|
||||
return
|
||||
if(ismob(source) || ismob(target))
|
||||
return
|
||||
if(!source.is_open_container() || !target.is_open_container())
|
||||
return
|
||||
if(!source.reagents.get_free_space() || !target.reagents.get_free_space())
|
||||
return
|
||||
|
||||
source.reagents.trans_to(target, transfer_amount)
|
||||
|
||||
/obj/item/integrated_circuit/reagent/storage
|
||||
name = "reagent storage"
|
||||
desc = "Stores liquid inside, and away from electrical components. Can store up to 60u."
|
||||
icon_state = "reagent_storage"
|
||||
extended_desc = "This is effectively an internal beaker."
|
||||
flags = OPENCONTAINER
|
||||
complexity = 4
|
||||
inputs = list()
|
||||
outputs = list("volume used")
|
||||
activators = list()
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2)
|
||||
volume = 60
|
||||
|
||||
/obj/item/integrated_circuit/reagent/storage/on_reagent_change()
|
||||
var/datum/integrated_io/A = outputs[1]
|
||||
A.data = reagents.total_volume
|
||||
A.push_data()
|
||||
|
||||
/obj/item/integrated_circuit/reagent/storage/cryo
|
||||
name = "cryo reagent storage"
|
||||
desc = "Stores liquid inside, and away from electrical components. Can store up to 60u. This will also suppress reactions."
|
||||
icon_state = "reagent_storage_cryo"
|
||||
extended_desc = "This is effectively an internal cryo beaker."
|
||||
flags = OPENCONTAINER | NOREACT
|
||||
complexity = 8
|
||||
spawn_flags = IC_SPAWN_RESEARCH
|
||||
origin_tech = list(TECH_MATERIALS = 3, TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2)
|
||||
@@ -4,7 +4,7 @@
|
||||
complexity = 2
|
||||
inputs = list()
|
||||
outputs = list()
|
||||
category = /obj/item/integrated_circuit/time
|
||||
category_text = "Time"
|
||||
|
||||
/obj/item/integrated_circuit/time/delay
|
||||
name = "two-sec delay circuit"
|
||||
@@ -13,6 +13,7 @@
|
||||
icon_state = "delay-20"
|
||||
var/delay = 2 SECONDS
|
||||
activators = list("incoming pulse","outgoing pulse")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/time/delay/do_work()
|
||||
set waitfor = 0 // Don't sleep in a proc that is called by a processor. It'll delay the entire thing
|
||||
@@ -27,6 +28,7 @@
|
||||
This circuit is set to send a pulse after a delay of five seconds."
|
||||
icon_state = "delay-50"
|
||||
delay = 5 SECONDS
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/time/delay/one_sec
|
||||
name = "one-sec delay circuit"
|
||||
@@ -34,6 +36,7 @@
|
||||
This circuit is set to send a pulse after a delay of one second."
|
||||
icon_state = "delay-10"
|
||||
delay = 1 SECOND
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/time/delay/half_sec
|
||||
name = "half-sec delay circuit"
|
||||
@@ -41,6 +44,7 @@
|
||||
This circuit is set to send a pulse after a delay of half a second."
|
||||
icon_state = "delay-5"
|
||||
delay = 5
|
||||
spawn_flags = IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/time/delay/tenth_sec
|
||||
name = "tenth-sec delay circuit"
|
||||
@@ -48,6 +52,7 @@
|
||||
This circuit is set to send a pulse after a delay of 1/10th of a second."
|
||||
icon_state = "delay-1"
|
||||
delay = 1
|
||||
spawn_flags = IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/time/delay/custom
|
||||
name = "custom delay circuit"
|
||||
@@ -55,6 +60,7 @@
|
||||
This circuit's delay can be customized, between 1/10th of a second to one hour. The delay is updated upon receiving a pulse."
|
||||
icon_state = "delay"
|
||||
inputs = list("delay time")
|
||||
spawn_flags = IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/time/delay/custom/do_work()
|
||||
var/datum/integrated_io/delay_input = inputs[1]
|
||||
@@ -75,6 +81,7 @@
|
||||
var/is_running = FALSE
|
||||
inputs = list("enable ticking")
|
||||
activators = list("outgoing pulse")
|
||||
spawn_flags = IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/time/ticker/Destroy()
|
||||
if(is_running)
|
||||
@@ -108,6 +115,7 @@
|
||||
icon_state = "tick-f"
|
||||
complexity = 12
|
||||
ticks_to_pulse = 2
|
||||
spawn_flags = IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/time/ticker/slow
|
||||
name = "slow ticker"
|
||||
@@ -115,6 +123,7 @@
|
||||
icon_state = "tick-s"
|
||||
complexity = 4
|
||||
ticks_to_pulse = 6
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/time/clock
|
||||
name = "integrated clock"
|
||||
@@ -122,6 +131,7 @@
|
||||
icon_state = "clock"
|
||||
inputs = list()
|
||||
outputs = list("time (string)", "hours (number)", "minutes (number)", "seconds (number)")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/time/clock/do_work()
|
||||
var/datum/integrated_io/time = outputs[1]
|
||||
|
||||
@@ -168,59 +168,29 @@
|
||||
|
||||
/obj/item/weapon/storage/bag/circuits/basic/New()
|
||||
..()
|
||||
var/list/types_to_spawn = typesof(/obj/item/integrated_circuit/arithmetic,
|
||||
/obj/item/integrated_circuit/logic,
|
||||
/obj/item/integrated_circuit/memory,
|
||||
) - list(/obj/item/integrated_circuit/arithmetic,
|
||||
/obj/item/integrated_circuit/memory,
|
||||
/obj/item/integrated_circuit/logic,
|
||||
)
|
||||
spawn(2 SECONDS) // So the list has time to initialize.
|
||||
for(var/obj/item/integrated_circuit/IC in all_integrated_circuits)
|
||||
if(IC.spawn_flags & IC_SPAWN_DEFAULT)
|
||||
for(var/i = 1 to 3)
|
||||
new IC.type(src)
|
||||
|
||||
types_to_spawn.Add(/obj/item/integrated_circuit/input/numberpad,
|
||||
/obj/item/integrated_circuit/input/textpad,
|
||||
/obj/item/integrated_circuit/input/button,
|
||||
/obj/item/integrated_circuit/input/signaler,
|
||||
/obj/item/integrated_circuit/input/local_locator,
|
||||
/obj/item/integrated_circuit/output/screen,
|
||||
/obj/item/integrated_circuit/converter/num2text,
|
||||
/obj/item/integrated_circuit/converter/text2num,
|
||||
/obj/item/integrated_circuit/converter/uppercase,
|
||||
/obj/item/integrated_circuit/converter/lowercase,
|
||||
/obj/item/integrated_circuit/time/delay/five_sec,
|
||||
/obj/item/integrated_circuit/time/delay/one_sec,
|
||||
/obj/item/integrated_circuit/time/delay/half_sec,
|
||||
/obj/item/integrated_circuit/time/delay/tenth_sec,
|
||||
/obj/item/integrated_circuit/time/ticker/slow,
|
||||
/obj/item/integrated_circuit/time/clock
|
||||
)
|
||||
|
||||
for(var/thing in types_to_spawn)
|
||||
var/obj/item/integrated_circuit/ic = thing
|
||||
if(initial(ic.category) == thing)
|
||||
continue
|
||||
|
||||
for(var/i = 1 to 4)
|
||||
new thing(src)
|
||||
|
||||
new /obj/item/device/electronic_assembly(src)
|
||||
new /obj/item/device/integrated_electronics/wirer(src)
|
||||
new /obj/item/device/integrated_electronics/debugger(src)
|
||||
new /obj/item/weapon/crowbar(src)
|
||||
new /obj/item/weapon/screwdriver(src)
|
||||
make_exact_fit()
|
||||
new /obj/item/device/electronic_assembly(src)
|
||||
new /obj/item/device/integrated_electronics/wirer(src)
|
||||
new /obj/item/device/integrated_electronics/debugger(src)
|
||||
new /obj/item/weapon/crowbar(src)
|
||||
new /obj/item/weapon/screwdriver(src)
|
||||
make_exact_fit()
|
||||
|
||||
/obj/item/weapon/storage/bag/circuits/all/New()
|
||||
..()
|
||||
for(var/thing in subtypesof(/obj/item/integrated_circuit))
|
||||
var/obj/item/integrated_circuit/ic = thing
|
||||
if(initial(ic.category) == thing)
|
||||
continue
|
||||
for(var/i = 1 to 10)
|
||||
new thing(src)
|
||||
spawn(2 SECONDS) // So the list has time to initialize.
|
||||
for(var/obj/item/integrated_circuit/IC in all_integrated_circuits)
|
||||
for(var/i = 1 to 10)
|
||||
new IC.type(src)
|
||||
|
||||
new /obj/item/device/electronic_assembly(src)
|
||||
new /obj/item/device/integrated_electronics/wirer(src)
|
||||
new /obj/item/device/integrated_electronics/debugger(src)
|
||||
new /obj/item/weapon/crowbar(src)
|
||||
new /obj/item/weapon/screwdriver(src)
|
||||
make_exact_fit()
|
||||
new /obj/item/device/electronic_assembly(src)
|
||||
new /obj/item/device/integrated_electronics/wirer(src)
|
||||
new /obj/item/device/integrated_electronics/debugger(src)
|
||||
new /obj/item/weapon/crowbar(src)
|
||||
new /obj/item/weapon/screwdriver(src)
|
||||
make_exact_fit()
|
||||
@@ -1574,428 +1574,6 @@ CIRCUITS BELOW
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 40000)
|
||||
build_path = /obj/item/device/electronic_assembly/large
|
||||
|
||||
/datum/design/circuit/integrated_circuit
|
||||
req_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2)
|
||||
|
||||
/datum/design/circuit/integrated_circuit/AssembleDesignName()
|
||||
..()
|
||||
name = "Custom circuitry ([item_name])"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/AssembleDesignDesc()
|
||||
if(!desc)
|
||||
desc = "Allows for the construction of \a [name] custom circuit."
|
||||
|
||||
/datum/design/circuit/integrated_circuit/arithmetic/AssembleDesignName()
|
||||
..()
|
||||
name = "Custom circuitry \[Arithmetic\] ([item_name])"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/arithmetic/addition
|
||||
id = "cc-addition"
|
||||
build_path = /obj/item/integrated_circuit/arithmetic/addition
|
||||
sort_string = "WAAAA"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/arithmetic/subtraction
|
||||
id = "cc-subtraction"
|
||||
build_path = /obj/item/integrated_circuit/arithmetic/subtraction
|
||||
sort_string = "WAAAB"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/arithmetic/multiplication
|
||||
id = "cc-multiplication"
|
||||
build_path = /obj/item/integrated_circuit/arithmetic/multiplication
|
||||
sort_string = "WAAAC"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/arithmetic/division
|
||||
id = "cc-division"
|
||||
build_path = /obj/item/integrated_circuit/arithmetic/division
|
||||
sort_string = "WAAAD"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/arithmetic/absolute
|
||||
id = "cc-absolute"
|
||||
build_path = /obj/item/integrated_circuit/arithmetic/absolute
|
||||
sort_string = "WAAAE"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/arithmetic/average
|
||||
id = "cc-average"
|
||||
build_path = /obj/item/integrated_circuit/arithmetic/average
|
||||
sort_string = "WAAAF"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/arithmetic/pi
|
||||
id = "cc-pi"
|
||||
build_path = /obj/item/integrated_circuit/arithmetic/pi
|
||||
sort_string = "WAAAG"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/arithmetic/random
|
||||
id = "cc-random"
|
||||
build_path = /obj/item/integrated_circuit/arithmetic/random
|
||||
sort_string = "WAAAH"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/arithmetic/round
|
||||
id = "cc-round"
|
||||
build_path = /obj/item/integrated_circuit/arithmetic/round
|
||||
sort_string = "WAAAI"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/arithmetic/exponent
|
||||
id = "cc-exponent"
|
||||
build_path = /obj/item/integrated_circuit/arithmetic/exponent
|
||||
sort_string = "WAAAJ"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/arithmetic/sign
|
||||
id = "cc-sign"
|
||||
build_path = /obj/item/integrated_circuit/arithmetic/sign
|
||||
sort_string = "WAAAK"
|
||||
|
||||
|
||||
|
||||
/datum/design/circuit/integrated_circuit/converter/AssembleDesignName()
|
||||
..()
|
||||
name = "Custom circuitry \[Conversion\] ([item_name])"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/converter/num2text
|
||||
id = "cc-num2text"
|
||||
build_path = /obj/item/integrated_circuit/converter/num2text
|
||||
sort_string = "WAABA"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/converter/text2num
|
||||
id = "cc-text2num"
|
||||
build_path = /obj/item/integrated_circuit/converter/text2num
|
||||
sort_string = "WAABB"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/converter/ref2text
|
||||
id = "cc-ref2text"
|
||||
build_path = /obj/item/integrated_circuit/converter/ref2text
|
||||
sort_string = "WAABC"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/converter/lowercase
|
||||
id = "cc-lowercase"
|
||||
build_path = /obj/item/integrated_circuit/converter/lowercase
|
||||
sort_string = "WAABD"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/converter/uppercase
|
||||
id = "cc-uppercase"
|
||||
build_path = /obj/item/integrated_circuit/converter/uppercase
|
||||
sort_string = "WAABD"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/converter/concatenatior
|
||||
id = "cc-concatenatior"
|
||||
build_path = /obj/item/integrated_circuit/converter/concatenatior
|
||||
sort_string = "WAABC"
|
||||
|
||||
|
||||
|
||||
/datum/design/circuit/integrated_circuit/coordinate/AssembleDesignName()
|
||||
..()
|
||||
name = "Custom circuitry \[Coordinate\] ([item_name])"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/coordinate/gps
|
||||
id = "cc-gps"
|
||||
build_path = /obj/item/integrated_circuit/gps
|
||||
sort_string = "WAACA"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/coordinate/abs_to_rel_coords
|
||||
id = "cc-abs_to_rel_coords"
|
||||
build_path = /obj/item/integrated_circuit/abs_to_rel_coords
|
||||
sort_string = "WAACB"
|
||||
|
||||
|
||||
|
||||
/datum/design/circuit/integrated_circuit/transfer/AssembleDesignName()
|
||||
..()
|
||||
name = "Custom circuitry \[Transfer\] ([item_name])"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/transfer/splitter
|
||||
id = "cc-splitter"
|
||||
build_path = /obj/item/integrated_circuit/transfer/splitter
|
||||
sort_string = "WAADA"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/transfer/splitter4
|
||||
id = "cc-splitter4"
|
||||
build_path = /obj/item/integrated_circuit/transfer/splitter/medium
|
||||
sort_string = "WAADB"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/transfer/splitter8
|
||||
id = "cc-splitter8"
|
||||
build_path = /obj/item/integrated_circuit/transfer/splitter/large
|
||||
sort_string = "WAADC"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/transfer/activator_splitter
|
||||
id = "cc-activator_splitter"
|
||||
build_path = /obj/item/integrated_circuit/transfer/activator_splitter
|
||||
sort_string = "WAADD"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/transfer/activator_splitter4
|
||||
id = "cc-activator_splitter4"
|
||||
build_path = /obj/item/integrated_circuit/transfer/activator_splitter/medium
|
||||
sort_string = "WAADE"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/transfer/activator_splitter8
|
||||
id = "cc-activator_splitter8"
|
||||
build_path = /obj/item/integrated_circuit/transfer/activator_splitter/large
|
||||
sort_string = "WAADF"
|
||||
|
||||
|
||||
|
||||
/datum/design/circuit/integrated_circuit/input_output/AssembleDesignName()
|
||||
..()
|
||||
name = "Custom circuitry \[Input/Output\] ([item_name])"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/input_output/button
|
||||
id = "cc-button"
|
||||
build_path = /obj/item/integrated_circuit/input/button
|
||||
sort_string = "WAAEA"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/input_output/numberpad
|
||||
id = "cc-numberpad"
|
||||
build_path = /obj/item/integrated_circuit/input/numberpad
|
||||
sort_string = "WAAEB"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/input_output/textpad
|
||||
id = "cc-textpad"
|
||||
build_path = /obj/item/integrated_circuit/input/textpad
|
||||
sort_string = "WAAEC"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/input_output/screen
|
||||
id = "cc-screen"
|
||||
build_path = /obj/item/integrated_circuit/output/screen
|
||||
sort_string = "WAAED"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/input_output/med_scanner
|
||||
id = "cc-medscanner"
|
||||
build_path = /obj/item/integrated_circuit/input/med_scanner
|
||||
req_tech = list(TECH_MATERIAL = 2, TECH_MAGNETS = 2, TECH_BIOMED = 2)
|
||||
sort_string = "WAAEE"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/input_output/adv_med_scanner
|
||||
id = "cc-advmedscanner"
|
||||
build_path = /obj/item/integrated_circuit/input/adv_med_scanner
|
||||
req_tech = list(TECH_MATERIAL = 2, TECH_MAGNETS = 3, TECH_BIOMED = 4)
|
||||
sort_string = "WAAEF"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/input_output/local_locator
|
||||
id = "cc-locallocator"
|
||||
build_path = /obj/item/integrated_circuit/input/local_locator
|
||||
sort_string = "WAAEG"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/input_output/adjacent_locator
|
||||
id = "cc-adjacentlocator"
|
||||
build_path = /obj/item/integrated_circuit/input/adjacent_locator
|
||||
sort_string = "WAAEH"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/input_output/signaler
|
||||
id = "cc-signaler"
|
||||
build_path = /obj/item/integrated_circuit/input/signaler
|
||||
sort_string = "WAAEJ"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/input_output/light
|
||||
id = "cc-light"
|
||||
build_path = /obj/item/integrated_circuit/output/light
|
||||
sort_string = "WAAEH"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/input_output/adv_light
|
||||
id = "cc-adv_light"
|
||||
build_path = /obj/item/integrated_circuit/output/light/advanced
|
||||
sort_string = "WAAEI"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/input_output/beeper
|
||||
id = "cc-sound_beeper"
|
||||
build_path = /obj/item/integrated_circuit/output/sound/beeper
|
||||
sort_string = "WAAEJ"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/input_output/beepsky_sound
|
||||
id = "cc-sound_beepsky"
|
||||
build_path = /obj/item/integrated_circuit/output/sound/beepsky
|
||||
sort_string = "WAAEK"
|
||||
req_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_ILLEGAL = 1)
|
||||
|
||||
/datum/design/circuit/integrated_circuit/input_output/EPv2
|
||||
id = "cc-epv2"
|
||||
build_path = /obj/item/integrated_circuit/input/EPv2
|
||||
sort_string = "WAAEL"
|
||||
req_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_MAGNETS = 2, TECH_BLUESPACE = 2)
|
||||
|
||||
|
||||
/datum/design/circuit/integrated_circuit/logic/AssembleDesignName()
|
||||
..()
|
||||
name = "Custom circuitry \[Logic\] ([item_name])"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/logic/binary/equals
|
||||
id = "cc-equals"
|
||||
build_path = /obj/item/integrated_circuit/logic/binary/equals
|
||||
sort_string = "WAAFA"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/logic/unary/not
|
||||
id = "cc-not"
|
||||
build_path = /obj/item/integrated_circuit/logic/unary/not
|
||||
sort_string = "WAAFB"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/logic/binary/and
|
||||
id = "cc-and"
|
||||
build_path = /obj/item/integrated_circuit/logic/binary/and
|
||||
sort_string = "WAAFC"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/logic/binary/or
|
||||
id = "cc-or"
|
||||
build_path = /obj/item/integrated_circuit/logic/binary/or
|
||||
sort_string = "WAAFD"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/logic/binary/less_than
|
||||
id = "cc-less_than"
|
||||
build_path = /obj/item/integrated_circuit/logic/binary/less_than
|
||||
sort_string = "WAAFE"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/logic/binary/less_than_or_equal
|
||||
id = "cc-less_than_or_equal"
|
||||
build_path = /obj/item/integrated_circuit/logic/binary/less_than_or_equal
|
||||
sort_string = "WAAFF"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/logic/binary/greater_than
|
||||
id = "cc-greater_than"
|
||||
build_path = /obj/item/integrated_circuit/logic/binary/greater_than
|
||||
sort_string = "WAAFG"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/logic/binary/greater_than_or_equal
|
||||
id = "cc-greater_than_or_equal"
|
||||
build_path = /obj/item/integrated_circuit/logic/binary/greater_than_or_equal
|
||||
sort_string = "WAAFH"
|
||||
|
||||
|
||||
|
||||
/datum/design/circuit/integrated_circuit/manipulation/AssembleDesignName()
|
||||
..()
|
||||
name = "Custom circuitry \[Manipulation\] ([item_name])"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/manipulation/weapon_firing
|
||||
name = "weapon firing mechanism"
|
||||
id = "cc-weapon_firing"
|
||||
build_path = /obj/item/integrated_circuit/manipulation/weapon_firing
|
||||
sort_string = "WAAGA"
|
||||
req_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 3, TECH_COMBAT = 4)
|
||||
|
||||
/datum/design/circuit/integrated_circuit/manipulation/smoke
|
||||
name = "smoke generator"
|
||||
id = "cc-smoke"
|
||||
build_path = /obj/item/integrated_circuit/manipulation/smoke
|
||||
sort_string = "WAAGB"
|
||||
req_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 3, TECH_BIO = 4)
|
||||
|
||||
/datum/design/circuit/integrated_circuit/manipulation/locomotion
|
||||
name = "locomotion"
|
||||
id = "cc-locomotion"
|
||||
build_path = /obj/item/integrated_circuit/manipulation/locomotion
|
||||
sort_string = "WAAGB"
|
||||
req_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 3)
|
||||
|
||||
/datum/design/circuit/integrated_circuit/manipulation/injector
|
||||
name = "injector"
|
||||
id = "cc-injector"
|
||||
build_path = /obj/item/integrated_circuit/manipulation/injector
|
||||
sort_string = "WAAGC"
|
||||
req_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 3)
|
||||
|
||||
/datum/design/circuit/integrated_circuit/manipulation/reagent_pump
|
||||
name = "reagent pump"
|
||||
id = "cc-reagent_pump"
|
||||
build_path = /obj/item/integrated_circuit/manipulation/reagent_pump
|
||||
sort_string = "WAAGD"
|
||||
req_tech = list(TECH_ENGINEERING = 1, TECH_DATA = 1, TECH_BIO = 2)
|
||||
|
||||
/datum/design/circuit/integrated_circuit/manipulation/reagent_storage
|
||||
name = "reagent storage"
|
||||
id = "cc-reagent_storage"
|
||||
build_path = /obj/item/integrated_circuit/manipulation/reagent_storage
|
||||
sort_string = "WAAGE"
|
||||
req_tech = list(TECH_ENGINEERING = 1, TECH_DATA = 1, TECH_BIO = 1)
|
||||
|
||||
/datum/design/circuit/integrated_circuit/manipulation/reagent_storage_cryo
|
||||
name = "cryo reagent storage"
|
||||
id = "cc-reagent_storage_cryo"
|
||||
build_path = /obj/item/integrated_circuit/manipulation/reagent_storage/cryo
|
||||
sort_string = "WAAGF"
|
||||
req_tech = list(TECH_MATERIALS = 3, TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2)
|
||||
|
||||
/datum/design/circuit/integrated_circuit/memory/AssembleDesignName()
|
||||
..()
|
||||
name = "Custom circuitry \[Memory\] ([item_name])"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/memory
|
||||
id = "cc-memory"
|
||||
build_path = /obj/item/integrated_circuit/memory
|
||||
sort_string = "WAAHA"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/memory/medium
|
||||
id = "cc-memory4"
|
||||
build_path = /obj/item/integrated_circuit/memory/medium
|
||||
sort_string = "WAAHB"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/memory/large
|
||||
id = "cc-memory8"
|
||||
build_path = /obj/item/integrated_circuit/memory/large
|
||||
sort_string = "WAAHC"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/memory/huge
|
||||
id = "cc-memory16"
|
||||
build_path = /obj/item/integrated_circuit/memory/huge
|
||||
sort_string = "WAAHD"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/memory/constant
|
||||
id = "cc-constant"
|
||||
build_path = /obj/item/integrated_circuit/memory/constant
|
||||
sort_string = "WAAHH"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/time/AssembleDesignName()
|
||||
..()
|
||||
name = "Custom circuitry \[Time\] ([item_name])"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/time/delay
|
||||
id = "cc-delay"
|
||||
build_path = /obj/item/integrated_circuit/time/delay
|
||||
sort_string = "WAAIA"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/time/delay/five_sec
|
||||
id = "cc-five_sec_delay"
|
||||
build_path = /obj/item/integrated_circuit/time/delay/five_sec
|
||||
sort_string = "WAAIB"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/time/delay/one_sec
|
||||
id = "cc-one_sec_delay"
|
||||
build_path = /obj/item/integrated_circuit/time/delay/one_sec
|
||||
sort_string = "WAAIC"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/time/delay/half_sec
|
||||
id = "cc-half_sec_delay"
|
||||
build_path = /obj/item/integrated_circuit/time/delay/half_sec
|
||||
sort_string = "WAAID"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/time/delay/tenth_sec
|
||||
id = "cc-tenth_sec_delay"
|
||||
build_path = /obj/item/integrated_circuit/time/delay/tenth_sec
|
||||
sort_string = "WAAIF"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/time/delay/custom
|
||||
id = "cc-custom_delay"
|
||||
build_path = /obj/item/integrated_circuit/time/delay/custom
|
||||
sort_string = "WAAIG"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/time/ticker
|
||||
id = "cc-ticker"
|
||||
build_path = /obj/item/integrated_circuit/time/ticker
|
||||
sort_string = "WAAIH"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/time/ticker/slow
|
||||
id = "cc-ticker_slow"
|
||||
build_path = /obj/item/integrated_circuit/time/ticker/slow
|
||||
sort_string = "WAAII"
|
||||
|
||||
/datum/design/circuit/integrated_circuit/time/ticker/fast
|
||||
id = "cc-ticker_fast"
|
||||
build_path = /obj/item/integrated_circuit/time/ticker/fast
|
||||
sort_string = "WAAIJ"
|
||||
req_tech = list(TECH_ENGINEERING = 4, TECH_DATA = 4)
|
||||
|
||||
/datum/design/circuit/integrated_circuit/time/clock
|
||||
id = "cc-clock"
|
||||
build_path = /obj/item/integrated_circuit/time/clock
|
||||
sort_string = "WAAIK"
|
||||
|
||||
/* Uncomment if someone makes these buildable
|
||||
/datum/design/circuit/general_alert
|
||||
name = "general alert console"
|
||||
|
||||
@@ -54,6 +54,7 @@ research holder datum.
|
||||
known_tech += new T(src)
|
||||
for(var/D in typesof(/datum/design) - /datum/design)
|
||||
possible_designs += new D(src)
|
||||
generate_integrated_circuit_designs()
|
||||
RefreshResearch()
|
||||
|
||||
/datum/research/techonly
|
||||
@@ -129,6 +130,20 @@ research holder datum.
|
||||
if(initial(check_tech.id) == ID)
|
||||
return initial(check_tech.name)
|
||||
|
||||
/datum/research/proc/generate_integrated_circuit_designs()
|
||||
spawn(2 SECONDS) // So the list has time to initialize.
|
||||
for(var/obj/item/integrated_circuit/IC in all_integrated_circuits)
|
||||
if(IC.spawn_flags & IC_SPAWN_RESEARCH)
|
||||
var/datum/design/D = new /datum/design/circuit(src)
|
||||
D.name = "Custom circuitry \[[IC.category_text]\] ([IC.name])"
|
||||
D.id = "ic-[lowertext(IC.name)]"
|
||||
if(IC.origin_tech && IC.origin_tech.len)
|
||||
D.req_tech = IC.origin_tech.Copy()
|
||||
else
|
||||
D.req_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2)
|
||||
D.build_path = IC.type
|
||||
possible_designs += D
|
||||
|
||||
/***************************************************************
|
||||
** Technology Datums **
|
||||
** Includes all the various technoliges and what they make. **
|
||||
|
||||
@@ -21,6 +21,7 @@ var/global/datum/global_init/init = new ()
|
||||
|
||||
initialize_chemical_reagents()
|
||||
initialize_chemical_reactions()
|
||||
initialize_integrated_circuits_list()
|
||||
|
||||
qdel(src) //we're done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user