private static string GetToolTipText(Vehicle vehicle, int unitIndex) { VehicleScheduleData scheduleData = Manager <VehicleScheduleDataManager> .Current[vehicle]; Locale locale = LazyManager <LocaleManager> .Current.Locale; if (scheduleData != null) { string result = ScheduleCapacityHelper.GetCapacityTooltipText(scheduleData.ScheduleMonthlyMultiplier, null, scheduleData.Capacity.GetTransfersPerStation(unitIndex), scheduleData.IsInacurate); if (result == "") { if (scheduleData.ScheduleMonthlyMultiplier != null) { result = locale.GetString("schedule_stopwatch/no_transfers"); } else { result = locale.GetString("schedule_stopwatch/no_transfers_data"); } } return(result); } return(locale.GetString("schedule_stopwatch/no_transfers_data")); }
private string GetCapacityTooltipText() { Locale locale = LazyManager <LocaleManager> .Current.Locale; if (_lastMonthMultiplier != null && _lastTaskTransfers != null && _lastTaskTransfers.Count > 0) { IReadOnlyDictionary <Item, TransferData> routeTaskTransfers = RouteTaskTransfers; bool isRoute = routeTaskTransfers != null && routeTaskTransfers.Count > 0; StringBuilder sb = new StringBuilder(); sb.Append(StringHelper.Boldify(locale.GetString("schedule_stopwatch/estim_monthly_transf").ToUpper())); if (isRoute) { sb.AppendLine().Append(StringHelper.Colorify(locale.GetString("schedule_stopwatch/estim_monthly_transf_hint"), UIColors.Solid.Text * 0.5f)); } if (_lastTravelData?.Estimated == true || _lastStationLoadingData?.Estimated == true) { sb.AppendLine().Append(StringHelper.Colorify(locale.GetString("schedule_stopwatch/inaccurate"), UIColors.Solid.Text * 0.5f)); } ScheduleCapacityHelper.TooltipTextForStation(_lastTaskTransfers, sb, routeTaskTransfers, _lastMonthMultiplier.Value); return(sb.ToString()); } return(""); }
private string GetCapacityTooltipText() { return(ScheduleCapacityHelper.GetCapacityTooltipText(_lastMonthMultiplier, _lastTotalTransfers, LastTransfersPerStation, _lastInaccurate, RouteTotalTransfers, RouteTransfersPerStation)); }