[MIRROR] Fixed animating filters with circuits and added special signal ports for instant circuit execution. [MDB IGNORE] (#8689)

* Fixed animating filters with circuits and added special signal ports for instant circuit execution.

* Update filter.dm

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
This commit is contained in:
SkyratBot
2021-10-13 19:39:00 +01:00
committed by GitHub
co-authored by Watermelon914 Gandalf
parent 25d1a5e7a2
commit 4c22c1f842
10 changed files with 101 additions and 85 deletions
+4 -1
View File
@@ -22,6 +22,9 @@ GLOBAL_LIST_INIT_TYPED(circuit_datatypes, /datum/circuit_datatype, generate_circ
/// The flags of the circuit datatype
var/datatype_flags = 0
/// The datatypes that this datatype can receive from.
var/list/can_receive_from = list()
/// Whether this datatype should be loaded into the global circuit_datatypes list.
var/abstract = FALSE
@@ -43,7 +46,7 @@ GLOBAL_LIST_INIT_TYPED(circuit_datatypes, /datum/circuit_datatype, generate_circ
* * datatype_to_check - The datatype to check
*/
/datum/circuit_datatype/proc/can_receive_from_datatype(datatype_to_check)
return datatype == datatype_to_check // This is already done by default on the input port.
return datatype == datatype_to_check || (datatype_to_check in can_receive_from)
/**
* Called when the datatype is given to a port.