DayZ 1.24
Loading...
Searching...
No Matches
KazuarOptic Class Reference
Inheritance diagram for KazuarOptic:
[legend]
Collaboration diagram for KazuarOptic:
[legend]

Private Member Functions

override void InitOpticMode ()
 
override int GetCurrentNVType ()
 
override void OnOpticModeChange ()
 
override void OnOpticEnter ()
 
override void UpdateSelectionVisibility ()
 
override void SetActions ()
 
- Private Member Functions inherited from ItemOptics
void SetPlayer (PlayerBase player)
 
PlayerBase GetPlayer ()
 

Additional Inherited Members

- Private Attributes inherited from ItemOptics
PlayerBase m_Player
 

Detailed Description

Definition at line 14 of file Optics.c.

Member Function Documentation

◆ GetCurrentNVType()

override int KazuarOptic::GetCurrentNVType ( )
inlineprivate

Definition at line 23 of file Optics.c.

24 {
25 if (IsWorking())
26 {
27 switch (m_CurrentOpticMode)
28 {
30 return NVTypes.NV_OPTICS_KAZUAR_DAY;
31
33 return NVTypes.NV_OPTICS_KAZUAR_NIGHT;
34 }
35 Error("Undefined optic mode of " + this);
36 return NVTypes.NONE;
37 }
38 else
39 return NVTypes.NV_OPTICS_OFF;
40 }
bool IsWorking()
Definition ItemOptics.c:188
int m_CurrentOpticMode
Definition ItemOptics.c:7
void Error(string err)
Messagebox with error message.
Definition EnDebug.c:90
const int OPTICS_STATE_DAY
Definition constants.c:800
const int OPTICS_STATE_NIGHTVISION
Definition constants.c:801

References Error(), ItemOptics::IsWorking(), ItemOptics::m_CurrentOpticMode, GameConstants::OPTICS_STATE_DAY, and GameConstants::OPTICS_STATE_NIGHTVISION.

◆ InitOpticMode()

override void KazuarOptic::InitOpticMode ( )
inlineprivate

Definition at line 16 of file Optics.c.

17 {
18 super.InitOpticMode();
19
21 }
void SetCurrentOpticMode(int mode)
Definition ItemOptics.c:427

References GameConstants::OPTICS_STATE_NIGHTVISION, and ItemOptics::SetCurrentOpticMode().

◆ OnOpticEnter()

override void KazuarOptic::OnOpticEnter ( )
inlineprivate

Definition at line 49 of file Optics.c.

50 {
51 super.OnOpticEnter();
52
53 HideSelection("hide_cover_pilot");
54 }
override void HideSelection(string selection_name)

References ItemOptics::HideSelection().

◆ OnOpticModeChange()

override void KazuarOptic::OnOpticModeChange ( )
inlineprivate

Definition at line 42 of file Optics.c.

43 {
44 super.OnOpticModeChange();
45
47 }
override void UpdateSelectionVisibility()
Definition Optics.c:56

References UpdateSelectionVisibility().

◆ SetActions()

override void KazuarOptic::SetActions ( )
inlineprivate

Definition at line 75 of file Optics.c.

76 {
77 super.SetActions();
78
80 }
void AddAction(typename actionName)

References AddAction().

◆ UpdateSelectionVisibility()

override void KazuarOptic::UpdateSelectionVisibility ( )
inlineprivate

Definition at line 56 of file Optics.c.

57 {
58 super.UpdateSelectionVisibility();
59
60 switch (GetCurrentOpticMode())
61 {
63 HideSelection("hide_cover");
64 HideSelection("hide_cover_pilot");
65 break;
66
68 ShowSelection("hide_cover");
69 if (!GetGame().IsDedicatedServer() && !IsInOptics()) //quick sanity check, just in case
70 ShowSelection("hide_cover_pilot");
71 break;
72 }
73 }
int GetCurrentOpticMode()
Definition ItemOptics.c:433
proto native bool IsInOptics()
is weapon in optics mode or not
override void ShowSelection(string selection_name)
proto native CGame GetGame()

References ItemOptics::GetCurrentOpticMode(), GetGame(), ItemOptics::HideSelection(), ItemOptics::IsInOptics(), GameConstants::OPTICS_STATE_DAY, GameConstants::OPTICS_STATE_NIGHTVISION, and ItemOptics::ShowSelection().

Referenced by OnOpticModeChange().


The documentation for this class was generated from the following file: