Remove functionality for cleaning anything other than entities:

For cleaning other objects it is recommended to use 'override' mod:
https://github.com/AntumMT/mod-override
This commit is contained in:
Jordan Irwin 2017-08-30 14:57:18 -07:00
parent 49fc2c6315
commit 6622ea8bab

View file

@ -18,35 +18,9 @@ local function logDebug(msg)
end
end
local old_nodes = {}
local old_entities = {}
-- Old/Missing nodes that should be replaced with something currently in game
local replace_nodes = {}
-- "Replaces" an old/non-existent node
local function replace_node(old_node, new_node)
core.register_alias(old_node, new_node)
end
for _,node_name in ipairs(old_nodes) do
core.register_node(':' .. node_name, {
groups = {old=1},
})
end
core.register_abm({
nodenames = {'group:old'},
interval = 1,
chance = 1,
action = function(pos, node)
core.remove_node(pos)
end,
})
-- Populate entities list from file in world path
local e_list = nil
local e_path = core.get_worldpath() .. '/clean_entities.txt'
@ -80,8 +54,3 @@ for _, entity_name in ipairs(old_entities) do
end,
})
end
-- Replace old nodes
for _, node_group in pairs(replace_nodes) do
replace_node(node_group[1], node_group[2])
end