public override void PostSpawnSetup(bool respawningAfterLoad) { base.PostSpawnSetup(respawningAfterLoad); AlienPartGenerator apg = ((ThingDef_AlienRace)this.parent.def).alienRace.generalSettings.alienPartGenerator; this.customDrawSize = apg.customDrawSize; this.customHeadDrawSize = apg.customHeadDrawSize; this.customPortraitDrawSize = apg.customPortraitDrawSize; this.customPortraitHeadDrawSize = apg.customPortraitHeadDrawSize; }
public ExposableValueTuple <Color, Color, Color> GetChannel(string channel) { if (this.ColorChannels.ContainsKey(channel)) { return(this.ColorChannels[channel]); } ThingDef_AlienRace alienProps = ((ThingDef_AlienRace)this.parent.def); AlienPartGenerator apg = alienProps.alienRace.generalSettings.alienPartGenerator; foreach (ColorChannelGenerator apgChannel in apg.colorChannels) { if (apgChannel.name == channel) { this.ColorChannels.Add(channel, new ExposableValueTuple <Color, Color, Color>(this.GenerateColor(apgChannel.first), this.GenerateColor(apgChannel.second), this.GenerateColor(apgChannel.third))); return(this.ColorChannels[channel]); } } return(new ExposableValueTuple <Color, Color, Color>(Color.white, Color.white, Color.white)); }