Mercurial > parpg-source
comparison systems/scriptingsystem.py @ 164:ed24962cdf5e
Small fixes.
author | KarstenBock@gmx.net |
---|---|
date | Sat, 19 Nov 2011 19:28:38 +0100 |
parents | d224bbce512a |
children | 565ffdd98d68 |
comparison
equal
deleted
inserted
replaced
163:9c82ed72dc9d | 164:ed24962cdf5e |
---|---|
50 action = self.system.actions[action_data[0]] | 50 action = self.system.actions[action_data[0]] |
51 action_params = eval(action_data[1], | 51 action_params = eval(action_data[1], |
52 self.system.funcs, | 52 self.system.funcs, |
53 self.system.vals | 53 self.system.vals |
54 ) | 54 ) |
55 self.cur_action = action(self.system.world, action_params) | 55 if not (isinstance(action_params, list) |
56 or isinstance(action_params, tuple)): | |
57 action_params = [action_params] | |
58 self.cur_action = action(self.system.world, *action_params) | |
56 self.wait = action_data[2] | 59 self.wait = action_data[2] |
57 if len(action_data) >= 4: | 60 if len(action_data) >= 4: |
58 vals = ( | 61 vals = ( |
59 eval(action_data[4], self.system.funcs, self.system.vals) | 62 eval(action_data[4], self.system.funcs, self.system.vals) |
60 if len(action_data) > 4 | 63 if len(action_data) > 4 |