summaryrefslogtreecommitdiff
path: root/plugins/ruby/plant.rb
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ruby/plant.rb')
-rw-r--r--plugins/ruby/plant.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/ruby/plant.rb b/plugins/ruby/plant.rb
index 5d6b9d72..2f5a1c7c 100644
--- a/plugins/ruby/plant.rb
+++ b/plugins/ruby/plant.rb
@@ -51,7 +51,7 @@ module DFHack
end
SaplingToTreeAge = 120960
- def cuttrees(material=nil, count_max=100)
+ def cuttrees(material=nil, count_max=100, quiet=false)
if !material
# list trees
cnt = Hash.new(0)
@@ -62,7 +62,7 @@ module DFHack
}
cnt.sort_by { |mat, c| c }.each { |mat, c|
name = @raws_tree_name[mat]
- puts " #{name} #{c}"
+ puts " #{name} #{c}" unless quiet
}
else
cnt = 0
@@ -78,11 +78,11 @@ module DFHack
break if cnt == count_max
end
}
- puts "Updated #{cnt} plant designations"
+ puts "Updated #{cnt} plant designations" unless quiet
end
end
- def growtrees(material=nil, count_max=100)
+ def growtrees(material=nil, count_max=100, quiet=false)
if !material
# list plants
cnt = Hash.new(0)
@@ -93,7 +93,7 @@ module DFHack
}
cnt.sort_by { |mat, c| c }.each { |mat, c|
name = @raws_tree_name[mat]
- puts " #{name} #{c}"
+ puts " #{name} #{c}" unless quiet
}
else
cnt = 0
@@ -104,7 +104,7 @@ module DFHack
cnt += 1
break if cnt == count_max
}
- puts "Grown #{cnt} saplings"
+ puts "Grown #{cnt} saplings" unless quiet
end
end
end