Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
PoweredOptic_Base Class Reference

Protected Member Functions

void ~Rangefinder ()
void DoMeasurement ()
float GetMeasurementUpdateInterval ()
void InitRangeFinderData ()
override void OnDebugSpawn ()
override void OnWorkStart ()
override void OnWorkStop ()
void Rangefinder ()
override void SetActions ()
void SetDistanceText (TextWidget text, float dist)
void SetInvalidText (TextWidget text)
void StartPeriodicMeasurement ()
void StopPeriodicMeasurement ()

Protected Attributes

string m_LayoutPath
TextWidget m_RangeText
Widget m_Root
ref Timer m_Timer

Private Member Functions

override void EEItemAttached (EntityAI item, string slot_name)
override void EEItemDetached (EntityAI item, string slot_name)
override ECachedEquipmentItemCategory GetCachedEquipmentCategory ()
override int GetCurrentNVType ()
override bool IsNVG ()
void LoweredCheck ()
 check for animation state, if another player lowered them first (or solve by synced variable)
void NVGoggles ()
override void OnWasAttached (EntityAI parent, int slot_id)
override void OnWasDetached (EntityAI parent, int slot_id)
override void OnWork (float consumed_energy)
override void OnWorkStart ()
override void OnWorkStop ()
void RotateGoggles (bool state)
override void SetActions ()
void SwitchOnNVGCheck ()

Private Attributes

bool m_IsLowered
Clothing m_Strap
ref Timer m_WorkCheckTimer = new Timer()
 DEPRECATED.

Static Private Attributes

static const float RANGEFINDER_MAX_DISTANCE = 913.4856

Detailed Description

Definition at line 1 of file nvgoggles.c.

Constructor & Destructor Documentation

◆ ~Rangefinder()

void ~Rangefinder ( )
inlineprotected

Definition at line 16 of file rangefinder.c.

Member Function Documentation

◆ DoMeasurement()

◆ EEItemAttached()

override void EEItemAttached ( EntityAI item,
string slot_name )
inlineprivate

Definition at line 24 of file nvgoggles.c.

References m_IsLowered.

◆ EEItemDetached()

override void EEItemDetached ( EntityAI item,
string slot_name )
inlineprivate

Definition at line 32 of file nvgoggles.c.

References m_Strap, and RotateGoggles().

◆ GetCachedEquipmentCategory()

override ECachedEquipmentItemCategory GetCachedEquipmentCategory ( )
inlineprivate

Definition at line 11 of file nvgoggles.c.

◆ GetCurrentNVType()

override int GetCurrentNVType ( )
inlineprivate

Definition at line 157 of file nvgoggles.c.

Referenced by OnWork().

◆ GetMeasurementUpdateInterval()

float GetMeasurementUpdateInterval ( )
inlineprotected

Definition at line 44 of file rangefinder.c.

Referenced by StartPeriodicMeasurement().

◆ InitRangeFinderData()

void InitRangeFinderData ( )
inlineprotected

Definition at line 21 of file rangefinder.c.

References g_Game, GetType(), string::Length(), m_LayoutPath, and path.

Referenced by Rangefinder().

◆ IsNVG()

override bool IsNVG ( )
inlineprivate

Definition at line 172 of file nvgoggles.c.

◆ LoweredCheck()

void LoweredCheck ( )
inlineprivate

check for animation state, if another player lowered them first (or solve by synced variable)

Definition at line 184 of file nvgoggles.c.

References m_IsLowered.

◆ NVGoggles()

void NVGoggles ( )
inlineprivate

Definition at line 6 of file nvgoggles.c.

References RotateGoggles().

◆ OnDebugSpawn()

override void OnDebugSpawn ( )
inlineprotected

Definition at line 201 of file rangefinder.c.

◆ OnWasAttached()

override void OnWasAttached ( EntityAI parent,
int slot_id )
inlineprivate

Definition at line 43 of file nvgoggles.c.

References m_Strap, and RotateGoggles().

◆ OnWasDetached()

override void OnWasDetached ( EntityAI parent,
int slot_id )
inlineprivate

Definition at line 51 of file nvgoggles.c.

References m_Strap, RotateGoggles(), and SetPlayer().

◆ OnWork()

override void OnWork ( float consumed_energy)
inlineprivate

Definition at line 112 of file nvgoggles.c.

References g_Game, GetCurrentNVType(), m_IsLowered, m_Strap, and RotateGoggles().

