mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-15 12:11:45 +00:00
* Adds basic list manipulation and fixes some performance issues with lists in integrated circuits (#64541) Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com> * Adds basic list manipulation and fixes some performance issues with lists in integrated circuits Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com> Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
18 lines
454 B
Plaintext
18 lines
454 B
Plaintext
/**
|
|
* # List Clear Component
|
|
*
|
|
* Clears an element to a list.
|
|
*/
|
|
/obj/item/circuit_component/variable/list/listclear
|
|
display_name = "List Clear"
|
|
desc = "Clears a list variable."
|
|
category = "List"
|
|
|
|
circuit_flags = CIRCUIT_FLAG_INPUT_SIGNAL|CIRCUIT_FLAG_OUTPUT_SIGNAL
|
|
|
|
/obj/item/circuit_component/variable/list/listclear/input_received(datum/port/input/port, list/return_values)
|
|
if(!current_variable)
|
|
return
|
|
current_variable.set_value(list())
|
|
|