Open Zet0rz opened 6 years ago
Alternatively, the reduction could incorporate a setup similar to FunctionConstructor
where self
doesn't exist, but where two arguments outputs
and settings
carry the information of the individual logic unit.
Whether this actual reduction is possible will depend on whether I can find a way to support event listening, perhaps using hooks, and broadcasting these events across all chained functions in one go.
The logic system is an extensive system that enabled custom object types to provide functionality and logic to any given situation. However during actual gameplay, the only things that matter are the functions they perform on their inputs. Since they cannot be edited or change during play, they can be reduced into just a chain of functions instead of whole networked objects.
In doing so, the Logic Map gets reduced to just a network of chained functions. It is unknown whether the overhead removed from this is worth the reduction, but the idea is as follows:
Function
field in LOGIC.Inputs toFunctionConstructor
An example of how the system would change, using arguments and settings:
Since settings can no longer change during play, the function can be reduced to just a static print. This is then created by the
FunctionConstructor
:The function generated by
FunctionConstructor
is referenced by any Logic Unit who has an output linked to it through itsoutputs
table, which contain functions that run loop through all connections by this output and call the respective Logic Unit's constructed function much the same way the above would.