check for air OR snow above when growing a plant

This commit is contained in:
Vanessa Ezekowitz 2015-07-19 15:27:14 -04:00
parent 54b116525a
commit f3423c0e04

View File

@ -591,8 +591,8 @@ function plantslib:grow_plants(opts)
if options.need_wall and options.verticals_list then if options.need_wall and options.verticals_list then
walldir = plantslib:find_adjacent_wall(p_top, options.verticals_list, options.choose_random_wall) walldir = plantslib:find_adjacent_wall(p_top, options.verticals_list, options.choose_random_wall)
end end
if n_top.name == "air" and (not options.need_wall or (options.need_wall and walldir)) if (n_top.name == "air" or n_top.name == "default:snow")
then and (not options.need_wall or (options.need_wall and walldir)) then
-- corner case for changing short junglegrass -- corner case for changing short junglegrass
-- to dry shrub in desert -- to dry shrub in desert
if n_bot.name == options.dry_early_node and options.grow_plant == "junglegrass:short" then if n_bot.name == options.dry_early_node and options.grow_plant == "junglegrass:short" then