Locks and Help

11 views
Skip to first unread message

Griatch

unread,
Oct 14, 2009, 3:27:57 PM10/14/09
to Evennia
- HelpSystem

Observe - From rev 758 onward the help entry database fields have
changed! You need to create the new fields in helpsys.models yourself,
resync or start over fresh with a new database or you will be have
trouble.

(The staff_only field is still there, but it's deprecated and only
remains for loading the startup help database. Once that depencence
can be removed, the staff_only field can be removed; it is replaced by
a full permission system.)


The Help system got a major overhaul in rev758. Almost all the new
features are listed in the commit info, here are some hilights of the
new system:

- All help entries now support django-style permissions for deciding
who has the ability to read what.
- Help entries are now structured after categories.
- All help indices and lists and dynamically created from the actual
database content
- A "See also:" footer is dynamically created whenever there are
similar matches.
- help management is split out into its own separate command @sethelp.

Running this is a completely rewritten help engine in helpsys/
helpsystem.py.

The auto-help functionality (which use the doc-strings of commands as
their help entries) is now completely handling the updating of all
command help entries dynamically. To accomodate this, all default
commands have been updated with proper doc strings (phew!).

Auto-help is very powerful for keeping help entries updated during
development, but might not be suitable for a production environment
since online-edited help entries will be lost upon @reload. So auto-
help can now be turned on/off from the settings.py file (You can still
activate auto-help on a per-command basis when developing new
commands).

This means that the format of add_command() (both for global- and
state-commands) has changed; auto-help and staff_help are no longer
valid flags. Instead the command now takes arguments specifying a help
category and a help-permission tuple if this is different from the
normal permission tuple. There is also the auto_help_override that
defines auto-help access on a per-command basis (much like the old
auto_help flag).

The imported MUX help files are still there, but they have all been
moved into a MUX category that is not shown in most help listings. So
in the help index you will now normally only see commands that are
actually implemented in Evennia. :-)

The stand-alone state help system has also been overhauled. There is
no longer a risk of state help commands overwriting global ones; the
help system is now truly stand-alone, interfacing seamlessly but non-
destructively with the global help system.


- Locks

You can now lock items using a series of different locks and a
plethora of Key types, including checks for attributes, permissions,
flags and the return values of a custom function. The main command is
@lock. It's really quite powerful, check it out.
.
Griatch
Reply all
Reply to author
Forward
0 new messages