-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Is your feature request related to a problem? Please describe.
Several skills and perks work off of adjacent entities, meaning anyone standing on the 6 tiles around an entity/position.
In Vanilla this is very copy&pasty done with a for-loop from 0 to 5 which then checks each tile via a getNext(i) function.
MSU currently only offers ::Tactical.Entities.getActorsByFunction but that is not efficient when we know that we only need to check the adjacent tiles. That function instead iterates over every entity on the whole battlefield and it is also a bit harder to parse when reading the code.
Describe the solution you'd like
I would like to have a function getAdjacentActors() for the actor.nut class which returns an array of up to 6 actor references.
Adjacency is where I draw the line already for this. Anything beyond adjacent needs to fall back on a getActorsByFunction call.