Added new templates to gamesrc/*/examples. The old base* modules still in place. Some cleanup of the API.

This commit is contained in:
Griatch 2012-03-25 16:35:22 +02:00
parent 3408f3ca3f
commit 4398d42360
12 changed files with 686 additions and 11 deletions

View file

@ -1,5 +1,13 @@
"""
The base object to inherit from when implementing new Scripts.
Template module for Scripts
Copy this module up one level to gamesrc/scripts and name it
appropriately, then use that as a template to create your own script.
Test scripts in-game e.g. with the @script command. In code you can
create new scripts of a given class with
script = ev.create.script("path.to.module.and.class")
Scripts are objects that handle everything in the game having
a time-component (i.e. that may change with time, with or without
@ -10,17 +18,13 @@ checking if its state changes, so as to update it. Evennia use several
in-built scripts to keep track of things like time, to clean out
dropped connections etc.
New Script objects (from these classes) are created using the
src.utils.create.create_script(scriptclass, ...) where scriptclass
is the python path to the specific class of script you want to use.
"""
from ev import Script as BaseScript
class Script(BaseScript):
"""
All scripts should inherit from this class and implement
some or all of its hook functions and variables.
A script type is customized by redefining some or all of its hook methods and variables.
* available properties