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>
This commit is contained in:
Watermelon914
2021-10-07 06:51:36 +01:00
committed by GitHub
parent 001315f214
commit d15b305527
52 changed files with 966 additions and 300 deletions
+5 -7
View File
@@ -10,6 +10,9 @@
/// The datatype of the circuit variable. Used by the setter and getter circuit components
var/datatype
/// The datatype handler for the circuit variable.
var/datum/circuit_datatype/datatype_handler
/// The colour that appears in the UI. The value is set to the datatype's matching colour
var/color
@@ -24,16 +27,11 @@
src.name = name
src.datatype = datatype
var/datum/circuit_datatype/circuit_datatype = GLOB.circuit_datatypes[datatype]
src.datatype_handler = GLOB.circuit_datatypes[datatype]
src.listeners = list()
src.color = circuit_datatype.color
src.color = datatype_handler.color
/datum/circuit_variable/Destroy(force, ...)
listeners = null
return ..()
/// Sets the value of the circuit component and triggers the appropriate listeners
/datum/circuit_variable/proc/set_value(new_value)
value = new_value