Files
Aurora.3/code/modules/integrated_electronics/_defines.dm
mineymonkeyandGitHub 6c6f596d89 Integrated Circuit Overhaul 2.0 (#22647)
Complete overhaul of Integrated Circuits Final Edition!

- Adds phoron cost to circuits (not assemblies).
- Printer searching capability.
- Changed names of assemblies to better match their description.
- Adds cloning and auto appending JSON for large builds.
- Adds database, debug, advanced math circuits.
- Reworks the list circuits to finally accept anything other than NUM.
- Adds plenty of list circuits to allow functional building and clearing
of lists.
- Reworks Complexity/Space to allow a bit better flexibility in creation
of devices.
- Adds a "Headroom" concept where space/complexity can go beyond the
maximum to a very slight degree. Concretely, unused space gives `2`
extra complexity per unused component slot, capped at `15%` of
`max_complexity`. Unused complexity gives `1` extra component slot per
`6` unused complexity, capped at `15%` of `max_components`.
- Groups math and logic circuits and adds subgroups.
- Doesn't mess with the circuit tool kit.
- Adds a xenoarch drill assembly with a nice sprite. Thank you
@EnchantedCrocolisk for the sprite!
- Changes activation limit time to 1 second from 2 seconds, adds a 1
second timer that is unique to the INTEGRATED CIRCUIT PRINTER with the
advanced design disk.
- Ports several Baystation integrated-circuit manipulation components,
primarily from
Baystation12/Baystation12https://github.com/Baystation12/Baystation12/pull/22458,
with anchoring bolts and hatch lock sourced from
Baystation12/Baystation12https://github.com/Baystation12/Baystation12/pull/25052.
- Changes the electronic ear piece into a workable radio headset with
working encryption keys capability and unique ways the Microphone and
TTS interacts with it.
- Removed the ability for all the electronic wearables to spawn with a
basic cell.
- Combines https://github.com/Aurorastation/Aurora.3/pull/22466,
https://github.com/Aurorastation/Aurora.3/pull/22456,
https://github.com/Aurorastation/Aurora.3/pull/22455,
https://github.com/Aurorastation/Aurora.3/pull/22446 that are now
closed.
2026-07-26 19:52:31 +00:00

72 lines
3.5 KiB
Plaintext

#define IC_INPUT "input"
#define IC_OUTPUT "output"
#define IC_ACTIVATOR "activator"
// Pin functionality.
#define DATA_CHANNEL "data channel"
#define PULSE_CHANNEL "pulse channel"
// Methods of obtaining a circuit. These are also defined in SSelectronics.
#define IC_SPAWN_DEFAULT 1 // If the circuit comes in the default circuit box and able to be printed in the IC printer.
#define IC_SPAWN_RESEARCH 2 // If the circuit design will be available in the IC printer after upgrading it.
// Displayed along with the pin name to show what type of pin it is.
#define IC_FORMAT_ANY "\<ANY\>"
#define IC_FORMAT_STRING "\<TEXT\>"
#define IC_FORMAT_CHAR "\<CHAR\>"
#define IC_FORMAT_COLOR "\<COLOR\>"
#define IC_FORMAT_NUMBER "\<NUM\>"
#define IC_FORMAT_DIR "\<DIR\>"
#define IC_FORMAT_BOOLEAN "\<BOOL\>"
#define IC_FORMAT_REF "\<REF\>"
#define IC_FORMAT_LIST "\<LIST\>"
#define IC_FORMAT_PULSE "\<PULSE\>"
// Used inside input/output list to tell the constructor what pin to make.
#define IC_PINTYPE_ANY /datum/integrated_io
#define IC_PINTYPE_STRING /datum/integrated_io/string
#define IC_PINTYPE_CHAR /datum/integrated_io/char
#define IC_PINTYPE_COLOR /datum/integrated_io/color
#define IC_PINTYPE_NUMBER /datum/integrated_io/number
#define IC_PINTYPE_DIR /datum/integrated_io/dir
#define IC_PINTYPE_BOOLEAN /datum/integrated_io/boolean
#define IC_PINTYPE_REF /datum/integrated_io/ref
#define IC_PINTYPE_LIST /datum/integrated_io/list
#define IC_PINTYPE_PULSE_IN /datum/integrated_io/activate
#define IC_PINTYPE_PULSE_OUT /datum/integrated_io/activate/out
// Data limits.
#define IC_MAX_LIST_LENGTH 200
#define IC_DEFAULT_PHORON_COST 0.005
#define IC_BLUEPRINT_CHUNK_LIMIT 1000
#define IC_BLUEPRINT_BUFFER_LIMIT 500000
/obj/item/integrated_circuit
name = "integrated circuit"
desc = "It's a tiny chip! This one doesn't seem to do much, however."
icon = 'icons/obj/assemblies/electronic_components.dmi'
icon_state = "template"
w_class = WEIGHT_CLASS_TINY
var/obj/item/electronic_assembly/assembly // Reference to the assembly holding this circuit, if any.
var/extended_desc
var/list/inputs = list()
var/list/inputs_default = list() // Assoc list which will fill a pin with data upon creation. e.g. "2" = 0 will set input pin 2 to equal 0 instead of null.
var/list/outputs = list()
var/list/outputs_default = list() // Ditto, for output.
var/list/activators = list()
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/size //This acts as a limitation on building machines, bigger components cost more 'space'. -1 for size 0
var/cooldown_per_use = 1 SECOND // Circuits are limited in how many times they can be work()'d by this variable.
var/power_draw_per_use = 0 // How much power is drawn when work()'d.
var/power_draw_idle = 0 // How much power is drawn when doing nothing.
var/spawn_flags // Used for world initializing, see the #defines above.
var/category_text = "NO CATEGORY THIS IS A BUG" // To show up on circuit printer, and perhaps other places.
var/phoron_cost = IC_DEFAULT_PHORON_COST
var/removable = TRUE // Determines if a circuit is removable from the assembly.
var/displayed_name = ""
var/allow_multitool = TRUE // Allows additional multitool functionality
// Used as a global var, (Do not set manually in children).