Generate stations that respect empty hardpoints and required items
UnoccupiedSpace now counts empty hardpoint cells as free, matching ItemFits: general gear may use a hardpoint until hardpoint gear claims it. LoadoutGenerator equips hardpoint gear before the docking bay, so the bay cannot take the reactor's slot. Hulls, docking bays, controllers, cargo bays and capacitors are required: if no manufacturer present in the galaxy and known to the faction makes one, any manufacturer is used and the database gap is logged, so a galaxy without AU still gets stations. Manufacturer preference is allegiance / (1 + hops to headquarters); the distance term previously never applied due to operator precedence, and would have divided by zero in the headquarters zone. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
97a9e7a598
commit
25ecb46fcd
2 changed files with 71 additions and 32 deletions
|
|
@ -420,7 +420,8 @@ public abstract class Entity
|
|||
var emptyShape = new Shape(HullData.Shape.Width, HullData.Shape.Height);
|
||||
foreach (var v in HullData.Shape.Coordinates)
|
||||
{
|
||||
if (HullData.InteriorCells[v] && GearOccupancy[v.x, v.y] == null && Hardpoints[v.x,v.y] == null)
|
||||
// Empty hardpoint cells count as free: general gear may use them until hardpoint gear claims them
|
||||
if (HullData.InteriorCells[v] && GearOccupancy[v.x, v.y] == null)
|
||||
emptyShape[v] = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue