Faction.BossLoadout (key 22): the boss is its faction's Loadout, resolved by Loadouts.BossOf and built by Materialize
BossOf refuses typed (BossRefusal Unset or Missing, Describe names the field and echoes no input). ZoneGenerator builds the boss from the Loadout with ChooseProduct as the chooser; a refused or unbuildable boss logs and spawns none. Galaxy picks boss factions through BossOf; AetherDb factions prints the boss Loadout. Loadout vocabulary: no preset, no variant. Production builds; the tests project does not until the next commit (RunGoalTests still sets BossHull). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
900fa51e43
commit
352e221453
7 changed files with 78 additions and 33 deletions
|
|
@ -583,7 +583,7 @@ public static class Program
|
|||
|
||||
// Every CultRecordRef in the catalog that resolves to nothing, as "<record> <DeclaringType.Member> -> <key>".
|
||||
// Each "clear <DeclaringType.Member>" argument unsets that member's dangling refs, or removes that dictionary's
|
||||
// dangling keys (Faction.BossHull clears boss hulls that would claim a chokepoint no boss can spawn in). Dry
|
||||
// dangling keys (a faction's BossLoadout member clears boss references that name no Loadout). Dry
|
||||
// run unless passed "apply", which alone opens the catalog writable and lands every changed record in one commit.
|
||||
private static int Dangling(string[] args)
|
||||
{
|
||||
|
|
@ -701,15 +701,14 @@ public static class Program
|
|||
{
|
||||
var db = AetherDb.Open();
|
||||
var products = db.Cache.GetAll<FactionProductData>().ToArray();
|
||||
Console.WriteLine($"{"faction",-26} {"short",-13} {"places",-22} {"boss hull",-14} {"influence",-9} {"doctrine",-10} products");
|
||||
Console.WriteLine($"{"faction",-26} {"short",-13} {"places",-22} {"boss loadout",-14} {"influence",-9} {"doctrine",-10} products");
|
||||
var broken = 0;
|
||||
foreach (var faction in db.Cache.GetAll<Faction>().OrderBy(f => f.Name))
|
||||
{
|
||||
var key = db.Cache.RefOf(faction).Key;
|
||||
var boss = !faction.BossHull.IsSet()
|
||||
? "none"
|
||||
: db.Cache.Get(faction.BossHull)?.Name ?? "DANGLING";
|
||||
if (boss == "DANGLING") broken++;
|
||||
var loadout = Loadouts.BossOf(db.Cache, faction, out var refusal);
|
||||
var boss = refusal == BossRefusal.Unset ? "none" : loadout?.Name ?? "MISSING";
|
||||
if (refusal == BossRefusal.Missing) broken++;
|
||||
Console.WriteLine($"{faction.Name,-26} {faction.ShortName,-13} {faction.Places.Length,-22} {boss,-14} {faction.InfluenceDistance,-9} {(faction.Doctrine == null ? "none" : faction.Doctrine.EngageOn.ToString()),-10} " +
|
||||
products.Count(p => p.Manufacturer.Key.Equals(key)));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue