aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_areastore.cpp
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2019-09-21 17:54:52 +0200
committerGitHub <noreply@github.com>2019-09-21 17:54:52 +0200
commitfec30e37ac1d160a942777b05a7717b5395c4d99 (patch)
treebd0fcdf9778bfbea6be5f10dba6936780259c1fd /src/script/lua_api/l_areastore.cpp
parent5fa614d97e13af64be490336392abe2a54fdcbc1 (diff)
downloadminetest-fec30e37ac1d160a942777b05a7717b5395c4d99.tar.gz
minetest-fec30e37ac1d160a942777b05a7717b5395c4d99.tar.bz2
minetest-fec30e37ac1d160a942777b05a7717b5395c4d99.zip
Fix AreaStore's IDs persistence (#8888)
Improve documentation Read old formats Fix free ID function. Return first gap in map
Diffstat (limited to 'src/script/lua_api/l_areastore.cpp')
-rw-r--r--src/script/lua_api/l_areastore.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/script/lua_api/l_areastore.cpp b/src/script/lua_api/l_areastore.cpp
index d53d74aa8..908c766b0 100644
--- a/src/script/lua_api/l_areastore.cpp
+++ b/src/script/lua_api/l_areastore.cpp
@@ -185,6 +185,7 @@ int LuaAreaStore::l_insert_area(lua_State *L)
if (lua_isnumber(L, 5))
a.id = lua_tonumber(L, 5);
+ // Insert & assign a new ID if necessary
if (!ast->insertArea(&a))
return 0;