public static Droid StatDummy(Blueprint bp) { if (statDummy == null || statDummy.kindDef != bp.KindDef || statDummy.blueprint != bp) { statDummy = (Droid)PawnGenerator.GeneratePawn(bp.KindDef); statDummy.blueprint = bp; statDummy.InitialiseFromBlueprint(); StatsReportUtility.Reset(); } return(statDummy); }
public static Droid GenerateDroid(PawnKindDef kindDef, Blueprint bp, Faction faction = null) { try { Droid d = (Droid)PawnGenerator.GeneratePawn(kindDef, faction); d.blueprint = bp; d.InitialiseFromBlueprint(); return(d); } catch (Exception ex) { Log.Error($"Error generating droid: {ex}"); return(null); } }