summaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_settings.h
diff options
context:
space:
mode:
authorMuhammad Rifqi Priyo Susanto <muhammadrifqipriyosusanto@gmail.com>2017-09-10 00:49:12 +0700
committerparamat <mat.gregory@virginmedia.com>2017-10-23 01:28:13 +0100
commita1e1a19ac355dbe7e1a2e060fd6b5fe082298eb6 (patch)
tree871e3058638547b7936a30f661042235110da9b2 /src/script/lua_api/l_settings.h
parentc60abb2aeccba2920d55a518fcffd2ad57f9f59a (diff)
downloadminetest-a1e1a19ac355dbe7e1a2e060fd6b5fe082298eb6.tar.gz
minetest-a1e1a19ac355dbe7e1a2e060fd6b5fe082298eb6.tar.bz2
minetest-a1e1a19ac355dbe7e1a2e060fd6b5fe082298eb6.zip
Improvements/fixes for noise parameter input in advanced settings
Formspec input for each individual noise parameter and flag. Allow noise flags to be set in advanced settings, previously only settable in minetest.conf. Standardise 'group format' for noise parameters set in minetest.conf, as only these support noise flags. However the older 'single line' format is still accepted to support existing minetest.conf files. Therefore auto-generate minetest.conf.example with noise parameters in 'group format'. Setting 'type' in settingtypes.txt is now either 'noise_params_2D' or 'noise_params_3D', the dimension number is displayed in the advanced settings edit page.
Diffstat (limited to 'src/script/lua_api/l_settings.h')
-rw-r--r--src/script/lua_api/l_settings.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/script/lua_api/l_settings.h b/src/script/lua_api/l_settings.h
index 500917f0a..dcf39a89e 100644
--- a/src/script/lua_api/l_settings.h
+++ b/src/script/lua_api/l_settings.h
@@ -19,6 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once
+#include "common/c_content.h"
#include "lua_api/l_base.h"
class Settings;
@@ -38,12 +39,18 @@ private:
// get_bool(self, key) -> boolean
static int l_get_bool(lua_State *L);
+ // get_np_group(self, key) -> noiseparam
+ static int l_get_np_group(lua_State *L);
+
// set(self, key, value)
static int l_set(lua_State *L);
// set_bool(self, key, value)
static int l_set_bool(lua_State *L);
+ // set_np_group(self, key, value)
+ static int l_set_np_group(lua_State *L);
+
// remove(self, key) -> success
static int l_remove(lua_State *L);