projects
/
tabakrolletjie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c4b45ee
)
Drain power at night.
author
Simon Cross
<hodgestar@gmail.com>
Sat, 10 Sep 2016 16:54:11 +0000
(18:54 +0200)
committer
Simon Cross
<hodgestar@gmail.com>
Sat, 10 Sep 2016 16:54:11 +0000
(18:54 +0200)
tabakrolletjie/scenes/night.py
patch
|
blob
|
history
diff --git
a/tabakrolletjie/scenes/night.py
b/tabakrolletjie/scenes/night.py
index 99b903b84300d2e205e82f8568829e07b4e4a177..692ecf1924b828ebcc094b1ba5afb289a992bdb5 100644
(file)
--- 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)
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:
# 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()
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()
self._total_ticks += 1
else:
self._end_night()