123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
- minetest.register_node("farming_super:pole", {
- description = "Farming Pole",
- tiles = {"default_fence_junglewood.png"},
- paramtype = "light",
- drawtype = "nodebox",
-
- node_box = {
- type = "connected",
- fixed = {-1/16, -0.5, -1/16, 1/16, 0.5, 1/16},
- connect_back = {{-1/32, -1/2, 0, 1/32, -15/32, 1/2 }},
- connect_left = {{-1/2, -1/2, -1/32, 0, -15/32, 1/32}},
- connect_front = {{-1/32, -1/2, -1/2, 1/32, -15/32, 0 }},
- connect_right = {{ 0, -1/2, -1/32, 1/2, -15/32, 1/32}},
- },--[[
- node_box = {
- type = "fixed",
- fixed = {-1/16, -0.5, -1/16, 1/16, 0.5, 1/16},
- },]]
- collision_box = {
- type = "fixed",
- fixed = {-1/16, -0.5, -1/16, 1/16, 0.5, 1/16},
- },
- connects_to = {"farming_super:wire"},
- sunlight_propagates = true,
- is_ground_content = false,
- groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, plant = 1},
- sounds = default.node_sound_wood_defaults(),
- })
- minetest.register_craft({
- output = "farming_super:pole 1",
- recipe = {
- {"group:stick"},
- {"group:stick"},
- {"group:stick"},
- }
- })
- minetest.register_node("farming_super:wire", {
- description = "Farming Wire",
- tiles = {"default_fence_junglewood.png"},
- paramtype = "light",
- drawtype = "nodebox",
- node_box = {
- type = "connected",
- fixed = {-1/32, -1/2, -1/32, 1/32, -15/32, 1/32},
- connect_back = {{-1/32, -1/2, 0, 1/32, -15/32, 1/2 }},
- connect_left = {{-1/2, -1/2, -1/32, 0, -15/32, 1/32}},
- connect_front = {{-1/32, -1/2, -1/2, 1/32, -15/32, 0 }},
- connect_right = {{ 0, -1/2, -1/32, 1/2, -15/32, 1/32}},
- },
- collision_box = {
- type = "connected",
- -- fixed = {-1/2, -1/2, -1/2, 1/2, -15/32, 1/2},
- fixed = {-1/32, -1/2, -1/32, 1/32, -15/32, 1/32},
- connect_back = {{-1/32, -1/2, 0, 1/32, -15/32, 1/2 }},
- connect_left = {{-1/2, -1/2, -1/32, 0, -15/32, 1/32}},
- connect_front = {{-1/32, -1/2, -1/2, 1/32, -15/32, 0 }},
- connect_right = {{ 0, -1/2, -1/32, 1/2, -15/32, 1/32}},
- },
- selection_box = {
- type = "fixed",
- fixed = {-1/2, -1/2, -1/2, 1/2, -1/4, 1/2},
- },
- connects_to = {"farming_super:wire", "farming_super:pole"},
- sunlight_propagates = true,
- is_ground_content = false,
- groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, },
- sounds = default.node_sound_wood_defaults(),
- })
- minetest.register_craft({
- output = "farming_super:wire 16",
- recipe = {
- {"","",""},
- {"","",""},
- {"default:tin_ingot","default:tin_ingot","default:tin_ingot"},
- }
- })
- minetest.register_node("farming_super:barrel", {
- description = "Wooden Barrel",
- tiles = {
- "default_wood.png^farming_super_barrel_bung.png",
- "default_wood.png",
- "default_wood.png^farming_super_barrel_rings.png",
- "default_wood.png^farming_super_barrel_rings.png",
- "default_wood.png^farming_super_barrel_rings.png",
- "default_wood.png^farming_super_barrel_rings.png"
- },
- paramtype2 = "facedir",
- -- inventory_image = "bitumen_oil_drum.png",
- groups = {
- cracky=2,
- choppy=2,
- oddly_breakable_by_hand=2,
- },
- paramtype = "light",
- drawtype = "nodebox",
- node_box = {
- type = "fixed",
- fixed = {
- --11.25
- {-0.49, -0.5, -0.10, 0.49, 0.5, 0.10},
- {-0.10, -0.5, -0.49, 0.10, 0.5, 0.49},
- --22.5
- {-0.46, -0.5, -0.19, 0.46, 0.5, 0.19},
- {-0.19, -0.5, -0.46, 0.19, 0.5, 0.46},
- -- 33.75
- {-0.416, -0.5, -0.28, 0.416, 0.5, 0.28},
- {-0.28, -0.5, -0.416, 0.28, 0.5, 0.416},
- --45
- {-0.35, -0.5, -0.35, 0.35, 0.5, 0.35},
- },
- },
- selection_box = {
- type = "fixed",
- fixed = {
- {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
- },
- },
- })
- minetest.register_craft({
- output = "farming_super:barrel 1",
- recipe = {
- {"default:wood","default:wood","default:wood"},
- {"default:steel_ingot","default:steel_ingot","default:steel_ingot"},
- {"default:wood","default:wood","default:wood"},
- }
- })
- minetest.register_abm({
- label = "fall from vines",
- nodenames = {"group:hangs_from_vines"},
- interval = 20,
- chance = 10,
- action = function(pos, node)
- pos.y = pos.y + 1
- local wire = minetest.get_node(pos)
- if wire.name ~= "farming_super:wire" then
- pos.y = pos.y - 1
- minetest.set_node(pos, {name = "air"})
- end
- end,
- })
|