Found Farming code, here's exactly how it works from projectzomboid