Skip to content

Commit 935a7e4

Browse files
authored
Improve precision #445 (#469)
Based on the discussion in #445 and the suggestion by @DaleStan, this at least partial solves the problem. Figured i might as well Pr it. Not sure if this warrants a change log entry, made one anyway.
2 parents 39ecda3 + acc6688 commit 935a7e4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Yafc.Model/Model/ProductionTableContent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ public void ChangeVariant<T>(T was, T now) where T : FactorioObject {
626626

627627
[MemberNotNullWhen(true, nameof(subgroup))]
628628
public bool isOverviewMode => subgroup != null && !subgroup.expanded;
629-
public float buildingCount => (float)recipesPerSecond * parameters.recipeTime;
629+
public float buildingCount => (float)(recipesPerSecond * parameters.recipeTime);
630630
public bool visible { get; internal set; } = true;
631631

632632
public RecipeRow(ProductionTable owner, IObjectWithQuality<RecipeOrTechnology> recipe) : base(owner) {

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Date:
2323
- Fixed a crash when item.weight == 0, related to ultracube.
2424
- If the requested mod version isn't found, use the latest, like Factorio.
2525
- Fix amounts loaded from other pages in the legacy summary page.
26+
- Improved precision for building count calculation.
2627
----------------------------------------------------------------------------------------------------------------------
2728
Version: 2.11.1
2829
Date: April 5th 2025

0 commit comments

Comments
 (0)