mirror of
https://github.com/minetest-mods/MoreMesecons.git
synced 2024-08-20 21:24:05 +02:00
Data associated to a LuaBlock is redundantly stored in both its metadata and in the mod storage so that it is not possible to hack a LuaBlock by changing its metadata or copying it using WorldEdit. This commit changes how it is done: * Store full code instead of storing MD5 checksum, which avoids bug caused by serializing non-ASCII strings using minetest.serialize, * Also store owner, * Use `minetest.hash_node_position` instead of deprecated vector_extras set_data_to_pos etc, * Remove mod storage data associated with the LuaBlock when destroying it, * Create helper functions for manipulating the mod storage in moremesecons_utils, I will soon update other parts of MoreMesecons as well to use them. This commit breaks backwards compatibility: previously created LuaBlocks will have to be reset by opening the formspec and pressing the `Submit` button. This commit also fixes an unrelated bug: code in the formspec was not correctly escaped using minetest.formspec_escape. |
||
---|---|---|
.. | ||
textures | ||
depends.txt | ||
init.lua |