Exemplo n.º 1
0
        public static void _SendCraftNotification(Thing thing, Pawn worker)

        {
            Nrcq_settings cnSetting = new Nrcq_settings();

            if (worker == null || cnSetting.crafting_notification == false)
            {
                return;
            }
            CompQuality compQuality = thing.TryGetComp <CompQuality>();

            if (compQuality == null)
            {
                return;
            }

            if (compQuality.Quality == QualityCategory.Masterwork)
            {
                Messages.Message("MessageCraftedMasterwork".Translate(worker.LabelShort, thing.LabelShort, worker.Named("WORKER"), thing.Named("CRAFTED")), thing, MessageTypeDefOf.PositiveEvent, true);
            }
            else if (compQuality.Quality == QualityCategory.Legendary)
            {
                Find.LetterStack.ReceiveLetter("LetterCraftedLegendaryLabel".Translate(), "LetterCraftedLegendaryMessage".Translate(worker.LabelShort, thing.LabelShort, worker.Named("WORKER"), thing.Named("CRAFTED")), LetterDefOf.PositiveEvent, thing, null, null);
            }
        }
Exemplo n.º 2
0
 public NrcqMod(ModContentPack content) : base(content)
 {
     NrcqMod.settings = GetSettings <Nrcq_settings>();
 }