private void PayAsMineral() { int oneCycle; if (!_missionDataCache.GetAmountPerCycleByMineralDefinition(Target.Definition, out oneCycle)) { Logger.Error("mineral was not found " + Target); throw new PerpetuumException(ErrorCodes.ConsistencyError); } var cycles = GetQuantityOrProgress / oneCycle; _reward = cycles * Target.Reward; Log("paid as mineral " + _reward + " for " + Target); }