private string GetLetterText(string settlementName, MedievalTournament tournament, int durationDays) { var hostFaction = tournament.Faction; var textBuilder = new StringBuilder(); textBuilder.AppendLine(def.letterText.Formatted(hostFaction.def.leaderTitle, hostFaction.Name, settlementName, GenLabel.ThingsLabel(tournament.rewards), hostFaction.leader.Named("PAWN")).AdjustedFor(hostFaction.leader)); textBuilder.AppendLine(); textBuilder.AppendLine(tournament.category.description); textBuilder.AppendLine(); textBuilder.AppendLine("VanillaFactionsExpanded.TournamentDurationDays".Translate(durationDays)); return(textBuilder.ToString().TrimEndNewlines()); }
public static FloatMenuAcceptanceReport CanVisit(Caravan caravan, MedievalTournament tournament) { return(tournament != null && tournament.Spawned); }
public static IEnumerable <FloatMenuOption> GetFloatMenuOptions(Caravan caravan, MedievalTournament tournament) { return(CaravanArrivalActionUtility.GetFloatMenuOptions(() => CanVisit(caravan, tournament), () => new CaravanArrivalAction_AttendMedievalTournament(tournament), "VanillaFactionsExpanded.AttendMedievalTournament".Translate(tournament.Label), caravan, tournament.Tile, tournament)); }
public CaravanArrivalAction_AttendMedievalTournament(MedievalTournament tournament) { this.tournament = tournament; }