Largely rewrote and refactored the help system.
The help entry database structure has changed! You have to resync or purge your database or your will get problems! New features: * Help entry access now fully controlled by evennia permissions * Categories for each help entry * All entries are created dynamically, with a See also: footer calculated after the current state of the database. * Indexes and topic list calculated on the fly (alphabetically/after category) * Added auto-help help entries for all default commands. * Only shows commands _actually implemented_ - MUX help db moved into 'MUX' category which is not shown by default. * More powerful auto-help markup - supports categories and permissions (and inheritance). * Global on/off switch for auto-help, when entering production * Auto_help_override switch for selectively activating auto-help when developing new commands (like the old system). * Refactored State help system; no more risk of overwriting global help entries. * State help now defers to main help db when no match found; makes system more transparent. * State help entries also support categories/permissions (state categories are not used much though). Other updates: * Added more commands to the batch processor * Many bug-fixes. /Griatch
This commit is contained in:
parent
46e2cd3ecb
commit
8074617285
27 changed files with 1995 additions and 1072 deletions
|
|
@ -11,6 +11,8 @@ from django.conf import settings
|
|||
from src.objects.models import Object
|
||||
from src.config.models import ConfigValue, CommandAlias, ConnectScreen
|
||||
from src import comsys, defines_global, logger
|
||||
from src.helpsys import helpsystem
|
||||
|
||||
def get_god_user():
|
||||
"""
|
||||
Returns the initially created 'god' User object.
|
||||
|
|
@ -131,6 +133,16 @@ def import_help_files():
|
|||
"""
|
||||
management.call_command('loaddata', 'docs/help_files.json', verbosity=0)
|
||||
|
||||
def categorize_initial_helpdb():
|
||||
"""
|
||||
This makes sure that the initially loaded
|
||||
database is separated into its own
|
||||
help category.
|
||||
"""
|
||||
default_category = "MUX"
|
||||
print " Moving initial imported help db to help category '%s'." % default_category
|
||||
helpsystem.edithelp.homogenize_database(default_category)
|
||||
|
||||
def handle_setup():
|
||||
"""
|
||||
Main logic for the module.
|
||||
|
|
@ -142,3 +154,4 @@ def handle_setup():
|
|||
create_groups()
|
||||
create_channels()
|
||||
import_help_files()
|
||||
categorize_initial_helpdb()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue