35 explicit filter(lua_State* L,
int data_index,
int res_index = 0);
50 std::unique_ptr<filter_impl>
impl_;
filter(const filter &)=delete
filter(lua_State *L, int data_index, int res_index=0)
a lua table with the following attributes [1]: the filter table,
filter(filter &&)=default
filter & operator=(const filter &)=delete
filter & operator=(filter &&)=default
std::unique_ptr< filter_impl > impl_
bool matches(const gamemap_base &m, map_location l) const
std::map< std::string, std::set< map_location > > known_sets_
lua_mapgen::filter * luaW_to_mgfilter(lua_State *L, int index)
int intf_mg_get_tiles_radius(lua_State *L)
int intf_terrainfilter_create(lua_State *L)
Create a filter.
lua_mapgen::filter_ptr luaW_check_mgfilter(lua_State *L, int index, bool allow_compile=false)
int intf_mg_get_locations(lua_State *L)
void lua_mgfilter_setmetatable(lua_State *L)
bool luaW_is_mgfilter(lua_State *L, int index)
std::string register_filter_metatables(lua_State *L)
std::unique_ptr< filter, std::function< void(filter *)> > filter_ptr
std::string register_metatables(lua_State *L)
std::size_t index(std::string_view str, const std::size_t index)
Codepoint index corresponding to the nth character in a UTF-8 string.
Encapsulates the map of the game.