changeset 514:55b95bb25ced

On move, revert to the select tool - why would you want to move the same chicken twice? Ctrl-click allows moving current selected chickens without having to use the move tool - saves switching modes repeatedly when rearranging chickens
author David Fraser <davidf@sjsoft.com>
date Fri, 27 Nov 2009 10:06:28 +0000
parents 399bb3cb4761
children 88bda6db953a
files gamelib/gameboard.py
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/gamelib/gameboard.py	Thu Nov 26 23:56:28 2009 +0000
+++ b/gamelib/gameboard.py	Fri Nov 27 10:06:28 2009 +0000
@@ -351,10 +351,16 @@
             self.sell_egg(self.tv.screen_to_tile(e.pos))
         elif self.selected_tool == constants.TOOL_PLACE_ANIMALS:
             self.place_animal(self.tv.screen_to_tile(e.pos))
+            self.selected_tool = constants.TOOL_SELECT_CHICKENS
+            self.toolbar.toggle_select_on()
         elif self.selected_tool == constants.TOOL_SELECT_CHICKENS:
-            if not (mods & KMOD_SHIFT):
-                self.unselect_all()
-            self.select_chicken(self.tv.screen_to_tile(e.pos))
+            # ctrl moves current selection without having to select move tool
+            if (mods & KMOD_CTRL):
+                self.place_animal(self.tv.screen_to_tile(e.pos))
+            else:
+                if not (mods & KMOD_SHIFT):
+                    self.unselect_all()
+                self.select_chicken(self.tv.screen_to_tile(e.pos))
         elif self.selected_tool == constants.TOOL_SELL_BUILDING:
             self.sell_building(self.tv.screen_to_tile(e.pos))
         elif self.selected_tool == constants.TOOL_SELL_EQUIPMENT: