Loadouts.BossOf: a faction's boss flies the Loadout on its boss hull's product (builds not yet checked)

BossOf keys on BossHullsOf(items, faction)[0] and Loadout.HullProduct, refuses typed (BossRefusal),
reads no Random, Prefab or Visual. ZoneGenerator builds the boss through Loadouts.Materialize with
ChooseProduct as the only generator member; Galaxy picks boss factions through BossOf. Loadout.cs
vocabulary: loadout, not preset or variant.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-18 18:25:42 +02:00
commit 5d624f9e6d
4 changed files with 69 additions and 24 deletions

View file

@ -397,17 +397,28 @@ public static class ZoneGenerator
}
// A boss zone gets its faction's boss whether or not the zone is ambient: the boss is the run's goal, not
// wandering traffic. RunGoal reads the mark; nothing else decides whether a boss lives.
// wandering traffic. A boss flies its faction's fixed Loadout, never generated gear (ruling boss-gear-is-a-loadout);
// ChooseProduct only picks the brand of a design-only slot. RunGoal reads the mark; nothing else decides whether a
// boss lives.
foreach (var bossFaction in galaxy.BossZones.Where(entry => entry.Value == galaxyZone).Select(entry => entry.Key))
{
var boss = GetLoadoutGenerator(bossFaction).GenerateBossLoadout();
if (boss == null)
var loadout = Loadouts.BossOf(itemManager.ItemData, bossFaction, out var refusal);
if (loadout == null)
{
itemManager.Log($"No boss could be generated for {bossFaction.Name}; its boss zone has no boss to kill!");
itemManager.Log($"{bossFaction.Name} has no boss: it {Loadouts.Describe(refusal)}.");
continue;
}
boss.Boss = true;
pack.Entities.Add(boss);
var failures = new List<string>();
var boss = Loadouts.Materialize(itemManager, null, loadout, GetLoadoutGenerator(bossFaction).ChooseProduct, failures);
if (boss == null)
{
itemManager.Log($"{bossFaction.Name}'s boss Loadout {loadout.Name} cannot be built: {string.Join("; ", failures)}");
continue;
}
boss.Faction = bossFaction;
var bossPack = EntitySerializer.Pack(boss);
bossPack.Boss = true;
pack.Entities.Add(bossPack);
pack.BossSpawned = true;
}