public override void SpawnSetup(Map map, bool respawningAfterLoad) { //Kill all invalid spawns if (this.station == null) { this.Kill(null); return; } base.SpawnSetup(map, respawningAfterLoad); skills = new Pawn_SkillTracker(this); skillSettings = station.def.GetModExtension <ModExtension_Skills>(); station.GetDroneSkillsRecord = DroneSkills.UpdateSkills(skills, station.GetDroneSkillsRecord, skillSettings, true); story = new Pawn_StoryTracker(this) { bodyType = BodyTypeDefOf.Thin, crownType = CrownType.Average, childhood = DroneBackstories.childhood, adulthood = DroneBackstories.adulthood }; drafter = new Pawn_DraftController(this); relations = new Pawn_RelationsTracker(this); Name = new NameSingle("PRFDroneName".Translate()); //Set the AreaRestriction. null means Unrestricted playerSettings.AreaRestriction = this.station.droneAllowedArea; }
//Disabeling this for now as i think we dont need the refresh on Rare Tick. //I think on spawn && Long Tick is Enoth //public override void TickRare() //{ // base.TickRare(); // DroneSkills.UpdateSkills(skills, station.GetDroneSkillsRecord, skillSettings); //} public override void TickLong() { base.TickLong(); station.GetDroneSkillsRecord = DroneSkills.UpdateSkills(skills, station.GetDroneSkillsRecord, skillSettings, true); }