Merge branch 'master' of ctpug.org.za:tabakrolletjie
authorSimon Cross <hodgestar@gmail.com>
Sun, 11 Sep 2016 00:00:25 +0000 (02:00 +0200)
committerSimon Cross <hodgestar@gmail.com>
Sun, 11 Sep 2016 00:00:25 +0000 (02:00 +0200)
data/stations/04-multicolor.json [new file with mode: 0644]
data/stations/06-station-alpha.json [new file with mode: 0644]
data/stations/station-alpha.json [deleted file]
tabakrolletjie/scenes/day.py
tabakrolletjie/scenes/help.py
tabakrolletjie/scenes/menu.py

diff --git a/data/stations/04-multicolor.json b/data/stations/04-multicolor.json
new file mode 100644 (file)
index 0000000..831d60a
--- /dev/null
@@ -0,0 +1,113 @@
+{
+  "config": {
+    "name": "Rhizomucor",
+    "spawn positions": [[25, 400], [1000, 410], [998, 332], [76, 300]],
+    "seeds": 65,
+    "turnip target": 40
+  },
+  "battery": {
+    "current": 8000,
+    "max": 8000,
+    "recharge": 8000
+  },
+  "available_lights": [
+    {
+      "type": "lamp",
+      "cost": 3,
+      "available_colours": ["blue", "red"],
+      "intensity": 0.8
+    }
+  ],
+  "obstacles": [
+    {
+      "type": "wall",
+      "vertices": [
+        [0, 0], [200, 302], [400, 0]
+      ]
+    },
+    {
+      "type": "wall",
+      "vertices": [
+        [624, 0], [824, 302], [1024, 0]
+      ]
+    },
+    {
+      "type": "wall",
+      "vertices": [
+        [0, 704], [200, 402], [400, 704]
+      ]
+    },
+    {
+      "type": "wall",
+      "vertices": [
+        [624, 704], [824, 402], [1024, 704]
+      ]
+    }
+  ],
+  "lights": [
+     {
+       "colours": [ "green" ],
+       "position": [313, 490 ],
+       "intensity": 0.8,
+       "type": "lamp"
+     },
+     {
+       "colours": [ "green" ],
+       "position": [313, 403 ],
+       "intensity": 0.8,
+       "type": "lamp"
+     },
+     {
+       "colours": [ "green" ],
+       "position": [313, 312 ],
+       "intensity": 0.8,
+       "type": "lamp"
+     },
+     {
+       "colours": [ "green" ],
+       "position": [313, 230 ],
+       "intensity": 0.8,
+       "type": "lamp"
+     },
+     {
+       "colours": [ "green" ],
+       "position": [250, 290 ],
+       "intensity": 0.8,
+       "type": "lamp"
+     },
+     {
+       "colours": [ "green" ],
+       "position": [250, 360 ],
+       "type": "lamp"
+     },
+     {
+       "colours": [ "green" ],
+       "position": [250, 430 ],
+       "intensity": 0.8,
+       "type": "lamp"
+     },
+     {
+       "colours": [ "green" ],
+       "position": [145, 270 ],
+       "intensity": 0.8,
+       "type": "lamp"
+     },
+     {
+       "colours": [ "green" ],
+       "position": [145, 460 ],
+       "intensity": 0.8,
+       "type": "lamp"
+     },
+     {
+       "colours": [ "green" ],
+       "position": [160, 400 ],
+       "intensity": 0.8,
+       "type": "lamp"
+     },
+     {
+       "colours": [ "green" ],
+       "position": [160, 335 ],
+       "type": "lamp"
+     }
+  ]
+}
diff --git a/data/stations/06-station-alpha.json b/data/stations/06-station-alpha.json
new file mode 100644 (file)
index 0000000..b07acc1
--- /dev/null
@@ -0,0 +1,115 @@
+{
+  "config": {
+    "name": "Station Alpha",
+    "spawn positions": [[275, 300]],
+    "seeds": 10,
+    "turnip target": 10
+  },
+  "battery": {
+    "current": 4000,
+    "max": 4000,
+    "recharge": 2000
+  },
+  "available_lights": [
+    {
+      "type": "spotlight",
+      "cost": 5,
+      "available_colours": ["red"],
+      "radius_limits": [20, 400],
+      "direction": 135,
+      "spread": 90,
+      "angular_velocity": 5,
+      "intensity": 0.8
+    },
+    {
+      "type": "lamp",
+      "cost": 3,
+      "available_colours": ["blue", "yellow/red/green", "cyan/magenta"],
+      "intensity": 0.5
+    },
+    {
+      "type": "pulsatinglamp",
+      "cost": 3,
+      "available_colours": ["cyan", "blue/green"],
+      "intensity": 0.5
+    }
+  ],
+  "obstacles": [
+    {
+      "type": "wall",
+      "vertices": [
+        [0, 0], [1024, 0], [1024, 100], [0, 100]
+      ]
+    },
+    {
+      "type": "wall",
+      "vertices": [
+        [0, 604], [1024, 604], [1024, 704], [0, 704]
+      ]
+    },
+    {
+      "type": "wall",
+      "vertices": [
+        [0, 100], [100, 100], [100, 300], [0, 300]
+      ]
+    },
+    {
+      "type": "wall",
+      "vertices": [
+        [0, 404], [100, 404], [100, 704], [0, 704]
+      ]
+    },
+    {
+      "type": "wall",
+      "vertices": [
+        [500, 100], [524, 100], [524, 352], [500, 352]
+      ]
+    },
+    {
+      "type": "wall",
+      "vertices": [
+        [924, 100], [1024, 100], [1024, 604], [924, 604]
+      ]
+    },
+    {
+      "type": "shrub",
+      "shrublets": [
+        [600, 200, 50], [700, 350, 100], [800, 250, 50], [400, 500, 50], [300, 400, 100], [400, 300, 50], [300, 200, 50]
+      ]
+    }
+  ],
+  "lights": [
+    {
+      "type": "spotlight",
+      "colours": ["red"],
+      "position": [850, 550],
+      "radius_limits": [20, 400],
+      "direction": 135,
+      "spread": 90,
+      "angular_velocity": 5,
+      "intensity": 0.8
+    },
+    {
+      "type": "lamp",
+      "colours": ["blue"],
+      "position": [150, 550],
+      "intensity": 0.5
+    },
+    {
+      "type": "lamp",
+      "colours": ["red", "yellow", "green"],
+      "position": [200, 200],
+      "intensity": 0.5
+    },
+    {
+      "type": "pulsatinglamp",
+      "colours": ["cyan"],
+      "pulse_range": [20, 90],
+      "pulse_velocity": 1,
+      "intensity_range": [0.1, 0.8],
+      "intensity_velocity": 0.01,
+      "position": [550, 500],
+      "intensity": 0.5
+    }
+  ]
+}
diff --git a/data/stations/station-alpha.json b/data/stations/station-alpha.json
deleted file mode 100644 (file)
index 1cd4ebc..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-{
-  "config": {
-    "name": "Station Alpha",
-    "spawn positions": [[275, 300]],
-    "seeds": 10,
-    "turnip target": 10
-  },
-  "battery": {
-    "current": 200,
-    "max": 200,
-    "recharge": 100
-  },
-  "available_lights": [
-    {
-      "type": "spotlight",
-      "cost": 5,
-      "available_colours": ["red"],
-      "radius_limits": [20, 400],
-      "direction": 135,
-      "spread": 90,
-      "angular_velocity": 5,
-      "intensity": 0.8
-    },
-    {
-      "type": "lamp",
-      "cost": 3,
-      "available_colours": ["yellow"],
-      "intensity": 0.5
-    },
-    {
-      "type": "lamp",
-      "cost": 3,
-      "available_colours": ["red", "yellow/blue", "green"],
-      "intensity": 0.5
-    },
-    {
-      "type": "pulsatinglamp",
-      "cost": 3,
-      "available_colours": ["red", "blue/green"],
-      "intensity": 0.5
-    }
-  ],
-  "obstacles": [
-    {
-      "type": "wall",
-      "vertices": [
-        [400, 400], [450, 400], [450, 450], [400, 450]
-      ]
-    },
-    {
-      "type": "wall",
-      "vertices": [
-        [800, 400], [850, 400], [850, 450], [800, 450]
-      ]
-    },
-    {
-      "type": "wall",
-      "vertices": [
-        [200, 350], [250, 350], [250, 400], [200, 400]
-      ]
-    },
-    {
-      "type": "shrub",
-      "shrublets": [
-        [600, 100, 50], [700, 200, 100]
-      ]
-    }
-  ],
-  "lights": [
-    {
-      "type": "spotlight",
-      "colours": ["red"],
-      "position": [700, 500],
-      "radius_limits": [20, 400],
-      "direction": 135,
-      "spread": 90,
-      "angular_velocity": 5,
-      "intensity": 0.8
-    },
-    {
-      "type": "lamp",
-      "colours": ["yellow"],
-      "position": [500, 500],
-      "intensity": 0.5
-    },
-    {
-      "type": "lamp",
-      "colours": ["red", "yellow", "green"],
-      "position": [300, 300],
-      "intensity": 0.5
-    },
-    {
-      "type": "pulsatinglamp",
-      "colours": ["cyan"],
-      "pulse_range": [20, 90],
-      "pulse_velocity": 1,
-      "intensity_range": [0.1, 0.8],
-      "intensity_velocity": 0.01,
-      "position": [250, 450],
-      "intensity": 0.5
-    }
-  ]
-}
index 2a1cc35a18c8c0a12f546d4067c6e7edac7676dc..cbe0460c4717a86fb15181a1a9f040e0d49457a2 100644 (file)
@@ -103,6 +103,9 @@ class DayScene(BaseScene):
             tool = ImageButton(
                 '32', '%s.png' % light_config["type"], name='light',
                 pos=(x, y))
