Mercurial > pyntnclick
diff gamelib/state.py @ 519:8f3c82c685a4
Fix is_interactive() by adding tool param.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Tue, 07 Sep 2010 18:13:35 +0200 |
parents | 3e91c82c2240 |
children | dfb6e57feebe |
line wrap: on
line diff
--- a/gamelib/state.py Tue Sep 07 17:05:51 2010 +0200 +++ b/gamelib/state.py Tue Sep 07 18:13:35 2010 +0200 @@ -359,11 +359,11 @@ class InteractiveMixin(object): - def is_interactive(self): + def is_interactive(self, tool=None): return True def interact(self, tool): - if not self.is_interactive(): + if not self.is_interactive(tool): return None if tool is None: return self.interact_without() @@ -523,7 +523,9 @@ def get_inverse_interact(self, tool): return getattr(tool, 'interact_with_' + self.tool_name, None) - def is_interactive(self): + def is_interactive(self, tool=None): + if tool: + return True return False