Did some bugfixing in harvest.lua

This commit is contained in:
Andrew Lalis 2018-09-27 08:37:40 +02:00
parent 4f1db31164
commit 80be066744
1 changed files with 6 additions and 1 deletions

View File

@ -220,6 +220,7 @@ end
--[[
Guides the user in creating a new config.
return - table: The config created.
--]]
local function createConfig(filename)
local config = {}
@ -239,6 +240,7 @@ local function createConfig(filename)
config.COLS = tonumber(io.read())
print("How many crops are being harvested?")
config.crop_definitions = {}
for i=1,tonumber(io.read()) do
print("Crop "..i..": What is the block name? (Use geolyzer to analyze it)")
local name = io.read()
@ -251,6 +253,7 @@ local function createConfig(filename)
file = io.open(filename, "w")
file:write(serial.serialize(config))
file:close()
return config
end
local function main()
@ -263,3 +266,5 @@ local function main()
local drop_count = dropItems()
print(harvest_count..", "..drop_count)
end
main()