actionminebush.c 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. class ActionMineBushCB : ActionContinuousBaseCB
  2. {
  3. protected const float TIME_BETWEEN_MATERIAL_DROPS_DEFAULT = 3;
  4. override void CreateActionComponent()
  5. {
  6. m_ActionData.m_ActionComponent = new CAContinuousMineWood(TIME_BETWEEN_MATERIAL_DROPS_DEFAULT);
  7. }
  8. };
  9. class ActionMineBush : ActionMineBase
  10. {
  11. void ActionMineBush()
  12. {
  13. m_CallbackClass = ActionMineBushCB;
  14. m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_HACKBUSH;
  15. m_FullBody = true;
  16. m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT;
  17. m_SpecialtyWeight = UASoftSkillsWeight.ROUGH_HIGH;
  18. }
  19. override void CreateConditionComponents()
  20. {
  21. m_ConditionTarget = new CCTCursor(UAMaxDistances.SMALL);
  22. m_ConditionItem = new CCINonRuined;
  23. }
  24. override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
  25. {
  26. if ( GetGame().IsMultiplayer() && GetGame().IsServer() )
  27. return true;
  28. Object targetObject = target.GetObject();
  29. return targetObject.IsBush() && targetObject.IsCuttable();
  30. }
  31. };