Refactoring Concept/Component documentation. Still not done
This commit is contained in:
parent
7114aea912
commit
c7ec3dfad3
42 changed files with 745 additions and 1275 deletions
22
docs/source/Concepts/Inline-Functions.md
Normal file
22
docs/source/Concepts/Inline-Functions.md
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Inline functions
|
||||
|
||||
```{sidebar}
|
||||
For much more information about inline functions, see the [FuncParser](../Components/FuncParser.md) documentation
|
||||
```
|
||||
_Inline functions_, also known as _funcparser functions_ are embedded strings on the form
|
||||
|
||||
$funcname(args, kwargs)
|
||||
|
||||
For example
|
||||
|
||||
> say the answer is $eval(24 * 12)!
|
||||
You say, "the answer is 288!"
|
||||
|
||||
General processing of outgoing strings is disabled by default. To activate inline-function parsing of outgoing strings, add this to your settings file:
|
||||
|
||||
FUNCPARSER_PARSE_OUTGOING_MESSAGES_ENABLED=True
|
||||
|
||||
Inline functions are provided by the [FuncParser](../Components/FuncParser.md). It is enabled in a few other situations:
|
||||
|
||||
- Processing of [Prototypes](../Components/Prototypes.md); these 'prototypefuncs' allow for prototypes whose values change dynamically upon spawning. For example, you would set `{key: '$choice(["Bo", "Anne", "Tom"])'` and spawn a random-named character every time.
|
||||
- Processing of strings to the `msg_contents` method. This allows for [sending different messages depending on who will see them](./Change-Message-Per-Receiver.md).
|
||||
Loading…
Add table
Add a link
Reference in a new issue