ClientScript loading logic

This commit is contained in:
sardelka9515
2022-10-09 23:35:30 +08:00
parent 617dbc9812
commit fe53e01a4a
8 changed files with 104 additions and 203 deletions

View File

@ -5,6 +5,7 @@ using RageCoop.Core;
using RageCoop.Core.Scripting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace RageCoop.Client.Scripting
@ -214,6 +215,13 @@ namespace RageCoop.Client.Scripting
#endregion
#region FUNCTIONS
public ClientResource GetResource(string name)
{
if(Main.Resources.LoadedResources.TryGetValue(name.ToLower(), out var res)){
return res;
}
return null;
}
/// <summary>
/// Connect to a server
/// </summary>