diff options
author | Justin Lewis <jtl1728@rit.edu> | 2010-02-02 18:38:00 (GMT) |
---|---|---|
committer | Justin Lewis <jtl1728@rit.edu> | 2010-02-02 18:38:00 (GMT) |
commit | ccceb5809ba973796efa59a6e64ce90a368996d0 (patch) | |
tree | 5087593c580d37ebfc70e3872ee845159cc2a550 /FortuneMaker.activity | |
parent | c163d646a03f6bc1abe40ca0d1bc3387d346bdde (diff) |
Added support function (not used yet)
Diffstat (limited to 'FortuneMaker.activity')
-rw-r--r-- | FortuneMaker.activity/JournalIntegration.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/FortuneMaker.activity/JournalIntegration.py b/FortuneMaker.activity/JournalIntegration.py index 2ebb34e..a1ab483 100644 --- a/FortuneMaker.activity/JournalIntegration.py +++ b/FortuneMaker.activity/JournalIntegration.py @@ -48,7 +48,7 @@ def export_textfile(activity, filename, dungeon_id, filetext=''): def list_fh_files(): - ds_objects, num_objects = datastore.find({'FortuneMaker_VERSION':'1'}) + ds_objects, num_objects = datastore.find({'FortuneMaker_VERSION':FM_VERSION}) file_list = [] for i in xrange(0, num_objects, 1): if ds_objects[i].metadata.has_key('FM_UID'): @@ -58,6 +58,14 @@ def list_fh_files(): pass return file_list +def load_dungeon_by_id(id): + ds_objects, num_objects = datastore.find({'FortuneMaker_VERSION':FM_VERSION,'FM_UID':id}) + + if num_objects == 0: + return False + + return load_dungeon(ds_objects[0]) + def load_dungeon(file_data): """ Gets dungeon data dictionary from journal file object @@ -81,7 +89,6 @@ def do_load( dgnFile ): grab = 0 room_str = [] for line in dgnFile: - print "PROCESSING LINE:",line if grab == 0: name = line.strip() grab = 1 |