public string GetDescription(Colony colony, Players.Player player) { if (BoughtCount.TryGetValue(colony, out var times)) { var time = times.LastOrDefault(); return(string.Format(LocalizationHelper.LocalizeOrDefault("ColonistsBought", player), System.Math.Round(time - TimeCycle.TotalHours, 1))); } return(""); }
public float Evaluate(Colony colony) { var cs = ColonyState.GetColonyState(colony); if (cs.SettlersEnabled != SettlersState.Disabled && BoughtCount.TryGetValue(colony, out var count)) { return((float)(count.Count * cs.Difficulty.GetorDefault("UnhappyColonistsBought", -1))); } return(0); }