DayZ 1.24
Loading...
Searching...
No Matches
DisinfectMdfr.c
Go to the documentation of this file.
2{
3 const int LIFETIME = 100;
4 //const int EFFECT_TIME = 100;
5 PluginTransmissionAgents m_PluginTransmissionAgents = PluginTransmissionAgents.Cast(GetPlugin(PluginTransmissionAgents));
7 override void Init()
8 {
10 m_IsPersistent = true;
11 m_ID = eModifiers.MDF_DISINFECTION;
14 //m_WoundAgentInvasibility = m_PluginTransmissionAgents.GetAgentInvasibility(eAgents.WOUND_AGENT);
16 }
17
19 {
20 return false;
21 }
22
24 {
26 }
27
28 override string GetDebugText()
29 {
30 return (LIFETIME - GetAttachedTime()).ToString();
31 }
32
33 override string GetDebugTextSimple()
34 {
35 return (LIFETIME - GetAttachedTime()).ToString();
36 }
37
38
40 {
41 player.IncreaseHealingsCount();
42
43 }
44
46 {
47 player.DecreaseHealingsCount();
48
49 if (player.GetModifiersManager().IsModifierActive(eModifiers.MDF_WOUND_INFECTION1))
50 player.m_AgentPool.AddAgent(eAgents.WOUND_AGENT, -10000);
51
52 }
53
55 {
57
59 return true;
60 else
61 return false;
62 }
63
64 override void OnTick(PlayerBase player, float deltaT)
65 {
66 if (player.GetModifiersManager().IsModifierActive(eModifiers.MDF_WOUND_INFECTION2))
67 player.m_AgentPool.AddAgent(eAgents.WOUND_AGENT, -m_PluginTransmissionAgents.GetAgentInvasibility(eAgents.WOUND_AGENT) * deltaT);
68 else
69 player.m_AgentPool.AddAgent(eAgents.WOUND_AGENT, -m_PluginTransmissionAgents.GetAgentInvasibility(eAgents.WOUND_AGENT) * 2 * deltaT);
70 }
71};
eAgents
Definition EAgents.c:3
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition Effect.c:49
bool m_TrackActivatedTime
float GetAttachedTime()
void DisableActivateCheck()
float m_TickIntervalActive
float m_TickIntervalInactive
bool m_IsPersistent
const int DEFAULT_TICK_TIME_INACTIVE
const int DEFAULT_TICK_TIME_ACTIVE
PluginBase GetPlugin(typename plugin_type)
override void OnReconnect(PlayerBase player)
override bool DeactivateCondition(PlayerBase player)
override void OnActivate(PlayerBase player)
override bool ActivateCondition(PlayerBase player)
const int LIFETIME
float m_WoundAgentInvasibility
override void OnDeactivate(PlayerBase player)
override string GetDebugText()
override void OnTick(PlayerBase player, float deltaT)
override void Init()
override string GetDebugTextSimple()
PluginTransmissionAgents m_PluginTransmissionAgents
eModifiers
Definition eModifiers.c:2
class HumanMovementState OnActivate()
HumanCommandScript fully scriptable command.
Definition human.c:1167