Skip to content
Snippets Groups Projects
init.lua 1.51 KiB
Newer Older
Vanessa Ezekowitz's avatar
Vanessa Ezekowitz committed
-- Bushes classic mod originally by unknown
-- now maintained by VanessaE
--
-- License:  WTFPL
-- Boilerplate to support localized strings if intllib mod is installed.
local S
if (minetest.get_modpath("intllib")) then
  dofile(minetest.get_modpath("intllib").."/intllib.lua")
  S = intllib.Getter(minetest.get_current_modname())
else
  S = function ( s ) return s end
end
Vanessa Ezekowitz's avatar
Vanessa Ezekowitz committed

bushes_classic = {}

bushes_classic.bushes = {
Vanessa Ezekowitz's avatar
Vanessa Ezekowitz committed
	"blackberry",
	"blueberry",
	"raspberry",
	"gooseberry",
	"mixed_berry"
Vanessa Ezekowitz's avatar
Vanessa Ezekowitz committed
bushes_classic.bushes_descriptions = {
Vanessa Ezekowitz's avatar
Vanessa Ezekowitz committed
	"Blackberry",
	"Blueberry",
	"Raspberry",
	"Gooseberry",
	"Mixed Berry"
Vanessa Ezekowitz's avatar
Vanessa Ezekowitz committed
bushes_classic.spawn_list = {}
Vanessa Ezekowitz's avatar
Vanessa Ezekowitz committed
dofile(minetest.get_modpath('bushes_classic') .. '/cooking.lua')
dofile(minetest.get_modpath('bushes_classic') .. '/nodes.lua')

plantslib:spawn_on_surfaces({
	spawn_delay = 3600,
Vanessa Ezekowitz's avatar
Vanessa Ezekowitz committed
	spawn_plants = bushes_classic.spawn_list,
	avoid_radius = 10,
	spawn_chance = 100,
	spawn_surfaces = {
		"default:dirt_with_grass",
		"woodsoils:dirt_with_leaves_1",
		"woodsoils:grass_with_leaves_1",
		"woodsoils:grass_with_leaves_2",
		"farming:soil",
		"farming:soil_wet"
Vanessa Ezekowitz's avatar
Vanessa Ezekowitz committed
	seed_diff = 545342534, -- chosen by a fair mashing of the keyboard - guaranteed to be random :P
	plantlife_limit = -0.1,
	light_min = 10,
	temp_min = 0.15, -- approx 20C
	temp_max = -0.15, -- approx 35C
	humidity_min = 0, -- 50% RH
	humidity_max = -1, -- 100% RH
})

Vanessa Ezekowitz's avatar
Vanessa Ezekowitz committed
minetest.register_alias("bushes:basket_pies", "bushes:basket_strawberry")
print(S("[Bushes] Loaded."))