fix save files being initialized incorrectly due to variable shadowing
This commit is contained in:
parent
47ad59c2ff
commit
1bef86f316
|
|
@ -16,11 +16,12 @@ func _validate_property(property: Dictionary):
|
||||||
property.usage = not PROPERTY_USAGE_STORAGE
|
property.usage = not PROPERTY_USAGE_STORAGE
|
||||||
|
|
||||||
|
|
||||||
func _init(filepath = "") -> void:
|
func _init(initial_filepath = "") -> void:
|
||||||
|
|
||||||
if filepath == "":
|
if initial_filepath == "":
|
||||||
filepath = "%s/%s" % [State.user_saves_path, unique_save_name]
|
filepath = "%s/%s" % [State.user_saves_path, unique_save_name]
|
||||||
|
else:
|
||||||
|
filepath = initial_filepath
|
||||||
read_save_file()
|
read_save_file()
|
||||||
|
|
||||||
func read_save_file():
|
func read_save_file():
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue