Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
pluginlifespan.c File Reference

Go to the source code of this file.

Enumerations

enum  eBloodyHandsTypes { CLEAN = 0 , SALMONELA , JUST_BLOOD , LAST_INDEX }

Functions

bool CanMakeHandsBloody (PlayerBase player)
void ChangeFakePlaytime (PlayerBase player, int change)
string GetCurrentHeadMaterial (PlayerBase player)
string GetCurrentHeadTexture (PlayerBase player)
static PluginLifespan GetInstance ()
LifespanLevel GetLifespanLevel (string player_class, float age=0)
void LoadFromCfg ()
void PluginLifespan ()
void SetBloodyHands (PlayerBase player, bool show)
void SetBloodyHandsEx (PlayerBase player, eBloodyHandsTypes type)
void SetHandsMaterial (PlayerBase player, int material_type)
void SetPlayerLifespanLevel (PlayerBase player, LifespanLevel level)
void SynchBeardVisual (PlayerBase player, int state)
void SynchBloodyHandsVisual (PlayerBase player, bool has_bloody_hands)
void SynchLifespanVisual (PlayerBase player, int beard_state_visible, bool bloody_hands_visible, bool blood_type_visible, int blood_type)
void SynchShowBloodType (PlayerBase player, int blood_type)
void SynchShowBloodTypeVisual (PlayerBase player, bool show)
void UpdateBloodType (PlayerBase player, int blood_type)
void UpdateBloodTypeVisibility (PlayerBase player, bool show)
void UpdateBloodyHandsVisibility (PlayerBase player, bool show)
void UpdateBloodyHandsVisibilityEx (PlayerBase player, eBloodyHandsTypes type)
void UpdateLifespan (PlayerBase player, bool force_update=false)
void UpdateLifespanLevel (PlayerBase player, float player_beard, bool force_update=false)

Variables

enum eBloodyHandsTypes BEARD_EXTRA = 3
enum eBloodyHandsTypes BEARD_LARGE = 2
enum eBloodyHandsTypes BEARD_MEDIUM = 1
enum eBloodyHandsTypes BEARD_NONE = 0
enum eBloodyHandsTypes COUNT = 4
static const int LIFESPAN_MAX = 240
enum eBloodyHandsTypes LIFESPAN_MIN = 0
ref map< PlayerBase, intm_BloodType
ref map< string, ref BloodyHandsm_BloodyHands
int m_FakePlaytime
ref map< string, ref array< ref LifespanLevel > > m_LifespanLevels
ref map< PlayerBase, ref LifespanLevelm_PlayerCurrentLevel

Enumeration Type Documentation

◆ eBloodyHandsTypes

Enumerator
CLEAN 
SALMONELA 
JUST_BLOOD 
LAST_INDEX 

Definition at line 8 of file pluginlifespan.c.

Function Documentation

◆ CanMakeHandsBloody()

bool CanMakeHandsBloody ( PlayerBase player)
protected

Definition at line 485 of file pluginlifespan.c.

Referenced by UpdateBloodyHandsVisibility(), and UpdateBloodyHandsVisibilityEx().

◆ ChangeFakePlaytime()

void ChangeFakePlaytime ( PlayerBase player,
int change )
protected

Definition at line 207 of file pluginlifespan.c.

References g_Game, m_FakePlaytime, and UpdateLifespan().

◆ GetCurrentHeadMaterial()

string GetCurrentHeadMaterial ( PlayerBase player)
protected

Definition at line 533 of file pluginlifespan.c.

References LifespanLevel::GetMaterialName(), and m_PlayerCurrentLevel.

◆ GetCurrentHeadTexture()

string GetCurrentHeadTexture ( PlayerBase player)
protected

Definition at line 523 of file pluginlifespan.c.

References LifespanLevel::GetTextureName(), and m_PlayerCurrentLevel.

◆ GetInstance()

PluginLifespan GetInstance ( )
staticprotected

Definition at line 40 of file pluginlifespan.c.

References GetPlugin(), and PluginLifespan().

◆ GetLifespanLevel()

LifespanLevel GetLifespanLevel ( string player_class,
float age = 0 )
protected

Definition at line 271 of file pluginlifespan.c.

References LifespanLevel::GetThreshold(), and m_LifespanLevels.

Referenced by UpdateLifespanLevel().

◆ LoadFromCfg()

void LoadFromCfg ( )
protected

Definition at line 56 of file pluginlifespan.c.

References g_Game, LIFESPAN_MAX, LIFESPAN_MIN, m_BloodyHands, and m_LifespanLevels.

◆ PluginLifespan()

◆ SetBloodyHands()

void SetBloodyHands ( PlayerBase player,
bool show )
protected

◆ SetBloodyHandsEx()

