Exemplo n.º 1
0
        private static void CheckMissingParts(BodyProps bodyProps)
        {
            Hediff hediff = bodyProps._hediff;

            if (hediff.def != HediffDefOf.MissingBodyPart)
            {
                return;
            }

            if (bodyProps._face != null)
            {
                if (bodyProps._face.Props.hasEyes)
                {
                    if (hediff.Part == bodyProps._leftEye)
                    {
                        bodyProps._face.BodyStat.EyeLeft = PartStatus.Missing;
                    }

                    if (hediff.Part == bodyProps._rightEye)
                    {
                        bodyProps._face.BodyStat.EyeRight = PartStatus.Missing;
                    }
                }
                if (bodyProps._face.Props.hasEars)
                {
                    if (hediff.Part == bodyProps._leftEar)
                    {
                        bodyProps._face.BodyStat.EarLeft = PartStatus.Missing;
                    }

                    if (hediff.Part == bodyProps._rightEar)
                    {
                        bodyProps._face.BodyStat.EarRight = PartStatus.Missing;
                    }
                }
            }

            if (bodyProps._anim != null && bodyProps._anim.Props.bipedWithHands)
            {
                if (hediff.Part == bodyProps._leftHand)
                {
                    bodyProps._anim.BodyStat.HandLeft = PartStatus.Missing;
                }

                if (hediff.Part == bodyProps._rightHand)
                {
                    bodyProps._anim.BodyStat.HandRight = PartStatus.Missing;
                }

                if (hediff.Part == bodyProps._leftFoot)
                {
                    bodyProps._anim.BodyStat.FootLeft = PartStatus.Missing;
                }

                if (hediff.Part == bodyProps._rightFoot)
                {
                    bodyProps._anim.BodyStat.FootRight = PartStatus.Missing;
                }
            }
        }
Exemplo n.º 2
0
        private static void CheckMissingParts(BodyProps bodyProps)
        {
            Hediff hediff = bodyProps._hediff;

            if (hediff.def != HediffDefOf.MissingBodyPart)
            {
                return;
            }

            if (bodyProps._face != null && bodyProps._face.Props.hasEyes)
            {
                if (hediff.Part == bodyProps._leftEye)
                {
                    bodyProps._face.BodyStat.EyeLeft = PartStatus.Missing;
                }

                if (hediff.Part == bodyProps._rightEye)
                {
                    bodyProps._face.BodyStat.EyeRight = PartStatus.Missing;
                }
            }

            if (bodyProps._anim != null && bodyProps._anim.Props.bipedWithHands)
            {
                if (hediff.Part == bodyProps._leftHand)
                {
                    //Need to add a check if art shoulder exist
                    Log.Message("No left hand");

                    bodyProps._anim.BodyStat.HandLeft = PartStatus.Missing;
                }

                if (hediff.Part == bodyProps._rightHand)
                {
                    Log.Message("No right hand");

                    bodyProps._anim.BodyStat.HandRight = PartStatus.Missing;
                }

                if (hediff.Part == bodyProps._leftFoot)
                {
                    bodyProps._anim.BodyStat.FootLeft = PartStatus.Missing;
                }

                if (hediff.Part == bodyProps._rightFoot)
                {
                    bodyProps._anim.BodyStat.FootRight = PartStatus.Missing;
                }
            }
        }