Changeset 190:e4b466368b89


Ignore:
Timestamp:
04/06/11 19:19:26 (12 years ago)
Author:
Simon Cross <hodgestar@…>
Branch:
default
Phase:
public
Message:

Fix dialogue.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/dialogue.py

    r185 r190  
    1616       """
    1717
    18     def __init__(self, npc_name, world):
     18    def __init__(self, json_filename, world):
    1919        self.world = world
    20         world.npcs[npc_name] = self
    2120        self.state = "start"
    2221        self.states = AttrDict()
    23         src = json.loads(data.load('npcs/' + npc_name + '.json').read())
     22        src = json.loads(data.load(json_filename).read())
    2423        for state, state_src in src.iteritems():
    2524            pseudo_path = [json_filename, state]
Note: See TracChangeset for help on using the changeset viewer.