Ejemplo n.º 1
0
        public static TaleData_Trader GenerateRandom()
        {
            PawnKindDef pawnKindDef = (from d in DefDatabase <PawnKindDef> .AllDefs
                                       where d.trader
                                       select d).RandomElement <PawnKindDef>();
            Pawn pawn = PawnGenerator.GeneratePawn(pawnKindDef, FactionUtility.DefaultFactionFrom(pawnKindDef.defaultFactionType));

            pawn.mindState.wantsToTradeWithColony = true;
            PawnComponentsUtility.AddAndRemoveDynamicComponents(pawn, true);
            return(TaleData_Trader.GenerateFrom(pawn));
        }
 public Tale_DoublePawnAndTrader(Pawn firstPawn, Pawn secondPawn, ITrader trader)
     : base(firstPawn, secondPawn)
 {
     traderData = TaleData_Trader.GenerateFrom(trader);
 }
Ejemplo n.º 3
0
 public Tale_SinglePawnAndTrader(Pawn pawn, ITrader trader)
     : base(pawn)
 {
     traderData = TaleData_Trader.GenerateFrom(trader);
 }