Farming: Set default minlight/maxlight to 8/max

master
Wuzzy 2021-05-16 01:06:56 +02:00
parent 68ad1288ed
commit f9cfb3f3fe
3 changed files with 7 additions and 16 deletions

View File

@ -23,6 +23,6 @@ Plant definition
inventory_image = "unknown_item.png", -- Image to be used as seed's wield- and inventory image
steps = 8, -- How many steps the plant has to grow, until it can be harvested
^ Always provide a plant texture for each step, format: modname_plantname_i.png (i = stepnumber)
minlight = 13, -- Minimum light to grow
maxlight = minetest.LIGHT_MAX -- Maximum light to grow
minlight = 8, -- Minimum light to grow (default: 8)
maxlight = minetest.LIGHT_MAX -- Maximum light to grow (default: minetest.LIGHT_MAX)
}

View File

@ -1,5 +1,8 @@
local S = minetest.get_translator("hades_farming")
local DEFAULT_MINLIGHT = 8
local DEFAULT_MAXLIGHT = minetest.LIGHT_MAX
-- Wear out hoes, place soil
-- TODO Ignore group:flower
hades_farming.hoe_on_use = function(itemstack, user, pointed_thing, uses)
@ -172,10 +175,10 @@ hades_farming.register_plant = function(name, def)
return nil
end
if not def.minlight then
def.minlight = 1
def.minlight = DEFAULT_MINLIGHT
end
if not def.maxlight then
def.maxlight = 14
def.maxlight = DEFAULT_MAXLIGHT
end
if not def.fertility then
def.fertility = {}

View File

@ -14,8 +14,6 @@ hades_farming.register_plant("hades_farming:wheat", {
_tt_help = S("Grows on Wet Soil in light"),
inventory_image = "hades_farming_wheat_seed.png",
steps = 3,
minlight = 13,
maxlight = minetest.LIGHT_MAX,
fertility = {"grassland"}
})
minetest.register_craftitem("hades_farming:wheat", {
@ -60,8 +58,6 @@ hades_farming.register_plant("hades_farming:cotton", {
description_harvest = S("String"),
inventory_image = "hades_farming_cotton_seed.png",
steps = 3,
minlight = 13,
maxlight = minetest.LIGHT_MAX,
fertility = {"grassland", "desert"}
})
minetest.register_craftitem("hades_farming:cotton", {
@ -103,8 +99,6 @@ hades_farming.register_plant("hades_farming:tomato", {
_tt_help = S("Grows on Wet Soil in light"),
inventory_image = "hades_farming_tomato_seed.png",
steps = 3,
minlight = 8,
maxlight = 20,
fertility = {"grassland", "desert"}
})
minetest.register_craftitem("hades_farming:tomato", {
@ -119,8 +113,6 @@ hades_farming.register_plant("hades_farming:potato", {
_tt_help = S("Grows on Wet Soil in light"),
inventory_image = "hades_farming_potato_seed.png",
steps = 3,
minlight = 8,
maxlight = 20,
fertility = {"grassland", "desert"}
})
minetest.register_craftitem("hades_farming:potato", {
@ -135,8 +127,6 @@ hades_farming.register_plant("hades_farming:strawberry", {
_tt_help = S("Grows on Wet Soil in light"),
inventory_image = "hades_farming_strawberry_seed.png",
steps = 3,
minlight = 8,
maxlight = 20,
fertility = {"grassland", "desert"}
})
minetest.register_craftitem("hades_farming:strawberry", {
@ -151,8 +141,6 @@ hades_farming.register_plant("hades_farming:spice", {
_tt_help = S("Grows on Wet Soil in light"),
inventory_image = "hades_farming_spice_seed.png",
steps = 3,
minlight = 8,
maxlight = 20,
fertility = {"grassland", "desert"}
})
minetest.register_craftitem("hades_farming:spice", {