Changeset 222:2cbeeef5867c


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

Fix npc tester (again).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/npc-test

    r196 r222  
    1313
    1414
    15 def run(npc_file):
     15def run(npc_name):
    1616    game = GameState("game.json")
    17     name = os.path.splitext(os.path.basename(npc_file))[0]
    18     dsm = DSM(name, game.world, npc_file)
     17    npc = getattr(game.world.npcs, npc_name)
     18    dsm = DSM(npc_name, game.world, npc.dsm, npc.state)
    1919
    2020    print "States:"
     
    4343
    4444def main():
    45     p = optparse.OptionParser(usage="%prog [options] <npc json state file>")
     45    p = optparse.OptionParser(usage="%prog [options] <npc name>")
    4646    opts, args = p.parse_args()
    4747    if len(args) != 1:
Note: See TracChangeset for help on using the changeset viewer.