mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
* 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?
32 lines
936 B
C#
32 lines
936 B
C#
using System;
|
|
using SS14.Client.Interfaces.ResourceManagement;
|
|
using SS14.Shared.Utility;
|
|
|
|
namespace SS14.Client.ResourceManagement
|
|
{
|
|
/// <summary>
|
|
/// Base resource for the cache.
|
|
/// </summary>
|
|
public abstract class BaseResource : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// Fallback resource path if this one does not exist.
|
|
/// </summary>
|
|
public virtual string Fallback => null;
|
|
|
|
/// <summary>
|
|
/// Disposes this resource.
|
|
/// </summary>
|
|
public virtual void Dispose()
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Deserializes the resource from the VFS.
|
|
/// </summary>
|
|
/// <param name="cache">ResourceCache this resource is being loaded into.</param>
|
|
/// <param name="path">Path of the resource requested on the VFS.</param>
|
|
public abstract void Load(IResourceCache cache, ResourcePath path);
|
|
}
|
|
}
|