From b2cf11d3af2078d34d2b6e1e2550dd71d0995aa2 Mon Sep 17 00:00:00 2001 From: Simon Cross Date: Sat, 10 Sep 2016 18:54:11 +0200 Subject: [PATCH] Drain power at night. --- tabakrolletjie/scenes/night.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tabakrolletjie/scenes/night.py b/tabakrolletjie/scenes/night.py index 99b903b..692ecf1 100644 --- a/tabakrolletjie/scenes/night.py +++ b/tabakrolletjie/scenes/night.py @@ -106,7 +106,6 @@ class NightScene(BaseScene): self._to_day() if ev.button == 1: self._lights.toggle_nearest(ev.pos, surfpos=True) - print self._lights.lit_by(ev.pos, surfpos=True) # Check tools for tool in self._tools: @@ -154,7 +153,9 @@ class NightScene(BaseScene): if self._total_ticks < NIGHT_LENGTH: self._mould.tick(gamestate, self._space, self._lights) self._lights.tick() - print "Power usage: ", self._lights.total_power_usage() + if self._total_ticks % 60 == 0: + self._battery.current -= int( + self._lights.total_power_usage()) self._total_ticks += 1 else: self._end_night() -- 2.34.1