Skip to content

Commit

Permalink
Make wool sawable (#72)
Browse files Browse the repository at this point in the history
* Make wool sawable

Based on my simple research #71 enabling wool should not cause major slowdowns.

Code pasted from gloopblocks

* List wool as optional dependancy

* Added check for wool dependancy

* Make life easier for translators
  • Loading branch information
Fixer-007 authored and sofar committed Mar 15, 2017
1 parent e9c6cef commit fbfb079
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions depends.txt
@@ -1,3 +1,4 @@
default
intllib?
farming?
wool?
37 changes: 37 additions & 0 deletions stairsplus/registrations.lua
Expand Up @@ -74,3 +74,40 @@ for _, name in pairs(default_nodes) do
})
end
end
-- wool registrations
if minetest.get_modpath("wool") then
local colorlist = {
{"white", "White Wool"},
{"grey", "Grey Wool"},
{"black", "Black Wool"},
{"red", "Red Wool"},
{"yellow", "Yellow Wool"},
{"green", "Green Wool"},
{"cyan", "Cyan Wool"},
{"blue", "Blue Wool"},
{"magenta", "Magenta Wool"},
{"orange", "Orange Wool"},
{"violet", "Violet Wool"},
{"brown", "Brown Wool"},
{"pink", "Pink Wool"},
{"dark_grey", "Dark Grey Wool"},
{"dark_green", "Dark Green Wool"},
}
for i in ipairs(colorlist) do
local color = colorlist[i][1]
local colordesc = colorlist[i][2]
stairsplus:register_all("wool", color, "wool:"..color, {
description = colordesc,
tiles = {"wool_"..color..".png"},
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,
flammable=3,wool=1,not_in_creative_inventory=1},
sounds = default.node_sound_defaults(),
sunlight_propagates = true,
})
end
end

0 comments on commit fbfb079

Please sign in to comment.