Description
a way to interact with logic gates, in both ways.
Use Case
Can be used to make sensor communicate with the mods, to make the mods interact with blocks (for example moving hinges on a plane or car), but most importantly custom logic circuits (enabling to use sin, cos, ecc...). (this would become especially good if we get a ModBlock.GetColor() so we can differentiate between logic gates)
Implementation
ModBlock.GetInputs() return a table with the values of all inputs
ModBlock.SetOutput(value:float) overrides the output of the logic gate (if it's too difficoult to implement a SetInput(value:float) that adds an extra input given by the mod would also work)
ModBlock.GetOutput() returns the output of a lofic gate (useful tho avoid repetition of calculating the output using the inputs)
least important but could still be useful
ModBlock.GetInputBlocks() returns a table with the ModBlock of anything that connects to that gate
ModBlock.GetOutputBlocks() returns a table with the ModBlock of anything that receives an input from that gate
ModBlock.RegisterValueChange(functionName:String) makes so whenever the block's inputs change it calls a function