Refactor mould drawing code. Use shape_query for lighting information
[tabakrolletjie.git] / tabakrolletjie / scenes / menu.py
index f9658a9c545b84a2fc0a2f0d99b04f9f60a8ec69..ed7cc3194ff34105a08ef3c5c1630f549502502a 100644 (file)
@@ -1,6 +1,5 @@
 """ Menu scene. """
 
-import pygame.event
 import pygame.locals as pgl
 
 from .base import BaseScene
@@ -8,6 +7,11 @@ from ..events import QuitEvent, SceneChangeEvent
 
 
 class MenuScene(BaseScene):
+    def enter(self, gamestate):
+        if gamestate.station is None:
+            print "Loading Station Alpha ..."
+            gamestate.load_station("station-alpha.json")
+
     def render(self, surface, gamestate):
         surface.fill((0, 255, 0))
 
@@ -18,3 +22,9 @@ class MenuScene(BaseScene):
             elif ev.key == pgl.K_n:
                 from .night import NightScene
                 SceneChangeEvent.post(scene=NightScene())
+            elif ev.key == pgl.K_d:
+                from .day import DayScene
+                SceneChangeEvent.post(scene=DayScene())
+            elif ev.key == pgl.K_l:
+                print "Loading Station Alpha ..."
+                gamestate.load_station("station-alpha.json")