commit ecfc79103cc402f2279b5eae9a18f901f05c6957 Author: TenPlus1 Date: Sun Jan 10 14:11:03 2016 +0000 Initial upload diff --git a/README.md b/README.md new file mode 100644 index 0000000..71b803c --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +Wool mod for Minetest + +by TenPlus1 + +Yep, it's a simple replacement for the wool mod that allows you to dye any +wool any colour including white, and I've also added a wool sound when walking +on top of the wool blocks to replace the leaves sound. + +Textures are from Gambit's PixelBox texture pack. + +Sound is from freeSFX.co.uk and has a creative-commons license diff --git a/depends.txt b/depends.txt new file mode 100644 index 0000000..4ad96d5 --- /dev/null +++ b/depends.txt @@ -0,0 +1 @@ +default diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..e93ef3b --- /dev/null +++ b/init.lua @@ -0,0 +1,61 @@ +minetest.register_alias("wool:dark_blue", "wool:blue") +minetest.register_alias("wool:gold", "wool:yellow") + +function default.node_wool_defaults(table) + + table = table or {} + + table.footstep = table.footstep or + {name = "wool_coat_movement", gain = 1.0} + + table.dug = table.dug or + {name = "wool_coat_movement", gain = 0.25} + + table.place = table.place or + {name = "default_place_node", gain = 1.0} + + return table +end + +local wool_sound = default.node_wool_defaults() +--local wool_sound = default.node_sound_leaves_defaults() + +local wool_dyes = { + {"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 _, row in pairs(wool_dyes) do + + minetest.register_node("wool:" .. row[1], { + description = row[2] .. " Wool", + tiles = {"wool_" .. row[1] .. ".png"}, + groups = { + snappy = 2, choppy = 2, oddly_breakable_by_hand = 3, + flammable = 3, wool = 1 + }, + sounds = wool_sound, + }) + + minetest.register_craft({ + type = "shapeless", + output = "wool:" .. row[1], + recipe = {"dye:" .. row[1], "group:wool"}, + }) + +end + +print ("[MOD] Wool mod loaded") diff --git a/sounds/wool_coat_movement.ogg b/sounds/wool_coat_movement.ogg new file mode 100644 index 0000000..89df47f Binary files /dev/null and b/sounds/wool_coat_movement.ogg differ diff --git a/textures/wool_black.png b/textures/wool_black.png new file mode 100644 index 0000000..9a8e140 Binary files /dev/null and b/textures/wool_black.png differ diff --git a/textures/wool_blue.png b/textures/wool_blue.png new file mode 100644 index 0000000..b890e37 Binary files /dev/null and b/textures/wool_blue.png differ diff --git a/textures/wool_brown.png b/textures/wool_brown.png new file mode 100644 index 0000000..a699732 Binary files /dev/null and b/textures/wool_brown.png differ diff --git a/textures/wool_cyan.png b/textures/wool_cyan.png new file mode 100644 index 0000000..2a2e625 Binary files /dev/null and b/textures/wool_cyan.png differ diff --git a/textures/wool_dark_green.png b/textures/wool_dark_green.png new file mode 100644 index 0000000..d701c7e Binary files /dev/null and b/textures/wool_dark_green.png differ diff --git a/textures/wool_dark_grey.png b/textures/wool_dark_grey.png new file mode 100644 index 0000000..c071cbf Binary files /dev/null and b/textures/wool_dark_grey.png differ diff --git a/textures/wool_green.png b/textures/wool_green.png new file mode 100644 index 0000000..d6c5fa7 Binary files /dev/null and b/textures/wool_green.png differ diff --git a/textures/wool_grey.png b/textures/wool_grey.png new file mode 100644 index 0000000..9e2f4b7 Binary files /dev/null and b/textures/wool_grey.png differ diff --git a/textures/wool_magenta.png b/textures/wool_magenta.png new file mode 100644 index 0000000..d93273d Binary files /dev/null and b/textures/wool_magenta.png differ diff --git a/textures/wool_orange.png b/textures/wool_orange.png new file mode 100644 index 0000000..6ce44fc Binary files /dev/null and b/textures/wool_orange.png differ diff --git a/textures/wool_pink.png b/textures/wool_pink.png new file mode 100644 index 0000000..7d7d9e8 Binary files /dev/null and b/textures/wool_pink.png differ diff --git a/textures/wool_red.png b/textures/wool_red.png new file mode 100644 index 0000000..0a0ce71 Binary files /dev/null and b/textures/wool_red.png differ diff --git a/textures/wool_violet.png b/textures/wool_violet.png new file mode 100644 index 0000000..155b018 Binary files /dev/null and b/textures/wool_violet.png differ diff --git a/textures/wool_white.png b/textures/wool_white.png new file mode 100644 index 0000000..0798592 Binary files /dev/null and b/textures/wool_white.png differ diff --git a/textures/wool_yellow.png b/textures/wool_yellow.png new file mode 100644 index 0000000..a29c047 Binary files /dev/null and b/textures/wool_yellow.png differ