using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using Robust.Shared.ContentPack; using Robust.Shared.Utility; namespace Robust.Client.ResourceManagement { public interface IResourceCache : IResourceManager { T GetResource(string path, bool useFallback = true) where T : BaseResource, new(); T GetResource(ResourcePath path, bool useFallback = true) where T : BaseResource, new(); bool TryGetResource(string path, [NotNullWhen(true)] out T? resource) where T : BaseResource, new(); bool TryGetResource(ResourcePath path, [NotNullWhen(true)] out T? resource) where T : BaseResource, new(); void ReloadResource(string path) where T : BaseResource, new(); void ReloadResource(ResourcePath path) where T : BaseResource, new(); void CacheResource(string path, T resource) where T : BaseResource, new(); void CacheResource(ResourcePath path, T resource) where T : BaseResource, new(); T GetFallback() where T : BaseResource, new(); IEnumerable> GetAllResources() where T : BaseResource, new(); // Resource load callbacks so content can hook stuff like click maps. event Action OnRawTextureLoaded; event Action OnRsiLoaded; } }