Files
Bubberstation/code/modules/wiremod/components/variables/getter.dm
SkyratBot 30e071673f [MIRROR] Refactors the list datatype to support composite lists. Adapts a lot of circuits to be able to properly use composite lists. Adds the dispenser shell [MDB IGNORE] (#8650)
* Refactors the list datatype to support composite lists. Adapts a lot of circuits to be able to properly use composite lists. Adds the dispenser shell (#61856)

Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
Co-authored-by: Colovorat <35225170+Colovorat@ users.noreply.github.com>

* Refactors the list datatype to support composite lists. Adapts a lot of circuits to be able to properly use composite lists. Adds the dispenser shell

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
Co-authored-by: Colovorat <35225170+Colovorat@ users.noreply.github.com>
2021-10-08 14:19:46 +01:00

23 lines
622 B
Plaintext

/**
* # Getter Component
*
* Gets the current value from a variable.
*/
/obj/item/circuit_component/variable/getter
display_name = "Variable Getter"
desc = "A component that gets a variable globally on the circuit."
/// The value of the variable
var/datum/port/output/value
circuit_size = 0
/obj/item/circuit_component/variable/getter/populate_ports()
value = add_output_port("Value", PORT_TYPE_ANY)
/obj/item/circuit_component/variable/getter/pre_input_received(datum/port/input/port)
. = ..()
if(current_variable)
value.set_datatype(current_variable.datatype)
value.set_value(current_variable.value)