diff --git a/__init__.py b/__init__.py index f958f6a699..633f866158 100644 --- a/__init__.py +++ b/__init__.py @@ -1,4 +1,2 @@ # -*- coding: utf-8 -*- -import lib as evennia -import lib as src # legacy diff --git a/bin/evennia.py b/bin/evennia.py index f432fbdbb0..255f17d9d5 100755 --- a/bin/evennia.py +++ b/bin/evennia.py @@ -14,7 +14,6 @@ import sys import signal import shutil import importlib -import django from argparse import ArgumentParser from subprocess import Popen from django.core import management @@ -51,6 +50,11 @@ PORTAL_RESTART = None SERVER_PY_FILE = None PORTAL_PY_FILE = None +PYTHON_MIN = '2.7' +TWISTED_MIN = '12.0' +DJANGO_MIN = '1.7' +DJANGO_REC = '1.7' + # add Evennia root and bin dir to PYTHONPATH sys.path.insert(0, EVENNIA_ROOT) @@ -78,6 +82,15 @@ WELCOME_MESSAGE = \ email-address does not have to exist. """ +CREATED_NEW_GAMEDIR = \ + """ + ... Created new Evennia game directory '{gamedir}'. + + Inside your new game directory, edit {settings_path} to suit your + setup, then run this command again from inside the game directory + to start the server. + """ + WARNING_RUNSERVER = \ """ WARNING: There is no need to run the Django development @@ -89,17 +102,15 @@ WARNING_RUNSERVER = \ ERROR_SETTINGS = \ """ - There was an error importing Evennia's config file {settingsfile}. There are usually + There was an error importing Evennia's config file {settingspath}. There is usually one of three reasons for this: - 1) You are not running this command from your game's - directory. Change directory to your game directory and try - again (or start anew by creating a new game directory using - evennia --init ) - 2) The settings file is a normal Python module. It may contain - a syntax error. Review the traceback above, resolve the - problem and try again. - 3) Django is not correctly installed. This usually means - errors involving 'DJANGO_SETTINGS_MODULE'. If you run a + 1) You are not running this command from your game directory. + Change directory to your game directory and try again (or + create a new game directory using evennia --init ) + 2) The settings file contains a syntax error. If you see a + traceback above, review it, resolve the problem and try again. + 3) Django is not correctly installed. This usually shows as + errors mentioning 'DJANGO_SETTINGS_MODULE'. If you run a virtual machine, it might be worth to restart it to see if this resolves the issue. """.format(settingsfile=SETTINGFILE, settingspath=SETTINGS_PATH) @@ -224,6 +235,46 @@ MENU = \ +---------------------------------------------------------------------------+ """ +ERROR_PYTHON_VERSION = \ + """ + ERROR: Python {pversion} used. Evennia requires version + {python_min} or higher (but not 3.x). + """ + +WARNING_TWISTED_VERSION = \ + """ + WARNING: Twisted {tversion} found. Evennia recommends + v{twisted_min} or higher." + """ + +ERROR_NOTWISTED = \ + """ + ERROR: Twisted does not seem to be installed. + """ + +ERROR_DJANGO_MIN = \ + """ + ERROR: Django {dversion} found. Evennia requires version + {django_min} or higher. + """ + +NOTE_DJANGO_MIN = \ + """ + NOTE: Django {dversion} found. This will work, but v{django_rec} + is recommended for production. + """ + +NOTE_DJANGO_NEW = \ + """ + NOTE: Django {dversion} found. This is newer than Evennia's + recommended version (v{django_rec}). It will probably work, but + may be new enough not to be fully tested yet. Report any issues." + """ + +ERROR_NODJANGO = \ + """ + ERROR: Django does not seem to be installed. + """ #------------------------------------------------------------ # @@ -231,6 +282,47 @@ MENU = \ # #------------------------------------------------------------ +def check_main_evennia_dependencies(): + """ + Checks and imports the Evennia dependencies. This must be done + already before the paths are set up. + """ + error = False + + # Python + pversion = ".".join(str(num) for num in sys.version_info if type(num) == int) + if pversion < PYTHON_MIN: + print ERROR_PYTHON_VERSION.format(pversion=pversion, python_min=PYTHON_MIN) + error = True + # Twisted + try: + import twisted + tversion = twisted.version.short() + if tversion < TWISTED_MIN: + print WARNING_TWISTED_VERSION.format(tversion=tversion, twisted_min=TWISTED_MIN) + except ImportError: + print ERROR_NOTWISTED + error = True + # Django + try: + import django + dversion = ".".join(str(num) for num in django.VERSION if type(num) == int) + # only the main version (1.5, not 1.5.4.0) + dversion_main = ".".join(dversion.split(".")[:2]) + if dversion < DJANGO_MIN: + print ERROR_DJANGO_MIN.format(dversion=dversion_main, django_min=DJANGO_MIN) + error = True + elif DJANGO_MIN <= dversion < DJANGO_REC: + print NOTE_DJANGO_MIN.format(dversion=dversion_main, django_rec=DJANGO_REC) + elif DJANGO_REC < dversion_main: + print NOTE_DJANGO_NEW.format(dversion=dversion_main, django_rec=DJANGO_REC) + except ImportError: + print ERROR_NODJANGO + error = True + if error: + sys.exit() + + def evennia_version(): """ Get the Evennia version info from the main package. @@ -245,6 +337,58 @@ def evennia_version(): return version +def create_secret_key(): + """ + Randomly create the secret key for the settings file + """ + import random + import string + secret_key = list((string.letters + + string.digits + string.punctuation).replace("\\", "").replace("'", '"')) + random.shuffle(secret_key) + secret_key = "".join(secret_key[:40]) + return secret_key + + +def create_settings_file(): + """ + Uses the template settings file to build a working + settings file. + """ + settings_path = os.path.join(GAMEDIR, "server", "conf", "settings.py") + with open(settings_path, 'r') as f: + settings_string = f.read() + + # tweak the settings + setting_dict = {"settings_default": os.path.join(EVENNIA_LIB, "settings_default.py"), + "servername":"\"%s\"" % GAMEDIR.rsplit(os.path.sep, 1)[1].capitalize(), + "game_dir":"\"%s\"" % GAMEDIR, + "secret_key":"\'%s\'" % create_secret_key()} + + # modify the settings + settings_string = settings_string.format(**setting_dict) + + with open(settings_path, 'w') as f: + f.write(settings_string) + + +def create_game_directory(dirname): + """ + Initialize a new game directory named dirname + at the current path. This means copying the + template directory from evennia's root. + """ + global GAMEDIR + GAMEDIR = os.path.abspath(os.path.join(CURRENT_DIR, dirname)) + if os.path.exists(GAMEDIR): + print "Cannot create new Evennia game dir: '%s' already exists." % dirname + sys.exit() + # copy template directory + shutil.copytree(EVENNIA_TEMPLATE, GAMEDIR) + # pre-build settings file in the new GAMEDIR + create_settings_file() + + def init_game_directory(path): """ Try to analyze the given path to find settings.py - this defines @@ -255,27 +399,29 @@ def init_game_directory(path): if os.path.exists(os.path.join(path, SETTINGFILE)): # path given to server/conf/ GAMEDIR = os.path.dirname(os.path.dirname(os.path.dirname(path))) - elif os.path.exists(SETTINGS_PATH): + elif os.path.exists(os.path.join(path, os.path.sep, SETTINGS_PATH)): # path given to somewhere else in gamedir GAMEDIR = os.path.dirname(os.path.dirname(path)) else: # Assume path given to root game dir GAMEDIR = path - # set pythonpath to gamedir + # Add gamedir to python path sys.path.insert(0, GAMEDIR) - # set the settings location - os.environ['DJANGO_SETTINGS_MODULE'] = SETTINGS_DOTPATH - # test existence of settings module + # test existence of the settings module try: settings = importlib.import_module(SETTINGS_DOTPATH) - except Exception: - import traceback - print traceback.format_exc().strip() + except Exception, ex: + if not str(ex).startswith("No module named"): + import traceback + print traceback.format_exc().strip() print ERROR_SETTINGS sys.exit() + # Prepare djangO; set the settings location + os.environ['DJANGO_SETTINGS_MODULE'] = SETTINGS_DOTPATH + import django # required since django1.7. django.setup() @@ -292,8 +438,8 @@ def init_game_directory(path): global SERVER_RESTART, PORTAL_RESTART global EVENNIA_VERSION - SERVER_PY_FILE = os.path.join(settings.LIB_DIR, "server/server.py") - PORTAL_PY_FILE = os.path.join(settings.LIB_DIR, "portal/server.py") + SERVER_PY_FILE = os.path.join(settings.SRC_DIR, "server/server.py") + PORTAL_PY_FILE = os.path.join(settings.SRC_DIR, "portal/server.py") SERVER_PIDFILE = os.path.join(GAMEDIR, SERVERDIR, "server.pid") PORTAL_PIDFILE = os.path.join(GAMEDIR, SERVERDIR, "portal.pid") @@ -349,62 +495,35 @@ def init_game_directory(path): print INFO_WINDOWS_BATFILE.format(twistd_path=twistd_path) -# -# Check/Create settings -# - -def create_secret_key(): - """ - Randomly create the secret key for the settings file - """ - import random - import string - secret_key = list((string.letters + - string.digits + string.punctuation).replace("\\", "").replace("'", '"')) - random.shuffle(secret_key) - secret_key = "".join(secret_key[:40]) - return secret_key +def create_database(): + from django.core.management import call_command + print "\nCreating a database ...\n" + call_command("migrate", interactive=False) + print "\n ... database initialized.\n" -def create_settings_file(): - """ - Uses the template settings file to build a working - settings file. - """ - settings_path = os.path.join(GAMEDIR, "server", "conf", "settings.py") - with open(settings_path, 'r') as f: - settings_string = f.read() - - # tweak the settings - setting_dict = {"settings_default": os.path.join(EVENNIA_LIB, "settings_default.py"), - "servername":GAMEDIR.rsplit(os.path.sep, 1)[0], - "secret_key":create_secret_key} - - # modify the settings - settings_string.format(**setting_dict) - - print "settings_string:", settings_string - with open(settings_path, 'w') as f: - f.write(settings_string) +def create_superuser(): + from django.core.management import call_command + print "\nCreate a superuser below. The superuser is Player #1, the 'owner' account of the server.\n" + call_command("createsuperuser", interactive=True) -# Functions - -def create_game_directory(dirname): - """ - Initialize a new game directory named dirname - at the current path. This means copying the - template directory from evennia's root. - """ - global GAMEDIR - GAMEDIR = os.path.abspath(os.path.join(CURRENT_DIR, dirname)) - if os.path.exists(GAMEDIR): - print "Cannot create new Evennia game dir: '%s' already exists." % dirname - sys.exit() - # copy template directory - shutil.copytree(EVENNIA_TEMPLATE, GAMEDIR) - # pre-build settings file in the new GAMEDIR - create_settings_file() +def check_database(automigrate=False): + # Check so a database exists and is accessible + from django.db import DatabaseError + from src.players.models import PlayerDB + try: + PlayerDB.objects.get(id=1) + except DatabaseError, e: + if automigrate: + create_database() + create_superuser() + else: + print ERROR_DATABASE.format(traceback=e) + sys.exit() + except PlayerDB.DoesNotExist: + # no superuser yet. We need to create it. + create_superuser() def get_pid(pidfile): @@ -653,35 +772,6 @@ def error_check_python_modules(): importlib.import_module(settings.BASE_SCRIPT_TYPECLASS) -def create_database(): - from django.core.management import call_command - print "\nCreating a database ...\n" - call_command("migrate", interactive=False) - print "\n ... database initialized.\n" - - -def create_superuser(): - from django.core.management import call_command - print "\nCreate a superuser below. The superuser is Player #1, the 'owner' account of the server.\n" - call_command("createsuperuser", interactive=True) - - -def check_database(automigrate=False): - # Check so a database exists and is accessible - from django.db import DatabaseError - from src.players.models import PlayerDB - try: - PlayerDB.objects.get(id=1) - except DatabaseError, e: - if automigrate: - create_database() - create_superuser() - else: - print ERROR_DATABASE.format(traceback=e) - sys.exit() - except PlayerDB.DoesNotExist: - # no superuser yet. We need to create it. - create_superuser() def main(): """ @@ -699,10 +789,10 @@ def main(): help="Show version info.") parser.add_argument('--init', action='store', dest="init", metavar="name", help="Creates a new game directory 'name' at the current location.") - parser.add_argument("mode", metavar="arg", nargs='?', default="menu", - help="Main operation command or management option. Common options are start|stop|reload.") - parser.add_argument("service", nargs='?', choices=["all", "server", "portal"], default="all", - help="Optionally defines which server component to operate on. Defaults to all.") + parser.add_argument("mode", metavar="option", nargs='?', default="menu", + help="Operational mode or management option. Commonly start, stop, reload, migrate, or menu (default).") + parser.add_argument("service", metavar="component", nargs='?', choices=["all", "server", "portal"], default="all", + help="Which server component to operate on. One of server, portal or all (default).") args = parser.parse_args() @@ -713,8 +803,12 @@ def main(): mode, service = args.mode, args.service + check_main_evennia_dependencies() + if args.init: create_game_directory(args.init) + print CREATED_NEW_GAMEDIR.format(gamedir=args.init, + settings_path=SETTINGS_PATH) sys.exit() # this must be done first - it sets up all the global properties diff --git a/evennia/__init__.py b/evennia/__init__.py new file mode 100644 index 0000000000..a2469c230e --- /dev/null +++ b/evennia/__init__.py @@ -0,0 +1,203 @@ +""" +Evennia MUD/MUX/MU* creation system +""" + +###################################################################### +# set Evennia version in __version__ property +###################################################################### +import os +try: + __version__ = "Evennia" + with os.path.join(open(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), "VERSION.txt", 'r') as f: + __version__ += " %s" % f.read().strip() +except IOError: + __version__ += " (unknown version)" + +del os + +###################################################################### +# Start Evennia API +# (easiest is to import this module interactively to explore it) +###################################################################### + +# help entries +from help.models import HelpEntry + +# players +from players.player import DefaultPlayer +from players.models import PlayerDB + +# commands +from commands.command import Command +from commands.cmdset import CmdSet +# (default_cmds is created below) + +# locks +from locks import lockfuncs + +# scripts +from scripts.scripts import Script + +# comms +from comms.models import Msg, ChannelDB +from comms.comms import Channel + +# objects +from objects.objects import DefaultObject, DefaultCharacter, DefaultRoom, DefaultExit + +# utils + +from utils.search import * +from utils.create import * +from scripts.tickerhandler import TICKER_HANDLER as tickerhandler +from utils import logger +from utils import utils +from utils import gametime +from utils import ansi +from utils.spawner import spawn + +###################################################################### +# API containers and helper functions +###################################################################### + +def help(header=False): + """ + Main Evennia API. + ev.help() views API contents + ev.help(True) or ev.README shows module instructions + + See www.evennia.com for the full documentation. + """ + if header: + return __doc__ + else: + import ev + names = [str(var) for var in ev.__dict__ if not var.startswith('_')] + return ", ".join(names) + + +class _EvContainer(object): + """ + Parent for other containers + + """ + def _help(self): + "Returns list of contents" + names = [name for name in self.__class__.__dict__ if not name.startswith('_')] + names += [name for name in self.__dict__ if not name.startswith('_')] + print self.__doc__ + "-" * 60 + "\n" + ", ".join(names) + help = property(_help) + + +class DBmanagers(_EvContainer): + """ + Links to instantiated database managers. + + helpentry - HelpEntry.objects + players - PlayerDB.objects + scripts - ScriptDB.objects + msgs - Msg.objects + channels - Channel.objects + objects - ObjectDB.objects + serverconfigs = ServerConfig.objects + tags - Tags.objects + attributes - Attributes.objects + + """ + from help.models import HelpEntry + from players.models import PlayerDB + from scripts.models import ScriptDB + from comms.models import Msg, ChannelDB + from objects.models import ObjectDB + from server.models import ServerConfig + from typeclasses.attributes import Attribute + from typeclasses.tags import Tag + + # create container's properties + helpentries = HelpEntry.objects + players = PlayerDB.objects + scripts = ScriptDB.objects + msgs = Msg.objects + channels = ChannelDB.objects + objects = ObjectDB.objects + serverconfigs = ServerConfig.objects + attributes = Attribute.objects + tags = Tag.objects + # remove these so they are not visible as properties + del HelpEntry, PlayerDB, ScriptDB, Msg, ChannelDB + #del ExternalChannelConnection + del ObjectDB, ServerConfig, Tag, Attribute + +managers = DBmanagers() +del DBmanagers + + +class DefaultCmds(_EvContainer): + """ + This container holds direct shortcuts to all default commands in Evennia. + + To access in code, do 'from ev import default_cmds' then + access the properties on the imported default_cmds object. + + """ + + from commands.default.cmdset_character import CharacterCmdSet + from commands.default.cmdset_player import PlayerCmdSet + from commands.default.cmdset_unloggedin import UnloggedinCmdSet + from commands.default.muxcommand import MuxCommand, MuxPlayerCommand + + def __init__(self): + "populate the object with commands" + + def add_cmds(module): + "helper method for populating this object with cmds" + cmdlist = utils.variable_from_module(module, module.__all__) + self.__dict__.update(dict([(c.__name__, c) for c in cmdlist])) + + from src.commands.default import (admin, batchprocess, + building, comms, general, + player, help, system, unloggedin) + add_cmds(admin) + add_cmds(building) + add_cmds(batchprocess) + add_cmds(building) + add_cmds(comms) + add_cmds(general) + add_cmds(player) + add_cmds(help) + add_cmds(system) + add_cmds(unloggedin) +default_cmds = DefaultCmds() +del DefaultCmds + + +class SystemCmds(_EvContainer): + """ + Creating commands with keys set to these constants will make + them system commands called as a replacement by the parser when + special situations occur. If not defined, the hard-coded + responses in the server are used. + + CMD_NOINPUT - no input was given on command line + CMD_NOMATCH - no valid command key was found + CMD_MULTIMATCH - multiple command matches were found + CMD_CHANNEL - the command name is a channel name + CMD_LOGINSTART - this command will be called as the very + first command when a player connects to + the server. + + To access in code, do 'from ev import syscmdkeys' then + access the properties on the imported syscmdkeys object. + + """ + from src.commands import cmdhandler + CMD_NOINPUT = cmdhandler.CMD_NOINPUT + CMD_NOMATCH = cmdhandler.CMD_NOMATCH + CMD_MULTIMATCH = cmdhandler.CMD_MULTIMATCH + CMD_CHANNEL = cmdhandler.CMD_CHANNEL + CMD_LOGINSTART = cmdhandler.CMD_LOGINSTART + del cmdhandler +syscmdkeys = SystemCmds() +del SystemCmds +del _EvContainer + diff --git a/lib/commands/__init__.py b/evennia/commands/__init__.py similarity index 100% rename from lib/commands/__init__.py rename to evennia/commands/__init__.py diff --git a/lib/commands/cmdhandler.py b/evennia/commands/cmdhandler.py similarity index 100% rename from lib/commands/cmdhandler.py rename to evennia/commands/cmdhandler.py diff --git a/lib/commands/cmdparser.py b/evennia/commands/cmdparser.py similarity index 100% rename from lib/commands/cmdparser.py rename to evennia/commands/cmdparser.py diff --git a/lib/commands/cmdset.py b/evennia/commands/cmdset.py similarity index 100% rename from lib/commands/cmdset.py rename to evennia/commands/cmdset.py diff --git a/lib/commands/cmdsethandler.py b/evennia/commands/cmdsethandler.py similarity index 100% rename from lib/commands/cmdsethandler.py rename to evennia/commands/cmdsethandler.py diff --git a/lib/commands/command.py b/evennia/commands/command.py similarity index 100% rename from lib/commands/command.py rename to evennia/commands/command.py diff --git a/lib/commands/connection_screen.py b/evennia/commands/connection_screen.py similarity index 100% rename from lib/commands/connection_screen.py rename to evennia/commands/connection_screen.py diff --git a/lib/commands/default/__init__.py b/evennia/commands/default/__init__.py similarity index 100% rename from lib/commands/default/__init__.py rename to evennia/commands/default/__init__.py diff --git a/lib/commands/default/admin.py b/evennia/commands/default/admin.py similarity index 100% rename from lib/commands/default/admin.py rename to evennia/commands/default/admin.py diff --git a/lib/commands/default/batchprocess.py b/evennia/commands/default/batchprocess.py similarity index 100% rename from lib/commands/default/batchprocess.py rename to evennia/commands/default/batchprocess.py diff --git a/lib/commands/default/building.py b/evennia/commands/default/building.py similarity index 100% rename from lib/commands/default/building.py rename to evennia/commands/default/building.py diff --git a/lib/commands/default/cmdset_character.py b/evennia/commands/default/cmdset_character.py similarity index 100% rename from lib/commands/default/cmdset_character.py rename to evennia/commands/default/cmdset_character.py diff --git a/lib/commands/default/cmdset_player.py b/evennia/commands/default/cmdset_player.py similarity index 100% rename from lib/commands/default/cmdset_player.py rename to evennia/commands/default/cmdset_player.py diff --git a/lib/commands/default/cmdset_session.py b/evennia/commands/default/cmdset_session.py similarity index 100% rename from lib/commands/default/cmdset_session.py rename to evennia/commands/default/cmdset_session.py diff --git a/lib/commands/default/cmdset_unloggedin.py b/evennia/commands/default/cmdset_unloggedin.py similarity index 100% rename from lib/commands/default/cmdset_unloggedin.py rename to evennia/commands/default/cmdset_unloggedin.py diff --git a/lib/commands/default/comms.py b/evennia/commands/default/comms.py similarity index 100% rename from lib/commands/default/comms.py rename to evennia/commands/default/comms.py diff --git a/lib/commands/default/general.py b/evennia/commands/default/general.py similarity index 100% rename from lib/commands/default/general.py rename to evennia/commands/default/general.py diff --git a/lib/commands/default/help.py b/evennia/commands/default/help.py similarity index 100% rename from lib/commands/default/help.py rename to evennia/commands/default/help.py diff --git a/lib/commands/default/muxcommand.py b/evennia/commands/default/muxcommand.py similarity index 100% rename from lib/commands/default/muxcommand.py rename to evennia/commands/default/muxcommand.py diff --git a/lib/commands/default/player.py b/evennia/commands/default/player.py similarity index 100% rename from lib/commands/default/player.py rename to evennia/commands/default/player.py diff --git a/lib/commands/default/syscommands.py b/evennia/commands/default/syscommands.py similarity index 100% rename from lib/commands/default/syscommands.py rename to evennia/commands/default/syscommands.py diff --git a/lib/commands/default/system.py b/evennia/commands/default/system.py similarity index 100% rename from lib/commands/default/system.py rename to evennia/commands/default/system.py diff --git a/lib/commands/default/tests.py b/evennia/commands/default/tests.py similarity index 100% rename from lib/commands/default/tests.py rename to evennia/commands/default/tests.py diff --git a/lib/commands/default/unloggedin.py b/evennia/commands/default/unloggedin.py similarity index 100% rename from lib/commands/default/unloggedin.py rename to evennia/commands/default/unloggedin.py diff --git a/lib/comms/__init__.py b/evennia/comms/__init__.py similarity index 100% rename from lib/comms/__init__.py rename to evennia/comms/__init__.py diff --git a/lib/comms/admin.py b/evennia/comms/admin.py similarity index 100% rename from lib/comms/admin.py rename to evennia/comms/admin.py diff --git a/lib/comms/channelhandler.py b/evennia/comms/channelhandler.py similarity index 100% rename from lib/comms/channelhandler.py rename to evennia/comms/channelhandler.py diff --git a/lib/comms/comms.py b/evennia/comms/comms.py similarity index 100% rename from lib/comms/comms.py rename to evennia/comms/comms.py diff --git a/lib/comms/managers.py b/evennia/comms/managers.py similarity index 100% rename from lib/comms/managers.py rename to evennia/comms/managers.py diff --git a/lib/comms/migrations/0001_initial.py b/evennia/comms/migrations/0001_initial.py similarity index 100% rename from lib/comms/migrations/0001_initial.py rename to evennia/comms/migrations/0001_initial.py diff --git a/lib/comms/migrations/0002_msg_db_hide_from_objects.py b/evennia/comms/migrations/0002_msg_db_hide_from_objects.py similarity index 100% rename from lib/comms/migrations/0002_msg_db_hide_from_objects.py rename to evennia/comms/migrations/0002_msg_db_hide_from_objects.py diff --git a/lib/comms/migrations/0003_auto_20140917_0756.py b/evennia/comms/migrations/0003_auto_20140917_0756.py similarity index 100% rename from lib/comms/migrations/0003_auto_20140917_0756.py rename to evennia/comms/migrations/0003_auto_20140917_0756.py diff --git a/lib/comms/migrations/__init__.py b/evennia/comms/migrations/__init__.py similarity index 100% rename from lib/comms/migrations/__init__.py rename to evennia/comms/migrations/__init__.py diff --git a/lib/comms/models.py b/evennia/comms/models.py similarity index 100% rename from lib/comms/models.py rename to evennia/comms/models.py diff --git a/lib/help/__init__.py b/evennia/help/__init__.py similarity index 100% rename from lib/help/__init__.py rename to evennia/help/__init__.py diff --git a/lib/help/admin.py b/evennia/help/admin.py similarity index 100% rename from lib/help/admin.py rename to evennia/help/admin.py diff --git a/lib/help/manager.py b/evennia/help/manager.py similarity index 100% rename from lib/help/manager.py rename to evennia/help/manager.py diff --git a/lib/help/migrations/0001_initial.py b/evennia/help/migrations/0001_initial.py similarity index 100% rename from lib/help/migrations/0001_initial.py rename to evennia/help/migrations/0001_initial.py diff --git a/lib/help/migrations/__init__.py b/evennia/help/migrations/__init__.py similarity index 100% rename from lib/help/migrations/__init__.py rename to evennia/help/migrations/__init__.py diff --git a/lib/help/models.py b/evennia/help/models.py similarity index 100% rename from lib/help/models.py rename to evennia/help/models.py diff --git a/lib/locks/__init__.py b/evennia/locks/__init__.py similarity index 100% rename from lib/locks/__init__.py rename to evennia/locks/__init__.py diff --git a/lib/locks/lockfuncs.py b/evennia/locks/lockfuncs.py similarity index 100% rename from lib/locks/lockfuncs.py rename to evennia/locks/lockfuncs.py diff --git a/lib/locks/lockhandler.py b/evennia/locks/lockhandler.py similarity index 100% rename from lib/locks/lockhandler.py rename to evennia/locks/lockhandler.py diff --git a/lib/locks/tests.py b/evennia/locks/tests.py similarity index 100% rename from lib/locks/tests.py rename to evennia/locks/tests.py diff --git a/lib/objects/__init__.py b/evennia/objects/__init__.py similarity index 100% rename from lib/objects/__init__.py rename to evennia/objects/__init__.py diff --git a/lib/objects/admin.py b/evennia/objects/admin.py similarity index 100% rename from lib/objects/admin.py rename to evennia/objects/admin.py diff --git a/lib/objects/manager.py b/evennia/objects/manager.py similarity index 100% rename from lib/objects/manager.py rename to evennia/objects/manager.py diff --git a/lib/objects/migrations/0001_initial.py b/evennia/objects/migrations/0001_initial.py similarity index 100% rename from lib/objects/migrations/0001_initial.py rename to evennia/objects/migrations/0001_initial.py diff --git a/lib/objects/migrations/0002_auto_20140917_0756.py b/evennia/objects/migrations/0002_auto_20140917_0756.py similarity index 100% rename from lib/objects/migrations/0002_auto_20140917_0756.py rename to evennia/objects/migrations/0002_auto_20140917_0756.py diff --git a/lib/__init__.py b/evennia/objects/migrations/__init__.py similarity index 100% rename from lib/__init__.py rename to evennia/objects/migrations/__init__.py diff --git a/lib/objects/models.py b/evennia/objects/models.py similarity index 100% rename from lib/objects/models.py rename to evennia/objects/models.py diff --git a/lib/objects/objects.py b/evennia/objects/objects.py similarity index 100% rename from lib/objects/objects.py rename to evennia/objects/objects.py diff --git a/lib/players/__init__.py b/evennia/players/__init__.py similarity index 100% rename from lib/players/__init__.py rename to evennia/players/__init__.py diff --git a/lib/players/admin.py b/evennia/players/admin.py similarity index 100% rename from lib/players/admin.py rename to evennia/players/admin.py diff --git a/lib/players/bots.py b/evennia/players/bots.py similarity index 100% rename from lib/players/bots.py rename to evennia/players/bots.py diff --git a/lib/players/manager.py b/evennia/players/manager.py similarity index 100% rename from lib/players/manager.py rename to evennia/players/manager.py diff --git a/lib/players/migrations/0001_initial.py b/evennia/players/migrations/0001_initial.py similarity index 100% rename from lib/players/migrations/0001_initial.py rename to evennia/players/migrations/0001_initial.py diff --git a/lib/players/migrations/__init__.py b/evennia/players/migrations/__init__.py similarity index 100% rename from lib/players/migrations/__init__.py rename to evennia/players/migrations/__init__.py diff --git a/lib/players/models.py b/evennia/players/models.py similarity index 100% rename from lib/players/models.py rename to evennia/players/models.py diff --git a/lib/players/player.py b/evennia/players/player.py similarity index 100% rename from lib/players/player.py rename to evennia/players/player.py diff --git a/lib/scripts/__init__.py b/evennia/scripts/__init__.py similarity index 100% rename from lib/scripts/__init__.py rename to evennia/scripts/__init__.py diff --git a/lib/scripts/admin.py b/evennia/scripts/admin.py similarity index 100% rename from lib/scripts/admin.py rename to evennia/scripts/admin.py diff --git a/lib/scripts/manager.py b/evennia/scripts/manager.py similarity index 100% rename from lib/scripts/manager.py rename to evennia/scripts/manager.py diff --git a/lib/scripts/migrations/0001_initial.py b/evennia/scripts/migrations/0001_initial.py similarity index 100% rename from lib/scripts/migrations/0001_initial.py rename to evennia/scripts/migrations/0001_initial.py diff --git a/lib/scripts/migrations/__init__.py b/evennia/scripts/migrations/__init__.py similarity index 100% rename from lib/scripts/migrations/__init__.py rename to evennia/scripts/migrations/__init__.py diff --git a/lib/scripts/models.py b/evennia/scripts/models.py similarity index 100% rename from lib/scripts/models.py rename to evennia/scripts/models.py diff --git a/lib/scripts/scripthandler.py b/evennia/scripts/scripthandler.py similarity index 100% rename from lib/scripts/scripthandler.py rename to evennia/scripts/scripthandler.py diff --git a/lib/scripts/scripts.py b/evennia/scripts/scripts.py similarity index 100% rename from lib/scripts/scripts.py rename to evennia/scripts/scripts.py diff --git a/lib/scripts/tickerhandler.py b/evennia/scripts/tickerhandler.py similarity index 100% rename from lib/scripts/tickerhandler.py rename to evennia/scripts/tickerhandler.py diff --git a/lib/server/__init__.py b/evennia/server/__init__.py similarity index 100% rename from lib/server/__init__.py rename to evennia/server/__init__.py diff --git a/lib/server/admin.py b/evennia/server/admin.py similarity index 100% rename from lib/server/admin.py rename to evennia/server/admin.py diff --git a/lib/server/amp.py b/evennia/server/amp.py similarity index 100% rename from lib/server/amp.py rename to evennia/server/amp.py diff --git a/lib/server/caches.py b/evennia/server/caches.py similarity index 100% rename from lib/server/caches.py rename to evennia/server/caches.py diff --git a/lib/server/initial_setup.py b/evennia/server/initial_setup.py similarity index 100% rename from lib/server/initial_setup.py rename to evennia/server/initial_setup.py diff --git a/lib/server/manager.py b/evennia/server/manager.py similarity index 100% rename from lib/server/manager.py rename to evennia/server/manager.py diff --git a/lib/server/migrations/0001_initial.py b/evennia/server/migrations/0001_initial.py similarity index 100% rename from lib/server/migrations/0001_initial.py rename to evennia/server/migrations/0001_initial.py diff --git a/lib/server/migrations/__init__.py b/evennia/server/migrations/__init__.py similarity index 100% rename from lib/server/migrations/__init__.py rename to evennia/server/migrations/__init__.py diff --git a/lib/server/models.py b/evennia/server/models.py similarity index 100% rename from lib/server/models.py rename to evennia/server/models.py diff --git a/lib/server/oob_cmds.py b/evennia/server/oob_cmds.py similarity index 100% rename from lib/server/oob_cmds.py rename to evennia/server/oob_cmds.py diff --git a/lib/server/oobhandler.py b/evennia/server/oobhandler.py similarity index 100% rename from lib/server/oobhandler.py rename to evennia/server/oobhandler.py diff --git a/lib/server/portal/__init__.py b/evennia/server/portal/__init__.py similarity index 100% rename from lib/server/portal/__init__.py rename to evennia/server/portal/__init__.py diff --git a/lib/server/portal/imc2.py b/evennia/server/portal/imc2.py similarity index 100% rename from lib/server/portal/imc2.py rename to evennia/server/portal/imc2.py diff --git a/lib/server/portal/imc2lib/__init__.py b/evennia/server/portal/imc2lib/__init__.py similarity index 100% rename from lib/server/portal/imc2lib/__init__.py rename to evennia/server/portal/imc2lib/__init__.py diff --git a/lib/server/portal/imc2lib/imc2_ansi.py b/evennia/server/portal/imc2lib/imc2_ansi.py similarity index 100% rename from lib/server/portal/imc2lib/imc2_ansi.py rename to evennia/server/portal/imc2lib/imc2_ansi.py diff --git a/lib/server/portal/imc2lib/imc2_packets.py b/evennia/server/portal/imc2lib/imc2_packets.py similarity index 100% rename from lib/server/portal/imc2lib/imc2_packets.py rename to evennia/server/portal/imc2lib/imc2_packets.py diff --git a/lib/server/portal/irc.py b/evennia/server/portal/irc.py similarity index 100% rename from lib/server/portal/irc.py rename to evennia/server/portal/irc.py diff --git a/lib/server/portal/mccp.py b/evennia/server/portal/mccp.py similarity index 100% rename from lib/server/portal/mccp.py rename to evennia/server/portal/mccp.py diff --git a/lib/server/portal/msdp.py b/evennia/server/portal/msdp.py similarity index 100% rename from lib/server/portal/msdp.py rename to evennia/server/portal/msdp.py diff --git a/lib/server/portal/mssp.py b/evennia/server/portal/mssp.py similarity index 100% rename from lib/server/portal/mssp.py rename to evennia/server/portal/mssp.py diff --git a/lib/server/portal/mxp.py b/evennia/server/portal/mxp.py similarity index 100% rename from lib/server/portal/mxp.py rename to evennia/server/portal/mxp.py diff --git a/lib/server/portal/naws.py b/evennia/server/portal/naws.py similarity index 100% rename from lib/server/portal/naws.py rename to evennia/server/portal/naws.py diff --git a/lib/server/portal/portal.py b/evennia/server/portal/portal.py similarity index 100% rename from lib/server/portal/portal.py rename to evennia/server/portal/portal.py diff --git a/lib/server/portal/portalsessionhandler.py b/evennia/server/portal/portalsessionhandler.py similarity index 100% rename from lib/server/portal/portalsessionhandler.py rename to evennia/server/portal/portalsessionhandler.py diff --git a/lib/server/portal/rss.py b/evennia/server/portal/rss.py similarity index 100% rename from lib/server/portal/rss.py rename to evennia/server/portal/rss.py diff --git a/lib/server/portal/ssh.py b/evennia/server/portal/ssh.py similarity index 100% rename from lib/server/portal/ssh.py rename to evennia/server/portal/ssh.py diff --git a/lib/server/portal/ssl.py b/evennia/server/portal/ssl.py similarity index 100% rename from lib/server/portal/ssl.py rename to evennia/server/portal/ssl.py diff --git a/lib/server/portal/telnet.py b/evennia/server/portal/telnet.py similarity index 100% rename from lib/server/portal/telnet.py rename to evennia/server/portal/telnet.py diff --git a/lib/server/portal/ttype.py b/evennia/server/portal/ttype.py similarity index 100% rename from lib/server/portal/ttype.py rename to evennia/server/portal/ttype.py diff --git a/lib/server/portal/webclient.py b/evennia/server/portal/webclient.py similarity index 100% rename from lib/server/portal/webclient.py rename to evennia/server/portal/webclient.py diff --git a/lib/server/portal/websocket_client.py b/evennia/server/portal/websocket_client.py similarity index 100% rename from lib/server/portal/websocket_client.py rename to evennia/server/portal/websocket_client.py diff --git a/lib/server/server.py b/evennia/server/server.py similarity index 100% rename from lib/server/server.py rename to evennia/server/server.py diff --git a/lib/server/serversession.py b/evennia/server/serversession.py similarity index 100% rename from lib/server/serversession.py rename to evennia/server/serversession.py diff --git a/lib/server/session.py b/evennia/server/session.py similarity index 100% rename from lib/server/session.py rename to evennia/server/session.py diff --git a/lib/server/sessionhandler.py b/evennia/server/sessionhandler.py similarity index 100% rename from lib/server/sessionhandler.py rename to evennia/server/sessionhandler.py diff --git a/lib/server/tests.py b/evennia/server/tests.py similarity index 100% rename from lib/server/tests.py rename to evennia/server/tests.py diff --git a/lib/server/webserver.py b/evennia/server/webserver.py similarity index 100% rename from lib/server/webserver.py rename to evennia/server/webserver.py diff --git a/lib/settings_default.py b/evennia/settings_default.py similarity index 91% rename from lib/settings_default.py rename to evennia/settings_default.py index db9a2d247e..2adf073665 100644 --- a/lib/settings_default.py +++ b/evennia/settings_default.py @@ -96,12 +96,12 @@ WEBSOCKET_INTERFACES = ['0.0.0.0'] # This determine's whether Evennia's custom admin page is used, or if the # standard Django admin is used. EVENNIA_ADMIN = True -# The path that contains this settings.py file (no trailing slash). -BASE_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +# The path to the root directory +ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Path to the src directory containing the bulk of the codebase's code. -SRC_DIR = os.path.join(BASE_PATH, 'src') +EVENNIA_DIR = os.path.join(ROOT_DIR, 'evennia') # Path to the game directory (containing the database file if using sqlite). -GAME_DIR = os.path.join(BASE_PATH, 'game') +GAME_DIR = os.path.join(ROOT_DIR, 'game_template') # Place to put log files LOG_DIR = os.path.join(GAME_DIR, 'logs') SERVER_LOG_FILE = os.path.join(LOG_DIR, 'server.log') @@ -116,7 +116,7 @@ CYCLE_LOGFILES = True TIME_ZONE = 'UTC' # Authentication backends. This is the code used to authenticate a user. AUTHENTICATION_BACKENDS = ( - 'src.web.utils.backends.CaseInsensitiveModelBackend',) + 'evennia.web.utils.backends.CaseInsensitiveModelBackend',) # Language code for this installation. All choices can be found here: # http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes LANGUAGE_CODE = 'en-us' @@ -172,7 +172,7 @@ IDMAPPER_CACHE_MAXSIZE = 200 # (MB) # Evennia Database config ###################################################################### -# Database config syntax for Django 1.2+. +# Database config syntax: # ENGINE - path to the the database backend. Possible choices are: # 'django.db.backends.sqlite3', (default) # 'django.db.backends.mysql', @@ -202,47 +202,47 @@ DATABASES = { # The command parser module to use. See the default module for which # functions it must implement -COMMAND_PARSER = "src.commands.cmdparser.cmdparser" +COMMAND_PARSER = "commands.cmdparser" # The handler that outputs errors when searching # objects using object.search(). -SEARCH_AT_RESULT = "src.commands.cmdparser.at_search_result" +SEARCH_AT_RESULT = "commands.at_search_result" # The parser used in order to separate multiple # object matches (so you can separate between same-named # objects without using dbrefs). -SEARCH_AT_MULTIMATCH_INPUT = "src.commands.cmdparser.at_multimatch_input" +SEARCH_AT_MULTIMATCH_INPUT = "commands.at_multimatch_input" # The module holding text strings for the connection screen. # This module should contain one or more variables # with strings defining the look of the screen. -CONNECTION_SCREEN_MODULE = "src.commands.connection_screen" +CONNECTION_SCREEN_MODULE = "world.connection_screen" # An optional module that, if existing, must hold a function # named at_initial_setup(). This hook method can be used to customize # the server's initial setup sequence (the very first startup of the system). # The check will fail quietly if module doesn't exist or fails to load. -AT_INITIAL_SETUP_HOOK_MODULE = "" +AT_INITIAL_SETUP_HOOK_MODULE = "server.conf.at_initial_setup_hook" # Module containing your custom at_server_start(), at_server_reload() and # at_server_stop() methods. These methods will be called every time # the server starts, reloads and resets/stops respectively. -AT_SERVER_STARTSTOP_MODULE = "" +AT_SERVER_STARTSTOP_MODULE = "server.conf.at_server_startstop" # List of one or more module paths to modules containing a function start_ # plugin_services(application). This module will be called with the main # Evennia Server application when the Server is initiated. # It will be called last in the startup sequence. -SERVER_SERVICES_PLUGIN_MODULES = [] +SERVER_SERVICES_PLUGIN_MODULES = ["server.conf.server_services_plugins"] # List of one or more module paths to modules containing a function # start_plugin_services(application). This module will be called with the # main Evennia Portal application when the Portal is initiated. # It will be called last in the startup sequence. -PORTAL_SERVICES_PLUGIN_MODULES = [] +PORTAL_SERVICES_PLUGIN_MODULES = ["server.conf.portal_services_plugins"] # Module holding MSSP meta data. This is used by MUD-crawlers to determine # what type of game you are running, how many players you have etc. MSSP_META_MODULE = "" # Tuple of modules implementing lock functions. All callable functions # inside these modules will be available as lock functions. -LOCK_FUNC_MODULES = ("src.locks.lockfuncs",) +LOCK_FUNC_MODULES = ("src.locks.lockfuncs", "server.conf.lockfuncs",) # Module holding OOB (Out of Band) hook objects. This allows for customization # and expansion of which hooks OOB protocols are allowed to call on the server # protocols for attaching tracker hooks for when various object field change -OOB_PLUGIN_MODULES = ["src.server.oob_cmds"] +OOB_PLUGIN_MODULES = ["src.server.oob_cmds", "server.conf.oob_cmds"] ###################################################################### # Default command sets @@ -258,50 +258,46 @@ OOB_PLUGIN_MODULES = ["src.server.oob_cmds"] # (or copy/paste from the default modules in src/ if you prefer). # Command set used on session before player has logged in -CMDSET_UNLOGGEDIN = "src.commands.default.cmdset_unloggedin.UnloggedinCmdSet" +CMDSET_UNLOGGEDIN = "commands.default_cmdsets.UnloggedinCmdSet" # Command set used on the logged-in session -CMDSET_SESSION = "src.commands.default.cmdset_session.SessionCmdSet" +CMDSET_SESSION = "commands.default_cmdsets.SessionCmdSet" # Default set for logged in player with characters (fallback) -CMDSET_CHARACTER = "src.commands.default.cmdset_character.CharacterCmdSet" +CMDSET_CHARACTER = "commands.default_cmdsets.CharacterCmdSet" # Command set for players without a character (ooc) -CMDSET_PLAYER = "src.commands.default.cmdset_player.PlayerCmdSet" +CMDSET_PLAYER = "commands.default_cmdsets.PlayerCmdSet" # Location to search for cmdsets if full path not given -CMDSET_PATHS = ["game.gamesrc.commands"] +CMDSET_PATHS = ["commands"] ###################################################################### # Typeclasses and other paths ###################################################################### -# Server-side session class used. +# Server-side session class used. #TODO SERVER_SESSION_CLASS = "src.server.serversession.ServerSession" # Base paths for typeclassed object classes. These paths must be # defined relative evennia's root directory. They will be searched in # order to find relative typeclass paths. -OBJECT_TYPECLASS_PATHS = ["game.gamesrc.objects", - "game.gamesrc.objects.examples", - "contrib"] -SCRIPT_TYPECLASS_PATHS = ["game.gamesrc.scripts", - "game.gamesrc.scripts.examples", - "contrib"] -PLAYER_TYPECLASS_PATHS = ["game.gamesrc.objects", "contrib"] -CHANNEL_TYPECLASS_PATHS = ["game.gamesrc.conf", "contrib"] +OBJECT_TYPECLASS_PATHS = ["types", "contrib"] +SCRIPT_TYPECLASS_PATHS = ["types" "contrib"] +PLAYER_TYPECLASS_PATHS = ["types", "contrib"] +CHANNEL_TYPECLASS_PATHS = ["types", "contrib"] # Typeclass for player objects (linked to a character) (fallback) -BASE_PLAYER_TYPECLASS = "src.players.player.DefaultPlayer" +BASE_PLAYER_TYPECLASS = "types.player.Player" # Typeclass and base for all objects (fallback) -BASE_OBJECT_TYPECLASS = "src.objects.objects.DefaultObject" +BASE_OBJECT_TYPECLASS = "types.object.Object" # Typeclass for character objects linked to a player (fallback) -BASE_CHARACTER_TYPECLASS = "src.objects.objects.DefaultCharacter" +BASE_CHARACTER_TYPECLASS = "types.character.Character" # Typeclass for rooms (fallback) -BASE_ROOM_TYPECLASS = "src.objects.objects.DefaultRoom" +BASE_ROOM_TYPECLASS = "types.room.Room" # Typeclass for Exit objects (fallback). -BASE_EXIT_TYPECLASS = "src.objects.objects.DefaultExit" +BASE_EXIT_TYPECLASS = "types.exit.Exit" # Typeclass for Channel (fallback). -BASE_CHANNEL_TYPECLASS = "src.comms.comms.Channel" +BASE_CHANNEL_TYPECLASS = "type.channel.Channel" # Typeclass for Scripts (fallback). You usually don't need to change this # but create custom variations of scripts on a per-case basis instead. -BASE_SCRIPT_TYPECLASS = "src.scripts.scripts.DoNothing" +BASE_SCRIPT_TYPECLASS = "type.scripts.Script" # The default home location used for all objects. This is used as a # fallback if an object's normal home location is deleted. Default # is Limbo (#2). @@ -325,7 +321,7 @@ TYPECLASS_AGGRESSIVE_CACHE = True # Python path to a directory to be searched for batch scripts # for the batch processors (.ev and/or .py files). -BASE_BATCHPROCESS_PATHS = ['game.gamesrc.world', 'contrib'] +BASE_BATCHPROCESS_PATHS = ['world', 'contrib'] ###################################################################### # Game Time setup @@ -358,7 +354,7 @@ INLINEFUNC_ENABLED = False # Only functions defined globally (and not starting with '_') in # these modules will be considered valid inlinefuncs. The list # is loaded from left-to-right, same-named functions will overload -INLINEFUNC_MODULES = ["src.utils.inlinefunc"] +INLINEFUNC_MODULES = ["server.conf.inlinefunc"] ###################################################################### # Default Player setup and access @@ -407,7 +403,7 @@ CLIENT_DEFAULT_HEIGHT = 45 # telnet standard is 24 but does anyone use such # This enables guest logins, by default via "connect guest" GUEST_ENABLED = False # Typeclass for guest player objects (linked to a character) -BASE_GUEST_TYPECLASS = "src.players.player.Guest" +BASE_GUEST_TYPECLASS = "types.player.Guest" # The permission given to guests PERMISSION_GUEST_DEFAULT = "Guests" # The default home location used for guests. @@ -522,13 +518,13 @@ SESSION_EXPIRE_AT_BROWSER_CLOSE = False # to load the internationalization machinery. USE_I18N = False # Where to find locales (no need to change this, most likely) -LOCALE_PATHS = ["../locale/"] +LOCALE_PATHS = [os.path.join(ROOT_DIR, "locale/")] # This should be turned off unless you want to do tests with Django's # development webserver (normally Evennia runs its own server) SERVE_MEDIA = False # The master urlconf file that contains all of the sub-branches to the # applications. Change this to add your own URLs to the website. -ROOT_URLCONF = 'src.web.urls' +ROOT_URLCONF = 'web.urls' #src.web.urls? # Where users are redirected after logging in via contrib.auth.login. LOGIN_REDIRECT_URL = '/' # Where to redirect users when using the @login_required decorator. @@ -548,7 +544,7 @@ STATIC_ROOT = os.path.join(GAME_DIR, "gamesrc", "web", "static") # Directories from which static files will be gathered from. STATICFILES_DIRS = ( os.path.join(GAME_DIR, "gamesrc", "web", "static_overrides"), - os.path.join(SRC_DIR, "web", "static"),) + os.path.join(EVENNIA_DIR, "web", "static"),) # Patterns of files in the static directories. Used here to make sure that # its readme file is preserved but unused. STATICFILES_IGNORE_PATTERNS = ('README.md',) @@ -558,8 +554,8 @@ ACTIVE_TEMPLATE = 'prosimii' # We setup the location of the website template as well as the admin site. TEMPLATE_DIRS = ( os.path.join(GAME_DIR, "gamesrc", "web", "template_overrides"), - os.path.join(SRC_DIR, "web", "templates", ACTIVE_TEMPLATE), - os.path.join(SRC_DIR, "web", "templates"),) + os.path.join(EVENNIA_DIR, "web", "templates", ACTIVE_TEMPLATE), + os.path.join(EVENNIA_DIR, "web", "templates"),) # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', @@ -583,7 +579,7 @@ TEMPLATE_CONTEXT_PROCESSORS = ( 'django.contrib.auth.context_processors.auth', 'django.core.context_processors.media', 'django.core.context_processors.debug', - 'src.web.utils.general_context.general_context',) + 'evennia.web.utils.general_context.general_context',) ###################################################################### # Evennia components @@ -600,20 +596,20 @@ INSTALLED_APPS = ( 'django.contrib.admindocs', 'django.contrib.flatpages', 'django.contrib.staticfiles', - 'src.server', - 'src.typeclasses', - 'src.players', - 'src.objects', - 'src.comms', - 'src.help', - 'src.scripts', - 'src.web.webclient') + 'evennia.server', + 'evennia.typeclasses', + 'evennia.players', + 'evennia.objects', + 'evennia.comms', + 'evennia.help', + 'evennia.scripts', + 'evennia.web.webclient') # The user profile extends the User object with more functionality; # This should usually not be changed. AUTH_USER_MODEL = "players.PlayerDB" #AUTH_PROFILE_MODULE = "players.PlayerDB" # Use a custom test runner that just tests Evennia-specific apps. -TEST_RUNNER = 'src.server.tests.EvenniaTestSuiteRunner' +TEST_RUNNER = 'evennia.server.tests.EvenniaTestSuiteRunner' ###################################################################### # Django extensions diff --git a/lib/objects/migrations/__init__.py b/evennia/tests/__init__.py similarity index 100% rename from lib/objects/migrations/__init__.py rename to evennia/tests/__init__.py diff --git a/lib/tests/test_commands_cmdhandler.py b/evennia/tests/test_commands_cmdhandler.py similarity index 100% rename from lib/tests/test_commands_cmdhandler.py rename to evennia/tests/test_commands_cmdhandler.py diff --git a/lib/tests/test_commands_cmdparser.py b/evennia/tests/test_commands_cmdparser.py similarity index 100% rename from lib/tests/test_commands_cmdparser.py rename to evennia/tests/test_commands_cmdparser.py diff --git a/lib/tests/test_commands_cmdset.py b/evennia/tests/test_commands_cmdset.py similarity index 100% rename from lib/tests/test_commands_cmdset.py rename to evennia/tests/test_commands_cmdset.py diff --git a/lib/tests/test_commands_cmdsethandler.py b/evennia/tests/test_commands_cmdsethandler.py similarity index 100% rename from lib/tests/test_commands_cmdsethandler.py rename to evennia/tests/test_commands_cmdsethandler.py diff --git a/lib/tests/test_commands_command.py b/evennia/tests/test_commands_command.py similarity index 100% rename from lib/tests/test_commands_command.py rename to evennia/tests/test_commands_command.py diff --git a/lib/tests/test_comms_channelhandler.py b/evennia/tests/test_comms_channelhandler.py similarity index 100% rename from lib/tests/test_comms_channelhandler.py rename to evennia/tests/test_comms_channelhandler.py diff --git a/lib/tests/test_comms_comms.py b/evennia/tests/test_comms_comms.py similarity index 100% rename from lib/tests/test_comms_comms.py rename to evennia/tests/test_comms_comms.py diff --git a/lib/tests/test_comms_models.py b/evennia/tests/test_comms_models.py similarity index 100% rename from lib/tests/test_comms_models.py rename to evennia/tests/test_comms_models.py diff --git a/lib/tests/test_locks_lockfuncs.py b/evennia/tests/test_locks_lockfuncs.py similarity index 100% rename from lib/tests/test_locks_lockfuncs.py rename to evennia/tests/test_locks_lockfuncs.py diff --git a/lib/tests/test_locks_lockhandler.py b/evennia/tests/test_locks_lockhandler.py similarity index 100% rename from lib/tests/test_locks_lockhandler.py rename to evennia/tests/test_locks_lockhandler.py diff --git a/lib/tests/test_objects_models.py b/evennia/tests/test_objects_models.py similarity index 100% rename from lib/tests/test_objects_models.py rename to evennia/tests/test_objects_models.py diff --git a/lib/tests/test_objects_objects.py b/evennia/tests/test_objects_objects.py similarity index 100% rename from lib/tests/test_objects_objects.py rename to evennia/tests/test_objects_objects.py diff --git a/lib/tests/test_players_bots.py b/evennia/tests/test_players_bots.py similarity index 100% rename from lib/tests/test_players_bots.py rename to evennia/tests/test_players_bots.py diff --git a/lib/tests/test_players_models.py b/evennia/tests/test_players_models.py similarity index 100% rename from lib/tests/test_players_models.py rename to evennia/tests/test_players_models.py diff --git a/lib/tests/test_scripts_models.py b/evennia/tests/test_scripts_models.py similarity index 100% rename from lib/tests/test_scripts_models.py rename to evennia/tests/test_scripts_models.py diff --git a/lib/tests/test_scripts_scripthandler.py b/evennia/tests/test_scripts_scripthandler.py similarity index 100% rename from lib/tests/test_scripts_scripthandler.py rename to evennia/tests/test_scripts_scripthandler.py diff --git a/lib/tests/test_scripts_scripts.py b/evennia/tests/test_scripts_scripts.py similarity index 100% rename from lib/tests/test_scripts_scripts.py rename to evennia/tests/test_scripts_scripts.py diff --git a/lib/tests/test_scripts_tickerhandler.py b/evennia/tests/test_scripts_tickerhandler.py similarity index 100% rename from lib/tests/test_scripts_tickerhandler.py rename to evennia/tests/test_scripts_tickerhandler.py diff --git a/lib/tests/test_server_amp.py b/evennia/tests/test_server_amp.py similarity index 100% rename from lib/tests/test_server_amp.py rename to evennia/tests/test_server_amp.py diff --git a/lib/tests/test_server_caches.py b/evennia/tests/test_server_caches.py similarity index 100% rename from lib/tests/test_server_caches.py rename to evennia/tests/test_server_caches.py diff --git a/lib/tests/test_server_initial_setup.py b/evennia/tests/test_server_initial_setup.py similarity index 100% rename from lib/tests/test_server_initial_setup.py rename to evennia/tests/test_server_initial_setup.py diff --git a/lib/tests/test_server_manager.py b/evennia/tests/test_server_manager.py similarity index 100% rename from lib/tests/test_server_manager.py rename to evennia/tests/test_server_manager.py diff --git a/lib/tests/test_server_models.py b/evennia/tests/test_server_models.py similarity index 100% rename from lib/tests/test_server_models.py rename to evennia/tests/test_server_models.py diff --git a/lib/tests/test_server_oob_msdp.py b/evennia/tests/test_server_oob_msdp.py similarity index 100% rename from lib/tests/test_server_oob_msdp.py rename to evennia/tests/test_server_oob_msdp.py diff --git a/lib/tests/test_server_oobhandler.py b/evennia/tests/test_server_oobhandler.py similarity index 100% rename from lib/tests/test_server_oobhandler.py rename to evennia/tests/test_server_oobhandler.py diff --git a/lib/tests/test_server_server.py b/evennia/tests/test_server_server.py similarity index 100% rename from lib/tests/test_server_server.py rename to evennia/tests/test_server_server.py diff --git a/lib/tests/test_server_serversession.py b/evennia/tests/test_server_serversession.py similarity index 100% rename from lib/tests/test_server_serversession.py rename to evennia/tests/test_server_serversession.py diff --git a/lib/tests/test_server_session.py b/evennia/tests/test_server_session.py similarity index 100% rename from lib/tests/test_server_session.py rename to evennia/tests/test_server_session.py diff --git a/lib/tests/test_server_webserver.py b/evennia/tests/test_server_webserver.py similarity index 100% rename from lib/tests/test_server_webserver.py rename to evennia/tests/test_server_webserver.py diff --git a/lib/tests/test_typeclasses_models.py b/evennia/tests/test_typeclasses_models.py similarity index 100% rename from lib/tests/test_typeclasses_models.py rename to evennia/tests/test_typeclasses_models.py diff --git a/lib/tests/test_typeclasses_typeclass.py b/evennia/tests/test_typeclasses_typeclass.py similarity index 100% rename from lib/tests/test_typeclasses_typeclass.py rename to evennia/tests/test_typeclasses_typeclass.py diff --git a/lib/tests/test_utils_ansi.py b/evennia/tests/test_utils_ansi.py similarity index 100% rename from lib/tests/test_utils_ansi.py rename to evennia/tests/test_utils_ansi.py diff --git a/lib/tests/test_utils_ansi_new.py b/evennia/tests/test_utils_ansi_new.py similarity index 100% rename from lib/tests/test_utils_ansi_new.py rename to evennia/tests/test_utils_ansi_new.py diff --git a/lib/tests/test_utils_batchprocessors.py b/evennia/tests/test_utils_batchprocessors.py similarity index 100% rename from lib/tests/test_utils_batchprocessors.py rename to evennia/tests/test_utils_batchprocessors.py diff --git a/lib/tests/test_utils_create.py b/evennia/tests/test_utils_create.py similarity index 100% rename from lib/tests/test_utils_create.py rename to evennia/tests/test_utils_create.py diff --git a/lib/tests/test_utils_dbserialize.py b/evennia/tests/test_utils_dbserialize.py similarity index 100% rename from lib/tests/test_utils_dbserialize.py rename to evennia/tests/test_utils_dbserialize.py diff --git a/lib/tests/test_utils_evform.py b/evennia/tests/test_utils_evform.py similarity index 100% rename from lib/tests/test_utils_evform.py rename to evennia/tests/test_utils_evform.py diff --git a/lib/tests/test_utils_evtable.py b/evennia/tests/test_utils_evtable.py similarity index 100% rename from lib/tests/test_utils_evtable.py rename to evennia/tests/test_utils_evtable.py diff --git a/lib/tests/test_utils_gametime.py b/evennia/tests/test_utils_gametime.py similarity index 100% rename from lib/tests/test_utils_gametime.py rename to evennia/tests/test_utils_gametime.py diff --git a/lib/tests/test_utils_logger.py b/evennia/tests/test_utils_logger.py similarity index 100% rename from lib/tests/test_utils_logger.py rename to evennia/tests/test_utils_logger.py diff --git a/lib/tests/test_utils_picklefield.py b/evennia/tests/test_utils_picklefield.py similarity index 100% rename from lib/tests/test_utils_picklefield.py rename to evennia/tests/test_utils_picklefield.py diff --git a/lib/tests/test_utils_prettytable.py b/evennia/tests/test_utils_prettytable.py similarity index 100% rename from lib/tests/test_utils_prettytable.py rename to evennia/tests/test_utils_prettytable.py diff --git a/lib/tests/test_utils_search.py b/evennia/tests/test_utils_search.py similarity index 100% rename from lib/tests/test_utils_search.py rename to evennia/tests/test_utils_search.py diff --git a/lib/tests/test_utils_tests.py b/evennia/tests/test_utils_tests.py similarity index 100% rename from lib/tests/test_utils_tests.py rename to evennia/tests/test_utils_tests.py diff --git a/lib/tests/test_utils_text2html.py b/evennia/tests/test_utils_text2html.py similarity index 100% rename from lib/tests/test_utils_text2html.py rename to evennia/tests/test_utils_text2html.py diff --git a/lib/tests/test_utils_utils.py b/evennia/tests/test_utils_utils.py similarity index 100% rename from lib/tests/test_utils_utils.py rename to evennia/tests/test_utils_utils.py diff --git a/lib/typeclasses/__init__.py b/evennia/typeclasses/__init__.py similarity index 100% rename from lib/typeclasses/__init__.py rename to evennia/typeclasses/__init__.py diff --git a/lib/typeclasses/admin.py b/evennia/typeclasses/admin.py similarity index 100% rename from lib/typeclasses/admin.py rename to evennia/typeclasses/admin.py diff --git a/lib/typeclasses/attributes.py b/evennia/typeclasses/attributes.py similarity index 100% rename from lib/typeclasses/attributes.py rename to evennia/typeclasses/attributes.py diff --git a/lib/typeclasses/django_new_patch.py b/evennia/typeclasses/django_new_patch.py similarity index 100% rename from lib/typeclasses/django_new_patch.py rename to evennia/typeclasses/django_new_patch.py diff --git a/lib/typeclasses/managers.py b/evennia/typeclasses/managers.py similarity index 100% rename from lib/typeclasses/managers.py rename to evennia/typeclasses/managers.py diff --git a/lib/typeclasses/migrations/0001_initial.py b/evennia/typeclasses/migrations/0001_initial.py similarity index 100% rename from lib/typeclasses/migrations/0001_initial.py rename to evennia/typeclasses/migrations/0001_initial.py diff --git a/lib/typeclasses/migrations/__init__.py b/evennia/typeclasses/migrations/__init__.py similarity index 100% rename from lib/typeclasses/migrations/__init__.py rename to evennia/typeclasses/migrations/__init__.py diff --git a/lib/typeclasses/models.py b/evennia/typeclasses/models.py similarity index 100% rename from lib/typeclasses/models.py rename to evennia/typeclasses/models.py diff --git a/lib/typeclasses/tags.py b/evennia/typeclasses/tags.py similarity index 100% rename from lib/typeclasses/tags.py rename to evennia/typeclasses/tags.py diff --git a/lib/utils/__init__.py b/evennia/utils/__init__.py similarity index 100% rename from lib/utils/__init__.py rename to evennia/utils/__init__.py diff --git a/lib/utils/ansi.py b/evennia/utils/ansi.py similarity index 100% rename from lib/utils/ansi.py rename to evennia/utils/ansi.py diff --git a/lib/utils/batchprocessors.py b/evennia/utils/batchprocessors.py similarity index 100% rename from lib/utils/batchprocessors.py rename to evennia/utils/batchprocessors.py diff --git a/lib/utils/create.py b/evennia/utils/create.py similarity index 100% rename from lib/utils/create.py rename to evennia/utils/create.py diff --git a/lib/utils/dbserialize.py b/evennia/utils/dbserialize.py similarity index 100% rename from lib/utils/dbserialize.py rename to evennia/utils/dbserialize.py diff --git a/lib/utils/dummyrunner/README.txt b/evennia/utils/dummyrunner/README.txt similarity index 100% rename from lib/utils/dummyrunner/README.txt rename to evennia/utils/dummyrunner/README.txt diff --git a/lib/tests/__init__.py b/evennia/utils/dummyrunner/__init__.py similarity index 100% rename from lib/tests/__init__.py rename to evennia/utils/dummyrunner/__init__.py diff --git a/lib/utils/dummyrunner/dummyrunner.py b/evennia/utils/dummyrunner/dummyrunner.py similarity index 100% rename from lib/utils/dummyrunner/dummyrunner.py rename to evennia/utils/dummyrunner/dummyrunner.py diff --git a/lib/utils/dummyrunner/dummyrunner_actions.py b/evennia/utils/dummyrunner/dummyrunner_actions.py similarity index 100% rename from lib/utils/dummyrunner/dummyrunner_actions.py rename to evennia/utils/dummyrunner/dummyrunner_actions.py diff --git a/lib/utils/dummyrunner/memplot.py b/evennia/utils/dummyrunner/memplot.py similarity index 100% rename from lib/utils/dummyrunner/memplot.py rename to evennia/utils/dummyrunner/memplot.py diff --git a/lib/utils/dummyrunner/test_queries.py b/evennia/utils/dummyrunner/test_queries.py similarity index 100% rename from lib/utils/dummyrunner/test_queries.py rename to evennia/utils/dummyrunner/test_queries.py diff --git a/lib/utils/evennia-mode.el b/evennia/utils/evennia-mode.el similarity index 100% rename from lib/utils/evennia-mode.el rename to evennia/utils/evennia-mode.el diff --git a/lib/utils/evform.py b/evennia/utils/evform.py similarity index 100% rename from lib/utils/evform.py rename to evennia/utils/evform.py diff --git a/lib/utils/evform_test.py b/evennia/utils/evform_test.py similarity index 100% rename from lib/utils/evform_test.py rename to evennia/utils/evform_test.py diff --git a/lib/utils/evtable.py b/evennia/utils/evtable.py similarity index 100% rename from lib/utils/evtable.py rename to evennia/utils/evtable.py diff --git a/lib/utils/gametime.py b/evennia/utils/gametime.py similarity index 100% rename from lib/utils/gametime.py rename to evennia/utils/gametime.py diff --git a/lib/utils/idmapper/EVENNIA.txt b/evennia/utils/idmapper/EVENNIA.txt similarity index 100% rename from lib/utils/idmapper/EVENNIA.txt rename to evennia/utils/idmapper/EVENNIA.txt diff --git a/lib/utils/idmapper/LICENSE b/evennia/utils/idmapper/LICENSE similarity index 100% rename from lib/utils/idmapper/LICENSE rename to evennia/utils/idmapper/LICENSE diff --git a/lib/utils/idmapper/README.rst b/evennia/utils/idmapper/README.rst similarity index 100% rename from lib/utils/idmapper/README.rst rename to evennia/utils/idmapper/README.rst diff --git a/lib/utils/idmapper/__init__.py b/evennia/utils/idmapper/__init__.py similarity index 100% rename from lib/utils/idmapper/__init__.py rename to evennia/utils/idmapper/__init__.py diff --git a/lib/utils/idmapper/base.py b/evennia/utils/idmapper/base.py similarity index 100% rename from lib/utils/idmapper/base.py rename to evennia/utils/idmapper/base.py diff --git a/lib/utils/idmapper/manager.py b/evennia/utils/idmapper/manager.py similarity index 100% rename from lib/utils/idmapper/manager.py rename to evennia/utils/idmapper/manager.py diff --git a/lib/utils/idmapper/models.py b/evennia/utils/idmapper/models.py similarity index 100% rename from lib/utils/idmapper/models.py rename to evennia/utils/idmapper/models.py diff --git a/lib/utils/idmapper/tests.py b/evennia/utils/idmapper/tests.py similarity index 100% rename from lib/utils/idmapper/tests.py rename to evennia/utils/idmapper/tests.py diff --git a/lib/utils/inlinefunc.py b/evennia/utils/inlinefunc.py similarity index 100% rename from lib/utils/inlinefunc.py rename to evennia/utils/inlinefunc.py diff --git a/lib/utils/logger.py b/evennia/utils/logger.py similarity index 100% rename from lib/utils/logger.py rename to evennia/utils/logger.py diff --git a/lib/utils/picklefield.py b/evennia/utils/picklefield.py similarity index 100% rename from lib/utils/picklefield.py rename to evennia/utils/picklefield.py diff --git a/lib/utils/prettytable.py b/evennia/utils/prettytable.py similarity index 100% rename from lib/utils/prettytable.py rename to evennia/utils/prettytable.py diff --git a/lib/utils/search.py b/evennia/utils/search.py similarity index 100% rename from lib/utils/search.py rename to evennia/utils/search.py diff --git a/lib/utils/spawner.py b/evennia/utils/spawner.py similarity index 100% rename from lib/utils/spawner.py rename to evennia/utils/spawner.py diff --git a/lib/utils/tests.py b/evennia/utils/tests.py similarity index 100% rename from lib/utils/tests.py rename to evennia/utils/tests.py diff --git a/lib/utils/text2html.py b/evennia/utils/text2html.py similarity index 100% rename from lib/utils/text2html.py rename to evennia/utils/text2html.py diff --git a/lib/utils/txws.py b/evennia/utils/txws.py similarity index 100% rename from lib/utils/txws.py rename to evennia/utils/txws.py diff --git a/lib/utils/utils.py b/evennia/utils/utils.py similarity index 100% rename from lib/utils/utils.py rename to evennia/utils/utils.py diff --git a/lib/utils/dummyrunner/__init__.py b/evennia/web/__init__.py similarity index 100% rename from lib/utils/dummyrunner/__init__.py rename to evennia/web/__init__.py diff --git a/lib/web/static/evennia_general/css/prosimii-print.css b/evennia/web/static/evennia_general/css/prosimii-print.css similarity index 100% rename from lib/web/static/evennia_general/css/prosimii-print.css rename to evennia/web/static/evennia_general/css/prosimii-print.css diff --git a/lib/web/static/evennia_general/css/prosimii-screen-alt.css b/evennia/web/static/evennia_general/css/prosimii-screen-alt.css similarity index 100% rename from lib/web/static/evennia_general/css/prosimii-screen-alt.css rename to evennia/web/static/evennia_general/css/prosimii-screen-alt.css diff --git a/lib/web/static/evennia_general/css/prosimii-screen.css b/evennia/web/static/evennia_general/css/prosimii-screen.css similarity index 100% rename from lib/web/static/evennia_general/css/prosimii-screen.css rename to evennia/web/static/evennia_general/css/prosimii-screen.css diff --git a/lib/web/static/evennia_general/images/LICENCE b/evennia/web/static/evennia_general/images/LICENCE similarity index 100% rename from lib/web/static/evennia_general/images/LICENCE rename to evennia/web/static/evennia_general/images/LICENCE diff --git a/lib/web/static/evennia_general/images/evennia_logo.png b/evennia/web/static/evennia_general/images/evennia_logo.png similarity index 100% rename from lib/web/static/evennia_general/images/evennia_logo.png rename to evennia/web/static/evennia_general/images/evennia_logo.png diff --git a/lib/web/static/evennia_general/images/favicon.ico b/evennia/web/static/evennia_general/images/favicon.ico similarity index 100% rename from lib/web/static/evennia_general/images/favicon.ico rename to evennia/web/static/evennia_general/images/favicon.ico diff --git a/lib/web/templates/evennia_general/evennia_admin.html b/evennia/web/templates/evennia_general/evennia_admin.html similarity index 100% rename from lib/web/templates/evennia_general/evennia_admin.html rename to evennia/web/templates/evennia_general/evennia_admin.html diff --git a/lib/web/templates/evennia_general/index.html b/evennia/web/templates/evennia_general/index.html similarity index 100% rename from lib/web/templates/evennia_general/index.html rename to evennia/web/templates/evennia_general/index.html diff --git a/lib/web/templates/evennia_general/tbi.html b/evennia/web/templates/evennia_general/tbi.html similarity index 100% rename from lib/web/templates/evennia_general/tbi.html rename to evennia/web/templates/evennia_general/tbi.html diff --git a/lib/web/templates/prosimii/404.html b/evennia/web/templates/prosimii/404.html similarity index 100% rename from lib/web/templates/prosimii/404.html rename to evennia/web/templates/prosimii/404.html diff --git a/lib/web/templates/prosimii/500.html b/evennia/web/templates/prosimii/500.html similarity index 100% rename from lib/web/templates/prosimii/500.html rename to evennia/web/templates/prosimii/500.html diff --git a/lib/web/templates/prosimii/base.html b/evennia/web/templates/prosimii/base.html similarity index 100% rename from lib/web/templates/prosimii/base.html rename to evennia/web/templates/prosimii/base.html diff --git a/lib/web/templates/prosimii/flatpages/default.html b/evennia/web/templates/prosimii/flatpages/default.html similarity index 100% rename from lib/web/templates/prosimii/flatpages/default.html rename to evennia/web/templates/prosimii/flatpages/default.html diff --git a/lib/web/templates/prosimii/registration/logged_out.html b/evennia/web/templates/prosimii/registration/logged_out.html similarity index 100% rename from lib/web/templates/prosimii/registration/logged_out.html rename to evennia/web/templates/prosimii/registration/logged_out.html diff --git a/lib/web/templates/prosimii/registration/login.html b/evennia/web/templates/prosimii/registration/login.html similarity index 100% rename from lib/web/templates/prosimii/registration/login.html rename to evennia/web/templates/prosimii/registration/login.html diff --git a/lib/web/urls.py b/evennia/web/urls.py similarity index 100% rename from lib/web/urls.py rename to evennia/web/urls.py diff --git a/lib/web/__init__.py b/evennia/web/utils/__init__.py similarity index 100% rename from lib/web/__init__.py rename to evennia/web/utils/__init__.py diff --git a/lib/web/utils/apache_wsgi.conf b/evennia/web/utils/apache_wsgi.conf similarity index 100% rename from lib/web/utils/apache_wsgi.conf rename to evennia/web/utils/apache_wsgi.conf diff --git a/lib/web/utils/backends.py b/evennia/web/utils/backends.py similarity index 100% rename from lib/web/utils/backends.py rename to evennia/web/utils/backends.py diff --git a/lib/web/utils/evennia_modpy_apache.conf b/evennia/web/utils/evennia_modpy_apache.conf similarity index 100% rename from lib/web/utils/evennia_modpy_apache.conf rename to evennia/web/utils/evennia_modpy_apache.conf diff --git a/lib/web/utils/evennia_wsgi_apache.conf b/evennia/web/utils/evennia_wsgi_apache.conf similarity index 100% rename from lib/web/utils/evennia_wsgi_apache.conf rename to evennia/web/utils/evennia_wsgi_apache.conf diff --git a/lib/web/utils/general_context.py b/evennia/web/utils/general_context.py similarity index 100% rename from lib/web/utils/general_context.py rename to evennia/web/utils/general_context.py diff --git a/lib/web/views.py b/evennia/web/views.py similarity index 100% rename from lib/web/views.py rename to evennia/web/views.py diff --git a/lib/web/utils/__init__.py b/evennia/web/webclient/__init__.py similarity index 100% rename from lib/web/utils/__init__.py rename to evennia/web/webclient/__init__.py diff --git a/lib/web/webclient/models.py b/evennia/web/webclient/models.py similarity index 100% rename from lib/web/webclient/models.py rename to evennia/web/webclient/models.py diff --git a/lib/web/webclient/static/webclient/css/webclient.css b/evennia/web/webclient/static/webclient/css/webclient.css similarity index 100% rename from lib/web/webclient/static/webclient/css/webclient.css rename to evennia/web/webclient/static/webclient/css/webclient.css diff --git a/lib/web/webclient/static/webclient/js/evennia_ajax_webclient.js b/evennia/web/webclient/static/webclient/js/evennia_ajax_webclient.js similarity index 100% rename from lib/web/webclient/static/webclient/js/evennia_ajax_webclient.js rename to evennia/web/webclient/static/webclient/js/evennia_ajax_webclient.js diff --git a/lib/web/webclient/static/webclient/js/evennia_websocket_webclient.js b/evennia/web/webclient/static/webclient/js/evennia_websocket_webclient.js similarity index 100% rename from lib/web/webclient/static/webclient/js/evennia_websocket_webclient.js rename to evennia/web/webclient/static/webclient/js/evennia_websocket_webclient.js diff --git a/lib/web/webclient/templates/webclient.html b/evennia/web/webclient/templates/webclient.html similarity index 100% rename from lib/web/webclient/templates/webclient.html rename to evennia/web/webclient/templates/webclient.html diff --git a/lib/web/webclient/urls.py b/evennia/web/webclient/urls.py similarity index 100% rename from lib/web/webclient/urls.py rename to evennia/web/webclient/urls.py diff --git a/lib/web/webclient/views.py b/evennia/web/webclient/views.py similarity index 100% rename from lib/web/webclient/views.py rename to evennia/web/webclient/views.py diff --git a/game_template/commands/cmdset.py b/game_template/commands/cmdset.py deleted file mode 100644 index 88e7c621b1..0000000000 --- a/game_template/commands/cmdset.py +++ /dev/null @@ -1,121 +0,0 @@ -""" -Example command set template module. - -To create new commands to populate the cmdset, see -examples/command.py. - -To extend the character command set: - - copy this file up one level to gamesrc/commands and name it - something fitting. - - change settings.CMDSET_CHARACTER to point to the new module's - CharacterCmdSet class - - import/add commands at the end of CharacterCmdSet's add() method. - -To extend Player cmdset: - - like character set, but point settings.PLAYER on your new cmdset. - -To extend Unloggedin cmdset: - - like default set, but point settings.CMDSET_UNLOGGEDIN on your new cmdset. - -To add a wholly new command set: - - copy this file up one level to gamesrc/commands and name it - something fitting. - - add a new cmdset class - - add it to objects e.g. with obj.cmdset.add(path.to.the.module.and.class) - -""" - -from ev import CmdSet, Command -from ev import default_cmds - -#from contrib import menusystem, lineeditor -#from contrib import misc_commands -#from contrib import chargen - - -class ExampleCmdSet(CmdSet): - """ - Implements an empty, example cmdset. - """ - - key = "ExampleSet" - - def at_cmdset_creation(self): - """ - This is the only method defined in a cmdset, called during - its creation. It should populate the set with command instances. - - As and example we just add the empty base Command object. - It prints some info. - """ - self.add(Command()) - - -class CharacterCmdSet(default_cmds.CharacterCmdSet): - """ - This is an example of how to overload the default command - set defined in src/commands/default/cmdset_character.py. - - Here we copy everything by calling the parent, but you can - copy&paste any combination of the default command to customize - your default set. Next you change settings.CMDSET_CHARACTER to point - to this class. - """ - key = "DefaultCharacter" - - def at_cmdset_creation(self): - """ - Populates the cmdset - """ - # calling setup in src.commands.default.cmdset_character - super(CharacterCmdSet, self).at_cmdset_creation() - - # - # any commands you add below will overload the default ones. - # - #self.add(menusystem.CmdMenuTest()) - #self.add(lineeditor.CmdEditor()) - #self.add(misc_commands.CmdQuell()) - - -class UnloggedinCmdSet(default_cmds.UnloggedinCmdSet): - """ - This is an example of how to overload the command set of the - unloggedin commands, defined in - src/commands/default/cmdset_unloggedin.py. - - Here we copy everything by calling the parent, but you can - copy&paste any combination of the default command to customize - your default set. Next you change settings.CMDSET_UNLOGGEDIN to - point to this class. - """ - key = "DefaultUnloggedin" - - def at_cmdset_creation(self): - """ - Populates the cmdset - """ - # calling setup in src.commands.default.cmdset_unloggedin - super(UnloggedinCmdSet, self).at_cmdset_creation() - - # - # any commands you add below will overload the default ones. - # - - -class PlayerCmdSet(default_cmds.PlayerCmdSet): - """ - This is set is available to the player when they have no - character connected to them (i.e. they are out-of-character, ooc). - """ - key = "DefaultPlayer" - - def at_cmdset_creation(self): - """ - Populates the cmdset - """ - # calling setup in src.commands.default.cmdset_ooc - super(PlayerCmdSet, self).at_cmdset_creation() - # - # any commands you add below will overload the default ones. - # diff --git a/game_template/commands/command.py b/game_template/commands/command.py index e0c945998b..359d527bab 100644 --- a/game_template/commands/command.py +++ b/game_template/commands/command.py @@ -8,9 +8,9 @@ examples/cmdset.py) """ -from ev import Command as BaseCommand -from ev import default_cmds -from ev import utils +from evennia import Command as BaseCommand +from evennia import default_cmds +from evennia import utils class Command(BaseCommand): diff --git a/game_template/types/character.py b/game_template/types/character.py index 4d0d42140f..8c216f6277 100644 --- a/game_template/types/character.py +++ b/game_template/types/character.py @@ -16,7 +16,7 @@ this change, you have to convert them manually e.g. with the @typeclass command. """ -from ev import Character as DefaultCharacter +from evennia import DefaultCharacter class Character(DefaultCharacter): diff --git a/game_template/types/exit.py b/game_template/types/exit.py index 888fe426c1..94324b8e23 100644 --- a/game_template/types/exit.py +++ b/game_template/types/exit.py @@ -16,7 +16,7 @@ this change, you have to convert them manually e.g. with the @typeclass command. """ -from ev import Exit as DefaultExit +from evennia import DefaultExit class Exit(DefaultExit): diff --git a/game_template/types/object.py b/game_template/types/object.py index 51cbc4d21b..f7251b87df 100644 --- a/game_template/types/object.py +++ b/game_template/types/object.py @@ -17,7 +17,7 @@ this change, you have to convert them manually e.g. with the @typeclass command. """ -from ev import Object as DefaultObject +from evennia import DefaultObject class Object(DefaultObject): diff --git a/game_template/types/player.py b/game_template/types/player.py index f587a71f25..6f9fdca584 100644 --- a/game_template/types/player.py +++ b/game_template/types/player.py @@ -16,7 +16,7 @@ this change, you have to convert them manually e.g. with the @typeclass command. """ -from ev import Player as DefaultPlayer +from evennia import DefaultPlayer class Player(DefaultPlayer): diff --git a/game_template/types/room.py b/game_template/types/room.py index 01bb16d90a..d7b65aae7d 100644 --- a/game_template/types/room.py +++ b/game_template/types/room.py @@ -17,7 +17,7 @@ this change, you have to convert them manually e.g. with the """ -from ev import Room as DefaultRoom +from evennia import DefaultRoom class Room(DefaultRoom): diff --git a/game_template/types/script.py b/game_template/types/script.py index 7e310f5a11..f267d72c93 100644 --- a/game_template/types/script.py +++ b/game_template/types/script.py @@ -20,10 +20,10 @@ dropped connections etc. """ -from ev import Script as BaseScript +from evennia import Script -class ExampleScript(BaseScript): +class ExampleScript(Script): """ A script type is customized by redefining some or all of its hook methods and variables. diff --git a/lib/web/webclient/__init__.py b/lib/web/webclient/__init__.py deleted file mode 100644 index e69de29bb2..0000000000