DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
ReplaceItemWithNewLambda.c
См. документацию.
1
5{
8
9 void ReplaceItemWithNewLambda(EntityAI old_item, string new_item_type, PlayerBase player)
10 {
11 m_Player = player;
12 m_IndexQB = -1;
13
14 if (m_Player)
15 m_IndexQB = m_Player.FindQuickBarEntityIndex(old_item);
16 }
17
23 override void CopyOldPropertiesToNew(notnull EntityAI old_item, EntityAI new_item)
24 {
25 super.CopyOldPropertiesToNew(old_item, new_item);
26
27 if (m_Player && m_IndexQB != -1)
28 {
29 m_Player.SetQuickBarEntityShortcut(new_item, m_IndexQB, true);
30 }
31 }
32
33 override void OnSuccess(EntityAI new_item)
34 {
35 super.OnSuccess(new_item);
36
37 if (m_Player && m_IndexQB != -1)
38 {
39 m_Player.SetQuickBarEntityShortcut(new_item, m_IndexQB, true);
40 }
41 }
42};
43
Определения Building.c:6
Определения PlayerBaseClient.c:2
override void CopyOldPropertiesToNew(notnull EntityAI old_item, EntityAI new_item)
Определения ReplaceItemWithNewLambda.c:23
void ReplaceItemWithNewLambda(EntityAI old_item, string new_item_type, PlayerBase player)
Определения ReplaceItemWithNewLambda.c:9
override void OnSuccess(EntityAI new_item)
Определения ReplaceItemWithNewLambda.c:33
PlayerBase m_Player
Определения ReplaceItemWithNewLambda.c:6
base class for transformation operations (creating one item from another)
Определения ReplaceItemWithNewLambdaBase.c:5
adds automatic QuickBar handling
Определения MiscGameplayFunctions.c:2