Example #1
0
        public override void OnTimeout(BuffManager bm, BuffInstance bi, Buff.OnTimeoutReasons reason)
        {
            if (bm.Actor.RabbitHoleCurrent != null)
            {
                return;
            }
            if (bm.Actor.Occupation != null && bm.Actor.Occupation.IsAtWork)
            {
                return;
            }
            InteractionInstance interactionInstance = bm.Actor.Autonomy.FindBestActionForCommodityOnLot(CommodityKind.RelieveNausea, bm.Actor.LotCurrent, AutonomySearchType.BuffAutoSolve);

            if (interactionInstance != null)
            {
                interactionInstance.CancellableByPlayer = false;
                interactionInstance.SetPriority(InteractionPriorityLevel.High);
                bm.Actor.InteractionQueue.AddNext(interactionInstance);
                return;
            }
            bm.Actor.InteractionQueue.AddNext(BuffNauseous.ThrowUpOutside.Singleton.CreateInstance(bm.Actor, bm.Actor, new InteractionPriority(InteractionPriorityLevel.High), false, false));
        }