Add "clean" mod.
parent
ea55ace43e
commit
8b2b91eed1
|
@ -5,6 +5,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
|
|||
|
||||
The following mods are also included:
|
||||
* admin/
|
||||
* [clean][] (WTFPL)
|
||||
* [invisible][] ([LGPL / CC BY-SA](mods/admin/invisible/readme.txt))
|
||||
* [adv_spawning][] ([???](mods/adv_spawning/README.txt))
|
||||
* [animalmaterials (modpack)][animalmaterials] (CC-BY-SA / CC0)
|
||||
|
@ -136,6 +137,7 @@ The following mods are also included:
|
|||
[character_creator]: https://forum.minetest.net/viewtopic.php?f=9&t=13138
|
||||
[chatlog]: https://forum.minetest.net/viewtopic.php?id=6220
|
||||
[christmas]: https://forum.minetest.net/viewtopic.php?t=3950
|
||||
[clean]: https://forum.minetest.net/viewtopic.php?t=2777
|
||||
[cme]: https://forum.minetest.net/viewtopic.php?t=8638
|
||||
[compass]: https://forum.minetest.net/viewtopic.php?t=3785
|
||||
[compassgps]: https://forum.minetest.net/viewtopic.php?t=9373
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
-- LICENSE: WTFPL
|
||||
-- Copyright: PilzAdam
|
||||
|
||||
local old_nodes = {"mod:a", "mod:b"}
|
||||
local old_entities = {}
|
||||
|
||||
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.env: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
|
Loading…
Reference in New Issue