Example #1
0
        public override void Execute()
        {
            foreach (Hediff hediff in _healQueue)
            {
                HealHelper.Cure(hediff);
            }

            foreach (Pair <Pawn, BodyPartRecord> part in _restoreQueue)
            {
                part.First.health.RestorePart(part.Second);
            }

            Viewer.Charge(storeIncident);
            MessageHelper.SendConfirmation(Viewer.username, "TKUtils.MassHealLetter.Description".Localize());

            Find.LetterStack.ReceiveLetter("TKUtils.MassHealLetter.Title".Localize(), "TKUtils.MassHealLetter.Description".Localize(), LetterDefOf.PositiveEvent);
        }
Example #2
0
        public override void Execute()
        {
            if (_toHeal != null)
            {
                HealHelper.Cure(_toHeal);

                NotifySuccess(_toHeal.LabelCap);
            }

            if (_toRestore == null)
            {
                return;
            }

            _target.health.RestorePart(_toRestore);

            NotifySuccess(_toRestore.Label);
        }
Example #3
0
        public override void Execute()
        {
            if (_toHeal != null)
            {
                HealHelper.Cure(_toHeal);
                Viewer.Charge(storeIncident);
                NotifySuccess(_toHeal.LabelCap);
            }

            if (_toRestore == null)
            {
                return;
            }

            _pawn.health.RestorePart(_toRestore);
            Viewer.Charge(storeIncident);
            NotifySuccess(_toRestore.Label);
        }
Example #4
0
        private int Heal(object injury, int healed)
        {
            switch (injury)
            {
            case Hediff hediff:
                HealHelper.Cure(hediff);
                healed += 1;

                Viewer.Charge(storeIncident, healed);

                break;

            case BodyPartRecord record:
                _pawn.health.RestorePart(record);
                healed += 1;

                Viewer.Charge(storeIncident, healed);

                break;
            }

            return(healed);
        }