added planter delay + mod description
parent
fa485f49a5
commit
17c289f10a
|
@ -4,6 +4,9 @@
|
|||
-- width_side are the amount of blocks to each side (+ it's own block thus the width of a farm is (2xside)+1 )
|
||||
-- length would be the length of the farm from the front side (face side)
|
||||
|
||||
-- chance to plant, higher number is more delay
|
||||
autofarmer.planter_delay = 4
|
||||
|
||||
-- LV planter settings
|
||||
autofarmer.LV_planter_demand = 6000
|
||||
autofarmer.LV_planter_width_side = 2
|
||||
|
@ -25,7 +28,7 @@ autofarmer.harvester_min_demand = 4000
|
|||
autofarmer.harvester_demand_per_node = 4
|
||||
|
||||
-- delay is the time between possible harvest in seconds
|
||||
-- (including randomness unless set to 1 then every second harvest is checked)
|
||||
-- (including randomness, unless set to 1 then every second harvest is checked)
|
||||
autofarmer.MV_harvester_delay = 5
|
||||
|
||||
-- depth is how many blocks below the harvester will be harvested, default 1 so it can be stacked on planter
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
pipeworks
|
||||
|
||||
technic
|
||||
pipeworks
|
||||
moreores
|
||||
mesecons
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Adds LV-MV-HV Auto Planter and a customizable MV Harvester
|
16
planter.lua
16
planter.lua
|
@ -166,12 +166,14 @@ local function planter_run(pos, node)
|
|||
|
||||
local prefix = meta:get_string("power_flag")
|
||||
|
||||
if meta:get_int("enabled") == 1 and meta:get_int(prefix.."_EU_input") >= meta:get_int(prefix.."_EU_demand") then
|
||||
-- plant on plantable spot
|
||||
plant_seed(pos, node)
|
||||
-- create delay/chance so not every second something is planted
|
||||
if math.random(autofarmer.planter_delay) == 1 then
|
||||
if meta:get_int("enabled") == 1 and meta:get_int(prefix.."_EU_input") >= meta:get_int(prefix.."_EU_demand") then
|
||||
-- plant on plantable spot
|
||||
plant_seed(pos, node)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
set_planter_demand(meta)
|
||||
end
|
||||
|
||||
|
@ -180,7 +182,7 @@ end
|
|||
-- REGISTER NODES
|
||||
-- LV planter
|
||||
minetest.register_node("autofarmer:lv_planter", {
|
||||
description = "LV Auto Planter",
|
||||
description = "LV Planter",
|
||||
tiles = {"default_copper_block.png", "default_copper_block.png",
|
||||
"default_copper_block.png", "default_copper_block.png",
|
||||
"default_copper_block.png^farming_tool_stonehoe.png", "default_copper_block.png"},
|
||||
|
@ -279,7 +281,7 @@ end
|
|||
|
||||
-- MV PLANTER
|
||||
minetest.register_node("autofarmer:mv_planter", {
|
||||
description = "MV Auto Planter",
|
||||
description = "MV Planter",
|
||||
tiles = {"default_bronze_block.png", "default_bronze_block.png",
|
||||
"default_bronze_block.png", "default_bronze_block.png",
|
||||
"default_bronze_block.png^farming_tool_bronzehoe.png", "default_bronze_block.png"},
|
||||
|
@ -352,7 +354,7 @@ minetest.register_node("autofarmer:mv_planter", {
|
|||
|
||||
-- HV planter
|
||||
minetest.register_node("autofarmer:hv_planter", {
|
||||
description = "HV Auto Planter",
|
||||
description = "HV Planter",
|
||||
tiles = {"default_steel_block.png", "default_steel_block.png",
|
||||
"default_steel_block.png", "default_steel_block.png",
|
||||
"default_steel_block.png^farming_tool_diamondhoe.png", "default_steel_block.png"},
|
||||
|
|
Loading…
Reference in New Issue