Migration needed. Changed how connection screens are defined, rather than being a database model, they are created on-the fly. I didn't migrate over the screen data into the new module file though, so if you had custom connection screens, you need to manually add them to the new module in gamesrc/world/connection_screen.py.

This commit is contained in:
Griatch 2011-04-10 14:21:41 +00:00
parent 52785e8f3e
commit 2ee54678ae
12 changed files with 110 additions and 174 deletions

View file

@ -21,23 +21,6 @@ def create_config_values():
ConfigValue.objects.conf("site_name", settings.SERVERNAME)
ConfigValue.objects.conf("idle_timeout", settings.IDLE_TIMEOUT)
def create_connect_screens():
"""
Creates the default connect screen(s).
"""
print " Creating startup screen(s) ..."
text = "{b=================================================================={n"
text += "\r\n Welcome to {wEvennia{n! Please type one of the following to begin:\r\n"
text += "\r\n If you have an existing account, connect to it by typing:\r\n "
text += "{wconnect <email> <password>{n\r\n If you need to create an account, "
text += "type (without the <>'s):\r\n "
text += "{wcreate \"<username>\" <email> <password>{n\r\n"
text += "\r\n Enter {whelp{n for more info. {wlook{n will re-show this screen.\r\n"
text += "{b=================================================================={n\r\n"
ConnectScreen(db_key="Default", db_text=text, db_is_active=True).save()
def get_god_user():
"""
Returns the initially created 'god' User object.
@ -203,7 +186,6 @@ def handle_setup(last_step):
# setting up the list of functions to run
setup_queue = [
create_config_values,
create_connect_screens,
create_objects,
create_channels,
create_system_scripts,

View file

@ -79,16 +79,11 @@ class TelnetProtocol(StatefulTelnetProtocol, session.Session):
def at_connect(self):
"""
Show the banner screen. Grab from the 'connect_screen'
config directive. If more than one connect screen is
defined in the ConnectScreen attribute, it will be
random which screen is used.
Show the banner screen.
"""
self.telnet_markup = True
# show screen
screen = ConnectScreen.objects.get_random_connect_screen()
string = ansi.parse_ansi(screen.text)
self.at_data_out(string)
# show connection screen
self.execute_cmd('look')
def at_login(self, player):
"""

View file

@ -221,15 +221,10 @@ class WebClientSession(session.Session):
def at_connect(self):
"""
Show the banner screen. Grab from the 'connect_screen'
config directive. If more than one connect screen is
defined in the ConnectScreen attribute, it will be
random which screen is used.
Show the banner screen.
"""
# show screen
screen = ConnectScreen.objects.get_random_connect_screen()
#string = parse_html(screen.text)
self.at_data_out(screen.text)
self.execute_cmd('look')
def at_login(self, player):
"""