Mod parameters in minetest.conf

User avatar
neko259
Member
 
Posts: 769
Joined: Sun Jun 19, 2011 06:51

Mod parameters in minetest.conf

by neko259 » Sat Jan 07, 2012 12:31

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.
Bitcoin donations: 18r66dJmUjwTmWRTFnorpGMzs8d4B8jzbw
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Sat Jan 07, 2012 13:38

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
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
xyz
Member
 
Posts: 449
Joined: Thu Nov 10, 2011 14:25

by xyz » Sat Jan 07, 2012 13:39

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
 

sapier
Member
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Sat Jan 07, 2012 14:06

+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)
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
neko259
Member
 
Posts: 769
Joined: Sun Jun 19, 2011 06:51

by neko259 » Sat Jan 07, 2012 14:10

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.
Bitcoin donations: 18r66dJmUjwTmWRTFnorpGMzs8d4B8jzbw
 

sapier
Member
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Sat Jan 07, 2012 14:14

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
DON'T mention coding style!
(c) sapier all rights reserved
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 7 guests

cron