This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if run_unit_tests then | |
local test_item_name = | |
minetest:get_current_modname()..":preserve_metadata_test_node" | |
minetest.register_node(test_item_name, { | |
description="test", | |
groups={cracky=3, attached_node=1}, | |
preserve_metadata = function(pos, node, oldmeta, drops) | |
drops[1]:get_meta():set_string("test", "metadata_target_string") | |
end, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--() { cat >>/dev/null <<"SHELL_ARCHIVE_AND_LUA_SCRIPT" | |
-- | |
-- A block that shows text, and holds its text when it is dug up or falls, by ashtrayoz. | |
-- | |
-- This is an example to test some new callback stuff. | |
-- If you want to use it in a game, you should probably read through it and figure out | |
-- what is not finished first ;-) | |
-- Code is licensed under the same terms as MinetestGame (basically, LGPL 2.1 or later). | |
-- | |
-- To install: |