Michal Cieslakiewicz 311639ee11 slmodules: cropswatcher: fix crash when using default farming mod.
farming.registered_plants table for farming_redo mod differs slightly from
default (vanilla) Minetest game farming mod. Redo adds 'crop' value and indexes
elements by full name ("farming:wheat") while vanilla one creates entries
with simple labels ("wheat") and does not provide 'crop' field.
This causes game to crash for vanilla farming addon with following error:

cropswatcher.lua:80: attempt to concatenate field 'crop' (a nil value)

Code has been updated to correctly handle either of farming mods.
This fixes issue #1 by neoh4x0r.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
2019-07-09 16:32:30 +02:00
..