actiondrinkthroughcontinuous.c 589 B

123456789101112131415161718192021222324
  1. class ActionDrinkThroughContinuous: ActionDrinkPondContinuous
  2. {
  3. override void CreateConditionComponents()
  4. {
  5. m_ConditionItem = new CCINone();
  6. m_ConditionTarget = new CCTCursor(UAMaxDistances.SMALL);
  7. }
  8. override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
  9. {
  10. if (item && item.IsHeavyBehaviour())
  11. return false;
  12. if (!player.CanEatAndDrink())
  13. return false;
  14. return target.GetObject() && target.GetObject().GetWaterSourceObjectType() == EWaterSourceObjectType.THROUGH;
  15. }
  16. override bool IsLockTargetOnUse()
  17. {
  18. return false;
  19. }
  20. }