mirror of
https://codeberg.org/AntumLuanti/mod-cleaner.git
synced 2025-03-15 04:41:22 +00:00
Add original code by PilzAdam:
@ forum post updated: June 08, 2013
This commit is contained in:
commit
ff382bba88
5 changed files with 63 additions and 0 deletions
13
LICENSE.txt
Normal file
13
LICENSE.txt
Normal file
|
@ -0,0 +1,13 @@
|
|||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
Version 2, December 2004
|
||||
|
||||
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim or modified
|
||||
copies of this license document, and changing it is allowed as long
|
||||
as the name is changed.
|
||||
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. You just DO WHAT THE FUCK YOU WANT TO.
|
18
README.md
Normal file
18
README.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
## Clean mod for [Minetest][]
|
||||
|
||||
|
||||
---
|
||||
### **Description:**
|
||||
|
||||
Fork of [PilzAdam's ***clean*** mod][f.pilzadam] for Minetest.
|
||||
|
||||
|
||||
---
|
||||
### **Licensing:**
|
||||
|
||||
[WTFPL](LICENSE.txt)
|
||||
|
||||
|
||||
[Minetest]: http://www.minetest.net/
|
||||
|
||||
[f.pilzadam]: https://forum.minetest.net/viewtopic.php?t=2777
|
1
description.txt
Normal file
1
description.txt
Normal file
|
@ -0,0 +1 @@
|
|||
A very simple mod that deletes unknown blocks and removes unknown entities.
|
28
init.lua
Normal file
28
init.lua
Normal file
|
@ -0,0 +1,28 @@
|
|||
-- clean by PilzAdam
|
||||
-- LICENSE: WTFPL
|
||||
|
||||
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
|
3
mod.conf
Normal file
3
mod.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
name = clean
|
||||
author = PilzAdam
|
||||
license = WTFPL
|
Loading…
Add table
Reference in a new issue