Scenarios: the Arcs turret and the Pursuit player carry the crates their guns reload from

Arcs' hostile turret fits two 100-round Light Machine Guns and had no hold, so it fell silent after one magazine; it now fits a bay and carries 30
crates of Ammo (about 8 minutes of both guns firing without pause). Pursuit's authored cargo had no Mines, capping the player at one magazine of six;
it now carries 10 crates (sixty-six mines). ScenarioStage.Cargo admits a commodity name as one unit, so authored cargo can state crates.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Nibu 2026-11-11 04:44:31 +00:00
commit bd3563dee3
4 changed files with 87 additions and 4 deletions

View file

@ -168,7 +168,8 @@ public sealed class ScenarioStage
}
// Items in the entity's first cargo bay, one per name. A name is an equippable or consumable design (open: the stage
// chooses its product) or a product of one (pinned); a name that is neither is a failure.
// chooses its product) or a product of one (pinned), or a commodity (one unit: the crates an AmmoType weapon reloads
// from); a name that is none of these is a failure.
public void Cargo(Entity entity, params string[] names)
{
if (entity == null) return;
@ -177,6 +178,13 @@ public sealed class ScenarioStage
var bay = entity.CargoBays.FirstOrDefault();
foreach (var name in names)
{
var commodity = _items.ItemData.GetAll<SimpleCommodityData>().FirstOrDefault(data => data.Name == name);
if (commodity != null)
{
if (bay == null || !bay.TryStore(new SimpleCommodity { Data = new CultRecordRef<ItemData>(_items.ItemData.RefOf<ItemData>(commodity).Key), Quantity = 1 }))
_failures.Add($"{where}: no room for {name}");
continue;
}
var (data, product) = NamedOrProduct<CraftedItemData>(name, where, found => found is EquippableItemData || found is ConsumableItemData);
if (data == null) continue;
var build = Loadouts.Resolve(_items, _items.ItemData.RefOf(data),

View file

@ -1,3 +1,4 @@
using System.Linq;
using static CultMath.math;
using static ItemRotation;
@ -20,6 +21,8 @@ public sealed class Arcs : Scenario
public static readonly CultMath.float2 Bow = float2(0, 400), Stern = float2(0, -400), Turret = float2(600, 300),
Port = float2(-400, 0), Starboard = float2(400, 0);
public const int TurretAmmoCrates = 30;
public override Galaxy Generate(GalaxyStage stage) => stage.Prelude();
public override void Stage(ScenarioStage stage)
@ -49,12 +52,14 @@ public sealed class Arcs : Scenario
("Compact Reactor", int2(3, 3), None),
("Turret Control Module", int2(3, 5), None),
("not if i see you first", int2(4, 5), None), // Compact Sensor
("Panopticon Prime", int2(3, 6), None)); // Fire Control Array
("Panopticon Prime", int2(3, 6), None), // Fire Control Array
("Store-All Plus", int2(3, 1), None)); // Cargo Bay: the only 2x2 the turret hull has free
stage.Player(fighter, float2(0, 0), facing: float2(0, 1));
stage.Place(stage.Bare("Longinus"), Bow);
stage.Place(stage.Bare("Longinus"), Stern);
stage.Place(turret, Turret, stance: ScenarioStance.Hostile);
// The turret's guns reload from its hold, a crate of Ammo per 100-round magazine: both guns firing without pause spend about 3.5 crates a minute, so 30 outlast any session.
stage.Cargo(stage.Place(turret, Turret, stance: ScenarioStance.Hostile), Enumerable.Repeat("Ammo", TurretAmmoCrates).ToArray());
stage.Place(stage.Bare("Longinus"), Port);
stage.Place(stage.Bare("Longinus"), Starboard);
}

View file

@ -1,3 +1,4 @@
using System.Linq;
using static CultMath.math;
using static ItemRotation;
@ -7,6 +8,7 @@ public sealed class Pursuit : Scenario
// cloud breaking a sensor's lock, and well outside the 40 at which AStrongCloseSensorBurnsThrough shows a close
// sensor burning through.
private const float Astern = 300;
public const int MineCrates = 10;
public override string Name => "Pursuit";
public override string Id => "pursuit";
@ -55,7 +57,8 @@ public sealed class Pursuit : Scenario
("Store-All Plus", int2(2, 8), None)); // Cargo Bay
var player = stage.Player(layer, float2(0, 0), facing: float2(0, 1));
stage.Cargo(player, "Morning Fog", "Morning Fog", "Morning Fog", "send it", "send it");
// The Mine Launcher reloads a magazine of six from a crate of Mines: ten crates are sixty-six mines, minutes of laying at its cooldown, more than a chase lasts.
stage.Cargo(player, new[] { "Morning Fog", "Morning Fog", "Morning Fog", "send it", "send it" }.Concat(Enumerable.Repeat("Mines", MineCrates)).ToArray());
stage.Place(pursuer, float2(0, -Astern), facing: float2(0, 1), stance: ScenarioStance.Hostile, piloted: true);
}
}