add a comment

This commit is contained in:
gfgtdf 2019-01-01 23:01:49 +01:00 committed by GitHub
parent a32e49e32f
commit bc685e3851
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -88,6 +88,11 @@ void luaW_pushslocs(lua_State *L, int index)
int impl_slocs_get(lua_State* L)
{
//todo: calling map.special_locations[1] will return the underlying map
// object instead of the first starting position, because the lua
// special locations is actually a table with the map object at
// index 1. The probably easiest way to fix this inconsitency is
// to just disallow all integerindicies here.
mapgen_gamemap& m = luaW_check_slocs(L, 1);
string_view id = luaL_checkstring(L, 2);
auto res = m.special_location(std::string(id));