Merge eureka/aetheria-release-ships-addon-frame-r4: ships authoring tool and add-on frame

# Conflicts:
#	tests/Aetheria.Shared.Tests/ShipSchemaPinTests.cs
This commit is contained in:
Meta Vens 2026-10-10 19:54:03 +02:00
commit 54ac0fcfa7
16 changed files with 1897 additions and 163 deletions

View file

@ -431,6 +431,27 @@ public sealed class ShipModCatalogTests : IDisposable
Assert.Contains("records and model", output);
}
[Theory]
[InlineData("con"), InlineData("nul.x"), InlineData("abc.")]
public void CreateRefusesABadIdBeforeTouchingTheDisk(string id)
{
var target = Path.Combine(_directory.Path, "GameData", "Mods", id, "ship.cc");
// The display name is itself a valid ship ID, so a rule applied to it instead of the ID would not refuse.
var (code, output, error) = Run("create", target, id, "probe", "--like", "Djinni");
Assert.Equal(1, code);
Assert.Contains("Ship ID", error);
Assert.False(Directory.Exists(Path.Combine(_directory.Path, "GameData")));
}
[Fact]
public void CreateJudgesTheIdAndTakesAnyDisplayName()
{
var target = Path.Combine(_directory.Path, "GameData", "Mods", "probe.a", "ship.cc");
var (code, output, error) = Run("create", target, "probe.a", "Probe A");
Assert.Equal(0, code);
Assert.True(File.Exists(target), error);
}
private static (int Code, string Output, string Error) Run(params string[] args)
{
var (output, error) = (new StringWriter(), new StringWriter());