forked from mtcontrib/coloredwood
add optional moreblocks/stairsplus support
defaults to enabled, to disable add: coloredwood_enable_stairsplus = false to minetest.conf.
This commit is contained in:
parent
252d3ee1e8
commit
1a3b387c9a
|
@ -1,2 +1,3 @@
|
||||||
default
|
default
|
||||||
unifieddyes
|
unifieddyes
|
||||||
|
moreblocks?
|
||||||
|
|
7
init.lua
7
init.lua
|
@ -1,4 +1,4 @@
|
||||||
-- Colored Wood mod by Vanessa Ezekowitz ~~ 2013-03-20
|
-- Colored Wood mod by Vanessa Ezekowitz
|
||||||
-- based on my unifieddyes template.
|
-- based on my unifieddyes template.
|
||||||
--
|
--
|
||||||
-- License: WTFPL
|
-- License: WTFPL
|
||||||
|
@ -16,8 +16,8 @@
|
||||||
-- Uncolored sticks cannot be dyed separately, but they can still be used
|
-- Uncolored sticks cannot be dyed separately, but they can still be used
|
||||||
-- to build colored wooden fences. These are crafted either by placing six
|
-- to build colored wooden fences. These are crafted either by placing six
|
||||||
-- plain, uncolored sticks into the crafting grid in the usual manner, plus
|
-- plain, uncolored sticks into the crafting grid in the usual manner, plus
|
||||||
-- one portion of dye or paint in the upper-left corner of the grid
|
-- one portion of dye in the upper-left corner of the grid
|
||||||
-- (D = dye or paint, S = uncolored stick):
|
-- (D = dye, S = uncolored stick):
|
||||||
--
|
--
|
||||||
-- D - -
|
-- D - -
|
||||||
-- S S S
|
-- S S S
|
||||||
|
@ -43,7 +43,6 @@
|
||||||
dofile(minetest.get_modpath("coloredwood").."/wood.lua")
|
dofile(minetest.get_modpath("coloredwood").."/wood.lua")
|
||||||
dofile(minetest.get_modpath("coloredwood").."/fence.lua")
|
dofile(minetest.get_modpath("coloredwood").."/fence.lua")
|
||||||
dofile(minetest.get_modpath("coloredwood").."/stick.lua")
|
dofile(minetest.get_modpath("coloredwood").."/stick.lua")
|
||||||
--dofile(minetest.get_modpath("coloredwood").."/ladder.lua")
|
|
||||||
|
|
||||||
print("[Colored Wood] Loaded!")
|
print("[Colored Wood] Loaded!")
|
||||||
|
|
||||||
|
|
73
wood.lua
73
wood.lua
|
@ -3,6 +3,14 @@
|
||||||
--
|
--
|
||||||
-- License: WTFPL
|
-- License: WTFPL
|
||||||
|
|
||||||
|
local coloredwood = {}
|
||||||
|
|
||||||
|
coloredwood.enable_stairsplus = true
|
||||||
|
|
||||||
|
if minetest.setting_getbool("coloredwood_enable_stairsplus") == false or not minetest.get_modpath("moreblocks") then
|
||||||
|
coloredwood.enable_stairsplus = false
|
||||||
|
end
|
||||||
|
|
||||||
local colored_block_modname = "coloredwood"
|
local colored_block_modname = "coloredwood"
|
||||||
local colored_block_description = "Wood Planks"
|
local colored_block_description = "Wood Planks"
|
||||||
local neutral_block = "default:wood"
|
local neutral_block = "default:wood"
|
||||||
|
@ -106,8 +114,6 @@ for shade = 1, 3 do
|
||||||
minetest.register_node(colorname, {
|
minetest.register_node(colorname, {
|
||||||
description = nodedesc,
|
description = nodedesc,
|
||||||
tiles = { pngname },
|
tiles = { pngname },
|
||||||
-- inventory_image = pngname,
|
|
||||||
-- wield_image = pngname,
|
|
||||||
sunlight_propagates = colored_block_sunlight,
|
sunlight_propagates = colored_block_sunlight,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
walkable = colored_block_walkable,
|
walkable = colored_block_walkable,
|
||||||
|
@ -118,8 +124,6 @@ for shade = 1, 3 do
|
||||||
minetest.register_node(s50colorname, {
|
minetest.register_node(s50colorname, {
|
||||||
description = s50nodedesc,
|
description = s50nodedesc,
|
||||||
tiles = { s50pngname },
|
tiles = { s50pngname },
|
||||||
-- inventory_image = s50pngname,
|
|
||||||
-- wield_image = s50pngname,
|
|
||||||
sunlight_propagates = colored_block_sunlight,
|
sunlight_propagates = colored_block_sunlight,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
walkable = colored_block_walkable,
|
walkable = colored_block_walkable,
|
||||||
|
@ -127,6 +131,35 @@ for shade = 1, 3 do
|
||||||
sounds = colored_block_sound
|
sounds = colored_block_sound
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if coloredwood.enable_stairsplus then
|
||||||
|
|
||||||
|
-- stairsplus:register_all(modname, subname, recipeitem, {fields})
|
||||||
|
|
||||||
|
stairsplus:register_all(
|
||||||
|
"coloredwood",
|
||||||
|
"wood_"..shadename..huename,
|
||||||
|
colorname,
|
||||||
|
{
|
||||||
|
groups = colored_block_groups,
|
||||||
|
tiles = { pngname },
|
||||||
|
description = nodedesc,
|
||||||
|
drop = "wood_"..shadename..huename,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
stairsplus:register_all(
|
||||||
|
"coloredwood",
|
||||||
|
"wood_"..shadename..huename.."_s50",
|
||||||
|
s50colorname,
|
||||||
|
{
|
||||||
|
groups = colored_block_groups,
|
||||||
|
tiles = { s50pngname },
|
||||||
|
description = s50nodedesc,
|
||||||
|
drop = "wood_"..shadename..huename.."_s50",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "fuel",
|
type = "fuel",
|
||||||
recipe = colorname,
|
recipe = colorname,
|
||||||
|
@ -177,8 +210,6 @@ for hue = 1, 12 do
|
||||||
minetest.register_node(colorname, {
|
minetest.register_node(colorname, {
|
||||||
description = nodedesc,
|
description = nodedesc,
|
||||||
tiles = { pngname },
|
tiles = { pngname },
|
||||||
-- inventory_image = pngname,
|
|
||||||
-- wield_image = pngname,
|
|
||||||
sunlight_propagates = colored_block_sunlight,
|
sunlight_propagates = colored_block_sunlight,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
walkable = colored_block_walkable,
|
walkable = colored_block_walkable,
|
||||||
|
@ -186,6 +217,20 @@ for hue = 1, 12 do
|
||||||
sounds = colored_block_sound
|
sounds = colored_block_sound
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if coloredwood.enable_stairsplus then
|
||||||
|
stairsplus:register_all(
|
||||||
|
"coloredwood",
|
||||||
|
"wood_light_"..huename,
|
||||||
|
colorname,
|
||||||
|
{
|
||||||
|
groups = colored_block_groups,
|
||||||
|
tiles = { pngname },
|
||||||
|
description = nodedesc,
|
||||||
|
drop = "wood_light_"..huename,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "fuel",
|
type = "fuel",
|
||||||
recipe = colorname,
|
recipe = colorname,
|
||||||
|
@ -225,8 +270,6 @@ for grey = 1,5 do
|
||||||
minetest.register_node(greyshadename, {
|
minetest.register_node(greyshadename, {
|
||||||
description = nodedesc,
|
description = nodedesc,
|
||||||
tiles = { pngname },
|
tiles = { pngname },
|
||||||
-- inventory_image = pngname,
|
|
||||||
-- wield_image = pngname,
|
|
||||||
sunlight_propagates = colored_block_sunlight,
|
sunlight_propagates = colored_block_sunlight,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
walkable = colored_block_walkable,
|
walkable = colored_block_walkable,
|
||||||
|
@ -234,6 +277,20 @@ for grey = 1,5 do
|
||||||
sounds = colored_block_sound
|
sounds = colored_block_sound
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if coloredwood.enable_stairsplus then
|
||||||
|
stairsplus:register_all(
|
||||||
|
"coloredwood",
|
||||||
|
"wood_"..greyname,
|
||||||
|
greyshadename,
|
||||||
|
{
|
||||||
|
groups = colored_block_groups,
|
||||||
|
tiles = { pngname },
|
||||||
|
description = nodedesc,
|
||||||
|
drop = "wood_"..greyname,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "fuel",
|
type = "fuel",
|
||||||
recipe = greyshadename,
|
recipe = greyshadename,
|
||||||
|
|
Loading…
Reference in New Issue