Opinionate the template, also some updates like the new build configs.

This commit is contained in:
moonheart08 2023-05-11 06:38:24 -05:00
parent 75a7ea8389
commit 4b84ff2033
16 changed files with 518 additions and 216 deletions

View file

@ -0,0 +1,32 @@
using Robust.Packaging;
using Robust.Packaging.AssetProcessing;
namespace Content.Packaging;
public static class ContentPackaging
{
public static async Task WriteResources(
string contentDir,
AssetPass pass,
IPackageLogger logger,
CancellationToken cancel)
{
var graph = new RobustClientAssetGraph();
pass.Dependencies.Add(new AssetPassDependency(graph.Output.Name));
AssetGraph.CalculateGraph(graph.AllPasses.Append(pass).ToArray(), logger);
var inputPass = graph.Input;
await RobustClientPackaging.WriteContentAssemblies(
inputPass,
contentDir,
"Content.Client",
new[] { "Content.Client", "Content.Shared" },
cancel);
await RobustClientPackaging.WriteClientResources(contentDir, inputPass, cancel);
inputPass.InjectFinished();
}
}