Add disable_settings to game.conf to get rid of "Enable Damage"/"Creative Mode"/"Host Server" checkboxes (#11524)

This adds support for disable_settings to game.conf. In this you can specify a list of settings that should not be visible in the "local game" (or however it is called nowadays) tab. Enable Damage, Creative Mode and Host Server are supported.

Co-authored-by: Wuzzy <Wuzzy2@mail.ru>
Co-authored-by: Aaron Suen <warr1024@gmail.com>
Co-authored-by: rubenwardy <rw@rubenwardy.com>
This commit is contained in:
Hugues Ross
2021-08-12 14:08:12 -04:00
committed by GitHub
parent 442e48b84f
commit 47c146120a
2 changed files with 89 additions and 13 deletions

View File

@@ -77,8 +77,16 @@ The game directory can contain the following files:
`disallowed_mapgens`.
* `disallowed_mapgen_settings= <comma-separated mapgen settings>`
e.g. `disallowed_mapgen_settings = mgv5_spflags`
These settings are hidden for this game in the world creation
These mapgen settings are hidden for this game in the world creation
dialog and game start menu.
* `disabled_settings = <comma-separated settings>`
e.g. `disabled_settings = enable_damage, creative_mode`
These settings are hidden for this game in the "Start game" tab
and will be initialized as `false` when the game is started.
Prepend a setting name with an exclamation mark to initialize it to `true`
(this does not work for `enable_server`).
Only these settings are supported:
`enable_damage`, `creative_mode`, `enable_server`.
* `author`: The author of the game. It only appears when downloaded from
ContentDB.
* `release`: Ignore this: Should only ever be set by ContentDB, as it is