Added a new 'contrib' folder for optional code snippets not suitable for the server core. Added contrib/menusystem for implementing a multi-choice menu system. Added contrib/lineeditor - a powerful line editor with commands mimicking VI. Also added an example NPC class using the menu system to allow for a conversation. As part of creating these contributions, lots of bugs were found and fixed. A new and more powerful cmdparser was intruduced as a result - this one is much easier to understand than the old one, while being more efficient and versatile. All testsuites were updated. Also: Resolves issue 165.

This commit is contained in:
Griatch 2011-05-12 21:51:11 +00:00
parent 2c47d6a66b
commit b9c1921a0b
16 changed files with 1426 additions and 354 deletions

View file

@ -20,9 +20,10 @@ new cmdset class.
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
class DefaultCmdSet(cmdset_default.DefaultCmdSet):
"""
This is an example of how to overload the default command
@ -44,7 +45,8 @@ class DefaultCmdSet(cmdset_default.DefaultCmdSet):
#
# any commands you add below will overload the default ones.
#
#self.add(menusystem.CmdMenuTest())
#self.add(lineeditor.CmdEditor())
class UnloggedinCmdSet(cmdset_unloggedin.UnloggedinCmdSet):
"""