Joint-rider refusal names the assembly root among the roles that may ride a joint

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
soul 2026-12-01 01:16:11 +01:00
commit c537c480d3
2 changed files with 2 additions and 2 deletions

View file

@ -499,7 +499,7 @@ public static class ShipAuthoringStore
if (anchor.Role == "radiator-mesh")
throw new InvalidOperationException($"{ship.Id}: {anchor.Role} anchor {anchor.Id} may not ride a joint.");
if (!RigChains.Actuates(anchor.Role))
throw new InvalidOperationException($"{ship.Id}: {anchor.Role} anchor {anchor.Id} may not name a joint; only a weapon mount or a thruster emitter, or an assembly's root, rides one.");
throw new InvalidOperationException($"{ship.Id}: {anchor.Role} anchor {anchor.Id} may not name a joint; only a weapon mount, a thruster emitter or an assembly root rides one.");
if (!byId.ContainsKey(anchor.Joint))
throw new InvalidOperationException($"{ship.Id}: {anchor.Role} anchor {anchor.Id} names an unknown joint.");
}

View file

@ -175,7 +175,7 @@ public sealed class ShipRigTests : IDisposable
ship = Armed("j");
ship.Visual.Joints.Add(Joint("j", null, (Up, -180f, 180f)));
ship.Visual.Anchors.Single(anchor => anchor.Id == "g0.muzzle").Joint = "j";
Assert.Contains("only a weapon mount or a thruster emitter rides one", Refusal(ship));
Assert.Contains("only a weapon mount, a thruster emitter or an assembly root rides one", Refusal(ship));
var thruster = Thrusting((null, 90f, "ghost"));
Assert.Contains("thruster-emitter anchor t0 names an unknown joint", Refusal(thruster));