mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 20:20:33 +01:00
[MIRROR] Adds an admin signal handler circuit component (#8218)
* Adds an admin signal handler circuit component * Update FundamentalTypes.js Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com> Co-authored-by: Gandalf <jzo123@hotmail.com>
This commit is contained in:
co-authored by
Watermelon914
Gandalf
parent
9269849f62
commit
c302124fd5
@@ -28,7 +28,7 @@ GLOBAL_LIST_INIT(circuit_datatypes, generate_circuit_datatypes())
|
||||
* Used for implicit conversions between outputs and inputs (e.g. number -> string)
|
||||
* and applying/removing signals on inputs
|
||||
*/
|
||||
/datum/circuit_datatype/proc/convert_value(datum/port/port, value_to_convert)
|
||||
/datum/circuit_datatype/proc/convert_value(datum/port/port, value_to_convert, force = FALSE)
|
||||
return value_to_convert
|
||||
|
||||
/**
|
||||
|
||||
@@ -84,7 +84,7 @@ GLOBAL_LIST_EMPTY_TYPED(integrated_circuits, /obj/item/integrated_circuit)
|
||||
for(var/obj/item/circuit_component/to_delete in attached_components)
|
||||
remove_component(to_delete)
|
||||
qdel(to_delete)
|
||||
QDEL_LIST(circuit_variables)
|
||||
QDEL_LIST_ASSOC_VAL(circuit_variables)
|
||||
attached_components.Cut()
|
||||
shell = null
|
||||
examined_component = null
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
if(src.value != value || force)
|
||||
if(isatom(value))
|
||||
UnregisterSignal(value, COMSIG_PARENT_QDELETING)
|
||||
src.value = datatype_handler.convert_value(src, value)
|
||||
src.value = datatype_handler.convert_value(src, value, force)
|
||||
if(isatom(value))
|
||||
RegisterSignal(value, COMSIG_PARENT_QDELETING, .proc/null_value)
|
||||
SEND_SIGNAL(src, COMSIG_PORT_SET_VALUE, value)
|
||||
|
||||
Reference in New Issue
Block a user