Skip to content

Commit

Permalink
fix compatibility with cropocalypse
Browse files Browse the repository at this point in the history
see #8
  • Loading branch information
TamaMcGlinn committed Jan 18, 2025
1 parent c06ee6a commit a3d7431
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions farmer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,15 @@ local soils = {
-- [ripe_plant] = {new_plant, seed_item, <extra_item>}
local crops = {}
for name, def in pairs(farming.registered_plants) do
local t = {def.crop.."_1", def.seed}
crops[def.crop.."_"..def.steps] = t
if name ~= "farming:cocoa_beans" and def.trellis then
t[3] = def.trellis
crops[def.trellis] = t
if def.crop == nil or def.seed == nil then
-- minetest.log("warning", "invalid plant: " .. dump(name) .. ": " .. dump(def))
else
local t = {def.crop.."_1", def.seed}
crops[def.crop.."_"..def.steps] = t
if name ~= "farming:cocoa_beans" and def.trellis then
t[3] = def.trellis
crops[def.trellis] = t
end
end
end

Expand Down

0 comments on commit a3d7431

Please sign in to comment.