From: Simon Cross Date: Sat, 10 Sep 2016 16:54:11 +0000 (+0200) Subject: Drain power at night. X-Git-Tag: tabakrolletjie-v1.0.0~73 X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=b2cf11d3af2078d34d2b6e1e2550dd71d0995aa2;p=tabakrolletjie.git Drain power at night. --- 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()