From 08846cd05cd402cc7f8d025aaba96c5bb0aade2c Mon Sep 17 00:00:00 2001 From: orwell96 Date: Thu, 28 Sep 2017 17:11:51 +0200 Subject: Add static_save property to luaentites to not save them statically. (#5112) * Add no_static_save property to luaentites to not save them statically. This allows for temporary objects that would get deleted anyway as soon as they are loaded again without the static saving overhead. * Use positive meaning for static_save object property * Invert meaning also for the LUA parameter Note: getboolfield() does not change &result when field does not exist, so it defaults to the default value in the header file, which is 'true'. * Extend push_object_properties() --- doc/lua_api.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 812b857f7..cd93ffc16 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -4199,6 +4199,10 @@ Definition tables nametag = "", -- by default empty, for players their name is shown if empty nametag_color = , -- sets color of nametag as ColorSpec infotext = "", -- by default empty, text to be shown when pointed at object + static_save = true, + -- ^ If false, never save this object statically. It will simply be deleted when the block gets unloaded. + -- ^ The get_staticdata() callback is never called then. + -- ^ Defaults to 'true' } ### Entity definition (`register_entity`) -- cgit v1.2.3