Page 1 of 1

Mod parameters in minetest.conf

PostPosted: Sat Jan 07, 2012 12:31
by neko259
Make it available for mods to read
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.get_parameters()

to a table (parameters["param_name"] == param_value) from minetest.conf. So that players could specify:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
mod_name.param_name = param_value

in the config.

PostPosted: Sat Jan 07, 2012 13:38
by sfan5
neko259 wrote:Make it available for mods to read
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.get_parameters()

to a table (parameters["param_name"] == param_value) from minetest.conf. So that players could specify:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
mod_name.param_name = param_value

in the config.

+2

PostPosted: Sat Jan 07, 2012 13:39
by xyz
Maybe that?
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.setting_get(name) -> string or nil

PostPosted: Sat Jan 07, 2012 14:06
by sapier
+1

Just to put another (slightly changed) option into discussion what about

minetest.settings:get_param(name) string or nil
minetest.settings:set_param(name,value)

PostPosted: Sat Jan 07, 2012 14:10
by neko259
xyz wrote:Maybe that?
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.setting_get(name) -> string or nil

Hmm. Need to try that.

PostPosted: Sat Jan 07, 2012 14:14
by sapier
minetest.setting_get(name) -> string or nil


sorry missed this is already in so forget about my suggestion no need to add new stuff if a working solution is already in place