Files
RAGECOOP-V/Client/Scripting/ClientResource.cs

50 lines
1.3 KiB
C#
Raw Normal View History

2023-02-13 20:44:50 +08:00
using Newtonsoft.Json;
using RageCoop.Core.Scripting;
using SHVDN;
2023-02-12 22:06:57 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace RageCoop.Client.Scripting
{
/// <summary>
/// </summary>
public class ClientResource
{
/// <summary>
/// Name of the resource
/// </summary>
2023-02-27 11:54:02 +08:00
[JsonProperty]
2023-02-12 22:06:57 +08:00
public string Name { get; internal set; }
/// <summary>
/// Directory where the scripts is loaded from
/// </summary>
2023-02-27 11:54:02 +08:00
[JsonProperty]
2023-02-12 22:06:57 +08:00
public string ScriptsDirectory { get; internal set; }
/// <summary>
/// A resource-specific folder that can be used to store your files.
/// </summary>
2023-02-27 11:54:02 +08:00
[JsonProperty]
2023-02-12 22:06:57 +08:00
public string DataFolder { get; internal set; }
/// <summary>
2023-02-27 11:54:02 +08:00
/// Get the <see cref="ClientFile" /> where this script is loaded from.
2023-02-12 22:06:57 +08:00
/// </summary>
2023-02-27 11:54:02 +08:00
[JsonProperty]
public Dictionary<string, ClientFile> Files { get; internal set; } = new Dictionary<string, ClientFile>();
2023-02-12 22:06:57 +08:00
2023-02-13 20:44:50 +08:00
/// <summary>
2023-02-27 11:54:02 +08:00
/// A <see cref="Core.Logger" /> instance that can be used to debug your resource.
2023-02-13 20:44:50 +08:00
/// </summary>
[JsonIgnore]
2023-02-27 11:54:02 +08:00
public ResourceLogger Logger => ResourceLogger.Default;
2023-02-12 22:06:57 +08:00
}
2023-02-13 20:44:50 +08:00
2023-02-12 22:06:57 +08:00
}