forked from mtcontrib/homedecor_modpack
get rid of old table conversion abms
This commit is contained in:
parent
da1f2b1430
commit
40cd59aa24
@ -90,44 +90,6 @@ for i, mat in ipairs(materials) do
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- conversion routines for old non-6dfacedir tables
|
|
||||||
|
|
||||||
local tlist_s = {}
|
|
||||||
local tlist_t = {}
|
|
||||||
local dirs2 = { 9, 18, 7, 12 }
|
|
||||||
|
|
||||||
for i in ipairs(materials) do
|
|
||||||
local m = materials[i][1]
|
|
||||||
table.insert(tlist_s, "homedecor:"..m.."_table_large_s")
|
|
||||||
table.insert(tlist_s, "homedecor:"..m.."_table_small_square_s")
|
|
||||||
table.insert(tlist_s, "homedecor:"..m.."_table_small_round_s")
|
|
||||||
|
|
||||||
table.insert(tlist_t, "homedecor:"..m.."_table_large_t")
|
|
||||||
table.insert(tlist_t, "homedecor:"..m.."_table_small_square_t")
|
|
||||||
table.insert(tlist_t, "homedecor:"..m.."_table_small_round_t")
|
|
||||||
end
|
|
||||||
|
|
||||||
minetest.register_abm({
|
|
||||||
nodenames = tlist_s,
|
|
||||||
interval = 1,
|
|
||||||
chance = 1,
|
|
||||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
|
||||||
local newnode = string.sub(node.name, 1, -3) -- strip the "_s" from the name
|
|
||||||
local fdir = node.param2 or 0
|
|
||||||
minetest.set_node(pos, {name = newnode, param2 = dirs2[fdir+1]})
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_abm({
|
|
||||||
nodenames = tlist_t,
|
|
||||||
interval = 1,
|
|
||||||
chance = 1,
|
|
||||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
|
||||||
local newnode = string.sub(node.name, 1, -3) -- strip the "_t" from the name
|
|
||||||
minetest.set_node(pos, { name = newnode, param2 = 20 })
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
-- other tables
|
-- other tables
|
||||||
|
|
||||||
homedecor.register("utility_table_top", {
|
homedecor.register("utility_table_top", {
|
||||||
@ -202,7 +164,6 @@ homedecor.register("utility_table_legs", {
|
|||||||
|
|
||||||
-- crafting
|
-- crafting
|
||||||
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
output = "homedecor:glass_table_small_round_b 15",
|
output = "homedecor:glass_table_small_round_b 15",
|
||||||
recipe = {
|
recipe = {
|
||||||
|
Loading…
Reference in New Issue
Block a user