1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Make string to v3f parsing consistent, replace core.setting_get_pos() by core.settings:get_pos() (#15438)

Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
This commit is contained in:
AFCMS 2024-12-04 18:19:46 +01:00 committed by GitHub
parent 18caf3a18d
commit e545e96d2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 162 additions and 45 deletions

View file

@ -6180,7 +6180,7 @@ Setting-related
* `core.settings`: Settings object containing all of the settings from the
main config file (`minetest.conf`). See [`Settings`].
* `core.setting_get_pos(name)`: Loads a setting from the main settings and
parses it as a position (in the format `(1,2,3)`). Returns a position or nil.
parses it as a position (in the format `(1,2,3)`). Returns a position or nil. **Deprecated: use `core.settings:get_pos()` instead**
Authentication
--------------
@ -9051,6 +9051,9 @@ means that no defaults will be returned for mod settings.
* Is currently limited to mapgen flags `mg_flags` and mapgen-specific
flags like `mgv5_spflags`.
* Returns `nil` if `key` is not found.
* `get_pos(key)`:
* Returns a `vector`
* Returns `nil` if no value is found or parsing failed.
* `set(key, value)`
* Setting names can't contain whitespace or any of `="{}#`.
* Setting values can't contain the sequence `\n"""`.
@ -9061,6 +9064,9 @@ means that no defaults will be returned for mod settings.
* `set_np_group(key, value)`
* `value` is a NoiseParams table.
* Also, see documentation for `set()` above.
* `set_pos(key, value)`
* `value` is a `vector`.
* Also, see documentation for `set()` above.
* `remove(key)`: returns a boolean (`true` for success)
* `get_names()`: returns `{key1,...}`
* `has(key)`: