2 # This file is part of Realism, which is Copyright FunnyMan3595 (Charlie Nolan)
3 # and licensed under the GNU GPL v3. For more details, see LICENSE in the main
7 # We allow mods to exist in the user's home directory, path:
8 # ~/.realism-rpg/mods/<modname>/
9 # On Windows XP, this translates to:
10 # <drive>:\Documents and Settings\<user>\.realism-rpg\mods\<modname>\
12 from os
import makedirs
13 from os
.path
import join
, expanduser
, isdir
14 user_dir
= join(expanduser('~'),'.realism-rpg')
15 if not isdir(user_dir
):
17 sys
.path
.append(user_dir
)
21 from engine
.party
import HeroParty
22 game
.party
= HeroParty()
24 from ui
.zork_ui
import ZorkUI
25 game
.ui
= ui
= ZorkUI()
27 # Import the maps, register the game object with them, and validate them.
28 from engine
.maps
import maps
29 for game_map
in maps
.values():
33 from engine
.maps
import start_map
35 if "start_map" not in maps
.keys():
36 print "No start map found. Realism will exit."
39 # maps["start"] guaranteed to exist.
40 start_map
= maps
["start_map"]
42 # start_map guaranteed to exist
43 ui
.map_mode(start_map
)