Merge resource loading
This commit is contained in:
commit
ad0368b4c0
@ -82,9 +82,9 @@ namespace RageCoop.Client.Scripting
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Load all resources from the server
|
/// Load all resources from the server
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Load(string path,string[] zips)
|
/// <param name="path">The path to the directory containing all resources to load.</param>
|
||||||
|
public void Load(string path)
|
||||||
{
|
{
|
||||||
Unload();
|
|
||||||
foreach (var zip in zips)
|
foreach (var zip in zips)
|
||||||
{
|
{
|
||||||
var zipPath=Path.Combine(path, zip);
|
var zipPath=Path.Combine(path, zip);
|
||||||
@ -98,7 +98,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();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user