sometime i have Problems that a Strip Miner stop when the Asteroid is empty and away. So i want to make a if condition for that, because when the script toggle to much the miner, the capacity is null.
But i have problems with the syntax, can anyone help me?
var ModuleMinerF1 = Sanderling.MemoryMeasurementAccu?.Value?.ShipUiModule?.Where(module => module?.TooltipLast?.Value?.ToggleKeyTextLabel?.Text?.RegexMatchSuccessIgnoreCase("F1")?? false);
if (!(ModuleMinerF1?.RampActive && CapacitorPercent > 50){
Sanderling.KeyboardPressCombined(new{ VirtualKeyCode.F1});
Host.Delay(150);
}