Ejemplo n.º 1
0
        static void Postfix(CompQuality __instance, QualityCategory q)
        {
            var thing = __instance.parent;

            // Can we be infused?
            var infusions = InfusedMod.Infuse(thing, q, max: Settings.max).ToList();

            if (infusions.Count > 0)
            {
                thing.TryGetComp <CompInfused>()?.SetInfusions(infusions);

                __instance.parent.HitPoints = __instance.parent.MaxHitPoints;
            }
        }
Ejemplo n.º 2
0
        public override void PostPostMake()
        {
            if (props is CompProperties_Enchant infusedProps)
            {
                #if DEBUG
                Log.Message($"Infused :: {parent} will be infused");
                #endif
                // This is ONLY called when Infused is set in XML
                infusions = InfusedMod.Infuse(
                    parent,
                    infusedProps.quality,
                    max: Settings.max,
                    skipThingFilter: true
                    ).ToList();

                parent.HitPoints = parent.MaxHitPoints;
            }
        }