DayZ 1.24
Loading...
Searching...
No Matches
ActionBreakLongWoodenStick.c
Go to the documentation of this file.
2{
3 private const float TIME_TO_BREAK_STICKS = 5.0;
4
5 override void CreateActionComponent()
6 {
7 //float adjusted_time = m_ActionData.m_Player.GetSoftSkillsManager().AdjustCraftingTime(TIME_TO_BREAK_STICKS,UASoftSkillsWeight.ROUGH_HIGH);
9 }
10};
11
13{
23
29
30 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
31 {
32 if (item.IsEmpty() && (!item.GetCompEM() || !item.GetCompEM().IsWorking()))
33 return true;
34 else
35 return false;
36 }
37
38 override bool HasTarget()
39 {
40 return false;
41 }
42
44 {
46
47 BreakLongWoodenStick lambda = new BreakLongWoodenStick(action_data.m_MainItem, "WoodenStick", action_data.m_Player, 3);
48 action_data.m_Player.ServerReplaceItemInHandsWithNew(lambda);
49
50 if (LongWoodenStick.Cast(startingItem) == null) // case if it is a broom
51 {
52 EntityAI longStick = action_data.m_Player.SpawnEntityOnGroundPos("LongWoodenStick", action_data.m_Player.GetPosition());
53
56
57 MiscGameplayFunctions.TransferItemProperties(action_data.m_MainItem, item_result);
58 }
59 }
60};
61
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
float m_SpecialtyWeight
Definition ActionBase.c:68
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
int m_StanceMask
Definition ActionBase.c:53
ActionData m_ActionData
override void OnFinishProgressServer(ActionData action_data)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
ref CABase m_ActionComponent
Definition ActionBase.c:30
override void CopyOldPropertiesToNew(notnull EntityAI old_item, EntityAI new_item)
void BreakLongWoodenStick(EntityAI old_item, string new_item_type, PlayerBase player, int count)
Super root of all classes in Enforce script.
Definition EnScript.c:11
base class for transformation operations (creating one item from another)
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.