Files
RobustToolbox/SS14.Client/Interfaces/ResourceManagement/IResourceCache.cs
Pieter-Jan Briers d7414930ff RSI support (#552)
* RSI WiP

* More work but we're doing bsdiff now

* RSI loading seems to mostly work.

* Vector2u deserialization test.

* Add in packages again.

* This is the part where I realize I need a path manipulation library.

* The start of a path class but it's late so I'm going to bed.

* HIGHLY theoretical ResourcePath code.

Partially tested but not really.

* Allow x86 for unit tests I guess jesus christ.

Thanks Microsoft for still not shipping x64 VS in 2018.

* Resource paths work & are tested.

* I missed a doc spot.

* ResourcePaths implemented on the server.

* Client works with resource paths.

TIME FOR A REFACTOR.

* Some work but this might be a stupid idea so I migh throw it in the trash.

* Resources refactored completely.

They now only get the requested resourcepath.
They're in charge of opening files to load.

* RSI Loader WORKS.

* Update AudioResource for new loading support.

* Fix package references.

* Fix more references.

* Gonna work now?
2018-04-12 21:53:19 +02:00

41 lines
1.2 KiB
C#

using SS14.Client.ResourceManagement;
using SS14.Shared.Interfaces;
using SS14.Shared.Utility;
namespace SS14.Client.Interfaces.ResourceManagement
{
public interface IResourceCache : IResourceManager
{
// For convenience.
void LoadLocalResources();
void LoadBaseResources();
/// <summary>
/// TEMPORARY: We need this because Godot can't load most resources without the disk easily.
/// </summary>
bool TryGetDiskFilePath(ResourcePath path, out string diskPath);
T GetResource<T>(string path, bool useFallback = true)
where T : BaseResource, new();
T GetResource<T>(ResourcePath path, bool useFallback = true)
where T : BaseResource, new();
bool TryGetResource<T>(string path, out T resource)
where T : BaseResource, new();
bool TryGetResource<T>(ResourcePath path, out T resource)
where T : BaseResource, new();
void CacheResource<T>(string path, T resource)
where T : BaseResource, new();
void CacheResource<T>(ResourcePath path, T resource)
where T : BaseResource, new();
T GetFallback<T>()
where T : BaseResource, new();
}
}