From 24b000eba8025a49d15d377c0d47228a53cb2f4a Mon Sep 17 00:00:00 2001 From: soul Date: Fri, 27 Nov 2026 02:27:02 +0100 Subject: [PATCH] Delete the applied RawStartPrices batch Co-Authored-By: Claude Sonnet 5.5 --- tools/AetherDb/Economy/RawStartPrices.cs | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 tools/AetherDb/Economy/RawStartPrices.cs diff --git a/tools/AetherDb/Economy/RawStartPrices.cs b/tools/AetherDb/Economy/RawStartPrices.cs deleted file mode 100644 index c56349a51..000000000 --- a/tools/AetherDb/Economy/RawStartPrices.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using GameCult.Caching; - -// One-shot: gives each raw good still at Price 0 a start price, its labour at the going wage over its output count (at least 1). -// Price 0 on a raw good is unset, not free; after this the wage reads only authored raw prices, and author's reprice writes only made -// goods, which never enter the wage. Applied, then deleted. -public sealed class RawStartPrices : EconomyBatch -{ - public override void Author(EconomyAuthor author) - { - var wage = EconomyBalance.Wage(author.Catalog); - foreach (var recipe in author.Catalog.GetAll()) - { - var item = author.Catalog.Get(recipe.Output); - if (item == null || !Recipes.IsCommodity(item) || !Recipes.IsRaw(author.Catalog, recipe) || item.Price != 0) continue; - author.SetPrice(recipe.Output.Key.Value, Math.Max(1, (int) Math.Round(wage * recipe.Workforce * recipe.Cycle / recipe.OutputCount, MidpointRounding.AwayFromZero))); - } - } -}