#define IC_INPUT "input" #define IC_OUTPUT "output" #define IC_ACTIVATOR "activator" // Pin functionality. #define DATA_CHANNEL "data channel" #define PULSE_CHANNEL "pulse channel" // Displayed along with the pin name to show what type of pin it is. #define IC_FORMAT_ANY "\" #define IC_FORMAT_STRING "\" #define IC_FORMAT_CHAR "\" #define IC_FORMAT_COLOR "\" #define IC_FORMAT_NUMBER "\" #define IC_FORMAT_DIR "\" #define IC_FORMAT_BOOLEAN "\" #define IC_FORMAT_REF "\" #define IC_FORMAT_LIST "\" #define IC_FORMAT_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 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." icon = 'icons/obj/integrated_electronics/electronic_components.dmi' icon_state = "template" w_class = ITEMSIZE_TINY var/obj/item/device/electronic_assembly/assembly = null // Reference to the assembly holding this circuit, if any. var/extended_desc = null 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 = null //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 = null // 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/removable = TRUE // Determines if a circuit is removable from the assembly. var/displayed_name = "" var/allow_multitool = 1 // Allows additional multitool functionality // Used as a global var, (Do not set manually in children).