Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
actiondrinkthroughcontinuous.c
Go to the documentation of this file.
1class ActionDrinkThroughContinuous: ActionDrinkPondContinuous
2{
3 override void CreateConditionComponents()
4 {
5 m_ConditionItem = new CCINone();
6 m_ConditionTarget = new CCTCursor(UAMaxDistances.SMALL);
7 }
8
9 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
10 {
11 if (item && item.IsHeavyBehaviour())
12 return false;
13
14 if (!player.CanEatAndDrink())
15 return false;
16
17 return target.GetObject() && target.GetObject().GetWaterSourceObjectType() == EWaterSourceObjectType.THROUGH;
18 }
19
20 override bool IsLockTargetOnUse()
21 {
22 return false;
23 }
24}
EWaterSourceObjectType