This commit is contained in:
2026-06-04 12:29:33 -04:00
parent 0c820ac973
commit 9323e7a1a6
17 changed files with 39 additions and 39 deletions
+1 -1
View File
@@ -157,7 +157,7 @@
void OnUpdate()
{
entity = EntityData.Get()[entityDialogService.GetEntityId()];
entity = EntityData.Get()[entityDialogService.GetEntityId() ?? string.Empty];
refresh++;
StateHasChanged();
-2
View File
@@ -135,8 +135,6 @@
@code {
private ElementReference searchBox;
private string SearchText { get; set; } = "";
protected override void OnInitialized()
@@ -131,9 +131,10 @@
armyCount[entity.Info().Name]++;
}
if (entity.Production() != null && entity.Production().BuildTime + entitiesAtTime.Key > lastInterval)
var production = entity.Production();
if (production != null && production.BuildTime + entitiesAtTime.Key > lastInterval)
{
lastInterval = entity.Production().BuildTime + entitiesAtTime.Key;
lastInterval = production.BuildTime + entitiesAtTime.Key;
}
}
}
@@ -110,15 +110,17 @@
_supplyTaken = (from ordersAtInterval in ordersOverTime
from order in ordersAtInterval.Value
where order.Supply() != null
where order.Supply().Takes > 0
select order.Supply().Takes).Sum();
let supply = order.Supply()
where supply != null
where supply.Takes > 0
select supply.Takes).Sum();
_supplyGranted = (from ordersAtInterval in ordersOverTime
from order in ordersAtInterval.Value
where order.Supply() != null
where order.Supply().Grants > 0
select order.Supply().Grants).Sum();
let supply = order.Supply()
where supply != null
where supply.Grants > 0
select supply.Grants).Sum();
_extraBuildings = 0;
if (_supplyGranted > 160)
@@ -205,7 +205,9 @@ else
var armyValue = 0;
foreach (var unit in army)
{
armyValue += unit.Production().Alloy + unit.Production().Ether;
var unitProduction = unit.Production();
if (unitProduction != null)
armyValue += unitProduction.Alloy + unitProduction.Ether;
}
+2 -1
View File
@@ -202,7 +202,8 @@
else
{
immortals = (from entity in factions
where entity.VanguardAdded() == null || entity.VanguardAdded().ImmortalId == selectedImmortalType
let vanguardAdded = entity.VanguardAdded()
where vanguardAdded == null || vanguardAdded.ImmortalId == selectedImmortalType
select entity).ToList();
}
@@ -211,9 +211,9 @@
[CascadingParameter] public string StyleType { get; set; } = "Detailed";
private EntityProductionModel Production => Entity!.Production();
private EntityProductionModel? Production => Entity!.Production();
private List<EntityRequirementModel> Requirements => Entity!.Requirements();
private EntitySupplyModel Supply => Entity!.Supply();
private EntitySupplyModel? Supply => Entity!.Supply();
protected override void OnParametersSet()
@@ -38,6 +38,7 @@
var requirements = entity.Requirements();
var vanguard = entity.VanguardAdded();
if (vanguard == null) continue;
var productionBuilding = (from building in requirements
where building.Requirement == RequirementType.Production_Building
select building).First().Id;
@@ -71,8 +71,6 @@
}
int lastRequestedRefreshIndex;
void IDisposable.Dispose()
{
economyComparisonService.Unsubscribe(OnBuilderOrderChanged);
+2 -2
View File
@@ -168,8 +168,8 @@
private string? _faction;
private string? _immortal;
private string? Faction => _faction == null ? DataType.FACTION_QRath : _faction;
private string? Immortal => _immortal == null ? DataType.IMMORTAL_Orzum : _immortal;
private string Faction => _faction ?? DataType.FACTION_QRath;
private string Immortal => _immortal ?? DataType.IMMORTAL_Orzum;
private int? _buildingInputDelay;
-2
View File
@@ -6,8 +6,6 @@
<SearchDialogComponent></SearchDialogComponent>
@code {
private string test = "Q";
protected override void OnInitialized()
{
searchService.Subscribe(OnUpdate);