3 private const float TIME_TO_CRAFT = 3.0;
5 override void CreateActionComponent()
13 const ref set<string> CUTTING_TYPES =
new set<string>();
20 CUTTING_TYPES.Clear();
21 CUTTING_TYPES.Insert(
"Sickle");
22 CUTTING_TYPES.Insert(
"KukriKnife");
23 CUTTING_TYPES.Insert(
"FangeKnife");
24 CUTTING_TYPES.Insert(
"KitchenKnife");
25 CUTTING_TYPES.Insert(
"SteakKnife");
26 CUTTING_TYPES.Insert(
"StoneKnife");
27 CUTTING_TYPES.Insert(
"Cleaver");
28 CUTTING_TYPES.Insert(
"CombatKnife");
29 CUTTING_TYPES.Insert(
"HuntingKnife");
30 CUTTING_TYPES.Insert(
"Machete");
31 CUTTING_TYPES.Insert(
"CrudeMachete");
32 CUTTING_TYPES.Insert(
"OrientalMachete");
33 CUTTING_TYPES.Insert(
"WoodAxe");
34 CUTTING_TYPES.Insert(
"Hatchet");
35 CUTTING_TYPES.Insert(
"FirefighterAxe");
36 CUTTING_TYPES.Insert(
"AK_Bayonet");
37 CUTTING_TYPES.Insert(
"M9A1_Bayonet");
38 CUTTING_TYPES.Insert(
"SKS_Bayonet");
39 CUTTING_TYPES.Insert(
"BoneKnife");
50 m_Text =
"#STR_CraftBolt0";
63 return CUTTING_TYPES.Find(item.ClassName()) >= 0;
71 if (target.GetObject())
72 return (target.GetObject().ClassName() ==
"WoodenStick");
74 else if (target.GetObject())
85 super.OnStartServer(action_data);
101 knife = action_data.m_MainItem;
102 material =
ItemBase.Cast(action_data.m_Target.GetObject());
107 material = action_data.m_MainItem;
108 knife =
ItemBase.Cast(action_data.m_Target.GetObject());
111 if (!material || !knife)
130 material.AddQuantity(-1);
131 knife.AddHealth(
"",
"",-3);
ref CCIBase m_ConditionItem
ref CCTBase m_ConditionTarget
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override void OnFinishProgressServer(ActionData action_data)
Ammunition_Base m_ResultEntity
override void CreateConditionComponents()
override void OnStartServer(ActionData action_data)
bool IsCuttingType(Object item)
DayZPlayerConstants
defined in C++