Update api.lua

added protection for seed placement and hoeing