Ark2000 / PankuConsole

Feature-packed real-time debugging toolkit for Godot Engine.
https://k2kra.xyz/PankuConsole/
MIT License
997 stars 38 forks source link

feat: custom default config file #175

Closed Ark2000 closed 4 months ago

Ark2000 commented 4 months ago

closes https://github.com/Ark2000/PankuConsole/issues/173

Expected Behavior:

  1. user://panku_config.cfg file exists, that is used as the config dictionary
  2. If the user config file does not exist (for example, for first-time users), then use res://addons/panku_console/panku_default_config.cfg (which can be changed in project settings) as the config dictionary.
  3. The plugin will always get a config dictionary, whether the config files exist or not.
  4. If there's no corresponding key-value pair in the config dictionary, the default value in the function call will be used.

Note: The user config file (which is located at user://) will always be created after the program starts, the default config file (located at res://) is in fact simply a read-only and for one use only template file.

Ark2000 commented 4 months ago

CC @worron @TheContainer Please take it a look.

TheContainer commented 4 months ago

CC @worron @TheContainer Please take it a look.

Works for me!