Esempio n. 1
0
        public void CopyIndividualitySexuality(Pawn pawn)
        {
            try
            {
                CompIndividuality.Sexuality individualitySexuality = pawn.TryGetComp <CompIndividuality>().sexuality;
                Orientation originalOrientation = Comp(pawn).orientation;

                if (individualitySexuality == CompIndividuality.Sexuality.Straight && Comp(pawn).orientation != Orientation.Heterosexual)
                {
                    Comp(pawn).orientation = Orientation.Heterosexual;
                }
                else if (individualitySexuality == CompIndividuality.Sexuality.Bisexual && Comp(pawn).orientation != Orientation.Bisexual)
                {
                    Comp(pawn).orientation = Orientation.Bisexual;
                }
                else if (individualitySexuality == CompIndividuality.Sexuality.Gay && Comp(pawn).orientation != Orientation.Homosexual)
                {
                    Comp(pawn).orientation = Orientation.Homosexual;
                }

                /*if (Comp(pawn).orientation != originalOrientation)
                 *      Log.Message("RJW + [SYR]Individuality: Inherited pawn " + xxx.get_pawnname(pawn) + " sexuality from Individuality - " + Comp(pawn).orientation);*/
            }
            catch
            {
                Log.Warning("CopyIndividualitySexuality " + pawn?.Name + ", def: " + pawn?.def?.defName + ", kindDef: " + pawn?.kindDef?.race.defName);
            }
        }
Esempio n. 2
0
        public static void CopyIndividualitySexuality(Pawn pawn)
        {
            try
            {
                CompIndividuality.Sexuality individualitySexuality = pawn.TryGetComp <CompIndividuality>().sexuality;
                //Orientation originalOrientation = Comp(pawn).orientation;

                if (individualitySexuality == CompIndividuality.Sexuality.Asexual)
                {
                    Comp(pawn).orientation = Orientation.Asexual;
                }
                else if (!Genital_Helper.has_genitals(pawn) && pawn.kindDef.race.defName.ToLower().Contains("droid"))
                {
                    Comp(pawn).orientation = Orientation.Asexual;
                }
                else if (individualitySexuality == CompIndividuality.Sexuality.Straight)
                {
                    Comp(pawn).orientation = Orientation.Heterosexual;
                }
                else if (individualitySexuality == CompIndividuality.Sexuality.Bisexual)
                {
                    Comp(pawn).orientation = Orientation.Bisexual;
                }
                else if (individualitySexuality == CompIndividuality.Sexuality.Gay)
                {
                    Comp(pawn).orientation = Orientation.Homosexual;
                }
                else
                {
                    Comp(pawn).orientation = Orientation.Asexual;
                }

                /*if (Comp(pawn).orientation != originalOrientation)
                 *      Log.Message("RJW + [SYR]Individuality: Inherited pawn " + xxx.get_pawnname(pawn) + " sexuality from Individuality - " + Comp(pawn).orientation);*/
            }
            catch
            {
                if (!pawn.IsAnimal())
                {
                    Log.Warning("CopyIndividualitySexuality " + pawn?.Name + ", def: " + pawn?.def?.defName + ", kindDef: " + pawn?.kindDef?.race.defName);
                }
            }
        }