Ore batch apply, code: OresAndProvinces replaces DemoOre; MunitionsFeed keeps references to the batch's four recipes; L-weights shape rule (aetheria-living-world, cut ore-batch-apply r3)
OresAndProvinces (from 371b4d04a) is the one writer of ores, their extraction recipes, the first smelting step, field kinds, province types and the mining station text. Ore() and Rename() set a Shape. DemoOre, DemoOreSheetTests (two tests moved to OresAndProvincesTests), Program.cs FieldKindsCatalog and MunitionsFeed's Make(CultRecordKey) and four Make calls are deleted. StationKindDescriptionTests asks Recipes.IsRaw. EconomyChecks.Weights (L-weights) refuses negative or non-finite weights and dangling yield, kind and ore refs. The catalog apply is the next commit.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d1ff2f78e8
commit
bf0d1ed249
14 changed files with 924 additions and 253 deletions
5
.changeset/ore-batch-rescale.md
Normal file
5
.changeset/ore-batch-rescale.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
default: patch
|
||||
---
|
||||
|
||||
Belts hold named ores by body class and province, mining stations name them, and gear, hull and consumable prices and the starting purse are a hundredth of what they were.
|
||||
|
|
@ -56,13 +56,14 @@ public sealed class EconomyReport
|
|||
// The one owner of the catalog's economy invariants. Pure: draws nothing, reads no clock, writes nothing. One method per rule.
|
||||
public static class EconomyChecks
|
||||
{
|
||||
public const string LRecipe = "L-recipe", LOneKindList = "L-one-kind-list", LLore = "L-lore", LSource = "L-source-sink", LProductive = "L-productive", LDemand = "L-consumer-demand";
|
||||
public const string LRecipe = "L-recipe", LOneKindList = "L-one-kind-list", LLore = "L-lore", LSource = "L-source-sink", LProductive = "L-productive", LDemand = "L-consumer-demand", LWeights = "L-weights";
|
||||
private const double Margin = 1e-9;
|
||||
|
||||
public static EconomyReport Check(CultCache catalog, EconomyLoad load = null)
|
||||
{
|
||||
var faults = new List<EconomyFault>();
|
||||
faults.AddRange(Recipe(catalog));
|
||||
faults.AddRange(Weights(catalog));
|
||||
faults.AddRange(Lore(catalog));
|
||||
faults.AddRange(SourceSink(catalog));
|
||||
faults.AddRange(Productive(catalog, load));
|
||||
|
|
@ -113,6 +114,48 @@ public static class EconomyChecks
|
|||
private static IEnumerable<ItemData> Commodities(CultCache catalog) =>
|
||||
catalog.GetAll<ItemData>().Where(Recipes.IsCommodity).OrderBy(item => catalog.RefOf(item).Key.Value, StringComparer.Ordinal);
|
||||
|
||||
// Ore geography is weighted draws: a field kind's generation weight and abundances, a province's card count and its kind and ore
|
||||
// weights are finite and not negative, and every yield, kind weight and province ore names a record this catalog holds. A weight of
|
||||
// zero is legal (never drawn); a negative or NaN weight corrupts the weighted pick.
|
||||
public static List<EconomyFault> Weights(CultCache catalog)
|
||||
{
|
||||
var faults = new List<EconomyFault>();
|
||||
void Weight(string record, string field, double value)
|
||||
{
|
||||
if (!double.IsFinite(value) || value < 0) faults.Add(new EconomyFault(LWeights, record, $"{field} is {value}, not a finite number from zero up."));
|
||||
}
|
||||
void Names<T>(string record, string field, CultRecordRef<T> reference) where T : class
|
||||
{
|
||||
if (catalog.Get(reference) == null) faults.Add(new EconomyFault(LWeights, record, $"{field} names no record this catalog holds."));
|
||||
}
|
||||
foreach (var kind in catalog.GetAll<FieldKindData>().OrderBy(k => catalog.RefOf(k).Key.Value, StringComparer.Ordinal))
|
||||
{
|
||||
var key = catalog.RefOf(kind).Key.Value;
|
||||
Weight(key, "GenerationWeight", kind.GenerationWeight);
|
||||
for (var i = 0; i < (kind.Yields?.Count ?? 0); i++)
|
||||
{
|
||||
Weight(key, $"Yields[{i}].Abundance", kind.Yields[i].Abundance);
|
||||
Names(key, $"Yields[{i}].Commodity", kind.Yields[i].Commodity);
|
||||
}
|
||||
}
|
||||
foreach (var province in catalog.GetAll<ProvinceData>().OrderBy(p => catalog.RefOf(p).Key.Value, StringComparer.Ordinal))
|
||||
{
|
||||
var key = catalog.RefOf(province).Key.Value;
|
||||
Weight(key, "GenerationWeight", province.GenerationWeight);
|
||||
for (var i = 0; i < (province.Kinds?.Count ?? 0); i++)
|
||||
{
|
||||
Weight(key, $"Kinds[{i}].Weight", province.Kinds[i].Weight);
|
||||
Names(key, $"Kinds[{i}].Kind", province.Kinds[i].Kind);
|
||||
}
|
||||
for (var i = 0; i < (province.Ores?.Count ?? 0); i++)
|
||||
{
|
||||
Weight(key, $"Ores[{i}].Weight", province.Ores[i].Weight);
|
||||
Names(key, $"Ores[{i}].Commodity", province.Ores[i].Commodity);
|
||||
}
|
||||
}
|
||||
return faults;
|
||||
}
|
||||
|
||||
// Every commodity and every offered design (but a Station or Turret hull) has a recipe, and each recipe is well formed.
|
||||
public static List<EconomyFault> Recipe(CultCache catalog)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ using CultMath;
|
|||
using UniRx;
|
||||
using Xunit;
|
||||
|
||||
// The demo loop on the shipped catalog (aetheria-release, mining 5a and the ore sheet): the player's own gun breaks a rock
|
||||
// The demo loop on the shipped catalog (aetheria-release, mining 5a): the player's own gun breaks a rock
|
||||
// through the trigger, the ore lands in the hold, the Pirates station Zenith buys it, repairs the hull and sells a unit back.
|
||||
public sealed partial class RunStartTests
|
||||
{
|
||||
|
|
@ -45,7 +45,7 @@ public sealed partial class RunStartTests
|
|||
var info = player.ChunkInfo(rock);
|
||||
Assert.False(arena.ChunkExists(rock), $"the laser broke the rock: designated {FireControl.Designated(laser, player, rock, out var range)} range {range} info {info} target {player.Target} pos {player.Position} rockpos {arena.ChunkPose(rock.Field, rock.Index)} hp {arena.Settings.AsteroidHitpoints.Evaluate(arena.AsteroidBelts[rock.Field].Data.Asteroids[0].Size)}");
|
||||
|
||||
var ores = new[] { "Regolith", "Nickel-Iron", "Gold" };
|
||||
var ores = FieldKinds.Yield(((AsteroidBeltData) belt.Value).Kind, default, _cache).Select(yield => _cache.Get(yield.Commodity).Name).ToArray();
|
||||
var held = player.CargoBays.SelectMany(bay => bay.Cargo.Keys.OfType<SimpleCommodity>().Select(stack => (bay, stack)))
|
||||
.Where(h => ores.Contains(_items.GetData(h.stack).Name)).ToArray();
|
||||
Assert.NotEmpty(held);
|
||||
|
|
|
|||
|
|
@ -1,131 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using CultMath;
|
||||
using GameCult.Caching;
|
||||
using Xunit;
|
||||
|
||||
// The interim ore sheet (rulings mining-demo-ore-minimal-yields-now, mining-demo-ore-prices-gear-scale): what the shipped catalog's
|
||||
// Asteroid belt holds can be carried and sold, so mine, sell, repair closes on the existing stations.
|
||||
public sealed class DemoOreSheetTests : IDisposable
|
||||
{
|
||||
private static readonly string[] Ores = { "Regolith", "Nickel-Iron", "Gold" };
|
||||
private readonly string _root = Path.Combine(Path.GetTempPath(), "aetheria-demoore-" + Guid.NewGuid().ToString("N"));
|
||||
|
||||
public DemoOreSheetTests() => Directory.CreateDirectory(_root);
|
||||
public void Dispose() => Directory.Delete(_root, true);
|
||||
|
||||
private CultCache Shipped()
|
||||
{
|
||||
var path = Path.Combine(_root, "Aetheria.cc");
|
||||
File.Copy(TestCatalog.Repo, path, true);
|
||||
return AetheriaStores.Open(path, catalogWritable: true, registry: TestCatalog.Registry());
|
||||
}
|
||||
|
||||
private static CultRecordRef<FieldKindData> Asteroid(CultCache cache) =>
|
||||
cache.RefOf(cache.GetAll<FieldKindData>().Single(k => k.Name == "Asteroid"));
|
||||
|
||||
[Fact]
|
||||
public void AsteroidYieldsThreeOresInKeyOrder()
|
||||
{
|
||||
using var cache = Shipped();
|
||||
var yield = FieldKinds.Yield(Asteroid(cache), default, cache);
|
||||
var amounts = yield.ToDictionary(y => cache.Get(y.Commodity).Name, y => y.Amount);
|
||||
Assert.Equal(Ores.OrderBy(n => n).ToArray(), amounts.Keys.OrderBy(n => n).ToArray());
|
||||
Assert.Equal(5f, amounts["Regolith"]);
|
||||
Assert.Equal(4f, amounts["Nickel-Iron"]);
|
||||
Assert.Equal(1f, amounts["Gold"]);
|
||||
Assert.Equal(yield.Select(y => y.Commodity.Key.Value).OrderBy(k => k, StringComparer.Ordinal), yield.Select(y => y.Commodity.Key.Value));
|
||||
}
|
||||
|
||||
// Ruling regolith-demo-retune: Regolith sells for 1, and the yield shifts so a full hold is worth about what it was with Rock at 200.
|
||||
// Each unit is drawn by abundance weight, and a hold cell takes MaxStack units, so a cell's value is sum(w x price) / sum(w / MaxStack).
|
||||
[Fact]
|
||||
public void AFullHoldSellsForAboutWhatItDidBeforeRegolith()
|
||||
{
|
||||
using var cache = Shipped();
|
||||
var yields = cache.GetAll<FieldKindData>().Single(k => k.Name == "Asteroid").Yields
|
||||
.Select(y => (data: cache.Get(y.Commodity), weight: y.Abundance)).ToArray();
|
||||
double Cell(IEnumerable<(double weight, double price, double stack)> ores) =>
|
||||
ores.Sum(o => o.weight * o.price) / ores.Sum(o => o.weight / o.stack);
|
||||
|
||||
Assert.Equal(1, yields.Single(y => y.data.Name == "Regolith").data.Price);
|
||||
var now = Cell(yields.Select(y => ((double) y.weight, (double) y.data.Price, (double) y.data.MaxStack)));
|
||||
var oldPrice = new Dictionary<string, (double weight, double price)> { ["Regolith"] = (6, 200), ["Nickel-Iron"] = (3, 1000), ["Gold"] = (1, 5000) };
|
||||
var before = Cell(yields.Select(y => (oldPrice[y.data.Name].weight, oldPrice[y.data.Name].price, (double) y.data.MaxStack)));
|
||||
// Bounds (deterministic-bound-margin, by analogy from RenderCheck): the midpoint between the shipped reading and the least claimed mutant on each
|
||||
// side. Shipped 9005 against before 9200 (0.9788). Low side: the old 6/3/1 yields left at price 1 read 8006 (0.8702), so the edge is 8505.5
|
||||
// (0.9245); it also kills Gold 4500 (8505) but not Nickel-Iron 900 (8605) or 5/3/1 (8894). High side: 4/5/1 yields read 10004 (1.0874),
|
||||
// so the edge is 9504.5 (1.033). Neither side reaches the 1.2 separation the ruling asks (1.125 low, 1.111 high): a hold value that is meant to
|
||||
// be 'about' the old one cannot pin the sheet tighter than this. The exact yields are pinned by AsteroidYieldsThreeOresInKeyOrder, and the
|
||||
// price of Regolith by the assertion above.
|
||||
Assert.InRange(now, 8505.5, 9504.5);
|
||||
Assert.Equal(9200, before, 6);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EveryYieldedOreCanBeHeldAndSold()
|
||||
{
|
||||
using var cache = Shipped();
|
||||
var shape = new Shape(5, 5);
|
||||
foreach (var cell in shape.AllCoordinates) shape[cell] = true;
|
||||
var bay = new Shape(4, 4);
|
||||
foreach (var cell in bay.AllCoordinates) bay[cell] = true;
|
||||
cache.Upsert(new VerseGrammar { Revision = 1 });
|
||||
cache.Upsert(new HullData { Name = "OreSkiff", HullType = HullType.Ship, Shape = shape, Price = 1000, Durability = 10, Armor = 10 });
|
||||
cache.Upsert(new CargoBayData { Name = "OreBay", Shape = new Shape(), InteriorShape = bay, Price = 20, Durability = 4 });
|
||||
cache.FlushAsync().GetAwaiter().GetResult();
|
||||
var items = new ItemManager(1u, cache, new ProvenanceLedger(), AuthoredSettings.Load(RestoredHullsTests.FindRepoRoot()).Read<GameplaySettings>("GameplaySettings"), _ => { });
|
||||
var zone = new Zone(items, new PlanetSettings(), new ZonePack(), new GalaxyZone { Name = "Test Zone", Owner = null }, null);
|
||||
EquippableItem Mint(string design)
|
||||
{
|
||||
var data = cache.GetByName<EquippableItemData>(design);
|
||||
return new EquippableItem
|
||||
{
|
||||
Data = cache.RefOf<ItemData>(data), Durability = data.Durability,
|
||||
Lot = items.Lots.Add(new Lot { Design = cache.RefOf<ItemData>(data), Origin = new Attributed(), Quality = .5f, Roles = new List<RoleFill>() })
|
||||
};
|
||||
}
|
||||
var ship = new Ship(items, zone, Mint("OreSkiff"), new EntitySettings());
|
||||
Assert.True(ship.TryEquip(Mint("OreBay"), new int2(1, 1)));
|
||||
|
||||
foreach (var (commodity, _) in FieldKinds.Yield(Asteroid(cache), default, cache))
|
||||
{
|
||||
var data = cache.Get(commodity);
|
||||
Assert.NotNull(data.Shape);
|
||||
Assert.True(data.Price > 0, data.Name);
|
||||
Assert.True(data.Mass > 0, data.Name);
|
||||
Assert.True(ship.CargoBays.Single().TryStore(new SimpleCommodity { Data = cache.RefOf<ItemData>(data), Quantity = 1 }), data.Name);
|
||||
}
|
||||
}
|
||||
|
||||
// MunitionsFeed names its outputs by name, except the two ores this sheet renames, which it finds by DemoOre's keys: a name lookup refused at head
|
||||
// ("0 items are named 'Rock'"). A dry run at the shipped catalog succeeds and changes nothing.
|
||||
[Fact]
|
||||
public void MunitionsFeedDryRunSucceedsAtHeadAndChangesNothing()
|
||||
{
|
||||
var path = Path.Combine(_root, "Feed.cc");
|
||||
File.Copy(Path.Combine(RestoredHullsTests.FindRepoRoot(), "GameData", "Aetheria.cc"), path);
|
||||
var before = File.ReadAllBytes(path);
|
||||
var output = new StringWriter();
|
||||
Assert.Equal(0, EconomyCommand.Author(path, new List<EconomyBatch> { new MunitionsFeed() }, false, output, TestCatalog.Registry(), _root));
|
||||
Assert.Equal(before, File.ReadAllBytes(path));
|
||||
Assert.DoesNotContain("are named", output.ToString());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TheSheetConverges()
|
||||
{
|
||||
var path = Path.Combine(_root, "Converge.cc");
|
||||
File.Copy(Path.Combine(RestoredHullsTests.FindRepoRoot(), "GameData", "Aetheria.cc"), path);
|
||||
var before = File.ReadAllBytes(path);
|
||||
var output = new StringWriter();
|
||||
Assert.Equal(0, EconomyCommand.Author(path, new List<EconomyBatch> { new DemoOre() }, true, output, TestCatalog.Registry(), _root));
|
||||
Assert.Equal(before, File.ReadAllBytes(path));
|
||||
|
||||
using var cache = AetheriaStores.Open(path, registry: TestCatalog.Registry());
|
||||
var ids = cache.GetAll<FieldKindData>().Single(k => k.Name == "Asteroid").Yields.Select(y => y.Id).ToArray();
|
||||
Assert.Equal(new[] { "a57e0c000001", "a57e0c000002", "a57e0c000003" }, ids);
|
||||
}
|
||||
}
|
||||
|
|
@ -86,6 +86,83 @@ public sealed class EconomyChecksTests
|
|||
if (invariant == EconomyChecks.LOneKindList) Assert.DoesNotContain(faults, x => x.Invariant == EconomyChecks.LRecipe);
|
||||
}
|
||||
|
||||
private static readonly CultRecordKey StonyKey = new CultRecordKey("field-kind:stony");
|
||||
private static readonly CultRecordKey PlainKey = new CultRecordKey("province:plain");
|
||||
|
||||
// The Healthy catalog with one field kind yielding the ore and one province that draws the kind and the ore.
|
||||
private static EconomyFixture WithGround()
|
||||
{
|
||||
var f = EconomyFixture.Healthy();
|
||||
var ore = new CultRecordRef<SimpleCommodityData>(new CultRecordKey(Ore));
|
||||
f.Cache.Upsert(typeof(FieldKindData), new FieldKindData
|
||||
{
|
||||
Name = "Stony", CrossSection = 5, GenerationWeight = 1,
|
||||
Yields = new List<FieldYield> { new FieldYield { Commodity = ore, Abundance = 2 } }
|
||||
}, StonyKey);
|
||||
f.Cache.Upsert(typeof(ProvinceData), new ProvinceData
|
||||
{
|
||||
Name = "Plain", GenerationWeight = 1,
|
||||
Kinds = new List<ProvinceKindWeight> { new ProvinceKindWeight { Kind = new CultRecordRef<FieldKindData>(StonyKey), Weight = 1 } },
|
||||
Ores = new List<ProvinceOre> { new ProvinceOre { Commodity = ore, Weight = 1 } }
|
||||
}, PlainKey);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static void EditKind(EconomyFixture f, Action<FieldKindData> edit)
|
||||
{
|
||||
var kind = f.Cache.Get<FieldKindData>(StonyKey);
|
||||
edit(kind);
|
||||
f.Cache.Upsert(typeof(FieldKindData), kind, StonyKey);
|
||||
}
|
||||
|
||||
private static void EditProvince(EconomyFixture f, Action<ProvinceData> edit)
|
||||
{
|
||||
var province = f.Cache.Get<ProvinceData>(PlainKey);
|
||||
edit(province);
|
||||
f.Cache.Upsert(typeof(ProvinceData), province, PlainKey);
|
||||
}
|
||||
|
||||
public static IEnumerable<object[]> BadWeights()
|
||||
{
|
||||
object[] Case(string name, Action<EconomyFixture> mutate, string record, string says) => new object[] { name, mutate, record, says };
|
||||
var ghost = new CultRecordKey("commodity:ghost");
|
||||
yield return Case("negative kind weight", f => EditKind(f, k => k.GenerationWeight = -1), StonyKey.Value, "GenerationWeight");
|
||||
yield return Case("NaN kind weight", f => EditKind(f, k => k.GenerationWeight = float.NaN), StonyKey.Value, "GenerationWeight");
|
||||
yield return Case("infinite kind weight", f => EditKind(f, k => k.GenerationWeight = float.PositiveInfinity), StonyKey.Value, "GenerationWeight");
|
||||
yield return Case("negative abundance", f => EditKind(f, k => k.Yields[0].Abundance = -0.5f), StonyKey.Value, "Yields[0].Abundance");
|
||||
yield return Case("a yield naming nothing", f => EditKind(f, k => k.Yields.Add(new FieldYield { Commodity = new CultRecordRef<SimpleCommodityData>(ghost), Abundance = 1 })), StonyKey.Value, "Yields[1].Commodity");
|
||||
yield return Case("an unset yield", f => EditKind(f, k => k.Yields.Add(new FieldYield { Abundance = 1 })), StonyKey.Value, "Yields[1].Commodity");
|
||||
yield return Case("negative province cards", f => EditProvince(f, p => p.GenerationWeight = -1), PlainKey.Value, "GenerationWeight");
|
||||
yield return Case("negative kind factor", f => EditProvince(f, p => p.Kinds[0].Weight = -1), PlainKey.Value, "Kinds[0].Weight");
|
||||
yield return Case("a province kind naming nothing", f => EditProvince(f, p => p.Kinds.Add(new ProvinceKindWeight { Kind = new CultRecordRef<FieldKindData>(new CultRecordKey("field-kind:ghost")), Weight = 1 })), PlainKey.Value, "Kinds[1].Kind");
|
||||
yield return Case("negative ore factor", f => EditProvince(f, p => p.Ores[0].Weight = -1), PlainKey.Value, "Ores[0].Weight");
|
||||
yield return Case("a province ore naming nothing", f => EditProvince(f, p => p.Ores.Add(new ProvinceOre { Commodity = new CultRecordRef<SimpleCommodityData>(ghost), Weight = 1 })), PlainKey.Value, "Ores[1].Commodity");
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(BadWeights))]
|
||||
public void WeightsRefuseBadGround(string name, Action<EconomyFixture> mutate, string record, string says)
|
||||
{
|
||||
using var f = WithGround();
|
||||
Assert.Empty(EconomyChecks.Weights(f.Cache));
|
||||
mutate(f);
|
||||
var faults = EconomyChecks.Weights(f.Cache);
|
||||
var matched = faults.Where(x => x.Invariant == EconomyChecks.LWeights && x.Record == record && x.Message.Contains(says)).ToArray();
|
||||
Assert.True(matched.Length > 0, name + ": " + string.Join(" | ", faults));
|
||||
// The rule is part of Check, and EconomyCommand refuses on it.
|
||||
Assert.Contains(EconomyChecks.Check(f.Cache).Faults, x => x.Invariant == EconomyChecks.LWeights && x.Record == record);
|
||||
}
|
||||
|
||||
// A zero weight is a legal 'never drawn', not a fault.
|
||||
[Fact]
|
||||
public void WeightsAllowZero()
|
||||
{
|
||||
using var f = WithGround();
|
||||
EditKind(f, k => { k.GenerationWeight = 0; k.Yields[0].Abundance = 0; });
|
||||
EditProvince(f, p => { p.GenerationWeight = 0; p.Kinds[0].Weight = 0; p.Ores[0].Weight = 0; });
|
||||
Assert.Empty(EconomyChecks.Weights(f.Cache));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RecipeRefusesARecipeUnderTheWrongKey()
|
||||
{
|
||||
|
|
|
|||
115
tests/Aetheria.Shared.Tests/OresAndProvincesTests.cs
Normal file
115
tests/Aetheria.Shared.Tests/OresAndProvincesTests.cs
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using CultMath;
|
||||
using GameCult.Caching;
|
||||
using Xunit;
|
||||
|
||||
// Batch OresAndProvinces on the shipped catalog (aetheria-living-world, cut ore-batch-apply): every ore a belt can yield is held,
|
||||
// priced and sold, and MunitionsFeed leaves the recipes the batch owns.
|
||||
public sealed class OresAndProvincesTests : IDisposable
|
||||
{
|
||||
private readonly string _root = Path.Combine(Path.GetTempPath(), "aetheria-ores-" + Guid.NewGuid().ToString("N"));
|
||||
|
||||
public OresAndProvincesTests() => Directory.CreateDirectory(_root);
|
||||
public void Dispose() => Directory.Delete(_root, true);
|
||||
|
||||
private CultCache Shipped()
|
||||
{
|
||||
var path = Path.Combine(_root, "Aetheria.cc");
|
||||
File.Copy(TestCatalog.Repo, path, true);
|
||||
return AetheriaStores.Open(path, catalogWritable: true, registry: TestCatalog.Registry());
|
||||
}
|
||||
|
||||
// Kills: an ore written without a Shape (ItemData.Shape has no default and a cargo bay reads it to store the good).
|
||||
[Fact]
|
||||
public void EveryYieldedOreCanBeHeldAndSold()
|
||||
{
|
||||
using var cache = Shipped();
|
||||
var shape = new Shape(5, 5);
|
||||
foreach (var cell in shape.AllCoordinates) shape[cell] = true;
|
||||
var bay = new Shape(4, 4);
|
||||
foreach (var cell in bay.AllCoordinates) bay[cell] = true;
|
||||
cache.Upsert(new VerseGrammar { Revision = 1 });
|
||||
cache.Upsert(new HullData { Name = "OreSkiff", HullType = HullType.Ship, Shape = shape, Price = 1000, Durability = 10, Armor = 10 });
|
||||
cache.Upsert(new CargoBayData { Name = "OreBay", Shape = new Shape(), InteriorShape = bay, Price = 20, Durability = 4 });
|
||||
cache.FlushAsync().GetAwaiter().GetResult();
|
||||
var items = new ItemManager(1u, cache, new ProvenanceLedger(), AuthoredSettings.Load(RestoredHullsTests.FindRepoRoot()).Read<GameplaySettings>("GameplaySettings"), _ => { });
|
||||
var zone = new Zone(items, new PlanetSettings(), new ZonePack(), new GalaxyZone { Name = "Test Zone", Owner = null }, null);
|
||||
EquippableItem Mint(string design)
|
||||
{
|
||||
var data = cache.GetByName<EquippableItemData>(design);
|
||||
return new EquippableItem
|
||||
{
|
||||
Data = cache.RefOf<ItemData>(data), Durability = data.Durability,
|
||||
Lot = items.Lots.Add(new Lot { Design = cache.RefOf<ItemData>(data), Origin = new Attributed(), Quality = .5f, Roles = new List<RoleFill>() })
|
||||
};
|
||||
}
|
||||
var ship = new Ship(items, zone, Mint("OreSkiff"), new EntitySettings());
|
||||
Assert.True(ship.TryEquip(Mint("OreBay"), new int2(1, 1)));
|
||||
|
||||
var kinds = cache.GetAll<FieldKindData>().ToArray();
|
||||
Assert.NotEmpty(kinds);
|
||||
var yielded = kinds.SelectMany(kind => kind.Yields).Select(yield => yield.Commodity).GroupBy(commodity => commodity.Key.Value).Select(group => group.First()).ToArray();
|
||||
Assert.NotEmpty(yielded);
|
||||
foreach (var commodity in yielded)
|
||||
{
|
||||
var data = cache.Get(commodity);
|
||||
Assert.NotNull(data);
|
||||
Assert.NotNull(data.Shape);
|
||||
Assert.True(data.Price > 0, data.Name);
|
||||
Assert.True(data.Mass > 0, data.Name);
|
||||
var hold = ship.CargoBays.Single();
|
||||
Assert.True(hold.TryStore(new SimpleCommodity { Data = cache.RefOf<ItemData>(data), Quantity = 1 }), data.Name);
|
||||
// One ore at a time: the bay has fewer cells than the ores there are.
|
||||
foreach (var held in hold.Cargo.Keys.ToArray()) hold.Remove(held);
|
||||
}
|
||||
}
|
||||
|
||||
// MunitionsFeed finds the ores it takes as inputs by key (Regolith, Nickel-Iron) or by name (Gold): a name lookup refused at head
|
||||
// ("0 items are named 'Rock'"). A dry run at the shipped catalog succeeds and changes nothing.
|
||||
[Fact]
|
||||
public void MunitionsFeedDryRunSucceedsAtHeadAndChangesNothing()
|
||||
{
|
||||
var path = Path.Combine(_root, "Feed.cc");
|
||||
File.Copy(Path.Combine(RestoredHullsTests.FindRepoRoot(), "GameData", "Aetheria.cc"), path);
|
||||
var before = File.ReadAllBytes(path);
|
||||
var output = new StringWriter();
|
||||
Assert.Equal(0, EconomyCommand.Author(path, new List<EconomyBatch> { new MunitionsFeed() }, false, output, TestCatalog.Registry(), _root));
|
||||
Assert.Equal(before, File.ReadAllBytes(path));
|
||||
Assert.DoesNotContain("are named", output.ToString());
|
||||
}
|
||||
|
||||
// The batch is the one writer of the four recipes MunitionsFeed once wrote (Regolith, Nickel-Iron, Gold, Potassium): applying the feed
|
||||
// to the applied catalog leaves each as the batch wrote it. Kills: a surviving Make for any of the four (mining without RoleInputs
|
||||
// for Gold and Potassium, the feed's lore for any).
|
||||
[Fact]
|
||||
public void MunitionsFeedLeavesTheBatchRecipes()
|
||||
{
|
||||
var path = Path.Combine(_root, "Leaves.cc");
|
||||
File.Copy(Path.Combine(RestoredHullsTests.FindRepoRoot(), "GameData", "Aetheria.cc"), path);
|
||||
string[] Names = { "Regolith", "Nickel-Iron", "Gold", "Potassium" };
|
||||
|
||||
List<string> Read()
|
||||
{
|
||||
using var cache = AetheriaStores.Open(path, registry: TestCatalog.Registry());
|
||||
return Names.Select(name =>
|
||||
{
|
||||
var item = cache.GetAll<SimpleCommodityData>().Single(c => c.Name == name);
|
||||
var recipe = cache.Get<RecipeData>(RecipeData.KeyOf(cache.RefOf(item).Key));
|
||||
Assert.NotNull(recipe);
|
||||
return $"{name}|{cache.Get(recipe.StationKind).Name}|inputs {recipe.Inputs.Count}|roles {string.Join(",", recipe.RoleInputs.Select(r => r.Name + "x" + r.Count))}|fills {string.Join(",", recipe.Fills)}|{recipe.LoreHook}";
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
var batch = Read();
|
||||
Assert.Contains(batch, line => line.StartsWith("Regolith|Mining Station|inputs 0|roles |"));
|
||||
Assert.Contains(batch, line => line.StartsWith("Nickel-Iron|Mining Station|inputs 0|roles |"));
|
||||
Assert.Contains(batch, line => line.StartsWith("Gold|Processing Station|inputs 0|roles gold orex"));
|
||||
Assert.Contains(batch, line => line.StartsWith("Potassium|Processing Station|inputs 0|roles potassium orex"));
|
||||
|
||||
Assert.Equal(0, EconomyCommand.Author(path, new List<EconomyBatch> { new MunitionsFeed() }, true, new StringWriter(), TestCatalog.Registry(), _root));
|
||||
Assert.Equal(batch, Read());
|
||||
}
|
||||
}
|
||||
|
|
@ -6,14 +6,14 @@ using Xunit;
|
|||
// A station kind's description is what a player and a planner read of what it does; the recipes at the kind are what it does.
|
||||
public sealed class StationKindDescriptionTests
|
||||
{
|
||||
// Every good the shipped catalog extracts at a station kind (a commodity recipe with no inputs; a gear recipe is a design on offer, not raw) is named in that kind's description.
|
||||
// Every good the shipped catalog extracts at a station kind (a commodity recipe that is raw per Recipes.IsRaw: no inputs, no role inputs; a gear recipe is a design on offer, not raw) is named in that kind's description.
|
||||
// Kills: a kind that gains an extraction recipe (Diamond at mining, Ammonia at volatiles) while its description still lists the old set.
|
||||
[Fact]
|
||||
public void EveryRawGoodAKindExtractsIsNamedInItsDescription()
|
||||
{
|
||||
using var db = AetherDb.Open();
|
||||
var cache = db.Cache;
|
||||
var unnamed = cache.GetAll<RecipeData>().Where(recipe => recipe.Inputs.Count == 0 && recipe.StationKind.IsSet())
|
||||
var unnamed = cache.GetAll<RecipeData>().Where(recipe => Recipes.IsRaw(cache, recipe) && recipe.StationKind.IsSet())
|
||||
.Select(recipe => (Kind: cache.Get(recipe.StationKind), Output: cache.Get(recipe.Output)))
|
||||
.Where(pair => pair.Kind != null && (pair.Output is SimpleCommodityData || pair.Output is CompoundCommodityData) && !pair.Kind.Description.Contains(pair.Output.Name))
|
||||
.Select(pair => $"{pair.Kind.Name} extracts {pair.Output.Name}, which its description omits")
|
||||
|
|
@ -28,7 +28,7 @@ public sealed class StationKindDescriptionTests
|
|||
using var db = AetherDb.Open();
|
||||
var cache = db.Cache;
|
||||
string Extracted(string kindId) => string.Join(",", cache.GetAll<RecipeData>()
|
||||
.Where(recipe => recipe.Inputs.Count == 0 && recipe.StationKind.IsSet() && recipe.StationKind.Key.Equals(StationKindData.KeyOf(kindId)))
|
||||
.Where(recipe => Recipes.IsRaw(cache, recipe) && recipe.StationKind.IsSet() && recipe.StationKind.Key.Equals(StationKindData.KeyOf(kindId)))
|
||||
.Select(recipe => cache.Get(recipe.Output).Name));
|
||||
Assert.Contains("Diamond", Extracted("mining"));
|
||||
Assert.Contains("Ammonia", Extracted("volatiles"));
|
||||
|
|
|
|||
|
|
@ -1,64 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using GameCult.Caching;
|
||||
|
||||
// Interim ore sheet (ruling mining-demo-ore-minimal-yields-now): the Asteroid field kind yields Regolith, Nickel-Iron and Gold, and those
|
||||
// three can be held (a 1x1 shape, a mass) and are sold (a price). The economy ores batch may rewrite the yields by element id.
|
||||
// Prices are ruling regolith-demo-retune (it superseded mining-demo-ore-prices-gear-scale), gear-scale so the mine, sell, repair loop closes: a retune
|
||||
// is an edit here and a rerun. When the ores batch lands with the 100x gear rescale its prices take over (aetheria-living-world ruling
|
||||
// ore-batch-keeps-prices-gear-rescaled) and this sheet retires.
|
||||
// Ruling regolith-demo-retune (rock-becomes-regolith): Rock becomes Regolith at price 1 and New Metals becomes Nickel-Iron; yield shifts toward
|
||||
// Nickel-Iron so a full hold sells for about what it did (expected 900.5 a unit against 920). The names and descriptions are the ores batch's.
|
||||
// Munitions and MunitionsFeed never rewrite these three commodities (MunitionsFeed finds the two renamed ores by the keys above), so rerunning them does not clobber this sheet.
|
||||
public sealed class DemoOre : EconomyBatch
|
||||
{
|
||||
private const int RegolithPrice = 1;
|
||||
private const int NickelIronPrice = 1000;
|
||||
private const int GoldPrice = 5000;
|
||||
|
||||
// The two renamed records are found by key, so a rerun converges after the rename (the ores batch finds them the same way).
|
||||
public static readonly CultRecordKey RegolithKey = new CultRecordKey("043997a8-0661-4206-ab8a-10215ecf4efc");
|
||||
public static readonly CultRecordKey NickelIronKey = new CultRecordKey("00b5b3b2-2fc5-4adb-a1d7-c1a35d19afd3");
|
||||
|
||||
// Authored element ids (the cache takes a hand-written id only as 12 lowercase hex): asteroid regolith, nickel-iron, gold. The ids keep
|
||||
// their first names; the ores batch rewrites yields by element id.
|
||||
private const string RockId = "a57e0c000001";
|
||||
private const string NewMetalsId = "a57e0c000002";
|
||||
private const string GoldId = "a57e0c000003";
|
||||
|
||||
public override void Author(EconomyAuthor author)
|
||||
{
|
||||
Rename(author, RegolithKey, "Regolith", "Crushed silicate rubble and dust, the bulk of every belt: what is left when the ore is picked out, and the aggregate cast habitats and berms are made of.", RegolithPrice, null);
|
||||
Rename(author, NickelIronKey, "Nickel-Iron", "Native nickel-iron, kamacite and taenite, cut from metallic asteroids: about nine parts iron to one of nickel, with a trace of cobalt and platinum.", NickelIronPrice, 2);
|
||||
author.Edit<SimpleCommodityData>("Gold", o => { o.Shape = new Shape(); o.Price = GoldPrice; });
|
||||
|
||||
var kinds = author.Catalog.GetAll<FieldKindData>().Where(k => k.Name == "Asteroid").ToArray();
|
||||
if (kinds.Length != 1) throw new InvalidOperationException($"{kinds.Length} field kinds are named 'Asteroid'; the ore sheet needs exactly one.");
|
||||
var asteroid = kinds[0];
|
||||
asteroid.Yields = new List<FieldYield>
|
||||
{
|
||||
Yield(author, "Regolith", 5, RockId),
|
||||
Yield(author, "Nickel-Iron", 4, NewMetalsId),
|
||||
Yield(author, "Gold", 1, GoldId)
|
||||
};
|
||||
author.Put(asteroid, author.Catalog.RefOf(asteroid).Key);
|
||||
}
|
||||
|
||||
private static void Rename(EconomyAuthor author, CultRecordKey key, string name, string description, int price, float? mass)
|
||||
{
|
||||
var record = author.Catalog.Get<SimpleCommodityData>(key) ?? throw new InvalidOperationException($"The catalog holds no simple commodity {key.Value}.");
|
||||
record.Name = name;
|
||||
record.Description = description;
|
||||
record.Price = price;
|
||||
record.Shape = new Shape();
|
||||
if (mass.HasValue) record.Mass = mass.Value;
|
||||
author.Put(record, key);
|
||||
}
|
||||
|
||||
private static FieldYield Yield(EconomyAuthor author, string name, float abundance, string id)
|
||||
{
|
||||
var item = author.Catalog.GetAll<SimpleCommodityData>().Single(i => i.Name == name);
|
||||
return new FieldYield { Commodity = new CultRecordRef<SimpleCommodityData>(author.Catalog.RefOf(item).Key), Abundance = abundance, Regional = false, Id = id };
|
||||
}
|
||||
}
|
||||
|
|
@ -5,26 +5,29 @@ using GameCult.Caching;
|
|||
|
||||
// Economy content, batch 1b: where the munitions chain's raw materials come from. Munitions writes the chain and names its leaves
|
||||
// (Water, Methane, Ammonia, Oxygen, Potassium, Diamond, Steel, Cellulose Pulp, Actuator, Circuit Board) without recipes; this batch
|
||||
// gives each a source at a station kind whose description already says it does that work: input-free extraction at mining (ore,
|
||||
// Gold, Potassium, Diamond) and volatiles (Water, Methane, Ammonia), and processing or fabrication from those goods for the rest.
|
||||
// gives each a source at a station kind whose description already says it does that work: input-free extraction at mining (Diamond)
|
||||
// and volatiles (Water, Methane, Ammonia), and processing or fabrication from those goods for the rest. Extraction of the ore,
|
||||
// Gold and Potassium is OresAndProvinces': this batch holds references to them and writes no recipe for them.
|
||||
// Run after Munitions: it edits nothing the other batch writes and every output it names must exist.
|
||||
public sealed class MunitionsFeed : EconomyBatch
|
||||
{
|
||||
private EconomyAuthor _a;
|
||||
|
||||
// The records OresAndProvinces owns, held by key (Regolith and Nickel-Iron keep the keys Rock and New Metals had) or by name.
|
||||
private static readonly CultRecordRef<ItemData> Regolith = new CultRecordRef<ItemData>(new CultRecordKey("043997a8-0661-4206-ab8a-10215ecf4efc"));
|
||||
private static readonly CultRecordRef<ItemData> NickelIron = new CultRecordRef<ItemData>(new CultRecordKey("00b5b3b2-2fc5-4adb-a1d7-c1a35d19afd3"));
|
||||
|
||||
public override void Author(EconomyAuthor author)
|
||||
{
|
||||
_a = author;
|
||||
|
||||
// Ores the chain takes as inputs; their recipes are OresAndProvinces'.
|
||||
var rock = Regolith;
|
||||
var metals = NickelIron;
|
||||
var gold = Named("Gold");
|
||||
var potassium = Named("Potassium");
|
||||
|
||||
// Extraction: no inputs, so these are the chain's raw goods.
|
||||
var rock = Make(DemoOre.RegolithKey, "mining", 300, 10, 8,
|
||||
"Nobody on a mining station calls it rock; it is the overburden, the slag, the thing the real cargo was buried in. It is also what every smelter, board shop and cement yard starts from, so the cheapest hold in the verse is the one that decides who can build.");
|
||||
var metals = Make(DemoOre.NickelIronKey, "mining", 300, 12, 6,
|
||||
"The ore that built the cities: whoever holds the claim feeds every foundry downstream, which is why mining rights are the one commodity the garrisons will not leave unguarded.");
|
||||
var gold = Make("Gold", "mining", 600, 8, 2,
|
||||
"Gold has a use besides vanity: it does not corrode in a contact. Boards bound for a hull in a cold or wet corridor are gold-plated, and a prospector who finds a seam sells it to the board shops before the jewellers.");
|
||||
var potassium = Make("Potassium", "mining", 300, 8, 4,
|
||||
"Potash and saltpetre salts turn up in the same evaporite beds that mark old water. Farms want it for fertiliser and the arsenal wants it for powder; the survey crews tag the beds by which buyer reached them first.");
|
||||
var diamond = Make("Diamond", "mining", 1200, 12, 1,
|
||||
"Industrial stones from the deep kimberlite cores: grit for lining barrels and cutting tools rather than jewellery. A miner who sells one for a ring has wasted a barrel.");
|
||||
var water = Make("Water", "volatiles", 300, 8, 6,
|
||||
|
|
@ -61,19 +64,18 @@ public sealed class MunitionsFeed : EconomyBatch
|
|||
(steel, 2), (board, 1));
|
||||
}
|
||||
|
||||
// The two ores DemoOre renames are named by its keys, so a rerun converges after the rename; every other output by its unique name.
|
||||
private CultRecordRef<ItemData> Make(string name, string kind, float cycle, int workforce, int count, string lore,
|
||||
params (CultRecordRef<ItemData> Commodity, int Count)[] inputs)
|
||||
// Every item this batch names is found by its unique name.
|
||||
private CultRecordRef<ItemData> Named(string name)
|
||||
{
|
||||
var named = _a.Catalog.GetAll<ItemData>().Where(i => i.Name == name).ToArray();
|
||||
if (named.Length != 1) throw new InvalidOperationException($"{named.Length} items are named '{name}'; the munitions feed needs exactly one.");
|
||||
return Make(_a.Catalog.RefOf(named[0]).Key, kind, cycle, workforce, count, lore, inputs);
|
||||
return new CultRecordRef<ItemData>(_a.Catalog.RefOf(named[0]).Key);
|
||||
}
|
||||
|
||||
private CultRecordRef<ItemData> Make(CultRecordKey outputKey, string kind, float cycle, int workforce, int count, string lore,
|
||||
private CultRecordRef<ItemData> Make(string name, string kind, float cycle, int workforce, int count, string lore,
|
||||
params (CultRecordRef<ItemData> Commodity, int Count)[] inputs)
|
||||
{
|
||||
var output = new CultRecordRef<ItemData>(outputKey);
|
||||
var output = Named(name);
|
||||
_a.Put(new RecipeData
|
||||
{
|
||||
Output = output,
|
||||
|
|
|
|||
312
tools/AetherDb/Economy/OresAndProvinces.cs
Normal file
312
tools/AetherDb/Economy/OresAndProvinces.cs
Normal file
|
|
@ -0,0 +1,312 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using GameCult.Caching;
|
||||
|
||||
// Economy content: ores and provinces (rulings ores-are-regional, ores-fill-metal-roles, provinces-within-regions,
|
||||
// province-types-dealt-per-region, everyone-mines, new-metals-is-nickel-iron). It comes before ores-to-alloys, which is
|
||||
// re-authored on top of it.
|
||||
//
|
||||
// The model is Dwarf Fortress's, moved to asteroids (docs/research/2026-10-27-ore-geology-prior-art.md). In DF a rock layer
|
||||
// decides which ores a site holds and many named ores smelt into a few shared metals. Here a belt's field kind is its body
|
||||
// class, read from real asteroid taxonomy (carbonaceous C, stony S, metallic M, basaltic V), and a province is the kind of
|
||||
// ground a region's zones sit on: which body classes its belts draw and which regional ores exist there at all. The ground
|
||||
// tells one story: the belts are the debris of protoplanets that differentiated and then broke, so a core province is
|
||||
// metal, a crust province is basalt, and the incompatible elements (uranium, rare earths, niobium, tungsten) sit only in
|
||||
// the last crust to freeze. Common ground (primitive and chondrite) is dealt most; specialty ground is dealt less, so a region
|
||||
// holds a spread and the specialty ore it lacks must come by trade.
|
||||
//
|
||||
// Ores are named minerals, each a raw good the mining station extracts. A metal's recipe takes that metal's ore role, and an
|
||||
// ore fills the role of every metal that is at least a tenth of the mineral by mass (ruling ores-fill-metal-roles: whatever else
|
||||
// the ore holds is slag for that recipe). So ilmenite is both titanium ore and iron ore, and which it becomes is the smelter's
|
||||
// choice. Grade is not modelled per role, by that ruling; how rich a belt is lives in its yield.
|
||||
//
|
||||
// This batch owns extraction and the first smelting step: every ore, the metal each role feeds, the field kinds and the
|
||||
// province types. It owns nothing downstream of a metal (steel, alloys, mill products are ores-to-alloys). Every faction places
|
||||
// mining (ruling everyone-mines): a Mega controls territory and the resources in it. A faction with no station model stands in on
|
||||
// the supply depot (ruling faction-station-models), Aeronautics Unlimited on its trade hub (ruling station-kind-family-stand-in).
|
||||
public sealed class OresAndProvinces : EconomyBatch
|
||||
{
|
||||
private EconomyAuthor _a;
|
||||
|
||||
// Records this batch renames, found by key so a rerun converges after the rename.
|
||||
private static readonly CultRecordKey NewMetalsKey = new CultRecordKey("00b5b3b2-2fc5-4adb-a1d7-c1a35d19afd3");
|
||||
private static readonly CultRecordKey RockKey = new CultRecordKey("043997a8-0661-4206-ab8a-10215ecf4efc");
|
||||
private static readonly CultRecordKey AsteroidKindKey = new CultRecordKey("2b0deb8dd4ca44da9a36581877bf629d");
|
||||
|
||||
public override void Author(EconomyAuthor author)
|
||||
{
|
||||
_a = author;
|
||||
|
||||
foreach (var faction in _a.Catalog.GetAll<Faction>().OrderBy(f => f.Name, StringComparer.Ordinal).ToArray())
|
||||
StandIn("mining", new CultRecordRef<Faction>(_a.Catalog.RefOf(faction).Key), faction.Name == "Aeronautics Unlimited" ? "trade-hub" : "depot");
|
||||
|
||||
var miningKey = StationKindData.KeyOf("mining");
|
||||
var mining = _a.Catalog.Get<StationKindData>(miningKey);
|
||||
mining.Description = "Extracts ore from belts: Regolith, Nickel-Iron and Troilite in common ground; Magnetite and Pentlandite in carbonaceous rock; Ilmenite and Anorthite in basalt; and only where the ground holds them Sylvite, Orthoclase, Chalcopyrite, Sperrylite, Native Copper, Native Gold, Isoferroplatinum, Uraninite, Brannerite, Monazite, Columbite and Wolframite. Cuts Diamond from deep cores; consumes tools and food.";
|
||||
_a.Put(mining, miningKey);
|
||||
|
||||
// ---- Ores: the raw goods. Fills are metal roles; abundance is the field kinds' business, below.
|
||||
|
||||
var regolith = Rename(RockKey, "Regolith", "Crushed silicate rubble and dust, the bulk of every belt: what is left when the ore is picked out, and the aggregate cast habitats and berms are made of.", 1f, 1, 14, 6,
|
||||
"Regolith is what every belt is mostly made of, and nobody fights over it. Orbital Forge casts it into habitat shells on a cage of rebar, so a hauler full of regolith heading for an empty rock means someone means to live there.");
|
||||
|
||||
var nickelIron = Rename(NewMetalsKey, "Nickel-Iron", "Native nickel-iron, kamacite and taenite, cut from metallic asteroids: about nine parts iron to one of nickel, with a trace of cobalt and platinum.", 1f, 10, 10, 4,
|
||||
"Metallic asteroids are the cores of broken protoplanets, iron that cooled so slowly it crystallised in plates a hand wide. The cut face rings when struck, and crews price it by the cut, not the tonne.",
|
||||
"iron ore", "nickel ore");
|
||||
|
||||
var troilite = Ore("troilite", "Troilite", "Iron sulphide (FeS) in grains and nodules through stony asteroids: iron ore, with the sulphur driven off as gas.", 1f, 4, 10, 4,
|
||||
"Troilite is the bronze fleck in a broken chondrite, and the reason a stony-belt smelter smells of sulphur. It is poor iron, but it is everywhere, and a habitat that cannot buy iron can always roast troilite.",
|
||||
"iron ore");
|
||||
|
||||
var magnetite = Ore("magnetite", "Magnetite", "Iron oxide (Fe3O4) grown in the wet clays of carbonaceous asteroids: rich iron ore that a magnet lifts straight out of the crushed rock.", 1f, 6, 10, 4,
|
||||
"Carbonaceous rocks were once wet, and the water grew magnetite in them as framboids and plates. Crews in the dark belts sweep crushed rock with a magnet drum and keep what sticks; the rest of the rock is somebody else's water.",
|
||||
"iron ore");
|
||||
|
||||
var ilmenite = Ore("ilmenite", "Ilmenite", "Iron-titanium oxide (FeTiO3), the black sand of basaltic crust: titanium ore and iron ore at once.", 1f, 14, 12, 4,
|
||||
"Ilmenite is the dark sand of old basalt flows, and every grain is both titanium and iron. Which one a smelter takes out of it says what its owner is short of this year, so a buyer's choice of ilmenite contract is read like a budget.",
|
||||
"titanium ore", "iron ore");
|
||||
|
||||
var anorthite = Ore("anorthite", "Anorthite", "Calcium plagioclase (CaAl2Si2O8), the pale feldspar of anorthosite crust: the aluminium ore that molten-salt cells take apart.", 1f, 6, 12, 4,
|
||||
"Anorthosite is the pale crust of a body that once had a magma ocean, the feldspar that floated to the top. Aluminium comes out of it only at a great cost in power, so where anorthite is cheap, ask where the power is coming from.",
|
||||
"aluminium ore");
|
||||
|
||||
var pentlandite = Ore("pentlandite", "Pentlandite", "Iron-nickel sulphide ((Fe,Ni)9S8), bronze-yellow grains in sulphide melt and carbonaceous rock: the richest nickel ore, and iron ore besides.", 1f, 12, 12, 4,
|
||||
"Pentlandite settles out of a sulphide melt like cream, so the sulphide provinces where an impact once melted a body are where nickel is cheap. Crews call a good pentlandite seam a cream line.",
|
||||
"nickel ore", "iron ore");
|
||||
|
||||
var chalcopyrite = Ore("chalcopyrite", "Chalcopyrite", "Copper-iron sulphide (CuFeS2), brassy and iridescent: the common copper ore, found only where a sulphide melt pooled.", 1f, 12, 12, 4,
|
||||
"Copper is scarce in the belts, and almost all of it is chalcopyrite in a sulphide province. Every wire, coil and heat pipe draws on it, so the regions that hold one trade copper for everything else, and the regions that do not wait in yards for their wiring.",
|
||||
"copper ore", "iron ore");
|
||||
|
||||
var nativeCopper = Ore("native-copper", "Native Copper", "Metallic copper in sheets and wires through the vesicles of basalt, where hot water once carried it.", 1f, 16, 10, 2,
|
||||
"Native copper lies in the old lava as sheets you can peel; the oldest Belt prospectors' stories are of native copper found in a vent pipe. It is rare, rich and hand-picked, and a find is kept quiet until the claim is filed.",
|
||||
"copper ore");
|
||||
|
||||
var sylvite = Ore("sylvite", "Sylvite", "Potassium chloride (KCl) crystallised from the brines of wet carbonaceous bodies: potash ore.", 1f, 2, 8, 4,
|
||||
"The wet bodies left salt where their brines froze out, the way Ceres wears its white spots. Farms buy sylvite first and arsenals second: the potassium that grows a habitat's algae is the potassium in its primers.",
|
||||
"potassium ore");
|
||||
|
||||
var orthoclase = Ore("orthoclase", "Orthoclase", "Potassium feldspar (KAlSi3O8) from evolved granitic crust: a lean potash ore, worked where no brine salt is.", 1f, 1, 10, 4,
|
||||
"Potassium feldspar is potash the hard way, cooked out of granite. Regions with no salt flats grind it anyway, and a farm co-op that buys orthoclase is a co-op whose neighbours have closed the salt trade to it.",
|
||||
"potassium ore");
|
||||
|
||||
var nativeGold = Ore("native-gold", "Native Gold", "Gold, alloyed with a little silver, in grains and nuggets through the metal of core fragments.", 0.2f, 350, 6, 1,
|
||||
"Gold sank with the iron when the protoplanets melted, so it is found in their broken cores, never in their crust. It wires every contact that must not corrode, and it is still the one metal people hoard without being told to.",
|
||||
"gold ore");
|
||||
|
||||
var isoferroplatinum = Ore("isoferroplatinum", "Isoferroplatinum", "Platinum-iron alloy (Pt3Fe) in grains and nuggets, with iridium, osmium and rhodium: the native platinum of core fragments.", 0.2f, 650, 6, 1,
|
||||
"Platinum came down with the iron, like the gold, and sits in nuggets where a core broke. A single nugget can pay a crew's season; a platinum strike in a contested core province has started more than one war that its history books call a border dispute.",
|
||||
"platinum ore");
|
||||
|
||||
var sperrylite = Ore("sperrylite", "Sperrylite", "Platinum arsenide (PtAs2), small tin-white crystals in sulphide ore: a platinum ore that comes out of the same melt as the nickel.", 0.3f, 450, 8, 1,
|
||||
"Sperrylite is platinum that rode up with the sulphide melt instead of sinking with the core, so a sulphide province holds platinum as well as copper and nickel. The arsenic that comes off in the roaster is why its smelters stand downwind of everything.",
|
||||
"platinum ore");
|
||||
|
||||
var uraninite = Ore("uraninite", "Uraninite", "Uranium dioxide (UO2), pitch-black and heavy, in veins through the last crust to freeze: uranium ore.", 1f, 60, 10, 2,
|
||||
"Uranium is an incompatible element: it would not fit in any early crystal, so it ended up in the last melt to freeze, and only evolved crust holds it. It is mined under licence and shipped under seal, and a broken seal is a crime in every bloc.",
|
||||
"uranium ore");
|
||||
|
||||
var brannerite = Ore("brannerite", "Brannerite", "Uranium titanate (UTi2O6), black and glassy: uranium ore and titanium ore in one, worked for both.", 1f, 45, 10, 2,
|
||||
"Brannerite is uranium locked in titanium oxide, hard to leach and worth it twice. A refinery that buys brannerite and sells only titanium has a uranium stockpile somewhere, and the licensing offices know to ask where.",
|
||||
"uranium ore", "titanium ore");
|
||||
|
||||
var monazite = Ore("monazite", "Monazite", "Rare-earth phosphate ((Ce,La,Nd)PO4) with a little thorium, honey-coloured grains in evolved crust: the rare-earth ore.", 1f, 80, 10, 2,
|
||||
"Neodymium from monazite is in every strong magnet, from an actuator to a drive pump, and the rare earths are in the premium superconductor tape that Cryonix certifies. The monazite crust provinces are few, so whoever holds one has a hand on every motor in the region.",
|
||||
"rare earth ore");
|
||||
|
||||
var columbite = Ore("columbite", "Columbite", "Iron niobate (FeNb2O6), black tabular crystals from the pegmatites of evolved crust: niobium ore, with iron besides.", 1f, 100, 10, 2,
|
||||
"Niobium is the conductor in the coils every yard but Cryonix's can wind: niobium-tin and niobium-titanium, heavier and hungrier for cold than the premium tape, and free of its licence. Columbite is how the gray-market fusion trade stays alive.",
|
||||
"niobium ore", "iron ore");
|
||||
|
||||
var wolframite = Ore("wolframite", "Wolframite", "Iron tungstate (FeWO4), dense black blades from the vein ends of evolved crust: tungsten ore, with iron besides.", 1f, 60, 10, 2,
|
||||
"Tungsten faces the plasma in every reactor and lines the throat of every hot nozzle; Orbital Forge's ugly refractory hardware is mostly tungsten. Wolframite is heavy for its size, so its haulers ride low on thrust and are easy prey.",
|
||||
"tungsten ore", "iron ore");
|
||||
|
||||
// ---- Metals: the first smelting step. Each takes its ore role; downstream of a metal is ores-to-alloys.
|
||||
|
||||
Metal("iron", "Iron", "Reduced iron pellet and sponge, smelted from whatever iron ore the furnace was fed; the rest of the ore leaves as slag.", 1f, 22, 3, 2, 600, 14,
|
||||
"Iron is the one metal every province can make, from nickel-iron, troilite, magnetite or the iron in a copper ore, and the dry-refinery stack TerraCore's patents spread across Luna and the Belt still runs on all of them. A region short of iron is short of something else: power, crews or peace.",
|
||||
"iron ore");
|
||||
|
||||
Metal("nickel", "Nickel", "Carbonyl nickel pellets, drawn off as a gas from nickel ore and redeposited almost pure.", 1f, 60, 4, 1, 900, 14,
|
||||
"Nickel comes off the carbonyl line as a poisonous gas and settles back as pellets: the same carbon monoxide that does it kills a crew that forgets its sensors. Every stainless fitting, hot alloy and battery plate in a habitat starts as one of these pellets.",
|
||||
"nickel ore");
|
||||
|
||||
Metal("copper", "Copper", "Cathode copper: sulphide ore roasted and smelted, or native copper melted, then electrorefined.", 1f, 70, 4, 1, 900, 16,
|
||||
"Copper travels further than any other base metal because so few provinces hold it. A copper smelter in a region without a sulphide province runs on ore that crossed a boss line, and its prices carry the escort's fee.",
|
||||
"copper ore");
|
||||
|
||||
Metal("aluminium", "Aluminium", "Aluminium ingot, reduced from anorthite in molten-salt electrolysis cells.", 0.4f, 50, 5, 1, 900, 12,
|
||||
"Aluminium is electricity made solid: the cells that win it from feldspar draw more power than the habitat beside them. Where a refinery sells aluminium cheap, its power is cheap too, and someone should ask why.",
|
||||
"aluminium ore");
|
||||
|
||||
Metal("titanium", "Titanium", "Titanium sponge, reduced from ilmenite or brannerite in molten-salt cells and pressed into billet.", 0.5f, 140, 5, 1, 1200, 14,
|
||||
"Titanium is reduced a few kilograms at a time in salt baths that run for days, so a sponge shipment is small, heavy with value and always insured. Basalt-crust provinces make most of it; the brannerite crust makes the rest, and pays its licence fees twice.",
|
||||
"titanium ore");
|
||||
|
||||
Metal("platinum-group-metals", "Platinum Group Metals", "Platinum with iridium, palladium, rhodium and osmium, refined to sponge from platinum ore.", 0.1f, 2400, 3, 1, 1800, 10,
|
||||
"Platinum is the catalyst gauze that turns ammonia into nitric acid, the electrode in a fuel cell and the contact in a sensor that must not drift. Every fertiliser plant and every arsenal in a region depends on a few kilograms of it, which is why a platinum province is guarded like a gate.",
|
||||
"platinum ore");
|
||||
|
||||
Smelt("Gold", "Gold bullion, melted out of native gold and parted from its silver.", 0.2f, 900, 2, 1, 600, 6,
|
||||
"Gold is refined where it is mined, under guard, because a tonne of native gold ore is a crew's lifetime of wages. It goes into contacts and connectors, and into bars that nobody uses for anything at all.",
|
||||
"gold ore");
|
||||
|
||||
Smelt("Uranium", "Uranium ore concentrate: yellowcake, leached from uranium ore and sealed in drums.", 0.5f, 150, 2, 1, 900, 10,
|
||||
"Yellowcake is milled at the mine head because nobody wants to haul the waste rock, and sealed there because nobody trusts the haulers. A drum's seal number is its whole history, and an unbroken seal on a drum that never reached its reactor is a better story than a broken one.",
|
||||
"uranium ore");
|
||||
|
||||
Smelt("Potassium", "Potash: potassium chloride and carbonate refined from potassium ore, fertiliser and chemical grade.", 1f, 6, 2, 1, 300, 6,
|
||||
"Potash feeds farms first and arsenals second: the saltpetre in a primer is made from the same salt that grows a habitat's algae. A region with no brine-salt ground grinds feldspar for it, and pays for that in power.",
|
||||
"potassium ore");
|
||||
|
||||
Metal("rare-earth-oxides", "Rare Earth Oxides", "Separated neodymium, praseodymium, lanthanum and cerium oxides, cracked from monazite and split by solvent extraction.", 0.5f, 320, 3, 1, 1800, 18,
|
||||
"Splitting the rare earths takes hundreds of solvent stages, each a little better than the last, and the thorium that comes off is someone's licensing problem. A separation plant is the most valuable building in an evolved-crust province, and the most watched.",
|
||||
"rare earth ore");
|
||||
|
||||
Metal("niobium", "Niobium", "Niobium metal, reduced from columbite and electron-beam remelted to conductor grade.", 0.5f, 380, 3, 1, 1500, 14,
|
||||
"Niobium wire is what a fusion plant without a Cryonix contract runs on. It is heavier and colder to run than the premium tape, but no inspector can take it away, so the regions that hold columbite keep the independent reactors lit.",
|
||||
"niobium ore");
|
||||
|
||||
Metal("tungsten", "Tungsten", "Tungsten powder and pressed bar, reduced from wolframite.", 1f, 240, 3, 1, 1200, 14,
|
||||
"Tungsten is the wall between a reactor's plasma and everything else, and it wears: every plasma-facing tile is replaced on a schedule. A region that cannot buy tungsten has a date when its reactors go dark, and its neighbours know the date.",
|
||||
"tungsten ore");
|
||||
|
||||
// ---- Field kinds: a belt's body class. CrossSection is reflectivity per cell, scaled to albedo with stony at the 5 it had.
|
||||
|
||||
var stony = Kind(AsteroidKindKey, "Stony", 5f, 2f,
|
||||
(regolith, 6f, false), (troilite, 1.5f, false), (nickelIron, 0.8f, false),
|
||||
(pentlandite, 0.6f, true), (chalcopyrite, 0.5f, true), (sperrylite, 0.1f, true));
|
||||
var carbonaceous = Kind(new CultRecordKey("field-kind:carbonaceous"), "Carbonaceous", 1.5f, 4f,
|
||||
(regolith, 5f, false), (magnetite, 1.5f, false), (pentlandite, 0.5f, false), (sylvite, 1f, true));
|
||||
var metallic = Kind(new CultRecordKey("field-kind:metallic"), "Metallic", 4f, 0.5f,
|
||||
(nickelIron, 5f, false), (troilite, 0.8f, false), (nativeGold, 0.15f, true), (isoferroplatinum, 0.1f, true));
|
||||
var basaltic = Kind(new CultRecordKey("field-kind:basaltic"), "Basaltic", 9f, 0.3f,
|
||||
(regolith, 5f, false), (ilmenite, 1.5f, false), (anorthite, 2f, false),
|
||||
(nativeCopper, 0.3f, true), (chalcopyrite, 0.3f, true), (orthoclase, 0.8f, true),
|
||||
(uraninite, 0.15f, true), (brannerite, 0.15f, true), (monazite, 0.2f, true), (columbite, 0.12f, true), (wolframite, 0.15f, true));
|
||||
|
||||
// ---- Province types: dealt per region from a deck of these card counts (ruling province-types-dealt-per-region).
|
||||
|
||||
Province("primitive-reach", "Primitive Reach", 3,
|
||||
new[] { (carbonaceous, 2f), (stony, 0.5f), (metallic, 0.2f), (basaltic, 0.1f) },
|
||||
new[] { (magnetite, 1.5f), (sylvite, 1f), (pentlandite, 1f) });
|
||||
Province("chondrite-plain", "Chondrite Plain", 3,
|
||||
new[] { (stony, 3f), (carbonaceous, 1f), (metallic, 0.5f), (basaltic, 0.3f) },
|
||||
new[] { (troilite, 1.5f), (nickelIron, 1.2f) });
|
||||
Province("shattered-core", "Shattered Core", 2,
|
||||
new[] { (metallic, 12f), (stony, 1f), (carbonaceous, 0.3f), (basaltic, 0.3f) },
|
||||
new[] { (nickelIron, 1.5f), (nativeGold, 1f), (isoferroplatinum, 1f) });
|
||||
Province("basalt-shards", "Basalt Shards", 2,
|
||||
new[] { (basaltic, 15f), (stony, 1f), (carbonaceous, 0.3f), (metallic, 0.3f) },
|
||||
new[] { (ilmenite, 1.5f), (anorthite, 1.5f), (nativeCopper, 1f) });
|
||||
Province("sulphide-melt", "Sulphide Melt", 1,
|
||||
new[] { (stony, 2f), (metallic, 6f), (basaltic, 10f), (carbonaceous, 0.3f) },
|
||||
new[] { (pentlandite, 2f), (chalcopyrite, 1.5f), (sperrylite, 1f), (nativeGold, 0.5f) });
|
||||
Province("evolved-crust", "Evolved Crust", 1,
|
||||
new[] { (basaltic, 12f), (stony, 1f), (carbonaceous, 0.2f), (metallic, 0.2f) },
|
||||
new[] { (ilmenite, 1f), (uraninite, 1f), (brannerite, 1f), (monazite, 1f), (columbite, 1f), (wolframite, 1f), (orthoclase, 1f) });
|
||||
}
|
||||
|
||||
// Sets this faction's stand-in on a kind, replacing any it had, so a rerun converges.
|
||||
private void StandIn(string kindId, CultRecordRef<Faction> faction, string standInKindId)
|
||||
{
|
||||
var key = StationKindData.KeyOf(kindId);
|
||||
var kind = _a.Catalog.Get<StationKindData>(key) ?? throw new InvalidOperationException($"The catalog holds no station kind '{kindId}'.");
|
||||
kind.StandIns = kind.StandIns.Where(s => !s.Faction.Key.Equals(faction.Key)).ToList();
|
||||
kind.StandIns.Add(new StationKindStandIn { Faction = faction, Kind = new CultRecordRef<StationKindData>(StationKindData.KeyOf(standInKindId)) });
|
||||
_a.Put(kind, key);
|
||||
}
|
||||
|
||||
private static CultRecordKey CommodityKey(string id) => new CultRecordKey("commodity:" + id);
|
||||
|
||||
// A new ore: a raw good with an extraction recipe at the mining station that fills its metal roles. Every ore gets a one-cell
|
||||
// Shape: ItemData.Shape has no default and a cargo bay reads it to store the good.
|
||||
private CultRecordRef<SimpleCommodityData> Ore(string id, string name, string description, float mass, int price, int workforce, int perCycle, string lore, params string[] fills)
|
||||
{
|
||||
var key = CommodityKey(id);
|
||||
_a.Put(new SimpleCommodityData { Name = name, Description = description, Mass = mass, Price = price, Shape = new Shape() }, key);
|
||||
Recipe(key, "mining", 600, workforce, perCycle, lore, fills, new List<ItemRole>());
|
||||
return new CultRecordRef<SimpleCommodityData>(key);
|
||||
}
|
||||
|
||||
// An existing raw record given its ore name, a Shape and an extraction recipe; found by key so a rerun after the rename converges.
|
||||
private CultRecordRef<SimpleCommodityData> Rename(CultRecordKey key, string name, string description, float mass, int price, int workforce, int perCycle, string lore, params string[] fills)
|
||||
{
|
||||
var record = _a.Catalog.Get<SimpleCommodityData>(key) ?? throw new InvalidOperationException($"The catalog holds no simple commodity {key.Value}.");
|
||||
record.Name = name;
|
||||
record.Description = description;
|
||||
record.Mass = mass;
|
||||
record.Price = price;
|
||||
record.Shape = new Shape();
|
||||
_a.Put(record, key);
|
||||
Recipe(key, "mining", 600, workforce, perCycle, lore, fills, new List<ItemRole>());
|
||||
return new CultRecordRef<SimpleCommodityData>(key);
|
||||
}
|
||||
|
||||
// A new metal: a simple commodity whose processing recipe takes its ore role.
|
||||
private void Metal(string id, string name, string description, float mass, int price, int oreCount, int outputCount, float cycle, int workforce, string lore, string role)
|
||||
{
|
||||
var key = CommodityKey(id);
|
||||
_a.Put(new SimpleCommodityData { Name = name, Description = description, Mass = mass, Price = price }, key);
|
||||
Recipe(key, "processing", cycle, workforce, outputCount, lore, new string[0], new List<ItemRole> { new ItemRole { Name = role, Count = oreCount } });
|
||||
}
|
||||
|
||||
// An existing good (Gold, Uranium, Potassium) given what it is and a processing recipe that takes its ore role.
|
||||
private void Smelt(string name, string description, float mass, int price, int oreCount, int outputCount, float cycle, int workforce, string lore, string role)
|
||||
{
|
||||
_a.Edit<SimpleCommodityData>(name, c =>
|
||||
{
|
||||
c.Description = description;
|
||||
c.Mass = mass;
|
||||
c.Price = price;
|
||||
});
|
||||
var key = _a.Catalog.RefOf(_a.Catalog.GetAll<SimpleCommodityData>().Single(c => c.Name == name)).Key;
|
||||
Recipe(key, "processing", cycle, workforce, outputCount, lore, new string[0], new List<ItemRole> { new ItemRole { Name = role, Count = oreCount } });
|
||||
}
|
||||
|
||||
private void Recipe(CultRecordKey output, string kind, float cycle, int workforce, int outputCount, string lore, string[] fills, List<ItemRole> roles)
|
||||
{
|
||||
var outputRef = new CultRecordRef<ItemData>(output);
|
||||
_a.Put(new RecipeData
|
||||
{
|
||||
Output = outputRef,
|
||||
OutputCount = outputCount,
|
||||
Inputs = new List<CommodityCount>(),
|
||||
RoleInputs = roles,
|
||||
Cycle = cycle,
|
||||
Workforce = workforce,
|
||||
Upkeep = new List<CommodityCount>(),
|
||||
StationKind = new CultRecordRef<StationKindData>(StationKindData.KeyOf(kind)),
|
||||
LoreHook = lore,
|
||||
Fills = fills.ToList()
|
||||
}, RecipeData.KeyOf(output));
|
||||
}
|
||||
|
||||
// A field kind under its key, written whole: a rerun converges, and the existing kind keeps its key so saved belts hold.
|
||||
private CultRecordRef<FieldKindData> Kind(CultRecordKey key, string name, float crossSection, float weight,
|
||||
params (CultRecordRef<SimpleCommodityData> Ore, float Abundance, bool Regional)[] yields)
|
||||
{
|
||||
_a.Put(new FieldKindData
|
||||
{
|
||||
Name = name,
|
||||
CrossSection = crossSection,
|
||||
GenerationWeight = weight,
|
||||
Yields = yields.Select(y => new FieldYield { Commodity = y.Ore, Abundance = y.Abundance, Regional = y.Regional }).ToList()
|
||||
}, key);
|
||||
return new CultRecordRef<FieldKindData>(key);
|
||||
}
|
||||
|
||||
private void Province(string id, string name, int cards, (CultRecordRef<FieldKindData> Kind, float Weight)[] kinds,
|
||||
(CultRecordRef<SimpleCommodityData> Ore, float Weight)[] ores)
|
||||
{
|
||||
_a.Put(new ProvinceData
|
||||
{
|
||||
Name = name,
|
||||
GenerationWeight = cards,
|
||||
Kinds = kinds.Select(k => new ProvinceKindWeight { Kind = k.Kind, Weight = k.Weight }).ToList(),
|
||||
Ores = ores.Select(o => new ProvinceOre { Commodity = o.Ore, Weight = o.Weight }).ToList()
|
||||
}, new CultRecordKey("province:" + id));
|
||||
}
|
||||
}
|
||||
345
tools/AetherDb/Economy/OresAndProvinces.dry-run.txt
Normal file
345
tools/AetherDb/Economy/OresAndProvinces.dry-run.txt
Normal file
|
|
@ -0,0 +1,345 @@
|
|||
Dry run of economy author OresAndProvinces on the Windows workstation (dotnet 10.0.401), branch nibu/ore-batch-rescale on base d1ff2f78e, before apply.
|
||||
Aetheria.cc sha256 7bfba1bdf25112c11f8c88a74d9ca53382d5d98245f68a4be9f67065ad5fe6e7, unchanged by the dry run. 62 added, 10 changed.
|
||||
|
||||
===== DRY RUN (exit 0)
|
||||
changed station-kind:mining
|
||||
unchanged 043997a8-0661-4206-ab8a-10215ecf4efc
|
||||
changed recipe:043997a8-0661-4206-ab8a-10215ecf4efc
|
||||
changed 00b5b3b2-2fc5-4adb-a1d7-c1a35d19afd3
|
||||
changed recipe:00b5b3b2-2fc5-4adb-a1d7-c1a35d19afd3
|
||||
added commodity:troilite
|
||||
added recipe:commodity:troilite
|
||||
added commodity:magnetite
|
||||
added recipe:commodity:magnetite
|
||||
added commodity:ilmenite
|
||||
added recipe:commodity:ilmenite
|
||||
added commodity:anorthite
|
||||
added recipe:commodity:anorthite
|
||||
added commodity:pentlandite
|
||||
added recipe:commodity:pentlandite
|
||||
added commodity:chalcopyrite
|
||||
added recipe:commodity:chalcopyrite
|
||||
added commodity:native-copper
|
||||
added recipe:commodity:native-copper
|
||||
added commodity:sylvite
|
||||
added recipe:commodity:sylvite
|
||||
added commodity:orthoclase
|
||||
added recipe:commodity:orthoclase
|
||||
added commodity:native-gold
|
||||
added recipe:commodity:native-gold
|
||||
added commodity:isoferroplatinum
|
||||
added recipe:commodity:isoferroplatinum
|
||||
added commodity:sperrylite
|
||||
added recipe:commodity:sperrylite
|
||||
added commodity:uraninite
|
||||
added recipe:commodity:uraninite
|
||||
added commodity:brannerite
|
||||
added recipe:commodity:brannerite
|
||||
added commodity:monazite
|
||||
added recipe:commodity:monazite
|
||||
added commodity:columbite
|
||||
added recipe:commodity:columbite
|
||||
added commodity:wolframite
|
||||
added recipe:commodity:wolframite
|
||||
added commodity:iron
|
||||
added recipe:commodity:iron
|
||||
added commodity:nickel
|
||||
added recipe:commodity:nickel
|
||||
added commodity:copper
|
||||
added recipe:commodity:copper
|
||||
added commodity:aluminium
|
||||
added recipe:commodity:aluminium
|
||||
added commodity:titanium
|
||||
added recipe:commodity:titanium
|
||||
added commodity:platinum-group-metals
|
||||
added recipe:commodity:platinum-group-metals
|
||||
changed 36746041-a5bd-4b95-aa18-294acaaeae62
|
||||
changed recipe:36746041-a5bd-4b95-aa18-294acaaeae62
|
||||
changed 08c07793-bc06-48dc-adc2-c7e61ef2cb2b
|
||||
added recipe:08c07793-bc06-48dc-adc2-c7e61ef2cb2b
|
||||
changed a8e259fc-fbf1-477a-8248-0277611f1859
|
||||
changed recipe:a8e259fc-fbf1-477a-8248-0277611f1859
|
||||
added commodity:rare-earth-oxides
|
||||
added recipe:commodity:rare-earth-oxides
|
||||
added commodity:niobium
|
||||
added recipe:commodity:niobium
|
||||
added commodity:tungsten
|
||||
added recipe:commodity:tungsten
|
||||
changed 2b0deb8dd4ca44da9a36581877bf629d
|
||||
added field-kind:carbonaceous
|
||||
added field-kind:metallic
|
||||
added field-kind:basaltic
|
||||
added province:primitive-reach
|
||||
added province:chondrite-plain
|
||||
added province:shattered-core
|
||||
added province:basalt-shards
|
||||
added province:sulphide-melt
|
||||
added province:evolved-crust
|
||||
62 added, 10 changed, 0 removed, 1 unchanged
|
||||
137 faults
|
||||
L-consumer-demand (18)
|
||||
recipe:0b449ae1-7eab-47e8-ac3c-2b6f6ff01f00: 'Ballistic Powder' leads into thruster, Ammo and Missiles but no use leads into a consumer good.
|
||||
recipe:2e08445d-c130-497c-9fb3-8d752a24e654: 'Algae' leads into thruster, Ammo and Missiles but no use leads into a consumer good.
|
||||
recipe:36746041-a5bd-4b95-aa18-294acaaeae62: 'Gold' leads into dispenser, feed mechanism, warhead, Mines and Missiles but no use leads into a consumer good.
|
||||
recipe:3c8b2b3d-ca1a-405f-966f-c64662a64418: 'Circuit Board' leads into dispenser, feed mechanism, warhead, Mines and Missiles but no use leads into a consumer good.
|
||||
recipe:a8e259fc-fbf1-477a-8248-0277611f1859: 'Potassium' leads into thruster, Ammo and Missiles but no use leads into a consumer good.
|
||||
recipe:commodity:actuator: 'Actuator' leads into dispenser and feed mechanism but no use leads into a consumer good.
|
||||
recipe:commodity:cellulose-pulp: 'Cellulose Pulp' leads into thruster, Ammo and Missiles but no use leads into a consumer good.
|
||||
recipe:commodity:explosive-fill: 'Explosive Fill' leads into warhead, Mines and Missiles but no use leads into a consumer good.
|
||||
recipe:commodity:fragmentation-case: 'Fragmentation Case' leads into warhead, Mines and Missiles but no use leads into a consumer good.
|
||||
recipe:commodity:fuze: 'Fuze' leads into warhead, Mines and Missiles but no use leads into a consumer good.
|
||||
recipe:commodity:he-warhead: 'High-Explosive Warhead' leads into warhead, Mines and Missiles but no use leads into a consumer good.
|
||||
recipe:commodity:hexamine: 'Hexamine' leads into warhead, Mines and Missiles but no use leads into a consumer good.
|
||||
recipe:commodity:nitric-acid: 'Nitric Acid' leads into thruster, warhead, Ammo, Mines and Missiles but no use leads into a consumer good.
|
||||
recipe:commodity:nitrocellulose: 'Nitrocellulose' leads into thruster, Ammo and Missiles but no use leads into a consumer good.
|
||||
recipe:commodity:oxygen: 'Oxygen' leads into thruster, warhead, Ammo, Mines and Missiles but no use leads into a consumer good.
|
||||
recipe:commodity:potassium-nitrate: 'Potassium Nitrate' leads into thruster, Ammo and Missiles but no use leads into a consumer good.
|
||||
recipe:commodity:rocket-motor: 'Rocket Motor' leads into thruster and Missiles but no use leads into a consumer good.
|
||||
recipe:commodity:steel: 'Steel' leads into barrel, dispenser, feed mechanism, thruster, warhead, Ammo, Mines and Missiles but no use leads into a consumer good.
|
||||
L-recipe (109)
|
||||
03ff4335-fa65-4a89-8cea-68f70de01d60: Commodity 'Dashboard Ornament' has no recipe.
|
||||
0caaa08c-e0b6-4eaf-a9fd-7e03088371ea: Commodity 'Reaction Chamber' has no recipe.
|
||||
0d6a518d-24e9-40bf-9861-301de17b5161: Commodity 'Heat Sink Tile' has no recipe.
|
||||
11d9fd0c-c0dd-482f-8e2a-f7c289ed6a3d: Commodity 'AI Pilot' has no recipe.
|
||||
17032840-c285-4f33-82ae-6b03f1e1e56b: Commodity 'Cargo Pod' has no recipe.
|
||||
1af83f0b-11ae-4d03-acc3-c5d478d55f14: Commodity 'Spacesuit' has no recipe.
|
||||
1ea0df17-aba1-45bc-8d6e-a430c110e38d: Commodity 'Geiger Counter' has no recipe.
|
||||
20376ecd-77fa-4ffe-9be6-185158ee1bfc: Commodity 'All-Surface Stylus' has no recipe.
|
||||
2055f611-ef5d-4791-b1ad-f1757c081a99: Commodity 'Holo-desk' has no recipe.
|
||||
22917d5e-313a-4470-a91e-0c78f1e08044: Commodity 'Spacewalking Boots' has no recipe.
|
||||
2aa99b2d-80ed-4640-9350-9affcfe6d8cd: Commodity 'Construction Rebar' has no recipe.
|
||||
32934bf0-d7e9-432f-8863-e07c092b67f6: Commodity 'Inertial Compensating Seatbelt' has no recipe.
|
||||
33944941-5bd1-43ca-91a4-348c253f7e8b: Commodity 'Stealth Coating' has no recipe.
|
||||
34b16da9-1e5e-4fba-b256-eb8a38274b39: Commodity 'Neural Lace' has no recipe.
|
||||
35f02735-1993-4467-b3de-028c2d6e2276: Commodity 'Emergency Personal Life Support System' has no recipe.
|
||||
3689a855-9264-40f0-91b3-8b235dac80b6: Commodity 'Sure Bet Sherbet Fountain' has no recipe.
|
||||
3987140a-19c3-4b0b-8fa5-528f43a83afb: Commodity 'Magnetic EVA Boots' has no recipe.
|
||||
3a33da73-ba06-4574-afec-d529097408b5: Commodity 'Universal Translator' has no recipe.
|
||||
3c6bb1cc-70d8-400b-8d69-9c81339758f3: Commodity 'Bacteria' has no recipe.
|
||||
3ddbbb28-c166-4ab3-8a0b-c7b77c372f32: Commodity 'Mouth Adapting Gummy Molars' has no recipe.
|
||||
40004417-d242-47d2-9f27-1bbcf8548779: Commodity 'Trigger' has no recipe.
|
||||
4081eb4c-3376-4912-a230-c43096d90ad1: Commodity 'Travel Permit' has no recipe.
|
||||
421e9788-d094-4c17-88cc-0d820e3cfeca: Commodity 'Sheet Metal' has no recipe.
|
||||
4486cfad-3063-4667-80ae-5e4d615ee501: Commodity 'Hydrogen' has no recipe.
|
||||
452bbd60-11df-449b-a4b7-a4ca22527123: Commodity 'Secret Storage Compartment' has no recipe.
|
||||
4681d1af-1a6d-4c7e-b10d-5ee8295b9a79: Commodity 'Ship Fins' has no recipe.
|
||||
4810a43b-bbb9-447d-b62e-b723e4d88afc: Commodity 'Antireflective Coating' has no recipe.
|
||||
498c664d-05ff-45a0-b3b6-2b98feec8611: Commodity 'Super Tough Toffee' has no recipe.
|
||||
4b3fc716-d362-4379-8c65-f2c471647ed1: Commodity 'Crash Test Dummy' has no recipe.
|
||||
4c82acfa-b8e4-4601-9465-2fad107b1eff: Commodity 'Insulation' has no recipe.
|
||||
4d5929a9-5cb1-470c-a0b7-12f8abaf4497: Commodity 'Ship Decal' has no recipe.
|
||||
502a6ed8-73aa-4554-ae89-a50b67cfa9e0: Commodity 'Rope' has no recipe.
|
||||
515734e6-4287-470c-bf56-188c4b257420: Commodity 'Trousers' has no recipe.
|
||||
51e4dc3b-0107-4ab5-a2c6-02d34a1035b2: Commodity 'Mining Rights' has no recipe.
|
||||
5383d6b6-083b-4721-8f6b-426dba0beaeb: Commodity 'Hat' has no recipe.
|
||||
5449f7d3-b250-41cd-9e7e-ab2a7037cacb: Commodity 'Knife' has no recipe.
|
||||
5837ec5e-036b-4f73-9098-dbe11339909f: Commodity 'Safety Goggles' has no recipe.
|
||||
5bcddae5-10fe-4316-9dca-6dc5d53c899e: Commodity 'Local Newscast' has no recipe.
|
||||
5e2950d6-02df-461e-a35e-a4123c6a5639: Commodity 'Big Red Button' has no recipe.
|
||||
601a345d-6f0b-4bdb-8171-be4befaf9a33: Commodity 'Daily Feed Ad Slot (5ms)' has no recipe.
|
||||
63abe46b-ad99-4ac9-b5e4-d83a40465065: Commodity 'Joystick' has no recipe.
|
||||
64bccb57-3aa8-4e5f-829d-07e62295b0c7: Commodity 'Fungi' has no recipe.
|
||||
6713c2b2-d886-4440-b076-dd206c22848a: Commodity 'SpaceCast' has no recipe.
|
||||
675a1ebe-868c-4b27-a2eb-bee2fe5e356b: Commodity 'Paparazzi Drone' has no recipe.
|
||||
6821495a-4875-4350-a8e8-e813c3576aa8: Commodity 'Fuel' has no recipe.
|
||||
6d20c298-281e-46fc-be33-dbcc575d49d7: Commodity 'Cockpit' has no recipe.
|
||||
6d4c9e32-7ffd-45f6-8e08-86d544793774: Commodity 'Dials' has no recipe.
|
||||
6dc76b7c-65c3-4cc1-bc2a-eace8e4f58d2: Commodity 'Support Strut' has no recipe.
|
||||
6f0ed812-01b0-4767-90c5-0b6857bc2e29: Commodity 'Memory Download' has no recipe.
|
||||
7e9783b7-ab6c-4c50-bb99-4f1f3a3e240d: Commodity 'Animal Products' has no recipe.
|
||||
86d11f6a-9ddd-478d-8192-f047d38a7c6a: Commodity 'Moo-ed Lighting' has no recipe.
|
||||
8b026aea-1d79-49a0-b843-abdfcca31bab: Commodity 'Helmet' has no recipe.
|
||||
03740fd6-158d-43e9-b070-9a40e0b9bc45: Offered design 'Secure Cargo Bay' has no recipe.
|
||||
03a842b2-295e-4cf7-9faa-ecc4bc54eb76: Offered design 'Heavy Beam Laser' has no recipe.
|
||||
04255796-db68-48d2-81e5-8cfdab150706: Offered design 'Burn Drive' has no recipe.
|
||||
08226a8cb09844919c9922fbd7b76bef: Offered design 'Station Reactor' has no recipe.
|
||||
0d499d62-3b92-454b-9498-37d12616167f: Offered design 'Charged Scatter Blaster' has no recipe.
|
||||
106179618b054e8da61650bbec486c18: Offered design 'Fire Control Array' has no recipe.
|
||||
1c0cff5d-8668-45ea-9726-8b08c81d0267: Offered design 'Short-Range Missile Rack' has no recipe.
|
||||
205efba0-16af-477b-80e9-c9597cead5b4: Offered design 'Ring Reactor' has no recipe.
|
||||
20e9f41a-6bd2-4f6c-9740-7b707614509c: Offered design 'Cryogenic Heat Pump' has no recipe.
|
||||
291a01746063494fbfcb8c96f82aa8d3: Offered design 'Muon Fusion Station Reactor' has no recipe.
|
||||
2933c4ce-bf41-459c-b0d6-9583466b393d: Offered design 'Long Laser' has no recipe.
|
||||
2935b4d4-2ad5-4b90-8416-a85bbb38171b: Offered design 'Adaptive Radiator' has no recipe.
|
||||
2b2777c0-b756-4e19-9bf6-e5bac3cc385c: Offered design 'Turret Control Module' has no recipe.
|
||||
2c911da4-fad0-4a38-be5b-5e327c0c9e43: Offered design 'Industrial Thermostatic Heater' has no recipe.
|
||||
2e4c7753e0a24c13849818ac1dcfdba0: Offered design 'Passive Array' has no recipe.
|
||||
2e5193aa-3703-4ecc-911d-4d8394ce4c2f: Offered design 'Incendiary Rocket Pod' has no recipe.
|
||||
31325c3d-0537-40ec-9e5e-80930ea01496: Offered design 'Cockpit 2x2' has no recipe.
|
||||
32157982-b015-461e-ba4e-d321a23c2748: Offered design 'Long-Range Missile Rack' has no recipe.
|
||||
34b15c33-c01f-4712-ac75-5fcf779f0685: Offered design 'Capacitor' has no recipe.
|
||||
372d23cc-5ef0-42b5-9d96-807f2e412b0d: Offered design 'Muon Fusion Reactor' has no recipe.
|
||||
394612a6-9198-4797-a69b-c70cd0ee3273: Offered design 'High-Yield Reactor' has no recipe.
|
||||
3baa2c43-b389-4438-94cb-fbb04489cd77: Offered design 'Heavy Reactor' has no recipe.
|
||||
3e930a2c-ac72-4385-98aa-1c5b0b90db46: Offered design 'Medium Docking Bay' has no recipe.
|
||||
457ac901-aa54-4ba7-9df6-fbacdfb40b3f: Offered design 'Cell Blaster' has no recipe.
|
||||
46b66f9a-5c72-4e7a-ac9b-4dd7904cc4a1: Offered design 'Large Cargo Bay' has no recipe.
|
||||
480d6cc4-cd8a-49b6-9c89-211033e7c1d5: Offered design 'Compact Sensor' has no recipe.
|
||||
499f7891-c5df-4cbe-8431-9db7108102ec: Offered design 'Charged Blaster' has no recipe.
|
||||
49b4c15a-c10b-49c0-9dad-31dfb9b3a9b9: Offered design 'Cargo Bay' has no recipe.
|
||||
4a41dec8-6b65-46ee-b578-ba805f112c0c: Offered design 'Light Laser' has no recipe.
|
||||
4b019503-1865-4bad-a6e9-c85b558aacea: Offered design 'Long Radiator' has no recipe.
|
||||
4bc1fe6f-347a-425e-be1b-997920175bee: Offered design 'Compact Reactor' has no recipe.
|
||||
542169f2-363c-41f7-8d6d-60a5bd7578bd: Offered design 'Heat Pump' has no recipe.
|
||||
5cd802dd-ef0e-4303-bd87-c30988326e4b: Offered design 'Large Drive' has no recipe.
|
||||
5ee2ff03-0ac4-4cdd-89bc-81e29223900b: Offered design 'Guided Missile Launcher' has no recipe.
|
||||
632420a6-4419-4647-a92b-5e22ea289025: Offered design 'Lightning Projector' has no recipe.
|
||||
67111f5b41d5464e958ffc62bb3249da: Offered design 'Coolant Vent' has no recipe.
|
||||
726c1403ced34c2497693bf0f269c898: Offered design 'Inspection Scanner' has no recipe.
|
||||
72859489-677a-47a4-ae04-550e582ba29e: Offered design 'Sensor Array' has no recipe.
|
||||
7d14649c-a3b6-47c5-ab74-201b90072e2c: Offered design 'Tractor Beam' has no recipe.
|
||||
88e81a2b-45fd-49de-830f-c896adae8d5b: Offered design 'Racing Drive' has no recipe.
|
||||
8d84faaae78c490cb762289fd362bb0a: Offered design 'Launch Suppressor' has no recipe.
|
||||
9013c312-f37f-42a8-9efc-3d699759923b: Offered design 'Small Drive' has no recipe.
|
||||
a0478430-3ec5-445d-94a7-f30e61b2b8d3: Offered design 'Swarm Rocket Pod' has no recipe.
|
||||
a2ce2da35eff4f4aa6ec220449427a0d: Offered design 'High-Yield Station Reactor' has no recipe.
|
||||
a828a676cc9e492f86ea7e08d75c4687: Offered design 'Launch Baffle' has no recipe.
|
||||
ae05f4cb-0dd5-4f37-af96-cc61c9d61e1f: Offered design 'Small Cargo Bay' has no recipe.
|
||||
b1403776e5fc4bd9bd0ed17d7e2a5e6e: Offered design 'Heavy Station Reactor' has no recipe.
|
||||
b24ee1740ae04cdf9a07fff4105069f2: Offered design 'Thruster Overdrive' has no recipe.
|
||||
bb5d9f73-612f-4060-8fb4-f72d6b93b616: Offered design 'Djinni' has no recipe.
|
||||
bc3870ae-8e31-45ec-99d9-745a4262f78a: Offered design 'Radiator' has no recipe.
|
||||
c07ea205005d423bb70d3bed899fdedd: Offered design 'Targeting Computer' has no recipe.
|
||||
c4b20032-8cd3-4206-807f-97b296797425: Offered design 'Longinus' has no recipe.
|
||||
d6e1b44396494e39a4e0a1b51c92a0ef: Offered design 'Ring Station Reactor' has no recipe.
|
||||
d706ff66-c98c-4e60-a8e5-5dceb8dc3742: Offered design 'Rugged Drive' has no recipe.
|
||||
ebfb35b5-3905-4510-a8cf-c09528f27172: Offered design 'High-Thrust Drive' has no recipe.
|
||||
ef0f782e-9fa8-4059-bb8c-f16e1d3de100: Offered design 'Medium Drive' has no recipe.
|
||||
fa568d572eec4969aad07599444a3892: Offered design 'Point Defense Laser' has no recipe.
|
||||
L-source-sink (10)
|
||||
recipe:08c07793-bc06-48dc-adc2-c7e61ef2cb2b: 'Uranium' has no sink: no recipe takes it or a role it fills, no design names a role it fills, no weapon draws it, no gate buys it.
|
||||
recipe:commodity:aluminium: 'Aluminium' has no sink: no recipe takes it or a role it fills, no design names a role it fills, no weapon draws it, no gate buys it.
|
||||
recipe:commodity:copper: 'Copper' has no sink: no recipe takes it or a role it fills, no design names a role it fills, no weapon draws it, no gate buys it.
|
||||
recipe:commodity:iron: 'Iron' has no sink: no recipe takes it or a role it fills, no design names a role it fills, no weapon draws it, no gate buys it.
|
||||
recipe:commodity:nickel: 'Nickel' has no sink: no recipe takes it or a role it fills, no design names a role it fills, no weapon draws it, no gate buys it.
|
||||
recipe:commodity:niobium: 'Niobium' has no sink: no recipe takes it or a role it fills, no design names a role it fills, no weapon draws it, no gate buys it.
|
||||
recipe:commodity:platinum-group-metals: 'Platinum Group Metals' has no sink: no recipe takes it or a role it fills, no design names a role it fills, no weapon draws it, no gate buys it.
|
||||
recipe:commodity:rare-earth-oxides: 'Rare Earth Oxides' has no sink: no recipe takes it or a role it fills, no design names a role it fills, no weapon draws it, no gate buys it.
|
||||
recipe:commodity:titanium: 'Titanium' has no sink: no recipe takes it or a role it fills, no design names a role it fills, no weapon draws it, no gate buys it.
|
||||
recipe:commodity:tungsten: 'Tungsten' has no sink: no recipe takes it or a role it fills, no design names a role it fills, no weapon draws it, no gate buys it.
|
||||
|
||||
Depth
|
||||
00b5b3b2-2fc5-4adb-a1d7-c1a35d19afd3 depth 0
|
||||
0271bb97-4ce8-4d64-97c3-8bfd3f76b2c6 depth 5
|
||||
03ff4335-fa65-4a89-8cea-68f70de01d60 depth none
|
||||
043997a8-0661-4206-ab8a-10215ecf4efc depth 0
|
||||
08c07793-bc06-48dc-adc2-c7e61ef2cb2b depth 1
|
||||
0b449ae1-7eab-47e8-ac3c-2b6f6ff01f00 depth 5
|
||||
0caaa08c-e0b6-4eaf-a9fd-7e03088371ea depth none
|
||||
0d6a518d-24e9-40bf-9861-301de17b5161 depth none
|
||||
11d9fd0c-c0dd-482f-8e2a-f7c289ed6a3d depth none
|
||||
13116166-f0c8-43cf-a35f-8fd448bc630c depth 5
|
||||
17032840-c285-4f33-82ae-6b03f1e1e56b depth none
|
||||
1af83f0b-11ae-4d03-acc3-c5d478d55f14 depth none
|
||||
1b4a2bb358eb432eb1cfc0ccf3317303 depth 6
|
||||
1ea0df17-aba1-45bc-8d6e-a430c110e38d depth none
|
||||
20376ecd-77fa-4ffe-9be6-185158ee1bfc depth none
|
||||
2055f611-ef5d-4791-b1ad-f1757c081a99 depth none
|
||||
214fe497-cda4-4cdb-a7c4-fe656e5ff61c depth 0
|
||||
22917d5e-313a-4470-a91e-0c78f1e08044 depth none
|
||||
2aa99b2d-80ed-4640-9350-9affcfe6d8cd depth none
|
||||
2e08445d-c130-497c-9fb3-8d752a24e654 depth 2
|
||||
2fd0d88b-f565-4021-85b4-02d9eae7be58 depth 5
|
||||
3085fc8a-ec0d-4f6f-a339-ea43edb573e6 depth 6
|
||||
32934bf0-d7e9-432f-8863-e07c092b67f6 depth none
|
||||
33944941-5bd1-43ca-91a4-348c253f7e8b depth none
|
||||
34b16da9-1e5e-4fba-b256-eb8a38274b39 depth none
|
||||
35f02735-1993-4467-b3de-028c2d6e2276 depth none
|
||||
36746041-a5bd-4b95-aa18-294acaaeae62 depth 1
|
||||
3689a855-9264-40f0-91b3-8b235dac80b6 depth none
|
||||
3987140a-19c3-4b0b-8fa5-528f43a83afb depth none
|
||||
3a33da73-ba06-4574-afec-d529097408b5 depth none
|
||||
3aa1ac05-6d55-4569-8a4b-e1c3c6e07c61 depth 5
|
||||
3acbb2bf-19fb-4591-bef1-dc9d5dde7e7a depth 0
|
||||
3c6bb1cc-70d8-400b-8d69-9c81339758f3 depth none
|
||||
3c8b2b3d-ca1a-405f-966f-c64662a64418 depth 2
|
||||
3ddbbb28-c166-4ab3-8a0b-c7b77c372f32 depth none
|
||||
40004417-d242-47d2-9f27-1bbcf8548779 depth none
|
||||
4081eb4c-3376-4912-a230-c43096d90ad1 depth none
|
||||
421e9788-d094-4c17-88cc-0d820e3cfeca depth none
|
||||
4486cfad-3063-4667-80ae-5e4d615ee501 depth none
|
||||
452bbd60-11df-449b-a4b7-a4ca22527123 depth none
|
||||
4681d1af-1a6d-4c7e-b10d-5ee8295b9a79 depth none
|
||||
4810a43b-bbb9-447d-b62e-b723e4d88afc depth none
|
||||
498c664d-05ff-45a0-b3b6-2b98feec8611 depth none
|
||||
4b3fc716-d362-4379-8c65-f2c471647ed1 depth none
|
||||
4c82acfa-b8e4-4601-9465-2fad107b1eff depth none
|
||||
4d5929a9-5cb1-470c-a0b7-12f8abaf4497 depth none
|
||||
502a6ed8-73aa-4554-ae89-a50b67cfa9e0 depth none
|
||||
515734e6-4287-470c-bf56-188c4b257420 depth none
|
||||
51e4dc3b-0107-4ab5-a2c6-02d34a1035b2 depth none
|
||||
5383d6b6-083b-4721-8f6b-426dba0beaeb depth none
|
||||
5449f7d3-b250-41cd-9e7e-ab2a7037cacb depth none
|
||||
5837ec5e-036b-4f73-9098-dbe11339909f depth none
|
||||
5bcddae5-10fe-4316-9dca-6dc5d53c899e depth none
|
||||
5e2950d6-02df-461e-a35e-a4123c6a5639 depth none
|
||||
601a345d-6f0b-4bdb-8171-be4befaf9a33 depth none
|
||||
63abe46b-ad99-4ac9-b5e4-d83a40465065 depth none
|
||||
64bccb57-3aa8-4e5f-829d-07e62295b0c7 depth none
|
||||
6713c2b2-d886-4440-b076-dd206c22848a depth none
|
||||
675a1ebe-868c-4b27-a2eb-bee2fe5e356b depth none
|
||||
679fb6a1-cefb-4adc-a49c-71942602196b depth 5
|
||||
6821495a-4875-4350-a8e8-e813c3576aa8 depth none
|
||||
6af6446e40cb4cdd90d7a3fee04394d4 depth 5
|
||||
6d20c298-281e-46fc-be33-dbcc575d49d7 depth none
|
||||
6d4c9e32-7ffd-45f6-8e08-86d544793774 depth none
|
||||
6dc76b7c-65c3-4cc1-bc2a-eace8e4f58d2 depth none
|
||||
6f0ed812-01b0-4767-90c5-0b6857bc2e29 depth none
|
||||
7e9783b7-ab6c-4c50-bb99-4f1f3a3e240d depth none
|
||||
86d11f6a-9ddd-478d-8192-f047d38a7c6a depth none
|
||||
8776c2fd-45f6-4ca6-8ef0-5214be830182 depth 0
|
||||
8ac84e31-f0cf-43b2-8611-3316adfa4010 depth 5
|
||||
8b026aea-1d79-49a0-b843-abdfcca31bab depth none
|
||||
a8e259fc-fbf1-477a-8248-0277611f1859 depth 1
|
||||
commodity:actuator depth 3
|
||||
commodity:aluminium depth 1
|
||||
commodity:ammonia depth 0
|
||||
commodity:anorthite depth 0
|
||||
commodity:autoloader depth 4
|
||||
commodity:brannerite depth 0
|
||||
commodity:cellulose-pulp depth 3
|
||||
commodity:chalcopyrite depth 0
|
||||
commodity:columbite depth 0
|
||||
commodity:copper depth 1
|
||||
commodity:explosive-fill depth 3
|
||||
commodity:fragmentation-case depth 2
|
||||
commodity:fuze depth 4
|
||||
commodity:gun-barrel depth 3
|
||||
commodity:gun-forging depth 2
|
||||
commodity:he-warhead depth 5
|
||||
commodity:hexamine depth 1
|
||||
commodity:ilmenite depth 0
|
||||
commodity:iron depth 1
|
||||
commodity:isoferroplatinum depth 0
|
||||
commodity:magnetite depth 0
|
||||
commodity:mine-dispenser depth 4
|
||||
commodity:mines depth 6
|
||||
commodity:missiles depth 7
|
||||
commodity:monazite depth 0
|
||||
commodity:native-copper depth 0
|
||||
commodity:native-gold depth 0
|
||||
commodity:nickel depth 1
|
||||
commodity:niobium depth 1
|
||||
commodity:nitric-acid depth 2
|
||||
commodity:nitrocellulose depth 4
|
||||
commodity:orthoclase depth 0
|
||||
commodity:oxygen depth 1
|
||||
commodity:pentlandite depth 0
|
||||
commodity:platinum-group-metals depth 1
|
||||
commodity:potassium-nitrate depth 3
|
||||
commodity:primer depth 4
|
||||
commodity:projectile depth 2
|
||||
commodity:rare-earth-oxides depth 1
|
||||
commodity:rocket-motor depth 6
|
||||
commodity:shell-casing depth 2
|
||||
commodity:sperrylite depth 0
|
||||
commodity:steel depth 1
|
||||
commodity:sylvite depth 0
|
||||
commodity:titanium depth 1
|
||||
commodity:troilite depth 0
|
||||
commodity:tungsten depth 1
|
||||
commodity:uraninite depth 0
|
||||
commodity:wolframite depth 0
|
||||
d02bcf71f2c8420b878f036cd1a33bea depth 5
|
||||
|
||||
Dry run. Pass "apply" to write Aetheria.cc.
|
||||
|
|
@ -60,7 +60,7 @@ public static class EconomyCommand
|
|||
// The invariants whose faults the batches introduce refuse them. The rest (a missing sink, no consumer demand, a commodity
|
||||
// with no recipe yet) are completeness: reported, and settled by the batch that closes the chain.
|
||||
private static readonly string[] Shape =
|
||||
{ EconomyChecks.LRecipe, EconomyChecks.LLore, EconomyChecks.LProductive, EconomyChecks.LOneKindList };
|
||||
{ EconomyChecks.LRecipe, EconomyChecks.LLore, EconomyChecks.LProductive, EconomyChecks.LOneKindList, EconomyChecks.LWeights };
|
||||
|
||||
// A batch is compiled code under tools/AetherDb/Economy/ and runs with the operator's authority: reviewed code, never an input.
|
||||
private const string Usage = "economy report | author <batch>... [apply]\nA batch is reviewed code: it runs on a trial copy and must write only through EconomyAuthor.";
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ public static class Program
|
|||
case "targeting-catalog-6c": return TargetingCatalog6c(args.Contains("apply"));
|
||||
case "targeting-catalog-6d": return TargetingCatalog6d(args.Contains("apply"));
|
||||
case "ship-authoring": return ShipAuthoringCommands.Run(args.Skip(1).ToArray());
|
||||
case "field-kinds": return FieldKindsCatalog(args.Contains("apply"));
|
||||
case "pd-gear": return PdGearCatalog(args.Contains("apply"));
|
||||
case "mine-launcher": return MineLauncherCatalog(args.Contains("apply"));
|
||||
case "smoke-hull": return SmokeHullCatalog(args.Contains("apply"));
|
||||
|
|
@ -82,7 +81,7 @@ public static class Program
|
|||
case "auto-guns": return AutoGunsCatalog.Run(AetherDb.Open(catalogWritable: args.Contains("apply")).Cache, args.Contains("apply"), Console.Out);
|
||||
case "doctrine-catalog": return DoctrineCatalog.Run(AetherDb.Open(catalogWritable: args.Contains("apply")).Cache, args.Contains("apply"), Console.Out);
|
||||
default:
|
||||
Console.WriteLine("commands: census, factions, station-fit, hardpoint-fit, loadout [seed], loadout-commit <name> <hull product> [<x>,<y>,<rotation>,<design>[@<product>]]... [--group <i>,<j>...]... [--replace] [--boss-of <faction>], save, settings, settings-dump, dangling [clear <Type.Member>]... [apply], shield-migrate [apply], brownout-migrate [apply], roles-migrate [apply], firing-arc-migrate [apply], range-falloff [apply] [--effective <fraction>] [--end <multiplier>], targeting-catalog [apply], targeting-catalog-6c [apply], targeting-catalog-6d [apply], ship-authoring create|inspect|validate|compose, field-kinds [apply], mine-launcher [apply], smoke-hull [apply], smoke-rounds [apply], roles-backfill [apply], pd-gear [apply], consumables-first-set [apply], launch-suppressor [apply], pirates-faction [apply], verse-grammar [apply], generic-designs [apply], sensor-stat-set [apply], inspection-scanner [apply], minor-power-factions [apply], place-names [apply], product-lines weapons|minor-powers|gear|tiers [apply], doctrine-catalog [apply], auto-guns [apply], assembly-from-maker [apply], station-kinds [hull \"<name>\" <kind>] [apply], economy report|author <batch>... [apply]");
|
||||
Console.WriteLine("commands: census, factions, station-fit, hardpoint-fit, loadout [seed], loadout-commit <name> <hull product> [<x>,<y>,<rotation>,<design>[@<product>]]... [--group <i>,<j>...]... [--replace] [--boss-of <faction>], save, settings, settings-dump, dangling [clear <Type.Member>]... [apply], shield-migrate [apply], brownout-migrate [apply], roles-migrate [apply], firing-arc-migrate [apply], range-falloff [apply] [--effective <fraction>] [--end <multiplier>], targeting-catalog [apply], targeting-catalog-6c [apply], targeting-catalog-6d [apply], ship-authoring create|inspect|validate|compose, mine-launcher [apply], smoke-hull [apply], smoke-rounds [apply], roles-backfill [apply], pd-gear [apply], consumables-first-set [apply], launch-suppressor [apply], pirates-faction [apply], verse-grammar [apply], generic-designs [apply], sensor-stat-set [apply], inspection-scanner [apply], minor-power-factions [apply], place-names [apply], product-lines weapons|minor-powers|gear|tiers [apply], doctrine-catalog [apply], auto-guns [apply], assembly-from-maker [apply], station-kinds [hull \"<name>\" <kind>] [apply], economy report|author <batch>... [apply]");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -1561,38 +1560,6 @@ public static class Program
|
|||
return 0;
|
||||
}
|
||||
|
||||
// Mining Cut 3 (docs/mining-cut-refresh.md): the first field kind. A chunk is detected by reflected light, and
|
||||
// its reflectivity comes from its belt's kind, so a catalog with no kind leaves every belt dark. This authors
|
||||
// the one kind Cut 3 needs, "Asteroid"; Cut 7 authors the rest. CrossSection is reflectivity per schematic
|
||||
// cell of chunk area: 5 sits inside the shipped hulls' 2-15 per cell (Longinus, Djinni), so a mid-size rock
|
||||
// (3-6 units across, 7-28 cells) reflects like a small ship. Both numbers are for the operator to review.
|
||||
private static int FieldKindsCatalog(bool apply)
|
||||
{
|
||||
var db = AetherDb.Open(catalogWritable: apply);
|
||||
var kinds = db.Cache.GetAll<FieldKindData>().ToArray();
|
||||
foreach (var kind in kinds)
|
||||
Console.WriteLine($" {kind.Name,-12} cross-section {kind.CrossSection,5:0.##} per cell, weight {kind.GenerationWeight:0.##}");
|
||||
|
||||
if (kinds.Any(kind => kind.Name == "Asteroid"))
|
||||
{
|
||||
Console.WriteLine("\"Asteroid\" is already authored; nothing to do.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
var asteroid = new FieldKindData { Name = "Asteroid", CrossSection = 5f, GenerationWeight = 1f };
|
||||
Console.WriteLine($"Adds \"Asteroid\": cross-section {asteroid.CrossSection} per cell, weight {asteroid.GenerationWeight}.");
|
||||
if (!apply)
|
||||
{
|
||||
Console.WriteLine("\nDry run. Pass \"apply\" to author it.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
CultRecordRefs.Validate(asteroid);
|
||||
db.Cache.Commit(batch => batch.Upsert(typeof(FieldKindData), asteroid));
|
||||
Console.WriteLine("\nAuthored \"Asteroid\" in Aetheria.cc");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Aetheria release, cut pd-gear (ruling catalog-grows-generic-designs-branded-products): the catalog's first
|
||||
// point-defence class guns. Nothing in data marks a gun as PD (ruling pd-who-engages); these are PD by their
|
||||
// stats: a hose of light rounds, a quick light beam, and a small pellet volley. Each design is a deep copy of a
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ public static class StationKindsCatalog
|
|||
|
||||
private static readonly (string id, string name, string description)[] Table =
|
||||
{
|
||||
("mining", "Mining Station", "Extracts ore (Regolith, Nickel-Iron, Gold, Potassium) and Diamond from bodies and belts; consumes tools and food."),
|
||||
("mining", "Mining Station", "Extracts ore from belts: Regolith, Nickel-Iron and Troilite in common ground; Magnetite and Pentlandite in carbonaceous rock; Ilmenite and Anorthite in basalt; and only where the ground holds them Sylvite, Orthoclase, Chalcopyrite, Sperrylite, Native Copper, Native Gold, Isoferroplatinum, Uraninite, Brannerite, Monazite, Columbite and Wolframite. Cuts Diamond from deep cores; consumes tools and food."),
|
||||
("volatiles", "Volatiles Station", "Skims Methane, Ammonia and Water from gas giants and ice; consumes tools."),
|
||||
("agriculture", "Agriculture Station", "Grows Algae from Water and Potassium; feeds residential."),
|
||||
("processing", "Processing Station", "Refines ore and volatiles into Metals, Alloys and Compounds."),
|
||||
|
|
|
|||
Loading…
Reference in a new issue