Add the connection screen in the login system
This commit is contained in:
parent
1a42ca8006
commit
4a6cb039b6
1 changed files with 4 additions and 3 deletions
|
|
@ -48,10 +48,12 @@ from evennia import ObjectDB
|
||||||
from evennia.server.models import ServerConfig
|
from evennia.server.models import ServerConfig
|
||||||
from evennia import syscmdkeys
|
from evennia import syscmdkeys
|
||||||
from evennia.utils.evmenu import EvMenu
|
from evennia.utils.evmenu import EvMenu
|
||||||
|
from evennia.utils.utils import random_string_from_module
|
||||||
|
|
||||||
## Constants
|
## Constants
|
||||||
RE_VALID_USERNAME = re.compile(r"^[a-z]{3,}$", re.I)
|
RE_VALID_USERNAME = re.compile(r"^[a-z]{3,}$", re.I)
|
||||||
LEN_PASSWD = 6
|
LEN_PASSWD = 6
|
||||||
|
CONNECTION_SCREEN_MODULE = settings.CONNECTION_SCREEN_MODULE
|
||||||
|
|
||||||
## Menu notes (top-level functions)
|
## Menu notes (top-level functions)
|
||||||
|
|
||||||
|
|
@ -65,9 +67,8 @@ def start(caller):
|
||||||
or not) to create a new player.
|
or not) to create a new player.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
text = dedent("""
|
text = random_string_from_module(CONNECTION_SCREEN_MODULE)
|
||||||
Enter your username or |yNEW|n to create one.
|
text += "\n\nEnter your username or |yNEW|n to create one."
|
||||||
""".strip("\n"))
|
|
||||||
options = (
|
options = (
|
||||||
{
|
{
|
||||||
"key": "new",
|
"key": "new",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue