Added check for wool dependancy

This commit is contained in:
Fixer 2017-03-04 18:21:40 +02:00 committed by GitHub
parent 6455e192ba
commit 9394b04b68
1 changed files with 31 additions and 27 deletions

View File

@ -77,33 +77,37 @@ end
-- wool registrations -- wool registrations
local colorlist = { if minetest.get_modpath("wool") then
{"white", "White"},
{"grey", "Grey"},
{"black", "Black"},
{"red", "Red"},
{"yellow", "Yellow"},
{"green", "Green"},
{"cyan", "Cyan"},
{"blue", "Blue"},
{"magenta", "Magenta"},
{"orange", "Orange"},
{"violet", "Violet"},
{"brown", "Brown"},
{"pink", "Pink"},
{"dark_grey", "Dark Grey"},
{"dark_green", "Dark Green"},
}
for i in ipairs(colorlist) do local colorlist = {
local color = colorlist[i][1] {"white", "White"},
local colordesc = colorlist[i][2] {"grey", "Grey"},
{"black", "Black"},
{"red", "Red"},
{"yellow", "Yellow"},
{"green", "Green"},
{"cyan", "Cyan"},
{"blue", "Blue"},
{"magenta", "Magenta"},
{"orange", "Orange"},
{"violet", "Violet"},
{"brown", "Brown"},
{"pink", "Pink"},
{"dark_grey", "Dark Grey"},
{"dark_green", "Dark Green"},
}
for i in ipairs(colorlist) do
local color = colorlist[i][1]
local colordesc = colorlist[i][2]
stairsplus:register_all("wool", color, "wool:"..color, { stairsplus:register_all("wool", color, "wool:"..color, {
description = colordesc.." Wool", description = colordesc.." Wool",
tiles = {"wool_"..color..".png"}, tiles = {"wool_"..color..".png"},
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3,wool=1,not_in_creative_inventory=1}, groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,
sounds = default.node_sound_defaults(), flammable=3,wool=1,not_in_creative_inventory=1},
sunlight_propagates = true, sounds = default.node_sound_defaults(),
}) sunlight_propagates = true,
})
end
end end