For working with surfaces.
Surfaces are the "domain" of the world.
local Surface = require('stdlib/area/surface')
find_all_entities (search_criteria) | Given a search criteria, find all entities that match the criteria. |
get_surface_bounds (surface) | Gets the area which covers the entirety of a given surface. |
lookup (surface) | Flexible and safe lookup function for surfaces. |
search_criteria | This table should be passed into find_all_entities function to find entities that match the criteria. |
Given a search criteria, find all entities that match the criteria.
surface.find_all_entities({ type = 'unit', surface = 'nauvis', area = {{-1000,20},{-153,2214}})
-- returns a list containing all unit entities on the nauvis surface in the given area
Gets the area which covers the entirety of a given surface.
This function is useful if you wish to compare the total number of chunks against the number of chunks within the entire area of a given surface.
Parameters:Flexible and safe lookup function for surfaces.
This table should be passed into find_all_entities function to find entities that match the criteria.
Fields: