Update Resources.cs
This commit is contained in:
@ -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();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user