Document persistence/memory
parent
d3c99773d6
commit
a378d4dccf
11
README.md
11
README.md
|
@ -65,6 +65,17 @@ the player who pressed the button and keep doing that until they log off. Becaus
|
|||
the code does nothing in response to an "act" event, at that point they will go
|
||||
into a permanent wait (sleep) state.
|
||||
|
||||
### Persistence
|
||||
|
||||
The code runs in a sandboxed Lua environment which persists for as long as the
|
||||
person is active. Therefore, 'local' (actually global to the sandboxed
|
||||
environment) persist between calls for different events.
|
||||
|
||||
Information that needs to persist longer than this (i.e. across deactivations
|
||||
or server restarts) can be stored in the person's "memory". The 'mem' table
|
||||
(initially empty) can be used to store anything required. It will persist for
|
||||
the entire lifetime of the person.
|
||||
|
||||
### Presets
|
||||
|
||||
Several 'presets' are supplied, which serve as both examples and useful
|
||||
|
|
Loading…
Reference in New Issue