Merge docs for 'Carpet Mod 1.4.60 for Minecraft 22w05a'
This commit is contained in:
1 parent
da557664c3
commit
fa8d2b75d0
1 file changed
+6
-2
@@ -1980,9 +1980,13 @@ apps `__on_close()` will execute once per app, and with `'player'` scoped apps,
|
||||
### App config via `__config()` function
|
||||
|
||||
If an app defines `__config` method, and that method returns a map, it will be used to apply custom settings
|
||||
for this app. Currently the following options are supported:
|
||||
for this app. Currently, the following options are supported:
|
||||
|
||||
* `'scope'`: default scope for global variables for the app, Default is `'player'`, which means that globals and defined
|
||||
* `'strict'` : if `true`, any use of an uninitialized variable will result in program failure. Defaults to `false` if
|
||||
not specified. With `'strict'`you have to assign an initial value to any variable before using it. It is very useful
|
||||
to use this setting for app debugging and for beginner programmers. Explicit initialization is not required for your
|
||||
code to work, but mistakes may result from improper assumptions about initial variable values of `null`.
|
||||
* `'scope'`: default scope for global variables for the app, Default is `'player'`, which means that globals and defined
|
||||
functions will be unique for each player so that apps for each player will run in isolation. This is useful in
|
||||
tool-like applications, where behaviour of things is always from a player's perspective. With player scope the initial run
|
||||
of the app creates is initial state: defined functions, global variables, config and event handlers, which is then copied for
|
||||
|
||||
Reference in new issue
Block a user