public override void DrawNaturalEyes(Vector3 drawLoc, Quaternion headQuat, bool portrait) { Mesh eyeMesh = this.CompFace.EyeMeshSet.Mesh.MeshAt(this.HeadFacing); PawnFaceGraphic faceGraphic = this.CompFace.PawnFaceGraphic; // natural eyes PartStatus eyeLeft = this.CompFace.BodyStat.EyeLeft; if (faceGraphic != null && (eyeLeft == PartStatus.Natural || eyeLeft == PartStatus.Artificial && !faceGraphic.EyePatchLeftTexExists())) { Material leftEyeMat = this.CompFace.FaceMaterial.EyeLeftMatAt(this.HeadFacing, portrait); if (leftEyeMat != null) { Vector3 left = drawLoc; drawLoc.y += Offsets.YOffset_LeftPart; GenDraw.DrawMeshNowOrLater( eyeMesh, left + this.EyeOffset(this.HeadFacing) + this.CompFace.EyeWiggler.EyeMoveL, headQuat, leftEyeMat, portrait); } } PartStatus eyeRight = this.CompFace.BodyStat.EyeRight; if (faceGraphic != null && (eyeRight == PartStatus.Natural || eyeRight == PartStatus.Artificial && !faceGraphic.EyePatchRightTexExists())) { Material rightEyeMat = this.CompFace.FaceMaterial.EyeRightMatAt(this.HeadFacing, portrait); if (rightEyeMat != null) { Vector3 right = drawLoc; right.y += Offsets.YOffset_RightPart; GenDraw.DrawMeshNowOrLater( eyeMesh, right + this.EyeOffset(this.HeadFacing) + this.CompFace.EyeWiggler.EyeMoveR, headQuat, rightEyeMat, portrait); } } }
public override void DrawNaturalEars(Vector3 drawLoc, Quaternion headQuat, bool portrait) { Mesh earMesh = this.CompFace.EyeMeshSet.Mesh.MeshAt(this.HeadFacing); PawnFaceGraphic faceGraphic = this.CompFace.PawnFaceGraphic; // natural eyes PartStatus earLeft = this.CompFace.BodyStat.EarLeft; if (faceGraphic == null) { return; } Material earLeftMatAt = null; if (earLeft == PartStatus.Natural || earLeft == PartStatus.Artificial && !faceGraphic.EarPatchLeftTexExists()) { earLeftMatAt = this.CompFace.FaceMaterial.EarLeftMatAt(this.HeadFacing, portrait); } else if (earLeft == PartStatus.Missing) { earLeftMatAt = this.CompFace.FaceMaterial.EarLeftMissingMatAt(this.HeadFacing, portrait); } if (earLeftMatAt != null) { Vector3 left = drawLoc; drawLoc.y += Offsets.YOffset_LeftPart; GenDraw.DrawMeshNowOrLater( earMesh, left + this.EarOffset(this.HeadFacing), headQuat, earLeftMatAt, portrait); } Material earRightMatAt = null; PartStatus earRight = this.CompFace.BodyStat.EarRight; if (earRight == PartStatus.Natural || earRight == PartStatus.Artificial && !faceGraphic.EarPatchRightTexExists()) { earRightMatAt = this.CompFace.FaceMaterial.EarRightMatAt(this.HeadFacing, portrait); } else if (earRight == PartStatus.Missing) { earRightMatAt = this.CompFace.FaceMaterial.EarRightMissingMatAt(this.HeadFacing, portrait); } if (earRightMatAt != null) { Vector3 right = drawLoc; right.y += Offsets.YOffset_RightPart; GenDraw.DrawMeshNowOrLater( earMesh, right + this.EarOffset(this.HeadFacing), headQuat, earRightMatAt, portrait); } }