ConsoleColor GetLocationColor(Location loc) { if (loc.Owner == _country.PlayerCountry) { return(ConsoleColor.Green); } else if (_discovery.IsDiscovered(_country.PlayerCountry, loc) && (loc.Owner != null)) { return(GetCountryColor(loc.Owner)); } return(ConsoleColor.White); }
public void Update() { var player = _country.PlayerCountry; if (_army.GetAvailableCount(player) > 0) { var locPairs = _conquest.GetAcceptableLocations(player); foreach (var pair in locPairs) { var homeLoc = pair.Item1; var targetLoc = pair.Item2; var name = targetLoc.Name; if (_discovery.IsDiscovered(player, targetLoc)) { if (targetLoc.Owner != null) { var raceName = LocUtils.TranslateRaceName(targetLoc.Owner); name += $" ({targetLoc.Owner.Name}, {raceName})"; } } else { name += " (?)"; } name += "."; _context.AddCase(name, () => TryStartConquest(homeLoc, targetLoc, player)); } } _context.AddCase( Content.go_back, () => _context.GoToRelatedContext <ArmyController>()); }