public void AddingPawn() { CustomPawn pawn = new CustomPawn(randomizer.GenerateColonist()); PrepareCarefully.Instance.AddPawn(pawn); state.CurrentPawn = pawn; PawnAdded(pawn); }
public void AddingPawn(bool startingPawn) { CustomPawn pawn = new CustomPawn(randomizer.GenerateColonist()); pawn.Type = startingPawn ? CustomPawnType.Colonist : CustomPawnType.World; PrepareCarefully.Instance.AddPawn(pawn); state.CurrentPawn = pawn; PawnAdded(pawn); }
public PawnRelationDef ComputeInverseRelationship(PawnRelationDef def) { Pawn source = randomizer.GenerateColonist(); Pawn target = randomizer.GenerateColonist(); MethodInfo info = def.workerClass.GetMethod("CreateRelation", BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly); if (info == null) { return(null); } var worker = FindPawnRelationWorker(def); PawnGenerationRequest req = new PawnGenerationRequest(); worker.CreateRelation(source, target, ref req); foreach (PawnRelationDef d in PawnRelationUtility.GetRelations(target, source)) { return(d); } return(null); }