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
)
15 # Game is just an empty class that holds the party, ui, and anything else we
16 # need to be able to use from anywhere.
22 from engine
.party
import HeroParty
23 game
.party
= HeroParty(game
)
25 from ui
.zork_ui
import ZorkUI
29 # Import the maps, register the game object with them, and validate them.
30 from engine
.maps
import maps
31 for game_map
in maps
.values():
33 game_map
.validate(maps
)
36 from engine
.maps
import start_map
38 if "start" not in maps
.keys():
39 print "No start map found. Realism will exit."
42 # maps["start"] guaranteed to exist.
43 start_map
= maps
["start"]
45 # start_map guaranteed to exist
46 ui
.map_mode(start_map
)