actiondrink.c 681 B

12345678910111213141516171819202122232425262728293031323334
  1. class ActionDrinkCB : ActionContinuousBaseCB
  2. {
  3. override void CreateActionComponent()
  4. {
  5. m_ActionData.m_ActionComponent = new CAContinuousQuantityEdible(UAQuantityConsumed.DRINK,UATimeSpent.DEFAULT);
  6. }
  7. };
  8. class ActionDrink: ActionConsume
  9. {
  10. void ActionDrink()
  11. {
  12. m_CallbackClass = ActionDrinkCB;
  13. m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_DRINK;
  14. m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONFB_DRINK;
  15. m_Text = "#drink";
  16. }
  17. override void CreateConditionComponents()
  18. {
  19. m_ConditionItem = new CCINotRuinedAndEmpty;
  20. m_ConditionTarget = new CCTSelf;
  21. }
  22. override bool IsDrink()
  23. {
  24. return true;
  25. }
  26. override bool HasTarget()
  27. {
  28. return false;
  29. }
  30. }