Fix error spam if store.json doesn't exist (Just create it)
This commit is contained in:
parent
17f1ce4674
commit
b7636394b2
4
Store.gd
4
Store.gd
@ -11,7 +11,6 @@ var store_file = File.new()
|
|||||||
var store_paths = [OS.get_config_dir()+"/UltraFlare/"]
|
var store_paths = [OS.get_config_dir()+"/UltraFlare/"]
|
||||||
var store_path = null
|
var store_path = null
|
||||||
|
|
||||||
|
|
||||||
# When script/game is loaded,
|
# When script/game is loaded,
|
||||||
func _ready():
|
func _ready():
|
||||||
# For each path,
|
# For each path,
|
||||||
@ -29,7 +28,8 @@ func _ready():
|
|||||||
# Set the data path to the first entry in the data_paths array
|
# Set the data path to the first entry in the data_paths array
|
||||||
store_path = store_paths[0]
|
store_path = store_paths[0]
|
||||||
store_dir.make_dir_recursive(store_path)
|
store_dir.make_dir_recursive(store_path)
|
||||||
store_file.open(store_path+"/store.json", 3)
|
store_file.open(store_path+"/store.json", 2)
|
||||||
|
store_file.close()
|
||||||
|
|
||||||
# get_store()
|
# get_store()
|
||||||
# Used for getting all data in storage
|
# Used for getting all data in storage
|
||||||
|
Loading…
Reference in New Issue
Block a user