3 # We allow mods to exist in the user's home directory, path:
4 # ~/.realism-rpg/mods/<modname>/
5 # On Windows XP, this translates to:
6 # <drive>:\Documents and Settings\<user>\.realism-rpg\mods\<modname>\
8 from os
import makedirs
9 from os
.path
import join
, expanduser
, isdir
10 user_dir
= join(expanduser('~'),'.realism-rpg')
11 if not isdir(user_dir
):
13 sys
.path
.append(user_dir
)
17 from engine
.party
import HeroParty
18 game
.party
= HeroParty()
20 from ui
.zork_ui
import ZorkUI
21 game
.ui
= ui
= ZorkUI()
23 # Import the maps, register the game object with them, and validate them.
24 from engine
.maps
import maps
25 for game_map
in maps
.values():
29 from engine
.maps
import start_map
31 if "start_map" not in maps
.keys():
32 print "No start map found. Realism will exit."
35 # maps["start"] guaranteed to exist.
36 start_map
= maps
["start_map"]
38 # start_map guaranteed to exist
39 ui
.map_mode(start_map
)