Created
June 27, 2014 19:26
-
-
Save davisonio/54ca8c6b0a3b82a56987 to your computer and use it in GitHub Desktop.
Clean mod for minetest https://forum.minetest.net/viewtopic.php?f=11&t=2777
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
local old_nodes = {"mod:block1", "mod:block2", "mod:block3"} | |
local old_entities = {"mod:item1", "mod:item2", "mod:item3"} | |
for _,node_name in ipairs(old_nodes) do | |
minetest.register_node(":"..node_name, { | |
groups = {old=1}, | |
}) | |
end | |
minetest.register_abm({ | |
nodenames = {"group:old"}, | |
interval = 1, | |
chance = 1, | |
action = function(pos, node) | |
minetest.remove_node(pos) | |
end, | |
}) | |
for _,entity_name in ipairs(old_entities) do | |
minetest.register_entity(":"..entity_name, { | |
on_activate = function(self, staticdata) | |
self.object:remove() | |
end, | |
}) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment