Mercurial > parpg-core
changeset 197:cf6345ec8988
Small fixes.
author | KarstenBock@gmx.net |
---|---|
date | Sat, 19 Nov 2011 19:28:38 +0100 |
parents | 7e51bae477f7 |
children | c99c424a69a7 |
files | src/parpg/entities/action.py src/parpg/systems/scriptingsystem.py |
diffstat | 2 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/parpg/entities/action.py Sat Nov 19 16:12:56 2011 +0100 +++ b/src/parpg/entities/action.py Sat Nov 19 19:28:38 2011 +0100 @@ -450,11 +450,8 @@ @param commands: Special commands that are executed @type commands: Dictionary """ - self.commands = commands or () - self.controller = controller - self.model = controller.model + Action.__init__(self, controller, commands) self.script = script - self.executed = False def execute(self): self.controller.systems.scripting.runScript(self.script)
--- a/src/parpg/systems/scriptingsystem.py Sat Nov 19 16:12:56 2011 +0100 +++ b/src/parpg/systems/scriptingsystem.py Sat Nov 19 19:28:38 2011 +0100 @@ -52,7 +52,10 @@ self.system.funcs, self.system.vals ) - self.cur_action = action(self.system.world, action_params) + if not (isinstance(action_params, list) + or isinstance(action_params, tuple)): + action_params = [action_params] + self.cur_action = action(self.system.world, *action_params) self.wait = action_data[2] if len(action_data) >= 4: vals = (