init.lua 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. -- Wallplaster by Nakilashiva
  2. -- All code and textures by Nakilashiva with SOME help from MustTest
  3. -- (Aside from initial texture taken from google heh heh heh.)
  4. local items = {
  5. {name="white", capitalized="White"},
  6. {name="blue", capitalized="Blue"},
  7. {name="pink", capitalized="Pink"},
  8. {name="yellow", capitalized="Yellow"},
  9. {name="grey", capitalized="Grey"},
  10. {name="green", capitalized="Green"},
  11. {name="orange", capitalized="Orange"},
  12. {name="purple", capitalized="Purple"},
  13. }
  14. for k, v in ipairs(items) do
  15. minetest.register_node("wallplaster:" .. v.name, {
  16. description = v.capitalized .. " Wall Plaster",
  17. tiles = {"wallplaster_" .. v.name .. ".png"},
  18. groups = utility.dig_groups("wood", {flammable = 3}),
  19. sounds = default.node_sound_wood_defaults(),
  20. })
  21. stairs.register_stair_and_slab(
  22. "wallplaster_" .. v.name,
  23. "wallplaster:" .. v.name,
  24. utility.dig_groups("wood", {flammable = 3}),
  25. {"wallplaster_" .. v.name .. ".png"},
  26. v.capitalized .. " Wall Plaster",
  27. default.node_sound_wood_defaults()
  28. )
  29. end
  30. local crafts = {
  31. {name="white", dye="white"},
  32. {name="blue", dye="cyan"},
  33. {name="pink", dye="pink"},
  34. {name="yellow", dye="yellow"},
  35. {name="grey", dye="grey"},
  36. {name="green", dye="green"},
  37. {name="orange", dye="orange"},
  38. {name="purple", dye="violet"},
  39. }
  40. for k, v in ipairs(crafts) do
  41. minetest.register_craft({
  42. output = 'wallplaster:' .. v.name,
  43. type = "shapeless",
  44. recipe = {'basictrees:aspen_wood', 'default:clay_lump', "dye:" .. v.dye}
  45. })
  46. end