Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("[Chains] v1.0")
- minetest.register_node("chains:chain", {
- description = "Chain",
- walkable = false,
- climbable = true,
- sunlight_propagates = true,
- paramtype = "light",
- drops = "",
- tile_images = { "Chain.png" },
- drawtype = "plantlike",
- groups = {cracky=3},
- sounds = default.node_sound_stone_defaults(),
- })
- minetest.register_node("chains:chain_top", {
- description = "Chain Top",
- walkable = false,
- climbable = true,
- sunlight_propagates = true,
- paramtype = "light",
- drops = "",
- tile_images = { "Chain_top.png" },
- drawtype = "plantlike",
- groups = {cracky=3},
- sounds = default.node_sound_stone_defaults(),
- })
- minetest.register_node("chains:chandelier", {
- description = "Chandelier",
- paramtype = "light",
- walkable = false,
- light_source = LIGHT_MAX-2,
- climbable = true,
- sunlight_propagates = true,
- paramtype = "light",
- drops = "",
- tile_images = { {name="Chandelier.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}}},
- drawtype = "plantlike",
- groups = {cracky=3},
- sounds = default.node_sound_stone_defaults(),
- })
- minetest.register_node("chains:roll", {
- description = "Roll of chains",
- inventory_image = "Chains_roll.png",
- on_construct = function(pos, node)
- if node.name == "default:air" then
- minetest.env:add_node(pos.x,pos.y,pos.x,{name="chains:chaintop"})
- end
- if minetest.env:get_node({pos.x, pos.y-1, pos.z}).name == "default:air" then
- minetest.env:add_node(pos.x,pos.y-1,pos.x,{name="chains:chain"})
- end
- if minetest.env:get_node({pos.x, pos.y-2, pos.z}).name == "default:air" then
- if node.name == "default:air" then
- minetest.env:add_node(pos.x,pos.y-2,pos.x ,{name="chains:chain"})
- end
- end
- })
- Error is:
- init.lua:57: unexpected symbol near '}'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement