Skip to content

Commit

Permalink
fix: prevent errors at startup, remove noisey logs
Browse files Browse the repository at this point in the history
ProjectSettings-supported config seems to be working as expected!
Huzzah!
  • Loading branch information
russmatney committed Jun 7, 2024
1 parent 0251bdb commit af59d90
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 4 additions & 2 deletions addons/log/log.gd
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ static func setup_config(opts={}):
if ProjectSettings.has_setting(key):
Log.config[key] = ProjectSettings.get_setting(key)
else:
ProjectSettings.set_initial_value(key, Log.config.get(key))
# ProjectSettings.set_setting(key, Log.config[key])
var val = Log.config[key]
if val != null:
ProjectSettings.set_setting(key, val)
ProjectSettings.set_initial_value(key, val)

print("updated config", Log.config)
Log.is_config_setup = true
Expand Down
1 change: 0 additions & 1 deletion addons/log/plugin.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
extends EditorPlugin

func _enter_tree():
Log.pr("log.gd entering tree")
ProjectSettings.settings_changed.connect(on_settings_changed)

func on_settings_changed():
Expand Down
6 changes: 2 additions & 4 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ settings/common/update_notification_enabled=false

[log_gd]

config/color_scheme={}
config/max_array_size=11
config/dictionary_skip_keys=["layer_0/tile_data"]
config/disable_colors=false
config/disable_colors=true
config/max_array_size=14

[rendering]

Expand Down

0 comments on commit af59d90

Please sign in to comment.