DemoTerminus stages Zenith's hauler: ZoneStage.Hauler places a piloted ship of Zenith's faction carrying the standing order

Deletes the 'nothing hauls it yet' comment.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
soul 2026-11-28 14:23:47 +01:00
commit e4332d3a49
2 changed files with 12 additions and 1 deletions

View file

@ -136,6 +136,16 @@ public class ZoneStage
return entity;
}
// A piloted ship that carries a standing haul order (ruling demo-zenith-ore-depot): its task is derived from the order at
// admission (HaulRun.TaskOf), so the order must exist by then; ScenarioStage writes its orders before it admits. A fit that is not
// a ship is Place's failure.
public Ship Hauler(ScenarioFit fit, string orderId, float2 at)
{
var ship = Place(fit, at, piloted: true) as Ship;
if (ship != null) ship.Haul = new CultRecordRef<HaulOrderData>(HaulOrderData.KeyOf(orderId));
return ship;
}
// The task a piloted entity starts on: it closes on the target and holds there (the flight's follow task, standoff
// nothing), in place of the patrol circuit the zone would draw for it. The pilot starts knowing it (RunStart seeds a sensor track). A check that rests on where a pilot goes states
// it here, so the pilot's course is the scenario's and not a draw. An entity that is not placed and piloted, or a

View file

@ -53,7 +53,7 @@ public sealed class DemoTerminus : Scenario
stage.Player(stage.Generated("Longinus"), float2.zero);
// Zenith's silo buys the ores the refinery's gear draws (ruling demo-zenith-ore-depot), by a standing order to the
// refinery; nothing hauls it yet (follow-up ore-haul-run).
// refinery, and a hauler of Zenith's faction carries it (ore-haul-run).
var zenith = stage.Station("trade-hub");
var refinery = stage.Station("processing");
if (refinery == null) return;
@ -61,5 +61,6 @@ public sealed class DemoTerminus : Scenario
var ores = StationWants.Of(refinery).Where(good => FieldKinds.IsOre(items.ItemData, items.ItemData.Get(new CultRecordRef<ItemData>(good))))
.OrderBy(good => good.Value, System.StringComparer.Ordinal).Select(good => new CultRecordRef<ItemData>(good));
stage.HaulOrder("demo-terminus-ore", zenith, refinery, ores, "scenario:demo-terminus");
stage.Hauler(stage.Generated(null, zenith.Faction), "demo-terminus-ore", stage.Arena.GetOrbitPosition(zenith.OrbitData));
}
}