def load_world(world='default'): parser.wn = world parser.init_parsers() world_info = parser.WORLD[world] try: options = parser.OPTIONS['game'] if options['debug'] is True: barf.Barf('DBG', 'Options loaded!') except Exception as e: barf.Barf('ERR', "'%s' options could not be loaded: %s" % (world, e.message)) barf.Barf('SAV', "'%s' loaded!" % world_info['name']) main(world_info)
# This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. import libs.libtcodpy as tcod import parser, game from scoundrels import barf import parser, network parser.init_parsers() options = parser.OPTIONS["game"] class Object(object): ''' This is a generic game Object. If it has a character to display, it's a game object. obj_type is shared among all objects- a creature will have the obj_type = 'creature' and so on. ''' obj_type = 'object' # generic object, unless otherwise overridden. def __init__(self, con, x, y, char, bgcolor, color, passable): if parser.OPTIONS['game']['debug'] is True: name = self.obj_type try: