protected override void DoConditionAndLetter(Map map, int duration, Gender gender, float points)
        {
            GameCondition_PsychicEmanation gameCondition_PsychicEmanation = (GameCondition_PsychicEmanation)GameConditionMaker.MakeCondition(GameConditionDefOf.PsychicSoothe, duration, 0);

            gameCondition_PsychicEmanation.gender = gender;
            map.gameConditionManager.RegisterCondition(gameCondition_PsychicEmanation);
            string text = "LetterIncidentPsychicSoothe".Translate(gender.ToString().Translate().ToLower());

            if (Quote != null)
            {
                text += "\n\n";
                text += Quote;
            }

            Find.LetterStack.ReceiveLetter("LetterLabelPsychicSoothe".Translate(), text, LetterDefOf.PositiveEvent, null);
        }
Esempio n. 2
0
        protected override void DoConditionAndLetter(Map map, int duration, Gender gender, float points)
        {
            if (points < 0f)
            {
                points = StorytellerUtility.DefaultThreatPointsNow(map);
            }
            PsychicDroneLevel level;

            if (points < 800f)
            {
                level = PsychicDroneLevel.BadLow;
            }
            else if (points < 2000f)
            {
                level = PsychicDroneLevel.BadMedium;
            }
            else
            {
                level = PsychicDroneLevel.BadHigh;
            }
            GameCondition_PsychicEmanation gameCondition_PsychicEmanation = (GameCondition_PsychicEmanation)GameConditionMaker.MakeCondition(GameConditionDefOf.PsychicDrone, duration, 0);

            gameCondition_PsychicEmanation.gender = gender;
            gameCondition_PsychicEmanation.level  = level;
            map.gameConditionManager.RegisterCondition(gameCondition_PsychicEmanation);
            string label = string.Concat(new string[]
            {
                "LetterLabelPsychicDrone".Translate(),
                " (",
                level.GetLabel(),
                ", ",
                gender.GetLabel(false),
                ")"
            });
            string text = "LetterIncidentPsychicDrone".Translate(gender.ToString().Translate().ToLower(), level.GetLabel());

            if (Quote != null)
            {
                text += "\n\n";
                text += Quote;
            }

            Find.LetterStack.ReceiveLetter(label, text, LetterDefOf.NegativeEvent, null);
        }
Esempio n. 3
0
        public static void Execute()
        {
            int duration = 3 * 60000;
            GameCondition_PsychicEmanation maleSoothe   = (GameCondition_PsychicEmanation)GameConditionMaker.MakeCondition(GameConditionDefOf.PsychicSoothe, duration);
            GameCondition_PsychicEmanation femaleSoothe = (GameCondition_PsychicEmanation)GameConditionMaker.MakeCondition(GameConditionDefOf.PsychicSoothe, duration);

            maleSoothe.gender   = Gender.Male;
            femaleSoothe.gender = Gender.Female;

            Map map = Find.CurrentMap;

            map.gameConditionManager.RegisterCondition(maleSoothe);
            map.gameConditionManager.RegisterCondition(femaleSoothe);

            string text = "A soothing feeling rushes over your colonists. The thought of hodl will help keep your colonists mood up for the next few days.";

            Find.LetterStack.ReceiveLetter("Hodl is here", text, LetterDefOf.PositiveEvent);

            SoundDefOf.OrbitalBeam.PlayOneShotOnCamera(map);
        }