From 95dd414c3d8f15d85a84238a1d747dc2a346a36a Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 09 Jul 2008 22:07:05 +0000 Subject: Fixing tool switching --- diff --git a/tools.py b/tools.py index c20fdb8..2409527 100644 --- a/tools.py +++ b/tools.py @@ -36,9 +36,9 @@ class Tool(object): self.game.setTool("destroy") elif event.key == K_m: self.game.setTool("magicpen") - elif event.type == USEREVENT: - if hasattr(event,"action"): - if self.game.tools.has_key(event.action): self.game.setTool(event.action) + elif event.type == USEREVENT: + if hasattr(event,"action"): + if self.game.tools.has_key(event.action): self.game.setTool(event.action) else: # let the subclasses know that no events were handled yet -- cgit v0.9.1