30 super.OnStartServer(action_data);
39 super.OnEndServer(action_data);
51 if (!super.ActionCondition(player, target, item))
56 if (!targetPlayer || !targetPlayer.CanEatAndDrink() || !targetPlayer.CanConsumeFood(dta) || !item.CanBeConsumed(dta))
59 float angleDiff =
Math.
AbsFloat(player.GetDirection().VectorToAngles()[0] - targetPlayer.GetDirection().VectorToAngles()[0]);
60 if (angleDiff < 135 || angleDiff > 225)
63 if (targetPlayer.GetPerformedActionID() != -1 || targetPlayer.GetActivePrimarySymptomID() == SymptomIDs.SYMPTOM_VOMIT)
66 return item.GetQuantity() > item.GetQuantityMin();
void OnEndServer(ActionData action_data)
void CreateConditionComponents()
ref CCIBase m_ConditionItem
void OnStartServer(ActionData action_data)
ref CCTBase m_ConditionTarget
bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
ActionForceConsumeCB SOUND_REPEAT_INTERVAL
void ActionForceConsume()
void ActionTarget(Object object, Object parent, int componentIndex, vector cursorHitPos, float utility, string surfaceName="")
ref ActionTarget m_Target
override void CreateActionComponent()
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
DayZPlayerConstants
defined in C++
static proto float AbsFloat(float f)
Returns absolute value.