DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
HuntingOptic.c
См. документацию.
1class HuntingOptic extends ItemOptics
2{
4
6 {
7 HideSelection("rings_ris");
8 HideSelection("rings_ris_pilot");
9 }
10
11 override void OnWasAttached( EntityAI parent, int slot_id )
12 {
13 super.OnWasAttached(parent, slot_id);
14 m_Parent = parent;
16 {
17 HideSelection("rings_winchester");
18 HideSelection("rings_winchester_pilot");
19 ShowSelection("rings_ris");
20 ShowSelection("rings_ris_pilot");
21 }
22 }
23
24 override void OnWasDetached( EntityAI parent, int slot_id )
25 {
26 super.OnWasDetached(parent, slot_id);
27 m_Parent = null;
28 HideSelection("rings_ris");
29 HideSelection("rings_ris_pilot");
30 ShowSelection("rings_winchester");
31 ShowSelection("rings_winchester_pilot");
32 }
33
34 override void HideSelection( string selection_name )
35 {
36 super.HideSelection( selection_name );
37 if (selection_name == "hide") //hides pilotview selections in order not to obstruct view
38 {
39 HideSelection("rings_ris_pilot");
40 HideSelection("rings_winchester_pilot");
41 }
42 }
43
44 override void ShowSelection( string selection_name )
45 {
46 super.ShowSelection( selection_name );
47 if (selection_name == "hide")
48 {
50 {
51 HideSelection("rings_winchester");
52 HideSelection("rings_winchester_pilot");
53 ShowSelection("rings_ris");
54 ShowSelection("rings_ris_pilot");
55 }
56 else
57 {
58 HideSelection("rings_ris");
59 HideSelection("rings_ris_pilot");
60 ShowSelection("rings_winchester");
61 ShowSelection("rings_winchester_pilot");
62 }
63 }
64 }
65
67 {
68 if (m_Parent && m_Parent.ConfigIsExisting("winchesterTypeOpticsMount"))
69 return m_Parent.ConfigGetBool("winchesterTypeOpticsMount");
70
71 return false;
72 }
73}
Определения Building.c:6
EntityAI m_Parent
Определения HuntingOptic.c:3
void HuntingOptic()
Определения HuntingOptic.c:5
override void ShowSelection(string selection_name)
Определения HuntingOptic.c:44
override void HideSelection(string selection_name)
Определения HuntingOptic.c:34
override void OnWasAttached(EntityAI parent, int slot_id)
Определения HuntingOptic.c:11
bool ParentUsesWinchesterTypeMount()
Определения HuntingOptic.c:66
override void OnWasDetached(EntityAI parent, int slot_id)
Определения HuntingOptic.c:24
Определения ItemOptics.c:2