Moved defines_globals to src/
This commit is contained in:
parent
e6e84c2ee5
commit
5064d0cacc
9 changed files with 11 additions and 12 deletions
|
|
@ -8,7 +8,7 @@ from django.conf import settings
|
|||
|
||||
import functions_general
|
||||
import src.comsys
|
||||
import defines_global
|
||||
from src import defines_global
|
||||
from src import ansi
|
||||
|
||||
def cmd_addcom(cdat):
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ from apps.config.models import ConfigValue
|
|||
from apps.helpsys.models import HelpEntry
|
||||
from apps.objects.models import Object
|
||||
import functions_general
|
||||
import defines_global
|
||||
from src import defines_global
|
||||
from src import session_mgr
|
||||
from src import ansi
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import django
|
|||
|
||||
from apps.objects.models import Object
|
||||
from src import scheduler
|
||||
import defines_global
|
||||
from src import defines_global
|
||||
|
||||
def cmd_version(cdat):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
from apps.objects.models import Object
|
||||
import defines_global
|
||||
import functions_general
|
||||
from src import ansi
|
||||
|
||||
"""
|
||||
This file contains commands that require special permissions to use. These
|
||||
are generally @-prefixed commands, but there are exceptions.
|
||||
"""
|
||||
from apps.objects.models import Object
|
||||
from src import defines_global
|
||||
import functions_general
|
||||
from src import ansi
|
||||
|
||||
def cmd_reload(cdat):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from django.contrib.auth.models import User
|
|||
|
||||
from apps.objects.models import Attribute, Object
|
||||
import functions_general
|
||||
import defines_global
|
||||
from src import defines_global
|
||||
|
||||
def cmd_connect(cdat):
|
||||
"""
|
||||
|
|
|
|||
53
src/defines_global.py
Executable file
53
src/defines_global.py
Executable file
|
|
@ -0,0 +1,53 @@
|
|||
import os
|
||||
|
||||
# Do not mess with the default types (0-5). This is passed to the Object
|
||||
# model's 'choices' argument.
|
||||
OBJECT_TYPES = (
|
||||
(0, 'NOTHING'),
|
||||
(1, 'PLAYER'),
|
||||
(2, 'ROOM'),
|
||||
(3, 'THING'),
|
||||
(4, 'EXIT'),
|
||||
(5, 'GOING'),
|
||||
(6, 'GARBAGE'),
|
||||
)
|
||||
|
||||
# Hate to duplicate the above, but it's the easiest way.
|
||||
OTYPE_NOTHING = 0
|
||||
OTYPE_PLAYER = 1
|
||||
OTYPE_ROOM = 2
|
||||
OTYPE_THING = 3
|
||||
OTYPE_EXIT = 4
|
||||
OTYPE_GOING = 5
|
||||
OTYPE_GARBAGE = 6
|
||||
|
||||
# This is a list of flags that the server actually uses. Anything not in this
|
||||
# list is a custom flag.
|
||||
SERVER_FLAGS = ["CONNECTED", "DARK", "FLOATING", "GAGGED", "HAVEN", "OPAQUE", "SAFE", "SLAVE", "SUSPECT", "TRANSPARENT"]
|
||||
|
||||
# These flags are not saved.
|
||||
NOSAVE_FLAGS = ["CONNECTED"]
|
||||
|
||||
# These flags can't be modified by players.
|
||||
NOSET_FLAGS = ["CONNECTED"]
|
||||
|
||||
# These attribute names can't be modified by players.
|
||||
NOSET_ATTRIBS = ["MONEY", "ALIAS", "LASTPAGED", "__CHANLIST", "LAST",
|
||||
"__PARENT", "LASTSITE"]
|
||||
|
||||
# These attributes don't show up on objects when examined.
|
||||
HIDDEN_ATTRIBS = ["__CHANLIST", "__PARENT"]
|
||||
|
||||
# Server version number.
|
||||
REVISION = os.popen('svnversion .', 'r').readline().strip()
|
||||
if not REVISION:
|
||||
REVISION = "UNKNOWN"
|
||||
|
||||
# Clip out the SVN keyword information
|
||||
EVENNIA_VERSION = 'Alpha ' + REVISION
|
||||
|
||||
# The message to show when the user lacks permissions for something.
|
||||
NOPERMS_MSG = "You do not have the necessary permissions to do that."
|
||||
|
||||
# Message seen when object doesn't control the other object.
|
||||
NOCONTROL_MSG = "You don't have authority over that object."
|
||||
Loading…
Add table
Add a link
Reference in a new issue