void SetBloodyHandsEx ( PlayerBase player,
eBloodyHandsTypes type )
protected

◆ SetHandsMaterial()

void SetHandsMaterial ( PlayerBase player,
int material_type )
protected

Definition at line 463 of file pluginlifespan.c.

References InventorySlots::GetSlotIdFromString(), and m_BloodyHands.

Referenced by SetBloodyHands(), and SetBloodyHandsEx().

◆ SetPlayerLifespanLevel()

◆ SynchBeardVisual()

void SynchBeardVisual ( PlayerBase player,
int state )
protected

Definition at line 365 of file pluginlifespan.c.

References LIFESPAN_MAX, LIFESPAN_MIN, Print(), and UpdateLifespanLevel().

Referenced by SynchLifespanVisual().

◆ SynchBloodyHandsVisual()

void SynchBloodyHandsVisual ( PlayerBase player,
bool has_bloody_hands )
protected

Definition at line 428 of file pluginlifespan.c.

References UpdateBloodyHandsVisibility().

Referenced by SynchLifespanVisual().

◆ SynchLifespanVisual()

void SynchLifespanVisual ( PlayerBase player,
int beard_state_visible,
bool bloody_hands_visible,
bool blood_type_visible,
int blood_type )
protected

◆ SynchShowBloodType()

void SynchShowBloodType ( PlayerBase player,
int blood_type )
protected

Definition at line 514 of file pluginlifespan.c.

References UpdateBloodType().

Referenced by SynchLifespanVisual().

◆ SynchShowBloodTypeVisual()

void SynchShowBloodTypeVisual ( PlayerBase player,
bool show )
protected

Definition at line 509 of file pluginlifespan.c.

References UpdateBloodTypeVisibility().

Referenced by SynchLifespanVisual().

◆ UpdateBloodType()

void UpdateBloodType ( PlayerBase player,
int blood_type )
protected

Definition at line 504 of file pluginlifespan.c.

Referenced by SynchShowBloodType().

◆ UpdateBloodTypeVisibility()

void UpdateBloodTypeVisibility ( PlayerBase player,
bool show )
protected

Definition at line 494 of file pluginlifespan.c.

Referenced by SynchShowBloodTypeVisual().

◆ UpdateBloodyHandsVisibility()

void UpdateBloodyHandsVisibility ( PlayerBase player,
bool show )
protected

Definition at line 420 of file pluginlifespan.c.

References CanMakeHandsBloody(), and SetBloodyHands().

Referenced by SynchBloodyHandsVisual().

◆ UpdateBloodyHandsVisibilityEx()

void UpdateBloodyHandsVisibilityEx ( PlayerBase player,
eBloodyHandsTypes type )
protected

Definition at line 412 of file pluginlifespan.c.

References CanMakeHandsBloody(), and SetBloodyHandsEx().

◆ UpdateLifespan()

void UpdateLifespan ( PlayerBase player,
bool force_update = false )
protected

◆ UpdateLifespanLevel()

void UpdateLifespanLevel ( PlayerBase player,
float player_beard,
bool force_update = false )
protected

Variable Documentation

◆ BEARD_EXTRA

enum eBloodyHandsTypes BEARD_EXTRA = 3

◆ BEARD_LARGE

enum eBloodyHandsTypes BEARD_LARGE = 2

◆ BEARD_MEDIUM

enum eBloodyHandsTypes BEARD_MEDIUM = 1

◆ BEARD_NONE

enum eBloodyHandsTypes BEARD_NONE = 0

◆ COUNT

enum eBloodyHandsTypes COUNT = 4

◆ LIFESPAN_MAX

const int LIFESPAN_MAX = 240
staticprotected

Definition at line 29 of file pluginlifespan.c.

Referenced by LoadFromCfg(), and SynchBeardVisual().

◆ LIFESPAN_MIN

enum eBloodyHandsTypes LIFESPAN_MIN = 0

Referenced by LoadFromCfg(), and SynchBeardVisual().

◆ m_BloodType

ref map<PlayerBase, int> m_BloodType
protected

Definition at line 35 of file pluginlifespan.c.

Referenced by PluginLifespan().

◆ m_BloodyHands

ref map<string, ref BloodyHands> m_BloodyHands
protected

Definition at line 34 of file pluginlifespan.c.

Referenced by LoadFromCfg(), and SetHandsMaterial().

◆ m_FakePlaytime

int m_FakePlaytime
protected

Definition at line 30 of file pluginlifespan.c.

Referenced by ChangeFakePlaytime(), PluginLifespan(), and UpdateLifespan().

◆ m_LifespanLevels

ref map<string, ref array< ref LifespanLevel> > m_LifespanLevels
protected

◆ m_PlayerCurrentLevel

ref map<PlayerBase, ref LifespanLevel> m_PlayerCurrentLevel
protected