Auto formatting
This commit is contained in:
@@ -343,16 +343,10 @@ public class BuildOrderService : IBuildOrderService
|
||||
|
||||
var checkedInterval = _lastInterval;
|
||||
|
||||
if (supply == null || production == null || supply.Takes.Equals(0))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if (supply == null || production == null || supply.Takes.Equals(0)) return 1;
|
||||
|
||||
var producedBy = production.ProducedBy;
|
||||
if (producedBy == null)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if (producedBy == null) return 1;
|
||||
|
||||
var uniqueCompleted = _buildOrder.UniqueCompleted[producedBy];
|
||||
|
||||
@@ -372,7 +366,7 @@ public class BuildOrderService : IBuildOrderService
|
||||
usedSlots += used.UsedSlots;
|
||||
var duration = used.StopUsageTime - used.StartingUsageTime;
|
||||
if (duration < shortestIncrement) shortestIncrement = duration;
|
||||
}
|
||||
}
|
||||
|
||||
if (usedSlots + supply.Takes <= trainingSlots)
|
||||
{
|
||||
@@ -389,10 +383,7 @@ public class BuildOrderService : IBuildOrderService
|
||||
checkedInterval += shortestIncrement;
|
||||
didDelay = true;
|
||||
|
||||
if (shortestIncrement == int.MaxValue)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if (shortestIncrement == int.MaxValue) return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Model.Entity.Data;
|
||||
using Model.Types;
|
||||
using static Services.IEntityFilterService;
|
||||
|
||||
namespace Services.Immortal;
|
||||
@@ -16,7 +15,9 @@ public class EntityFilterService : IEntityFilterService
|
||||
{
|
||||
private readonly List<string> _entityChoices = new();
|
||||
|
||||
private readonly List<string> _factionChoices = new() { DataType.Any, DataType.FACTION_QRath, DataType.FACTION_Aru };
|
||||
private readonly List<string> _factionChoices = new()
|
||||
{ DataType.Any, DataType.FACTION_QRath, DataType.FACTION_Aru };
|
||||
|
||||
private readonly List<string> _immortalChoices = new();
|
||||
private string _entityType = EntityType.Army;
|
||||
private string _searchText = "";
|
||||
|
||||
@@ -5,15 +5,14 @@ namespace Services.Immortal;
|
||||
|
||||
public class ImmortalSelectionService : IImmortalSelectionService, IDisposable
|
||||
{
|
||||
private readonly IStorageService _storageService;
|
||||
private string _selectedFaction = DataType.FACTION_QRath;
|
||||
private string _selectedImmortal = DataType.IMMORTAL_Orzum;
|
||||
|
||||
private readonly IStorageService _storageService;
|
||||
|
||||
public ImmortalSelectionService(IStorageService storageService)
|
||||
{
|
||||
_storageService = storageService;
|
||||
|
||||
|
||||
_storageService.Subscribe(RefreshDefaults);
|
||||
|
||||
RefreshDefaults();
|
||||
@@ -73,7 +72,7 @@ public class ImmortalSelectionService : IImmortalSelectionService, IDisposable
|
||||
if (foundFaction != null) _selectedFaction = foundFaction;
|
||||
|
||||
if (foundImmortal != null) _selectedImmortal = foundImmortal;
|
||||
|
||||
|
||||
NotifyDataChanged();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user