53 if (item && item.IsHeavyBehaviour())
56 return player.CanEatAndDrink();
61 super.OnStart(action_data);
63 action_data.
m_Player.TryHideItemInHands(
true);
68 action_data.
m_Player.TryHideItemInHands(
false);
91 consumeData.
m_Type = consumeType;
97 action_data.
m_Player.Consume(consumeData);
103 super.WriteToContext(ctx, action_data);
116 super.ReadFromContext(ctx, action_recive_data);
121 if (!ctx.
Read(cursorPosition))
124 action_recive_data.m_Target.SetCursorHitPos(cursorPosition);
136 [
Obsolete(
"1.30: No replacement. Method is no longer needed as liquid source is now checked and provided by the CCTLiquid target condition.")]
139 vector hitPosition = target.GetCursorHitPos();
143 g_Game.SurfaceGetType3D(hitPosition[0], hitPosition[1], hitPosition[2], surfaceType);
144 string path =
"CfgSurfaces " + surfaceType +
" liquidType";
override void OnFinishProgressServer(ActionData action_data)
bool CanBeUsedInFreelook()
void CreateConditionComponents()
ref CCIBase m_ConditionItem
ref CCTBase m_ConditionTarget
bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
int GetLiquidSource(ActionTarget target)
DEPRECATED.
void ActionDrinkPondContinuous()
ActionDrinkPondContinuousCB WATER_DRANK_PER_SEC
const string ALLOWED_WATER_SURFACES
void ActionTarget(Object object, Object parent, int componentIndex, vector cursorHitPos, float utility, string surfaceName="")
void ReadFromContext(ParamsReadContext ctx)
void WriteToContext(ParamsWriteContext ctx)
ref ActionTarget m_Target
ref CABase m_ActionComponent
override void CreateActionComponent()
proto bool Write(void value_out)
proto bool Read(void value_in)
DayZPlayerConstants
defined in C++
Serializer ParamsReadContext
Serializer ParamsWriteContext
void Obsolete(string msg="")
const int LIQUID_HOTWATER
const int LIQUID_GROUP_DRINKWATER
const int LIQUID_CLEANWATER