Update Resources.cs

This commit is contained in:
Sardelka9515
2022-07-10 23:30:29 +08:00
committed by GitHub
parent b37ce4d0c1
commit bdeaeee293

View File

@ -85,7 +85,7 @@ namespace RageCoop.Client.Scripting
/// <param name="path">The path to the directory containing all resources to load.</param> /// <param name="path">The path to the directory containing all resources to load.</param>
public void Load(string path) public void Load(string path)
{ {
Unload();
foreach (var d in Directory.GetDirectories(path)) foreach (var d in Directory.GetDirectories(path))
{ {
if(Path.GetFileName(d).ToLower() != "data") if(Path.GetFileName(d).ToLower() != "data")
@ -106,7 +106,7 @@ namespace RageCoop.Client.Scripting
StopAll(); StopAll();
if (LoadedResources.Count > 0) if (LoadedResources.Count > 0)
{ {
Util.Reload(); API.QueueAction(()=>Util.Reload());
} }
LoadedResources.Clear(); LoadedResources.Clear();
} }