TacticalMetaphysics / LiSE

Rules-based engine for life sims, with time travel
GNU Affero General Public License v3.0
116 stars 9 forks source link

Lazily evaluated neighborhoods for node triggers #109

Closed clayote closed 1 month ago

clayote commented 1 year ago

Currently, node triggers are evaluated for every node in their category, which may take a while.

If triggers were only reevaluated when their node changed somehow, they would be faster. But a lot of triggers consider nodes beyond the one they are specifically attached to.

Neighborhoods on triggers would let the user declare that the trigger is interested in nodes that are close to the one they are attached to, so that the trigger is only evaluated when the node in question, or ones connected to it at so-many removes, are changed.