self._lights.render_light(surface)
self._obstacles.render(surface)
self._lights.render_fittings(surface)
- surface.blit(self._infobar, (120, 10), None)
+ surface.blit(self._infobar, (50, 10), None)
for tool in self._tools:
tool.render(surface)
for light_tool in self._light_toolbar:
self._lights.tick()
def _update_infobar(self, gamestate):
- line1 = ("Day %d: Goal: %d Turnips. Turnips harvested: %d" %
- (gamestate.days, gamestate.get_target(), self._harvested))
+ line1 = ("Day %d: Goal: %d Turnips. Turnips harvested: %d" % (
+ gamestate.days, gamestate.get_target(), self._harvested))
line1_img = self._infobar_font.render(line1, True, (255, 255, 255))
- line2 = ("Turnip Stocks: Seeds: %s. Planted: %d" %
- (self._seeds, len(self._turnips)))
+ line2 = ("Turnip Stocks: Seeds: %s. Planted: %d. Battery: %d/%d" % (
+ self._seeds, len(self._turnips), self._battery.current,
+ self._battery.max))
line2_img = self._infobar_font.render(line2, True, (255, 255, 255))
width = max(line1_img.get_width(), line2_img.get_width()) + 10
height = line1_img.get_height() + line2_img.get_height() + 10