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:
parent
18caf3a18d
commit
e545e96d2b
17 changed files with 162 additions and 45 deletions
|
@ -36,11 +36,7 @@ end
|
|||
|
||||
|
||||
function core.setting_get_pos(name)
|
||||
local value = core.settings:get(name)
|
||||
if not value then
|
||||
return nil
|
||||
end
|
||||
return core.string_to_pos(value)
|
||||
return core.settings:get_pos(name)
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
local static_spawnpoint_string = core.settings:get("static_spawnpoint")
|
||||
if static_spawnpoint_string and
|
||||
static_spawnpoint_string ~= "" and
|
||||
not core.setting_get_pos("static_spawnpoint") then
|
||||
not core.settings:get_pos("static_spawnpoint") then
|
||||
error('The static_spawnpoint setting is invalid: "' ..
|
||||
static_spawnpoint_string .. '"')
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue