Skip to content

[Discussion] Make technic use minetest.conf style settings? #659

@DustyBagel

Description

@DustyBagel
Contributor

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.

Activity

SmallJoker

SmallJoker commented on Dec 16, 2024

@SmallJoker
Member

I agree that the minetest.conf system should be used. Here's some settingtypes.txt parser code to retrieve the default values: https://github.com/minetest-mods/areas/blob/master/settings.lua

EDIT: I think the setting priority should be as follows:

  1. value specified in WORLDNAME/technic.conf (world-specific settings)
  2. value specified in minetest.conf (global settings)
  3. default value from settingtypes.txt

This way we can ensure compatibility with older worlds and yet allow server owners to move the settings to a separate file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @SmallJoker@DustyBagel

        Issue actions

          [Discussion] Make technic use minetest.conf style settings? · Issue #659 · minetest-mods/technic