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:
parent
4ffb274d9c
commit
c537c480d3
2 changed files with 2 additions and 2 deletions
|
|
@ -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.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in a new issue