actionforcedrink.c 831 B

123456789101112131415161718192021222324252627282930313233
  1. class ActionForceDrinkCB : ActionContinuousBaseCB
  2. {
  3. override void CreateActionComponent()
  4. {
  5. m_ActionData.m_ActionComponent = new CAContinuousQuantityEdible(UAQuantityConsumed.DRINK,UATimeSpent.DEFAULT);
  6. }
  7. };
  8. class ActionForceDrink: ActionForceConsume
  9. {
  10. void ActionForceDrink()
  11. {
  12. m_CallbackClass = ActionForceDrinkCB;
  13. m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_EMPTY_VESSEL;
  14. m_FullBody = true;
  15. m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
  16. m_Text = "#give_drink";
  17. }
  18. override void CreateConditionComponents()
  19. {
  20. m_ConditionTarget = new CCTMan(UAMaxDistances.DEFAULT);
  21. m_ConditionItem = new CCINonRuined;
  22. }
  23. override protected void PlaySound(PlayerBase player)
  24. {
  25. if (player)
  26. player.RequestSoundEventEx(EPlayerSoundEventID.FORCE_DRINK);
  27. }
  28. };