actioncraftropebelt.c 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. class ActionCraftRopeBeltCB : ActionContinuousBaseCB
  2. {
  3. override void CreateActionComponent()
  4. {
  5. m_ActionData.m_ActionComponent = new CAContinuousTime(3);
  6. }
  7. };
  8. class ActionCraftRopeBelt: ActionContinuousBase
  9. {
  10. void ActionCraftRopeBelt()
  11. {
  12. m_CallbackClass = ActionCraftRopeBeltCB;
  13. m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
  14. m_FullBody = true;
  15. m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
  16. m_SpecialtyWeight = UASoftSkillsWeight.ROUGH_HIGH;
  17. m_Text = "#STR_CraftRopeBelt";
  18. }
  19. override void CreateConditionComponents()
  20. {
  21. m_ConditionItem = new CCINonRuined;
  22. m_ConditionTarget = new CCTNone;
  23. }
  24. override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
  25. {
  26. return true;
  27. }
  28. override bool HasTarget()
  29. {
  30. return false;
  31. }
  32. override void OnFinishProgressServer( ActionData action_data )
  33. {
  34. EntityAI item_ingredient = action_data.m_MainItem;
  35. EntityAI belt = action_data.m_Player.SpawnEntityOnGroundRaycastDispersed("RopeBelt");
  36. action_data.m_MainItem.Delete();
  37. MiscGameplayFunctions.TransferItemProperties(item_ingredient, belt);
  38. }
  39. };