+            font = loader.load_font(FONTS["sans"], size=12)
+            tool_cost = font.render("%d" % light_config["cost"], True, (0, 0, 0))
+            tool._img.blit(tool_cost, (16, 12), None)
             tool.light_config = light_config
             tools.append(tool)
             x += step
index 648a5812a07465814cc8a85c77643e4ef1c8c965..4ec31fc5d7e9b083b5940821f150f6fc5eff3bd1 100644 (file)
@@ -96,7 +96,8 @@ class HelpScene(BaseScene):
                 " during the night. The battery recharges during the day."),
                 transform=Multiply(colour=COLOURS["yellow"])),
             HelpItem(("48", "pulsatinglamp.png"), (
-                "This is a pulsating lamp. Its light intensity is variable."),
+                "This is a pulsating lamp. Its light radius increases and"
+                " decreases."),
                 transform=Multiply(colour=COLOURS["cyan"])),
             HelpItem(("48", "spotlight.png"), (
                 "This is a spotlight. Unlike a lamp, it has a beam which is"
@@ -141,11 +142,15 @@ class HelpScene(BaseScene):
                 " available on your level.")),
             HelpItem(("32", "spotlight.png"), (
                 "Once you have selected a colour option, you will be able to"
-                " place the light."),
+                " place the light, as long as this does not reduce your seed"
+                " count to zero. The cost will be deducted from your seed"
+                " total."),
                 transform=Multiply(colour=COLOURS["magenta"])),
             HelpItem(("32", "remove.png"), (
                 "Buyer's remorse? Use this icon to blow up unwanted lights. You"
                 " don't get your money back. Sorry.")),
+            HelpItem(("32", "default_cursor.png"), (
+                "You can use this to change your cursor back to an arrow.")),
             HelpItem(("32", "night.png"), (
                 "When you have finished planting seeds and placing lights, you"
                 " can prepare for Boyd's night-time onslaught by clicking this"
index 9cf0557f27d909bedc2688bf26fc7fd86d94d0f9..b577370b221289972ea914a08a0c139e8c8f2043 100644 (file)
@@ -30,7 +30,7 @@ class MenuScene(BaseScene):
     def enter(self, gamestate):
         if gamestate.station is None:
             print "Loading Station Alpha ..."
-            gamestate.set_station(loader.load_station("station-alpha.json"))
+            gamestate.set_station(loader.load_station("06-station-alpha.json"))
 
         self._cont_but = SplashButton("continue_retry", (500, 210))
         if not save_file_exists():