Demo pressure curve: Galaxy.Antagonist scopes and sources the raids

Galaxy.Antagonist (set by PlaceGate, saved as SavedGame key 18) is the faction
whose gate the galaxy has. ZoneGenerator raids a galaxy that has one by
DemoPressure's curve, one depth formula e / (e + x) with no clamp, and keeps the
nearest faction's patrol for a galaxy that has none. Inside grace the
antagonist's stations and turrets pass to the nearest other faction, and the
antagonist is no wanderer. LoadoutGenerator.OfferedShipHulls feeds the price
ceiling. Cut demo-pressure-curve.r2.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
soul 2026-11-22 21:50:23 +01:00
commit 0cac368bc2
6 changed files with 138 additions and 12 deletions

View file

@ -64,6 +64,11 @@ public class LoadoutGenerator
return EntitySerializer.Pack(entity);
}
// The ship hulls this faction's generator can draw (its products, with the any-manufacturer fallback a required hull has).
public HullData[] OfferedShipHulls() =>
AvailableProducts<HullData>(hull => hull.HullType == HullType.Ship, required: true).available
.Select(entry => entry.design).Distinct().ToArray();
public OrbitalEntityPack GenerateTurretLoadout()
{
var (hullProduct, hullData) = RandomHull(HullType.Turret);