Skip to content

Game Code: Settings.gd using set_value instead of get_value #94

Open

Description

@kacpersienkiewicz

The Settings.gd file (Example: https://github.com/RPG-Research/bcirpg/blob/master/Phase2/Godot_GameCode/Multiplayer/Settings.gd) uses the following:

var bClosedCaptions = config.set_value("player", "bClosedCaptions")
var bDevConsole = config.set_value("Player", "bDevConsole")
var bVirtualKeyboard = config.set_value("Player", "bVirtualKeyboard", false)
var preferredTheme = config.set_value("Player", "preferredTheme", PlayerSettingsTemplate.ThemeChoice.LIGHTHIGHCONTRAST)
var visualKeyboardLayout = config.set_value("Player", "visualKeyboardLayout", PlayerSettingsTemplate.KeyboardLayout.QWERTY)

The documentation says that set_value() is a void returning function so it doesn't actually return anything so this doesn't actually do anything. It needs to be swapped to get_value() so it returns something. This is also how the documentation does it so I am pretty sure this is right.

These are the affected files as far I can tell:

https://github.com/RPG-Research/bcirpg/blob/master/Phase2/Godot_GameCode/ImportCharacter/Settings.gd
https://github.com/RPG-Research/bcirpg/blob/master/Phase2/Godot_GameCode/Multiplayer/Settings.gd
https://github.com/RPG-Research/bcirpg/blob/master/Phase2/Godot_GameCode/Settings/bcirpg_move/Settings.gd

As soon as someone checks that this is an issue, I can quickly just swap all of this from set to get and push it.

Activity

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions