Merge pull request #54 from noelleleigh/growth-rate-rounding

Round growth rate to single decimal
master
Nate Smith 2024-04-04 15:26:07 -04:00 committed by GitHub
commit df01d7397c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -564,7 +564,7 @@ class CursedMenu(object):
# get plant description before printing # get plant description before printing
output_string = self.get_plant_description(this_plant) output_string = self.get_plant_description(this_plant)
growth_multiplier = 1 + (0.2 * (this_plant.generation-1)) growth_multiplier = 1 + (0.2 * (this_plant.generation-1))
output_string += "Generation: {}\nGrowth rate: {}x".format(self.plant.generation, growth_multiplier) output_string += "Generation: {}\nGrowth rate: {:.1f}x".format(self.plant.generation, growth_multiplier)
self.draw_info_text(output_string) self.draw_info_text(output_string)
self.infotoggle = 1 self.infotoggle = 1
else: else: