From dfa0ced4e503a9900ca10a7e3444cad9f1f395e2 Mon Sep 17 00:00:00 2001 From: Griatch Date: Wed, 13 Jun 2012 01:07:09 +0200 Subject: [PATCH] Some further cleanup of readmes. --- contrib/README | 6 +++++- contrib/evlang/README | 19 ++++++++++++------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/contrib/README b/contrib/README index 7dccd5b322..62426ecbaa 100644 --- a/contrib/README +++ b/contrib/README @@ -43,4 +43,8 @@ things you want from here into game/gamesrc and change them there. * CharGen (Griatch 2011) - A simple Character creator and selector for Evennia's ooc mode. Works well with the menu login contrib and is intended as a starting point for building a more full-featured - character creation system. \ No newline at end of file + character creation system. + +* Evlang (Griatch 2012) - A heavily restricted version of Python for use + as a "softcode" language by Players in-game. Contains a complete + system with examples of objects and commands for coding. diff --git a/contrib/evlang/README b/contrib/evlang/README index 98ea07a72d..9fbee28b0e 100644 --- a/contrib/evlang/README +++ b/contrib/evlang/README @@ -48,9 +48,10 @@ Quick Example Install This is a quick test-setup using the example objects and commands. 1) If you haven't already, make sure you are able to overload the - default cmdset: Copy game/gamesrc/commands/examples/cmdset.py up one level, - then change settings.CMDSET_DEFAULT to point to DefaultCmdSet in your newly copied module. - Restart the server and check so the default commands still work. + default cmdset: Copy game/gamesrc/commands/examples/cmdset.py up + one level, then change settings.CMDSET_DEFAULT to point to + DefaultCmdSet in your newly copied module. Restart the server and + check so the default commands still work. 2) Import and add contrib.evlang.command.CmdCode and @@ -86,9 +87,11 @@ There are a few "safe" objects made available out of the box. caller - reference back to the one triggering the script scripter - reference to the one creating the script (set by @code) - There is also the 'evl' object that defines "safe" methods to use. + There is also the 'evl' object that defines "safe" methods to use: + evl.msg(string, obj=None) # default is the send to caller evl.msg_contents(string, obj=None) # default is to send to all except caller + evl.msg_home(string, obj=None) # default is to send to self.location delay(delay, function, *args, **kwargs) attr(obj, attrname=None, attrvalue=None, delete=False) # lock-checking attribute accesser list() # display all available methods on evl, with docstrings (including your custom additions) @@ -101,9 +104,11 @@ try it. Now look at the crate. :) -You can (in evlang) use evl.list() to get a list of all methods currently stored on the evl object. For testing, let's -use the same look slot on the crate again. But this time we'll use the /debug mode of @code, which means the script -will be auto-run immediately and we don't have to look at the create to get a result when developing. +You can (in evlang) use evl.list() to get a list of all methods +currently stored on the evl object. For testing, let's use the same +look slot on the crate again. But this time we'll use the /debug mode +of @code, which means the script will be auto-run immediately and we +don't have to look at the create to get a result when developing. @code/debug crate/look = evl.msg(evl.list())