mirror of
https://github.com/evennia/evennia.git
synced 2026-03-26 01:36:32 +01:00
Copy doc tools from develop
This commit is contained in:
parent
bd65641755
commit
6af2fc6819
127 changed files with 2927 additions and 1427 deletions
|
|
@ -19,8 +19,8 @@ MONITOR_HANDLER.add(obj, fieldname, callback,
|
|||
|
||||
```
|
||||
|
||||
- `obj` ([Typeclassed](Typeclasses) entity) - the object to monitor. Since this must be typeclassed, it means you can't monitor changes on [Sessions](Sessions) with the monitorhandler, for example.
|
||||
- `fieldname` (str) - the name of a field or [Attribute](Attributes) on `obj`. If you want to monitor a database field you must specify its full name, including the starting `db_` (like `db_key`, `db_location` etc). Any names not starting with `db_` are instead assumed to be the names of Attributes. This difference matters, since the MonitorHandler will automatically know to watch the `db_value` field of the Attribute.
|
||||
- `obj` ([Typeclassed](./Typeclasses) entity) - the object to monitor. Since this must be typeclassed, it means you can't monitor changes on [Sessions](./Sessions) with the monitorhandler, for example.
|
||||
- `fieldname` (str) - the name of a field or [Attribute](./Attributes) on `obj`. If you want to monitor a database field you must specify its full name, including the starting `db_` (like `db_key`, `db_location` etc). Any names not starting with `db_` are instead assumed to be the names of Attributes. This difference matters, since the MonitorHandler will automatically know to watch the `db_value` field of the Attribute.
|
||||
- `callback`(callable) - This will be called as `callback(fieldname=fieldname, obj=obj, **kwargs)` when the field updates.
|
||||
- `idstring` (str) - this is used to separate multiple monitors on the same object and fieldname. This is required in order to properly identify and remove the monitor later. It's also used for saving it.
|
||||
- `persistent` (bool) - if True, the monitor will survive a server reboot.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue