Renamed cmdset_ooc -> cmdset_player and settings.CMDSET_OOC -> settings.CMDSET_PLAYER. Also split most of the player-specific commands to a new module player.

This commit is contained in:
Griatch 2013-04-11 01:02:05 +02:00
parent 5874505902
commit 1aff5f1fd1
14 changed files with 53 additions and 593 deletions

View file

@ -428,7 +428,11 @@ def error_check_python_modules():
from src.commands import cmdsethandler
cmdsethandler.import_cmdset(settings.CMDSET_UNLOGGEDIN, None)
cmdsethandler.import_cmdset(settings.CMDSET_DEFAULT, None)
cmdsethandler.import_cmdset(settings.CMDSET_OOC, None)
if hasattr(settings, "CMDSET_OOC"):
string = "settings.CMDSET_OOC was renamed to CMDSET_PLAYER."
string += "Also default cmdset location in src was renamed (see src.settings_default.py)."
raise DeprecationWarning(string)
cmdsethandler.import_cmdset(settings.CMDSET_PLAYER, None)
# typeclasses
imp(settings.BASE_PLAYER_TYPECLASS)
imp(settings.BASE_OBJECT_TYPECLASS)

View file

@ -86,7 +86,7 @@ class UnloggedinCmdSet(default_cmds.UnloggedinCmdSet):
your default set. Next you change settings.CMDSET_UNLOGGEDIN to
point to this class.
"""
key = "Unloggedin"
key = "DefaultUnloggedin"
def at_cmdset_creation(self):
"""
@ -99,19 +99,19 @@ class UnloggedinCmdSet(default_cmds.UnloggedinCmdSet):
# any commands you add below will overload the default ones.
#
class OOCCmdSet(default_cmds.OOCCmdSet):
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 = "OOC"
key = "DefaultPlayer"
def at_cmdset_creation(self):
"""
Populates the cmdset
"""
# calling setup in src.commands.default.cmdset_ooc
super(OOCCmdSet, self).at_cmdset_creation()
super(PlayerCmdSet, self).at_cmdset_creation()
#
# any commands you add below will overload the default ones.
#