From: Neil Date: Sat, 10 Sep 2016 18:58:01 +0000 (+0200) Subject: End the night if no power and no planted turnips left X-Git-Tag: tabakrolletjie-v1.0.0~53^2~1 X-Git-Url: https://git.ctpug.org.za/?p=tabakrolletjie.git;a=commitdiff_plain;h=bfc338bd54ff02673ec28436453561acf372e39e End the night if no power and no planted turnips left --- diff --git a/tabakrolletjie/scenes/night.py b/tabakrolletjie/scenes/night.py index 0c76889..674d074 100644 --- a/tabakrolletjie/scenes/night.py +++ b/tabakrolletjie/scenes/night.py @@ -176,7 +176,8 @@ class NightScene(BaseScene): self._end_night() if not self.turnip_count: self.add_day_button() - + if not self.turnip_count and not self._battery.current: + self._end_night() def exit(self, gamestate): turnip_data = [turnip.serialize() for turnip in self._turnips]