mirror of
https://github.com/space-wizards/RobustToolboxTemplate.git
synced 2026-02-10 16:24:49 -05:00
Opinionate the template, also some updates like the new build configs.
This commit is contained in:
parent
75a7ea8389
commit
4b84ff2033
16 changed files with 518 additions and 216 deletions
32
Content.Packaging/ContentPackaging.cs
Normal file
32
Content.Packaging/ContentPackaging.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue