Run Migrate. Implemented a full separation between Player and Character - Players (OOC entities) can now also hold cmdsets and execute commands. This means that "disconnecting" from a Character becomes possible, putting the Player in an "OOC" state outside the game. This overall makes the game much more stable since there used to be issues if the character was destroyed. Having an OOC set also avoids the previous problem of @puppeting into an object that didn't have any cmdset of its own - you couldn't get back out! A new default OOC-Cmdset handles commands available to a player while OOC. Commands in this set are applied with a low priority, allowing "IC" mode to give precedence if desired.
This change meant several changes to the lock and permission functionality, since it becomes important if permissions are assigned on the Player or on their Character (lock functions pperm() and pid() etc check on Player rather than Character). This has the boon of allowing Admins to switch and play/test the game as a "Low access" character as they like. Plenty of bug fixes and adjustments. Migrations should make sure to move over all data properly.
This commit is contained in:
parent
ce2a8e9ffe
commit
28fe2ad3f4
37 changed files with 1622 additions and 555 deletions
|
|
@ -19,7 +19,7 @@ new cmdset class.
|
|||
"""
|
||||
|
||||
from src.commands.cmdset import CmdSet
|
||||
from src.commands.default import cmdset_default, cmdset_unloggedin
|
||||
from src.commands.default import cmdset_default, cmdset_unloggedin, cmdset_ooc
|
||||
|
||||
from game.gamesrc.commands.basecommand import Command
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ class DefaultCmdSet(cmdset_default.DefaultCmdSet):
|
|||
Populates the cmdset
|
||||
"""
|
||||
super(DefaultCmdSet, self).at_cmdset_creation()
|
||||
|
||||
|
||||
#
|
||||
# any commands you add below will overload the default ones.
|
||||
#
|
||||
|
|
@ -70,6 +70,24 @@ class UnloggedinCmdSet(cmdset_unloggedin.UnloggedinCmdSet):
|
|||
#
|
||||
|
||||
|
||||
class OOCCmdSet(cmdset_ooc.OOCCmdSet):
|
||||
"""
|
||||
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"
|
||||
|
||||
def at_cmdset_creation(self):
|
||||
"""
|
||||
Populates the cmdset
|
||||
"""
|
||||
super(OOCCmdSet, self).at_cmdset_creation()
|
||||
|
||||
#
|
||||
# any commands you add below will overload the default ones.
|
||||
#
|
||||
|
||||
|
||||
class BaseCmdSet(CmdSet):
|
||||
"""
|
||||
Implements an empty, example cmdset.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue