Skip to content

Commit

Permalink
don't count trigger techs for total tech cost (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
SWeini authored Dec 26, 2024
2 parents f4451f9 + f20873e commit 48bc947
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Yafc.Model/Analysis/TechnologyScienceAnalysis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 48bc947

Please sign in to comment.