Fix configuration not being inited upon first boot
This commit is contained in:
parent
16e68e2b16
commit
44f490b00a
1 changed files with 2 additions and 1 deletions
|
@ -3,7 +3,6 @@ extends Config
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
self.clone_config(Config.new_clear())
|
|
||||||
load_from_file()
|
load_from_file()
|
||||||
|
|
||||||
func bind_keys() -> void:
|
func bind_keys() -> void:
|
||||||
|
@ -53,6 +52,8 @@ func load_from_file() -> void:
|
||||||
if err != OK:
|
if err != OK:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
self.clone_config(Config.new_clear())
|
||||||
|
|
||||||
for key in config.get_section_keys("FunkPanion"):
|
for key in config.get_section_keys("FunkPanion"):
|
||||||
var value = config.get_value("FunkPanion", key)
|
var value = config.get_value("FunkPanion", key)
|
||||||
if value != null:
|
if value != null:
|
||||||
|
|
Loading…
Reference in a new issue