Autofarm: only try to plant things that have seeds.

develop
Kelly Martin 2012-11-29 18:19:53 -06:00
parent bb3c5c02c1
commit f8dea0e9f9
1 changed files with 2 additions and 1 deletions

@ -18,10 +18,11 @@ class AutoFarm
end
def is_plantable (plant)
has_seed = plant.flags[:SEED]
season = df.cur_season
harvest = df.cur_season_tick + plant.growdur * 10
will_finish = harvest < 10080
can_plant = plant.flags[season]
can_plant = has_seed && plant.flags[season]
can_plant = can_plant && (will_finish || plant.flags[(season+1)%4])
can_plant
end