aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_areastore.cpp
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2019-06-10 13:01:07 +0200
committerGitHub <noreply@github.com>2019-06-10 13:01:07 +0200
commite2f8f4da83206d551f9acebd14d574ea37ca214a (patch)
tree0a2a4f63b59db1a511c781c617b5e80f608723e5 /src/script/lua_api/l_areastore.cpp
parente40be619f2a30c7a4d5042d922f0fe57539411d5 (diff)
downloadminetest-e2f8f4da83206d551f9acebd14d574ea37ca214a.tar.gz
minetest-e2f8f4da83206d551f9acebd14d574ea37ca214a.tar.bz2
minetest-e2f8f4da83206d551f9acebd14d574ea37ca214a.zip
Formspecs: Close on metadata removal (#8348)
Formspecs will now close as soon the formspec string in the node metadata turns invalid.
Diffstat (limited to 'src/script/lua_api/l_areastore.cpp')
0 files changed, 0 insertions, 0 deletions
pan class="hl opt">= { type = "set_hp", from = "mod" } player:set_hp(3) assert(expect == nil) expect = { a = 234, type = "set_hp", from = "mod" } player:set_hp(10, { a= 234 }) assert(expect == nil) expect = { df = 3458973454, type = "fall", from = "mod" } player:set_hp(10, { type = "fall", df = 3458973454 }) assert(expect == nil) end minetest.register_on_player_hpchange(function(player, hp, reason) if not expect then return end for key, value in pairs(reason) do assert(expect[key] == value) end for key, value in pairs(expect) do assert(reason[key] == value) end expect = nil end) local function run_player_meta_tests(player) local meta = player:get_meta() meta:set_string("foo", "bar")