mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
45 lines
1.3 KiB
C#
45 lines
1.3 KiB
C#
using Robust.Packaging.AssetProcessing;
|
|
|
|
namespace Robust.Packaging;
|
|
|
|
public sealed class RobustServerPackaging
|
|
{
|
|
public static IReadOnlySet<string> ServerIgnoresResources { get; } = new HashSet<string>
|
|
{
|
|
"Textures",
|
|
"Fonts",
|
|
"EngineFonts",
|
|
"Shaders",
|
|
"Midi"
|
|
};
|
|
|
|
public static async Task WriteServerResources(
|
|
string contentDir,
|
|
AssetPass pass,
|
|
CancellationToken cancel = default)
|
|
{
|
|
await WriteServerResources(contentDir, pass, new HashSet<string>(), cancel);
|
|
}
|
|
|
|
public static async Task WriteServerResources(
|
|
string contentDir,
|
|
AssetPass pass,
|
|
IReadOnlySet<string> additionalIgnoredResources,
|
|
CancellationToken cancel = default)
|
|
{
|
|
var ignoreSet = ServerIgnoresResources.Union(RobustSharedPackaging.SharedIgnoredResources).ToHashSet();
|
|
|
|
await RobustSharedPackaging.DoResourceCopy(
|
|
Path.Combine(contentDir, "Resources"),
|
|
pass,
|
|
ignoreSet.Union(additionalIgnoredResources).ToHashSet(),
|
|
cancel: cancel);
|
|
|
|
await RobustSharedPackaging.DoResourceCopy(
|
|
Path.Combine("RobustToolbox", "Resources"),
|
|
pass,
|
|
ignoreSet,
|
|
cancel: cancel);
|
|
}
|
|
}
|