DayZ 1.24
Loading...
Searching...
No Matches
ReplaceItemWithNewLambda.c
Go to the documentation of this file.
1
5{
8
10 {
12 m_IndexQB = -1;
13
14 if (m_Player)
15 m_IndexQB = m_Player.FindQuickBarEntityIndex(old_item);
16 }
17
24 {
25 super.CopyOldPropertiesToNew(old_item, new_item);
26
27 if (m_Player && m_IndexQB != -1)
28 m_Player.SetQuickBarEntityShortcut(new_item, m_IndexQB, true);
29 }
30
32 {
33 super.OnSuccess(new_item);
34
35 if (m_Player && m_IndexQB != -1)
36 m_Player.SetQuickBarEntityShortcut(new_item, m_IndexQB, true);
37 }
38};
39
base class for transformation operations (creating one item from another)
adds automatic QuickBar handling
override void CopyOldPropertiesToNew(notnull EntityAI old_item, EntityAI new_item)
void ReplaceItemWithNewLambda(EntityAI old_item, string new_item_type, PlayerBase player)
override void OnSuccess(EntityAI new_item)