Actions
Feature #2031
closedadd lua function (Tile).latitude
Start date:
05/18/2026
Due date:
% Done:
0%
Estimated time:
Description
Requirements can deal with latitude, so lua should too.
Files
Actions
Added by Dean Brown 2 months ago. Updated 9 days ago.
0%
Description
Requirements can deal with latitude, so lua should too.
Files
| 2031_Main.patch (2.47 KB) 2031_Main.patch | Dean Brown, 07/10/2026 11:41 PM | ||
| 2031_S3_3.patch (2.47 KB) 2031_S3_3.patch | Dean Brown, 07/10/2026 11:41 PM |
int api_methods_tile_latitude(lua_State *L, Tile *ptile)
{
+ LUASCRIPT_CHECK_STATE(L, -1);
+ LUASCRIPT_CHECK_SELF(L, ptile, -1);
return map_signed_latitude(ptile);
+}
Since it normally returns signed latitude -> negative values are valid, it makes no sense to return specifically -1 on error.
Had to think about this one, it has to return something because the function isn't void. Best I can come up with is MAP_MAX_LATITUDE + 1.