Browse Source

stairs no longer dependency, will use only when found

tags/20181016
TenPlus1 1 year ago
parent
commit
83ef1cebb2
3 changed files with 38 additions and 30 deletions
  1. +18
    -14
      crops/hemp.lua
  2. +19
    -15
      crops/wheat.lua
  3. +1
    -1
      depends.txt

+ 18
- 14
crops/hemp.lua View File

@@ -111,21 +111,24 @@ minetest.register_craft( {
},
})

if stairs and stairs.mod and stairs.mod == "redo" then

stairs.register_all("hemp_block", "farming:hemp_block",
{snappy = 1, flammable = 2},
{"farming_hemp_block.png"},
"Hemp Block",
default.node_sound_leaves_defaults())
else

stairs.register_stair_and_slab("hemp_block", "farming:hemp_block",
{snappy = 1, flammable = 2},
{"farming_hemp_block.png"},
"Hemp Block",
default.node_sound_leaves_defaults())
-- check and register stairs
if minetest.global_exists("stairs") then

if stairs.mod and stairs.mod == "redo" then

stairs.register_all("hemp_block", "farming:hemp_block",
{snappy = 1, flammable = 2},
{"farming_hemp_block.png"},
"Hemp Block",
default.node_sound_leaves_defaults())
else

stairs.register_stair_and_slab("hemp_block", "farming:hemp_block",
{snappy = 1, flammable = 2},
{"farming_hemp_block.png"},
"Hemp Block",
default.node_sound_leaves_defaults())
end
end

-- paper


+ 19
- 15
crops/wheat.lua View File

@@ -51,21 +51,25 @@ minetest.register_craft({
}
})

if stairs and stairs.mod and stairs.mod == "redo" then

stairs.register_all("straw", "farming:straw",
{snappy = 3, flammable = 4},
{"farming_straw.png"},
"Straw",
default.node_sound_leaves_defaults())
else

stairs.register_stair_and_slab("straw", "farming:straw",
{snappy = 3, flammable = 4},
{"farming_straw.png"},
"Straw Stair",
"Straw Slab",
default.node_sound_leaves_defaults())
-- check and register stairs
if minetest.global_exists("stairs") then

if stairs.mod and stairs.mod == "redo" then

stairs.register_all("straw", "farming:straw",
{snappy = 3, flammable = 4},
{"farming_straw.png"},
"Straw",
default.node_sound_leaves_defaults())
else

stairs.register_stair_and_slab("straw", "farming:straw",
{snappy = 3, flammable = 4},
{"farming_straw.png"},
"Straw Stair",
"Straw Slab",
default.node_sound_leaves_defaults())
end
end

-- flour


+ 1
- 1
depends.txt View File

@@ -1,5 +1,5 @@
default
stairs
stairs?
intllib?
lucky_block?
toolranks?

Loading…
Cancel
Save