From 6ec6acc539321709ed8517f1a571777a04f5c24c Mon Sep 17 00:00:00 2001 From: AFCMS Date: Tue, 2 Aug 2022 11:58:08 +0200 Subject: Add `minetest.settings` to CSM API and allow CSMs to provide `settingtypes.txt` (#12131) Co-authored-by: sfan5 Co-authored-by: SmallJoker --- builtin/client/misc.lua | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 builtin/client/misc.lua (limited to 'builtin/client/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 -- cgit v1.2.3