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; } }
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); } } }
public void TakeLiquid() { if (BowlController.Get().IsActive()) { BowlController.Get().TakeLiquid(this); return; } LiquidInHandsController.Get().TakeLiquid(this); }
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); } }
public override void GetActions(List <TriggerAction.TYPE> actions) { if (HeavyObjectController.Get().IsActive()) { return; } if (LiquidInHandsController.Get().m_Container != this) { base.GetActions(actions); } }
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(); } } }
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); }
public override bool CanTrigger() { return((!this.m_CantTriggerDuringDialog || !DialogsManager.Get().IsAnyDialogPlaying()) && !(LiquidInHandsController.Get().m_Container == this) && base.CanTrigger()); }
public override bool CanTrigger() { return(!(LiquidInHandsController.Get().m_Container == this) && base.CanTrigger()); }