Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ✨ Config JSON: Add API methods for saving data #142

Merged

Conversation

ithinkandicode
Copy link
Collaborator

@ithinkandicode ithinkandicode commented Feb 26, 2023

NOTE: Depends on PR #143, which should be merged first.

Adds 3 methods to ModLoader. There's 2 for saving data, plus a small utility method for checking if a config JSON data object is valid.

# Utility
func is_mod_config_data_valid(config_obj: Dictionary) -> bool:

# Saving
func save_mod_config_dictionary(mod_id: String, data: Dictionary, update_config: bool = true) -> bool:
func save_mod_config_setting(mod_id: String, key:String, value, update_config: bool = true) -> bool:

Docs: https://github.com/GodotModding/godot-mod-loader/wiki/Upcoming-Features#config-json


Closes #132:

@ithinkandicode ithinkandicode added enhancement New feature or request validation Feature to make things safe and predictable labels Feb 26, 2023
@ithinkandicode ithinkandicode linked an issue Feb 27, 2023 that may be closed by this pull request
addons/mod_loader/mod_loader.gd Outdated Show resolved Hide resolved
addons/mod_loader/mod_loader.gd Outdated Show resolved Hide resolved
@ithinkandicode ithinkandicode merged commit 25bdd59 into GodotModding:development Feb 27, 2023
@ithinkandicode ithinkandicode deleted the config-json-saving-api branch February 27, 2023 11:17
@ithinkandicode ithinkandicode changed the title Config JSON: Add API methods for saving data feat: ✨ Config JSON: Add API methods for saving data Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request validation Feature to make things safe and predictable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Config JSON: Add API methods for saving
2 participants