public Vector3 SouthOffset(ExtraPartEntry Entry)
 {
     if (Entry.SouthOffset != Vector3.zero)
     {
         return(Entry.SouthOffset);
     }
     return(this.Props.SouthOffset);
 }
 public Vector3 WestOffset(ExtraPartEntry Entry)
 {
     if (Entry.WestOffset != Vector3.zero)
     {
         return(Entry.WestOffset);
     }
     return(this.Props.WestOffset);
 }
        public Vector3 GetAltitudeOffset(Rot4 rotation, ExtraPartEntry partEntry)
        {
            Vector3 offset = new Vector3();

            if (!partEntry.hidesBody)
            {
                offset.y = _OffsetFactor * partEntry.order;
                offset.y = offset.y + (_SubOffsetFactor * partEntry.sublayer);
            }

            bool flag = Find.Selector.SingleSelectedThing == pawn && Prefs.DevMode && DebugSettings.godMode;

            if (!onHead)
            {
                offset.y += _BodyOffset;
                if (rotation == Rot4.North)
                {
                    if (partEntry.northtop)
                    {
                        offset.y += _HairOffset;
                        offset   += NorthOffset(partEntry);
                    }
                    else
                    {
                        offset += NorthOffset(partEntry);
                    }
                }
                else if (rotation == Rot4.West)
                {
                    offset += WestOffset(partEntry);
                }
                else if (rotation == Rot4.East)
                {
                    offset += EastOffset(partEntry);
                }
                else if (rotation == Rot4.South)
                {
                    offset += SouthOffset(partEntry);
                }
            }
            else
            {
                if (rotation == Rot4.North)
                {
                    offset.y += _BodyOffset;
                }
                else
                {
                    offset.y += _HeadOffset;
                }
            }
            if (flag)
            {
                //    Log.Message(string.Format("{0}'s {1}, {2} offset: {3}, DrawPos.y: {4}", this.pawn.Label, parent.def.label, direction, offset, pawn.Drawer.DrawPos.y));
            }

            return(offset);
        }
 public override void PostSpawnSetup(bool respawningAfterLoad)
 {
     base.PostSpawnSetup(respawningAfterLoad);
     if (!this.Props.ExtrasEntries.NullOrEmpty())
     {
         extraPartEntry          = this.Props.ExtrasEntries.RandomElementByWeight((ExtraPartEntry x) => x.commonality);
         this.graphicPath        = extraPartEntry.extraTexPath;
         this.shader             = ShaderDatabase.LoadShader(extraPartEntry.shaderType.shaderPath);
         this.useSecondaryColor  = extraPartEntry.UseSecondaryColor;
         this.ExtraUseBodyOffset = extraPartEntry.UseBodytypeOffsets;
     }
     pauldronInitialized = true;
 }