mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 17:14:47 +01: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>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user