mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-15 20:22:07 +00:00
* 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>
23 lines
622 B
Plaintext
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)
|