Esempio n. 1
0
    public override void GetActions(List <TriggerAction.TYPE> actions)
    {
        if (HeavyObjectController.Get().IsActive())
        {
            return;
        }
        switch (this.m_State)
        {
        case Bowl.State.None:
            if (LiquidInHandsController.Get().IsActive())
            {
                actions.Add(TriggerAction.TYPE.Pour);
            }
            else if (!this.m_RackChild)
            {
                actions.Add(TriggerAction.TYPE.Take);
            }
            break;

        case Bowl.State.UnsafeWater:
        case Bowl.State.WaterCooked:
        case Bowl.State.Herb:
        case Bowl.State.HerbCooked:
            if (this.m_LCInfo.CanDrink())
            {
                actions.Add(TriggerAction.TYPE.Drink);
            }
            else
            {
                actions.Add(TriggerAction.TYPE.Take);
            }
            break;
        }
    }
Esempio n. 2
0
 public override void OnExecute(TriggerAction.TYPE action)
 {
     base.OnExecute(action);
     if (action == TriggerAction.TYPE.Pour)
     {
         base.Fill(LiquidInHandsController.Get().m_Container);
         return;
     }
     if (action == TriggerAction.TYPE.Drink)
     {
         this.Drink();
         if (((LiquidContainerInfo)this.m_Info).m_Amount == 0f)
         {
             if (this.m_Item)
             {
                 UnityEngine.Object.Destroy(this.m_Item.gameObject);
                 this.m_Item = null;
             }
             this.m_ItemSlot.gameObject.SetActive(false);
             if (this.m_ItemVis)
             {
                 this.m_ItemVis.gameObject.SetActive(false);
                 this.m_ItemVis = null;
             }
             this.SetState(Bowl.State.None);
         }
     }
 }
Esempio n. 3
0
 public void TakeLiquid()
 {
     if (BowlController.Get().IsActive())
     {
         BowlController.Get().TakeLiquid(this);
         return;
     }
     LiquidInHandsController.Get().TakeLiquid(this);
 }
Esempio n. 4
0
 public override void GetActions(List <TriggerAction.TYPE> actions)
 {
     if (HeavyObjectController.Get().IsActive())
     {
         return;
     }
     if (LiquidInHandsController.Get().IsActive() || BowlController.Get().IsActive())
     {
         actions.Add(TriggerAction.TYPE.Pour);
     }
 }
Esempio n. 5
0
 public override void GetActions(List <TriggerAction.TYPE> actions)
 {
     if (HeavyObjectController.Get().IsActive())
     {
         return;
     }
     if (LiquidInHandsController.Get().m_Container != this)
     {
         base.GetActions(actions);
     }
 }
Esempio n. 6
0
 public override void OnExecute(TriggerAction.TYPE action)
 {
     base.OnExecute(action);
     if (action == TriggerAction.TYPE.Pour)
     {
         if (LiquidInHandsController.Get().IsActive())
         {
             this.Fill(LiquidInHandsController.Get().m_Container.m_LCInfo);
         }
         else if (BowlController.Get().IsActive())
         {
             this.Fill(BowlController.Get().m_Bowl.m_LCInfo);
         }
         if (Inventory3DManager.Get().isActiveAndEnabled)
         {
             Inventory3DManager.Get().OnLiquidTransfer();
         }
     }
 }
Esempio n. 7
0
    public override void GetActions(List <TriggerAction.TYPE> actions)
    {
        if (HeavyObjectController.Get().IsActive())
        {
            return;
        }
        if (GreenHellGame.IsPadControllerActive() && Inventory3DManager.Get().IsActive() && Inventory3DManager.Get().CanSetCarriedItem(true))
        {
            actions.Add(TriggerAction.TYPE.Pick);
        }
        switch (this.m_State)
        {
        case Bowl.State.None:
            if (LiquidInHandsController.Get().IsActive())
            {
                actions.Add(TriggerAction.TYPE.Pour);
            }
            else if (!this.m_RackChild)
            {
                actions.Add(TriggerAction.TYPE.Take);
            }
            break;

        case Bowl.State.UnsafeWater:
        case Bowl.State.WaterCooked:
        case Bowl.State.Herb:
        case Bowl.State.HerbCooked:
            if (this.m_LCInfo.CanDrink())
            {
                actions.Add(TriggerAction.TYPE.Drink);
            }
            else
            {
                actions.Add(TriggerAction.TYPE.Take);
            }
            break;
        }
        actions.Add(TriggerAction.TYPE.Expand);
    }
Esempio n. 8
0
 public override bool CanTrigger()
 {
     return((!this.m_CantTriggerDuringDialog || !DialogsManager.Get().IsAnyDialogPlaying()) && !(LiquidInHandsController.Get().m_Container == this) && base.CanTrigger());
 }
Esempio n. 9
0
 public override bool CanTrigger()
 {
     return(!(LiquidInHandsController.Get().m_Container == this) && base.CanTrigger());
 }