Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lua settings improvements #3271

Merged
merged 1 commit into from
Oct 24, 2015

Conversation

PilzAdam
Copy link
Contributor

Changes:

  • Key settings are added to minetest.conf.example
  • Added missing key and noclip settings to `settingtypes.txt
  • Expanded description on key settings
  • Fixed parallax typos
  • flags now fully supported with a list of possible values
  • Added input validation for int, float and flags types (type safety and min / max checks)
  • Restructured graphics section
  • Additional settingtypes.txt files are passed from games and mods root folders; they are displayed in special categories.
  • Added description for format of noise_params type

@kilbith
Copy link
Contributor

kilbith commented Oct 18, 2015

@PilzAdam You've cancelled (at least) 9d21fa3 with 5675486.

@PilzAdam
Copy link
Contributor Author

@kilbith Thanks for spotting that; I checked everything else now.

@PilzAdam
Copy link
Contributor Author

Everything important is now done here, except the support for grouped noise param settings, but this is due to a missing Lua API functionality for grouped settings (or structs).

The only things missing from the list in #3266 are fancier input dialogs for certain types, but that's not so high priority.

I think this can be merged now.

@@ -29,6 +31,11 @@
# - default (if default is not specified then "" is set)
# * key:
# - default
# * flags:
# Flags are always comman seperated without spaces.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comman?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo; will fix.

@est31
Copy link
Contributor

est31 commented Oct 19, 2015

Really great idea to scan for settingstypes.txt in the mods and game directories as well.

@est31
Copy link
Contributor

est31 commented Oct 19, 2015

For modders and game creators: should we add documentation for how to automatically generate minetest.conf.example for mods/games from settingstypes.txt?

@PilzAdam
Copy link
Contributor Author

@est31 addressed all your remarks.

If we want to expose the generation of minetest.conf.example then it should be done with a command line option or an extra button in the GUI. Editing builtin/mainmenu/tab_settings.lua is not an option for end-users (on some distros they may not be able to edit this file, since it's installed in the system-wide part).

I would personally prefer a way to pass command-line options to the main menu (maybe with registering them first, so they can be printed in --help), but that may be too complicated for this use-case.

# If enabled together with fly mode, player is able to fly through solid nodes.
# This requires the "noclip" privilege on the server.
noclip (Noclip) bool false

# Smooths camera when moving and looking arround.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"around"

@paramat
Copy link
Contributor

paramat commented Oct 19, 2015

New notes for map_generation_limit for settingtypes.txt and minetest.conf.example.
The unnecessary 'please note' line can be removed and the notes formatted as elsewhere in these files.

"Map generation is limited to this distance in nodes from (0, 0, 0),
along all axes in positive and negative directions.
Value is limited to 31000.
By default map generates in chunks of 80x80x80 nodes
that are offset by (-32, -32, -32) nodes from (0, 0, 0).
Only chunks within the map generation limit volume are generated."

@PilzAdam
Copy link
Contributor Author

Thanks for all your suggestions on settingtypes.txt, but I'd like to first merge this PR, since it contains important functionality. Improving settingtypes.txt will probably take a long time and should be subject of future PRs.

@paramat
Copy link
Contributor

paramat commented Oct 21, 2015

Cool. For the moment don't worry too much about the setting of noise parameters, as this is advanced stuff that can always be done using minetest.conf.example.

@est31
Copy link
Contributor

est31 commented Oct 21, 2015

Don't edit that file anymore. If you want to change something in minetest.conf.example, edit settingstypes.txt instead, and @PilzAdam will generate minetest.conf.example with automated tools.

* Add key settings to setting table and ignore them later
  This way they are added to the auto-generated minetest.conf.example
* Add flags type
* Add input validation for int, float and flags
* Break in-game graphic settings into multiple sections
* Parse settingtpes.txt in mods and games
* Improve description for a lot of settings
* Fix typos and wording in settingtypes.txt
* Convert language setting to an enum
@PilzAdam PilzAdam merged commit 6f2d9de into minetest:master Oct 24, 2015
@PilzAdam PilzAdam deleted the lua_settings_improvements branch October 24, 2015 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants