mirror of
https://github.com/evennia/evennia.git
synced 2026-04-05 07:27:17 +02:00
Correct lineno alignment for docs; fix sidebar displays
This commit is contained in:
parent
39b4b7846b
commit
a427594f25
5 changed files with 41 additions and 42 deletions
|
|
@ -572,7 +572,7 @@ There are also two special properties:
|
|||
Non-database attributes are not stored in the database and have no equivalence
|
||||
to `category` nor `strvalue`, `attrtype` or `model`.
|
||||
|
||||
# In-memory Attributes (NAttributes)
|
||||
## In-memory Attributes (NAttributes)
|
||||
|
||||
_NAttributes_ (short of Non-database Attributes) mimic Attributes in most things except they
|
||||
are **non-persistent** - they will _not_ survive a server reload.
|
||||
|
|
|
|||
|
|
@ -68,10 +68,6 @@ You can also use [shell-type wildcards](http://www.linfo.org/wildcard.html):
|
|||
- [seq] - matches everything in the sequence, e.g. [xyz] will match both x, y and z
|
||||
- [!seq] - matches everything *not* in the sequence. e.g. [!xyz] will match all but x,y z.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Coding with nicks
|
||||
|
||||
Nicks are stored as the `Nick` database model and are referred from the normal Evennia
|
||||
|
|
@ -104,7 +100,7 @@ command in `evennia/commands/default/general.py` for more examples.
|
|||
As a last note, The Evennia [channel](./Channels.md) alias systems are using nicks with the
|
||||
`nick_type="channel"` in order to allow users to create their own custom aliases to channels.
|
||||
|
||||
# Advanced note
|
||||
## Advanced note
|
||||
|
||||
Internally, nicks are [Attributes](./Attributes.md) saved with the `db_attrype` set to "nick" (normal
|
||||
Attributes has this set to `None`).
|
||||
|
|
|
|||
|
|
@ -111,13 +111,13 @@ new_script.delete()
|
|||
timed_script.delete()
|
||||
```
|
||||
|
||||
# Defining new Scripts
|
||||
## Defining new Scripts
|
||||
|
||||
A Script is defined as a class and is created in the same way as other
|
||||
[typeclassed](./Typeclasses.md) entities. The parent class is `evennia.DefaultScript`.
|
||||
|
||||
|
||||
## Simple storage script
|
||||
### Simple storage script
|
||||
|
||||
In `mygame/typeclasses/scripts.py` is an empty `Script` class already set up. You
|
||||
can use this as a base for your own scripts.
|
||||
|
|
@ -303,7 +303,7 @@ You can also attach the script as part of creating it:
|
|||
create_script('typeclasses.weather.Weather', obj=myroom)
|
||||
```
|
||||
|
||||
# Other Script methods
|
||||
## Other Script methods
|
||||
|
||||
A Script has all the properties of a typeclassed object, such as `db` and `ndb`(see
|
||||
[Typeclasses](./Typeclasses.md)). Setting `key` is useful in order to manage scripts (delete them by name
|
||||
|
|
@ -330,7 +330,7 @@ Typeclassed entities.
|
|||
|
||||
See also the methods involved in controlling a [Timed Script](#timed-scripts) above.
|
||||
|
||||
# The GLOBAL_SCRIPTS container
|
||||
## The GLOBAL_SCRIPTS container
|
||||
|
||||
A Script not attached to another entity is commonly referred to as a _Global_ script since it't available
|
||||
to access from anywhere. This means they need to be searched for in order to be used.
|
||||
|
|
@ -413,7 +413,7 @@ That is, if the script is deleted, next time you get it from `GLOBAL_SCRIPTS`, E
|
|||
information in settings to recreate it for you on the fly.
|
||||
|
||||
|
||||
# Hints: Dealing with Script Errors
|
||||
## Hints: Dealing with Script Errors
|
||||
|
||||
Errors inside a timed, executing script can sometimes be rather terse or point to
|
||||
parts of the execution mechanism that is hard to interpret. One way to make it
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue