From 353a01fc2d9216dc6b93c263469e5b2a22c353fa Mon Sep 17 00:00:00 2001 From: Nordup Date: Sun, 2 Apr 2023 01:44:08 +0300 Subject: [PATCH] remove cache on start --- project/export_presets.cfg | 4 ++-- project/the_gates/scripts/loading/file_downloader.gd | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/project/export_presets.cfg b/project/export_presets.cfg index 3a43152..06731e2 100644 --- a/project/export_presets.cfg +++ b/project/export_presets.cfg @@ -49,7 +49,7 @@ custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="../../../Builds/TheGates.exe" +export_path="../../Builds/TheGates.exe" encryption_include_filters="" encryption_exclude_filters="" encrypt_pck=false @@ -58,7 +58,7 @@ script_encryption_key="" [preset.1.options] -custom_template/debug="C:/Users/Nordup/Documents/GodotProjects/godot-the-gates/bin/godot.windows.template_debug.x86_64.exe" +custom_template/debug="C:/Users/Nordup/Documents/GodotProjects/the-gates/bin/godot.windows.template_debug.x86_64.exe" custom_template/release="" debug/export_console_script=1 binary_format/embed_pck=false diff --git a/project/the_gates/scripts/loading/file_downloader.gd b/project/the_gates/scripts/loading/file_downloader.gd index e4ac6ce..6329a4b 100644 --- a/project/the_gates/scripts/loading/file_downloader.gd +++ b/project/the_gates/scripts/loading/file_downloader.gd @@ -3,6 +3,10 @@ extends Node var folder: String = "user://gates_data" +func _ready() -> void: + FileTools.remove_recursive(folder) + + func download(url: String) -> String: var save_path = folder + "/" + url.md5_text() + "." + url.get_file().get_extension() if FileAccess.file_exists(save_path):