circuitry upgrade pt 2 (#4213)

* 1.All reagent containers are acidproof now and have pin with self reference(to make it more easy to link them)
2.reagent scaner. It's like a beaker. But can give a list of contained reagents.
3.reagent filter. Pump,that can transfer only desired reagents,or all,except unwanted.
4.fuel cell.Converts chemicals to energy.
5.2 pins memory circuit. Sometimes it is very useful.
6.pulse demultiplexers. A lot like regular demultiplexer. But it doesn't distributes data. Just sends pulse to given activator pin.
7.list operations. choose element by index. write element by index. delete element by index search desired element in list. lenght of list.
8.strings: find element in string. explode string by delimeter.

* athsmos sensors back.

* fix
This commit is contained in:
arsserpentarium
2017-11-07 22:54:56 -06:00
committed by Anewbe
parent 0b13c6ead3
commit 1a1c10c3f8
7 changed files with 490 additions and 51 deletions
@@ -29,6 +29,28 @@
if(assembly)
assembly.give_power(adjusted_power)
/obj/item/integrated_circuit/passive/power/starter
name = "starter"
desc = "This tiny circuit will send a pulse right after device is turned on, or when power is restored."
icon_state = "led"
complexity = 1
activators = list("pulse out" = IC_PINTYPE_PULSE_OUT)
origin_tech = list(TECH_POWER = 3, TECH_ENGINEERING = 3, TECH_DATA = 2)
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
var/is_charge=0
/obj/item/integrated_circuit/passive/power/starter/make_energy()
if(assembly.battery)
if(assembly.battery.charge)
if(!is_charge)
activate_pin(1)
is_charge=1
else
is_charge=0
else
is_charge=0
return FALSE
// For implants.
/obj/item/integrated_circuit/passive/power/metabolic_siphon
name = "metabolic siphon"
@@ -82,6 +104,44 @@
origin_tech = list(TECH_POWER = 3, TECH_ENGINEERING = 3, TECH_DATA = 2)
spawn_flags = IC_SPAWN_RESEARCH
var/power_amount = 250
//fuel cell
/obj/item/integrated_circuit/passive/power/chemical_cell
name = "fuel cell"
desc = "Produces electricity from chemicals."
icon_state = "chemical_cell"
extended_desc = "This is effectively an internal beaker. It will consume and produce power from phoron, slime jelly, welding fuel, carbon,\
ethanol, nutriments and blood, in order of decreasing efficiency. It will consume fuel only if the battery can take more energy."
flags = OPENCONTAINER
complexity = 4
inputs = list()
outputs = list("volume used" = IC_PINTYPE_NUMBER,"self reference" = IC_PINTYPE_REF)
activators = list()
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2)
var/volume = 60
var/list/fuel = list("phoron" = 50000, "slimejelly" = 25000, "fuel" = 15000, "carbon" = 10000, "ethanol"= 10000, "nutriment" =8000, "blood" = 5000)
/obj/item/integrated_circuit/passive/power/chemical_cell/New()
..()
create_reagents(volume)
/obj/item/integrated_circuit/passive/power/chemical_cell/interact(mob/user)
set_pin_data(IC_OUTPUT, 2, weakref(src))
push_data()
..()
/obj/item/integrated_circuit/passive/power/chemical_cell/on_reagent_change()
set_pin_data(IC_OUTPUT, 1, reagents.total_volume)
push_data()
/obj/item/integrated_circuit/passive/power/chemical_cell/make_energy()
if(assembly)
for(var/I in fuel)
if((assembly.battery.maxcharge-assembly.battery.charge) / CELLRATE > fuel[I])
if(reagents.remove_reagent(I, 1))
assembly.give_power(fuel[I])
// For really fat machines.
/obj/item/integrated_circuit/passive/power/relay/large