1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- class ActionDeCraftRopeBeltCB : ActionContinuousBaseCB
- {
- override void CreateActionComponent()
- {
- m_ActionData.m_ActionComponent = new CAContinuousTime(UATimeSpent.DEFAULT_DECRAFT);
- }
- //! DEPRECATED
- private const float TIME_TO_CRAFT_CLOTHES = 5.0;
- }
- class ActionDeCraftRopeBelt : ActionContinuousBase
- {
- void ActionDeCraftRopeBelt()
- {
- m_CallbackClass = ActionDeCraftRopeBeltCB;
- m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
- m_FullBody = true;
- m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT;
- m_SpecialtyWeight = UASoftSkillsWeight.ROUGH_HIGH;
- m_Text = "#STR_DeCraftRopeBelt";
- }
-
- override void CreateConditionComponents()
- {
- m_ConditionItem = new CCINonRuined();
- m_ConditionTarget = new CCTNone();
- }
-
- override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
- {
- return item.GetInventory().AttachmentCount() == 0;
- }
-
- override bool HasTarget()
- {
- return false;
- }
-
- override void OnFinishProgressServer(ActionData action_data)
- {
- EntityAI ropebelt = action_data.m_MainItem;
-
- EntityAI rope = action_data.m_Player.SpawnEntityOnGroundPos("Rope", action_data.m_Player.GetPosition());
- action_data.m_MainItem.Delete();
-
- MiscGameplayFunctions.TransferItemProperties(ropebelt, rope);
- }
- }
|