homedecor_modpack/chains/init.lua

182 lines
3.9 KiB
Lua
Raw Normal View History

2017-01-29 22:41:03 +01:00
local S = homedecor_i18n.gettext
2015-02-03 17:54:44 +01:00
local chains_sbox = {
type = "fixed",
fixed = { -0.1, -0.625, -0.1, 0.1, 0.5, 0.1 }
}
local topchains_sbox = {
type = "fixed",
fixed = {
{ -0.25, 0.35, -0.25, 0.25, 0.5, 0.25 },
{ -0.1, -0.625, -0.1, 0.1, 0.4, 0.1 }
}
}
2014-08-26 00:56:48 +02:00
minetest.register_node("chains:chain", {
2017-01-29 22:41:03 +01:00
description = S("Hanging chain (wrought iron)"),
2015-02-03 17:54:44 +01:00
drawtype = "mesh",
mesh = "chains.obj",
2015-04-27 06:38:23 +02:00
tiles = {"chains_wrought_iron.png"},
walkable = false,
climbable = true,
sunlight_propagates = true,
paramtype = "light",
2015-02-03 17:54:44 +01:00
inventory_image = "chain_wrought_iron_inv.png",
groups = {cracky=3},
2015-02-03 17:54:44 +01:00
selection_box = chains_sbox,
})
2015-02-03 17:54:44 +01:00
minetest.register_node("chains:chain_brass", {
2017-01-29 22:41:03 +01:00
description = S("Hanging chain (brass)"),
2015-02-03 17:54:44 +01:00
drawtype = "mesh",
mesh = "chains.obj",
2015-04-27 06:38:23 +02:00
tiles = {"chains_brass.png"},
walkable = false,
climbable = true,
sunlight_propagates = true,
paramtype = "light",
2015-02-03 17:54:44 +01:00
inventory_image = "chain_brass_inv.png",
groups = {cracky=3},
2015-02-03 17:54:44 +01:00
selection_box = chains_sbox,
})
2015-02-03 17:54:44 +01:00
minetest.register_node("chains:chain_top", {
2017-01-29 22:41:03 +01:00
description = S("Hanging chain (ceiling mount, wrought iron)"),
2015-02-03 17:54:44 +01:00
drawtype = "mesh",
mesh = "top_chains.obj",
2015-04-27 06:38:23 +02:00
tiles = {"chains_wrought_iron.png"},
walkable = false,
climbable = true,
sunlight_propagates = true,
paramtype = "light",
2015-02-03 17:54:44 +01:00
inventory_image = "top_chain_wrought_iron_inv.png",
groups = {cracky=3},
2015-02-03 17:54:44 +01:00
selection_box = topchains_sbox,
})
2015-02-03 17:54:44 +01:00
minetest.register_node("chains:chain_top_brass", {
2017-01-29 22:41:03 +01:00
description = S("Hanging chain (ceiling mount, brass)"),
2015-02-03 17:54:44 +01:00
drawtype = "mesh",
mesh = "top_chains.obj",
2015-04-27 06:38:23 +02:00
tiles = {"chains_brass.png"},
2014-08-26 00:56:48 +02:00
walkable = false,
climbable = true,
sunlight_propagates = true,
paramtype = "light",
2015-02-03 17:54:44 +01:00
inventory_image = "top_chain_brass_inv.png",
2014-08-26 00:56:48 +02:00
groups = {cracky=3},
2015-02-03 17:54:44 +01:00
selection_box = topchains_sbox,
2014-08-26 00:56:48 +02:00
})
2015-02-03 17:54:44 +01:00
minetest.register_node("chains:chandelier", {
2017-01-29 22:41:03 +01:00
description = S("Chandelier (wrought iron)"),
2015-02-03 17:54:44 +01:00
paramtype = "light",
2016-07-31 01:23:10 +02:00
light_source = default.LIGHT_MAX-2,
2014-08-26 00:56:48 +02:00
walkable = false,
climbable = true,
sunlight_propagates = true,
paramtype = "light",
2015-04-27 06:38:23 +02:00
tiles = {
"chains_wrought_iron.png",
"chains_candle.png",
{
name="chains_candle_flame.png",
animation={
type="vertical_frames",
aspect_w=16,
aspect_h=16,
length=3.0
}
}
},
drawtype = "mesh",
mesh = "chains_chandelier.obj",
2014-08-26 00:56:48 +02:00
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("chains:chandelier_brass", {
2017-01-29 22:41:03 +01:00
description = S("Chandelier (brass)"),
2014-08-26 00:56:48 +02:00
paramtype = "light",
2016-07-31 01:23:10 +02:00
light_source = default.LIGHT_MAX-2,
2015-02-03 17:54:44 +01:00
walkable = false,
2014-08-26 00:56:48 +02:00
climbable = true,
sunlight_propagates = true,
paramtype = "light",
2015-04-27 06:38:23 +02:00
tiles = {
"chains_brass.png",
"chains_candle.png",
{
name="chains_candle_flame.png",
animation={
type="vertical_frames",
aspect_w=16,
aspect_h=16,
length=3.0
}
}
},
drawtype = "mesh",
mesh = "chains_chandelier.obj",
2014-08-26 00:56:48 +02:00
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
})
-- crafts
minetest.register_craft({
output = 'chains:chain 2',
recipe = {
{'glooptest:chainlink'},
{'glooptest:chainlink'},
{'glooptest:chainlink'},
}
})
minetest.register_craft({
output = 'chains:chain_top',
recipe = {
{'default:steel_ingot'},
{'glooptest:chainlink'},
},
})
minetest.register_craft({
output = 'chains:chandelier',
recipe = {
{'', 'glooptest:chainlink', ''},
{'default:torch', 'glooptest:chainlink', 'default:torch'},
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
}
})
2014-08-26 00:56:48 +02:00
-- brass versions
minetest.register_craft({
output = 'chains:chain_brass 2',
recipe = {
{'homedecor:chainlink_brass'},
{'homedecor:chainlink_brass'},
{'homedecor:chainlink_brass'},
}
})
minetest.register_craft({
output = 'chains:chain_top_brass',
recipe = {
{'technic:brass_ingot'},
{'homedecor:chainlink_brass'},
2014-08-26 00:56:48 +02:00
},
})
minetest.register_craft({
output = 'chains:chandelier_brass',
recipe = {
{'', 'homedecor:chainlink_brass', ''},
{'default:torch', 'homedecor:chainlink_brass', 'default:torch'},
{'technic:brass_ingot', 'technic:brass_ingot', 'technic:brass_ingot'},
}
})