◆ OnWorkStart() [1/2]

override void OnWorkStart ( )
inlineprivate

Definition at line 68 of file nvgoggles.c.

References g_Game, m_IsLowered, m_Strap, and RotateGoggles().

◆ OnWorkStart() [2/2]

override void OnWorkStart ( )
inlineprotected

Definition at line 49 of file rangefinder.c.

References g_Game, and StartPeriodicMeasurement().

◆ OnWorkStop() [1/2]

override void OnWorkStop ( )
inlineprivate

Definition at line 92 of file nvgoggles.c.

References g_Game, and m_Strap.

◆ OnWorkStop() [2/2]

override void OnWorkStop ( )
inlineprotected

Definition at line 66 of file rangefinder.c.

References g_Game, and StopPeriodicMeasurement().

◆ Rangefinder()

void Rangefinder ( )
inlineprotected

Definition at line 11 of file rangefinder.c.

References InitRangeFinderData().

◆ RotateGoggles()

void RotateGoggles ( bool state)
inlineprivate

Definition at line 134 of file nvgoggles.c.

References m_IsLowered, m_Strap, and slotName.

Referenced by EEItemDetached(), NVGoggles(), OnWasAttached(), OnWasDetached(), OnWork(), and OnWorkStart().

◆ SetActions() [1/2]

override void SetActions ( )
inlineprivate

Definition at line 16 of file nvgoggles.c.

References AddAction(), and RemoveAction().

◆ SetActions() [2/2]

override void SetActions ( )
inlineprotected

Definition at line 193 of file rangefinder.c.

References AddAction(), and RemoveAction().

◆ SetDistanceText()

void SetDistanceText ( TextWidget text,
float dist )
inlineprotected

Definition at line 110 of file rangefinder.c.

References RANGEFINDER_MAX_DISTANCE, Math::Round(), SetInvalidText(), and float::ToString().

Referenced by DoMeasurement().

◆ SetInvalidText()

void SetInvalidText ( TextWidget text)
inlineprotected

Definition at line 129 of file rangefinder.c.

Referenced by DoMeasurement(), and SetDistanceText().

◆ StartPeriodicMeasurement()

void StartPeriodicMeasurement ( )
inlineprotected

◆ StopPeriodicMeasurement()

void StopPeriodicMeasurement ( )
inlineprotected

Definition at line 97 of file rangefinder.c.

References m_Root, and m_Timer.

Referenced by OnWorkStop().

◆ SwitchOnNVGCheck()

void SwitchOnNVGCheck ( )
inlineprivate

Definition at line 192 of file nvgoggles.c.

References m_WorkCheckTimer.

Field Documentation

◆ m_IsLowered

bool m_IsLowered
private

Definition at line 3 of file nvgoggles.c.

Referenced by EEItemAttached(), LoweredCheck(), OnWork(), OnWorkStart(), and RotateGoggles().

◆ m_LayoutPath

string m_LayoutPath
protected

Definition at line 9 of file rangefinder.c.

Referenced by InitRangeFinderData(), and StartPeriodicMeasurement().

◆ m_RangeText

TextWidget m_RangeText
protected

Definition at line 7 of file rangefinder.c.

Referenced by DoMeasurement(), and StartPeriodicMeasurement().

◆ m_Root

Widget m_Root
protected

Definition at line 6 of file rangefinder.c.

Referenced by DoMeasurement(), StartPeriodicMeasurement(), and StopPeriodicMeasurement().

◆ m_Strap

Clothing m_Strap
private

◆ m_Timer

ref Timer m_Timer
protected

Definition at line 5 of file rangefinder.c.

Referenced by StartPeriodicMeasurement(), and StopPeriodicMeasurement().

◆ m_WorkCheckTimer

ref Timer m_WorkCheckTimer = new Timer()
private

DEPRECATED.

Definition at line 181 of file nvgoggles.c.

Referenced by SwitchOnNVGCheck().

◆ RANGEFINDER_MAX_DISTANCE

const float RANGEFINDER_MAX_DISTANCE = 913.4856
staticprivate

Definition at line 3 of file rangefinder.c.

Referenced by DoMeasurement(), and SetDistanceText().


The documentation for this class was generated from the following files:
  • F:/Games/Dayz/scripts/4_world/entities/itembase/nvgoggles.c
  • F:/Games/Dayz/scripts/4_world/entities/itembase/rangefinder.c