Changed the way unloggedin commands work. Rather than the cmdhander having a special state for unlogged-in commands, the session itself simply stores the cmdset from settings.CMDSET_UNLOGGEDIN. Clean and efficient and also gives a lot more freedom for creating custom login mechanisms (notably it opens the door to using menu systems).
This commit is contained in:
parent
0ed692c19c
commit
2b2d27ed39
10 changed files with 119 additions and 77 deletions
|
|
@ -22,7 +22,7 @@ from src.commands.cmdset import CmdSet
|
|||
from src.commands.default import cmdset_default, cmdset_unloggedin, cmdset_ooc
|
||||
from game.gamesrc.commands.basecommand import Command
|
||||
|
||||
#from contrib import menusystem, lineeditor
|
||||
from contrib import menusystem, lineeditor
|
||||
#from contrib import misc_commands
|
||||
|
||||
class DefaultCmdSet(cmdset_default.DefaultCmdSet):
|
||||
|
|
@ -47,9 +47,9 @@ class DefaultCmdSet(cmdset_default.DefaultCmdSet):
|
|||
#
|
||||
# any commands you add below will overload the default ones.
|
||||
#
|
||||
#self.add(menusystem.CmdMenuTest())
|
||||
self.add(menusystem.CmdMenuTest())
|
||||
#self.add(lineeditor.CmdEditor())
|
||||
#self.add(misc_commands.CmdQuell())
|
||||
#self.add(misc_commands.CmdQuell())
|
||||
|
||||
class UnloggedinCmdSet(cmdset_unloggedin.UnloggedinCmdSet):
|
||||
"""
|
||||
|
|
@ -75,7 +75,6 @@ class UnloggedinCmdSet(cmdset_unloggedin.UnloggedinCmdSet):
|
|||
# any commands you add below will overload the default ones.
|
||||
#
|
||||
|
||||
|
||||
class OOCCmdSet(cmdset_ooc.OOCCmdSet):
|
||||
"""
|
||||
This is set is available to the player when they have no
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue