static public bool ShouldBeActivePermanent(this Accumulation.IShipUiModule module, Bot bot) => new[] { module?.TooltipLast?.Value?.IsHardener, bot?.ConfigSerialAndStruct.Value?.ModuleActivePermanentSetTitlePattern ?.Any(activePermanentTitlePattern => module?.TooltipLast?.Value?.TitleElementText()?.Text?.RegexMatchSuccessIgnoreCase(activePermanentTitlePattern) ?? false), } .Any(sufficientCondition => sufficientCondition ?? false);
static public bool ShouldBeActivePermanent(this Accumulation.IShipUiModule module, Bot bot) { System.Diagnostics.Debug.WriteLine($"Checking module {module.TooltipLast}" + $" IsHardener: {module?.TooltipLast?.Value?.IsHardener}" + $" IsActive: {module.IsActive(bot)}" + $" RampActive: {module.RampActive}" + $" ;RegionX: {module.Region.Min0};RegionY: {module.Region.Min1}"); if (module?.TooltipLast?.Value?.IsHardener ?? false) { return(true); } return (bot?.ConfigSerialAndStruct.Value?.ModuleActivePermanentSetTitlePattern ?.Any(activePermanentTitlePattern => module?.TooltipLast?.Value?.TitleElementText()?.Text ?.RegexMatchSuccessIgnoreCase(activePermanentTitlePattern) ?? false) ?? false); }
public Int64?ToggleLastAgeStepCountFromModule(Accumulation.IShipUiModule module) => stepIndex - ToggleLastStepIndexFromModule?.TryGetValueNullable(module);
public long?ToggleLastAgeStepCountFromModule(Accumulation.IShipUiModule module) => module == null ? null : stepIndex - ToggleLastStepIndexFromModule?.TryGetValueNullable(module);