init.lua 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. -- Bushes classic mod originally by unknown
  2. -- now maintained by VanessaE
  3. bushes_classic = {}
  4. -- support for i18n
  5. local S = minetest.get_translator("bushes_classic")
  6. bushes_classic.bushes = {
  7. "strawberry",
  8. "blackberry",
  9. "blueberry",
  10. "raspberry",
  11. "gooseberry",
  12. "mixed_berry"
  13. }
  14. bushes_classic.bushes_descriptions = {
  15. {S("Strawberry"), S("Raw Strawberry pie"), S("Cooked Strawberry pie"), S("Slice of Strawberry pie"), S("Basket with Strawberry pies"), S("Strawberry Bush")},
  16. {S("Blackberry"), S("Raw Blackberry pie"), S("Cooked Blackberry pie"), S("Slice of Blackberry pie"), S("Basket with Blackberry pies"), S("Blackberry Bush")},
  17. {S("Blueberry"), S("Raw Blueberry pie"), S("Cooked Blueberry pie"), S("Slice of Blueberry pie"), S("Basket with Blueberry pies"), S("Blueberry Bush")},
  18. {S("Raspberry"), S("Raw Raspberry pie"), S("Cooked Raspberry pie"), S("Slice of Raspberry pie"), S("Basket with Raspberry pies"), S("Raspberry Bush")},
  19. {S("Gooseberry"), S("Raw Gooseberry pie"), S("Cooked Gooseberry pie"), S("Slice of Gooseberry pie"), S("Basket with Gooseberry pies"), S("Gooseberry Bush")},
  20. {S("Mixed Berry"), S("Raw Mixed Berry pie"), S("Cooked Mixed Berry pie"), S("Slice of Mixed Berry pie"), S("Basket with Mixed Berry pies"), S("Currently fruitless Bush")}
  21. }
  22. bushes_classic.spawn_list = {}
  23. local modpath = minetest.get_modpath('bushes_classic')
  24. dofile(modpath..'/cooking.lua')
  25. dofile(modpath..'/nodes.lua')
  26. biome_lib:spawn_on_surfaces({
  27. spawn_delay = 3600,
  28. spawn_plants = bushes_classic.spawn_list,
  29. avoid_radius = 10,
  30. spawn_chance = 100,
  31. spawn_surfaces = {
  32. "default:dirt_with_grass",
  33. "woodsoils:dirt_with_leaves_1",
  34. "woodsoils:grass_with_leaves_1",
  35. "woodsoils:grass_with_leaves_2",
  36. "farming:soil",
  37. "farming:soil_wet"
  38. },
  39. avoid_nodes = {"group:bush"},
  40. seed_diff = 545342534, -- chosen by a fair mashing of the keyboard - guaranteed to be random :P
  41. plantlife_limit = -0.1,
  42. light_min = 10,
  43. temp_min = 0.15, -- approx 20C
  44. temp_max = -0.15, -- approx 35C
  45. humidity_min = 0, -- 50% RH
  46. humidity_max = -1, -- 100% RH
  47. })
  48. minetest.register_alias("bushes:basket_pies", "bushes:basket_strawberry")
  49. print("[Bushes] Loaded.")