Integrated Circuitry Tweaks/Fixes (#22074)

**power stuff**
- generally 10Xs all power draw stuff so they actually have a
significant effect on assembly power cells.
- buffs some of the lower-end power gen. circuits to go with, but the
higher-end ones can already handle the new numbers

**reagent pump**
- changes adjacent check to use turfs to cover more bases (ie. assembly
being held in-hand, or source/target being in an assembly thats held
in-hand — these being 90% of reagent pump uses)

**tickers**
- shouldn't have appended `SECONDS` to them all. they work as advertised
now (again)

---------

Signed-off-by: c#min7 <sadkermit01@gmail.com>
Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com>
This commit is contained in:
c#min7
2026-03-23 09:15:52 +00:00
committed by GitHub
co-authored by SleepyGemmy
parent fb0e5a6e0a
commit 22cd2ed612
16 changed files with 108 additions and 93 deletions
@@ -13,17 +13,19 @@
/obj/item/integrated_circuit/passive/power/solar_cell
name = "tiny photovoltaic cell"
desc = "It's a very tiny solar cell, generally used in calculators."
extended_desc = "The cell generates 1W of energy per second in optimal lighting conditions. Less light will result in less power being generated."
extended_desc = "The cell generates up to 100 W of energy in optimal lighting conditions. Less light will result in less power being generated."
icon_state = "solar_cell"
complexity = 8
origin_tech = list(TECH_POWER = 3, TECH_ENGINEERING = 3, TECH_DATA = 2)
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
var/max_power = 1
/// Multiplied by amount of lumens to get amount of power to generate.
var/power_factor = 15
/obj/item/integrated_circuit/passive/power/solar_cell/make_energy()
var/turf/T = get_turf(src)
var/light_amount = T ? T.get_lumcount() : 0
var/adjusted_power = max(max_power * light_amount, 0)
var/adjusted_power = clamp(power_factor*light_amount, 0, 100)
adjusted_power = round(adjusted_power, 0.1)
if(adjusted_power && assembly)
assembly.give_power(adjusted_power)
@@ -33,26 +35,26 @@
name = "tesla power relay"
desc = "A seemingly enigmatic device which connects to nearby APCs wirelessly and draws power from them."
w_class = WEIGHT_CLASS_NORMAL
extended_desc = "The siphon generates 250W of energy, so long as an APC is in the same room, with a cell that has energy. It will always drain \
extended_desc = "The siphon generates 1 kW of energy, so long as an APC is in the same room, with a cell that has energy. It will always drain \
from the 'equipment' power channel."
icon_state = "power_relay"
complexity = 7
origin_tech = list(TECH_POWER = 3, TECH_ENGINEERING = 3, TECH_DATA = 2)
spawn_flags = IC_SPAWN_RESEARCH
var/power_amount = 250
var/power_amount = 1000
// For really fat machines.
/obj/item/integrated_circuit/passive/power/relay/large
name = "large tesla power relay"
desc = "A seemingly enigmatic device which connects to nearby APCs wirelessly and draws power from them, now in industiral size!"
w_class = WEIGHT_CLASS_BULKY
extended_desc = "The siphon generates 2 kW of energy, so long as an APC is in the same room, with a cell that has energy. It will always drain \
extended_desc = "The siphon generates 4 kW of energy, so long as an APC is in the same room, with a cell that has energy. It will always drain \
from the 'equipment' power channel."
icon_state = "power_relay"
complexity = 15
origin_tech = list(TECH_POWER = 6, TECH_ENGINEERING = 5, TECH_DATA = 4)
spawn_flags = IC_SPAWN_RESEARCH
power_amount = 2000
power_amount = 4000
/obj/item/integrated_circuit/passive/power/relay/make_energy()
if(!assembly)
@@ -92,10 +94,10 @@
host = implant_assembly.implant.imp_in
if(!get_pin_data(IC_INPUT, 1))
if(test_validity(host))
assembly.give_power(10)
assembly.give_power(100)
host.adjustNutritionLoss(HUNGER_FACTOR)
else
if(assembly.draw_power(10*inefficiency)) // slightly less efficient the other way around
if(assembly.draw_power(100*inefficiency)) // slightly less efficient the other way around
host.adjustNutritionLoss(-HUNGER_FACTOR)
set_pin_data(IC_OUTPUT, 1, host.nutrition)