aboutsummaryrefslogtreecommitdiff
path: root/builtin/client
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/client')
-rw-r--r--builtin/client/init.lua1
-rw-r--r--builtin/client/misc.lua7
2 files changed, 8 insertions, 0 deletions
diff --git a/builtin/client/init.lua b/builtin/client/init.lua
index 0133fc16d..3719a90ee 100644
--- a/builtin/client/init.lua
+++ b/builtin/client/init.lua
@@ -9,3 +9,4 @@ dofile(commonpath .. "mod_storage.lua")
dofile(commonpath .. "chatcommands.lua")
dofile(clientpath .. "chatcommands.lua")
dofile(clientpath .. "death_formspec.lua")
+dofile(clientpath .. "misc.lua")
diff --git a/builtin/client/misc.lua b/builtin/client/misc.lua
new file mode 100644
index 000000000..80e0f2904
--- /dev/null
+++ b/builtin/client/misc.lua
@@ -0,0 +1,7 @@
+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)
+end