From f20873e509d2cfc9e96ceda226ab24824b8d72b1 Mon Sep 17 00:00:00 2001 From: Simon Weinberger Date: Thu, 26 Dec 2024 07:03:11 +0100 Subject: [PATCH] don't count trigger techs for total tech cost --- Yafc.Model/Analysis/TechnologyScienceAnalysis.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Yafc.Model/Analysis/TechnologyScienceAnalysis.cs b/Yafc.Model/Analysis/TechnologyScienceAnalysis.cs index 5b34f46d..6f29bea4 100644 --- a/Yafc.Model/Analysis/TechnologyScienceAnalysis.cs +++ b/Yafc.Model/Analysis/TechnologyScienceAnalysis.cs @@ -74,9 +74,11 @@ public override void Compute(Project project, ErrorCollector warnings) { while (prerequisiteQueue.Count > 0) { var prerequisite = prerequisiteQueue.Dequeue(); - foreach (var ingredient in prerequisite.ingredients) { - int science = sciencePackIndex[ingredient.goods]; - sciencePackCount[science][current] += ingredient.amount * prerequisite.count; + if (!prerequisite.flags.HasFlagAny(RecipeFlags.HasResearchTriggerMask)) { + foreach (var ingredient in prerequisite.ingredients) { + int science = sciencePackIndex[ingredient.goods]; + sciencePackCount[science][current] += ingredient.amount * prerequisite.count; + } } foreach (var prerequisitePrerequisite in prerequisite.prerequisites) {