-
Notifications
You must be signed in to change notification settings - Fork 156
Open
Labels
Description
Technic has it's own settings system instead of using minetest's own setting system. This can be less than ideal for a few reasons:
- When you update technic, all the settings are reset instead of being stored in the minetest.conf file.
- Settings can't be changed in the minetest settings Gui on mobile platforms.
I would really like to move to mintest's settings system. If backwards comparability is desired, we can easily implement it something like this:
if minetest:settings("setting_name") then -- If the setting can't be retrieved or is at its default then this will return nil
technic_settings_table.setting_name = minetest:settings.get("setting_name")
else
-- Use default setting.
end
Other mods have had a similar system. I would really like to get started on this when I find the time but first I would like to get the community's thoughts.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
SmallJoker commentedon Dec 16, 2024
I agree that the
minetest.conf
system should be used. Here's somesettingtypes.txt
parser code to retrieve the default values: https://github.com/minetest-mods/areas/blob/master/settings.luaEDIT: I think the setting priority should be as follows:
WORLDNAME/technic.conf
(world-specific settings)minetest.conf
(global settings)settingtypes.txt
This way we can ensure compatibility with older worlds and yet allow server owners to move the settings to a separate file.