Maaack / Godot-Game-Template

Godot template with a main menu, options menus, pause menu, credits, scene loader, extra tools, and an example game scene.
MIT License
283 stars 17 forks source link

Suggestion: option to use version from Project settings #73

Closed hsandt closed 1 month ago

hsandt commented 1 month ago

I already wrote my own main menu scripts for other games, and I just use the Project settings version to fill the version label

I found it less error-prone as I don't have to manually update the version each time.

An option to do so, or alternatively fallback to the project settings version when version name is empty of "0.0.0", would be helpful.

Here is my current custom patch:

func _setup_version_name():
    # CUSTOM CHANGE by hsandt
    # If not setting a custom version name, use the one from project settings
    # This avoids having to manually update it every time
    if version_name == '0.0.0':
        version_name = ProjectSettings.get_setting("application/config/version", "0.0.0")
    AppLog.version_opened(version_name)
    $"%VersionNameLabel".text = "v%s" % version_name
Maaack commented 1 month ago

Thanks for this suggestion. In light of discovering the version config option that was always staring me in the face, I'm skeptical that the redundant version_name in the MainMenu.gd provides value. For the next release, I plan to add a toggle to show/hide the version #, and direct users to the config option.

Let me know if this feels like a feature regression. It's easy enough to add back in.