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

Private Member Functions

void ActionWritePaper ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnStartClient (ActionData action_data)
 
override void OnStartServer (ActionData action_data)
 
override void OnUpdate (ActionData action_data)
 
override void OnEndRequest (ActionData action_data)
 
- Private Member Functions inherited from ActionContinuousBase
void OnStartAnimationLoopServer (ActionData action_data)
 
void OnStartAnimationLoopClient (ActionData action_data)
 
void OnEndAnimationLoopServer (ActionData action_data)
 
void OnEndAnimationLoopClient (ActionData action_data)
 
void OnFinishProgressServer (ActionData action_data)
 
void OnFinishProgressClient (ActionData action_data)
 

Private Attributes

const float TARGET_DISTANCE = 2
 

Detailed Description

Definition at line 33 of file ActionWritePaper.c.

Constructor & Destructor Documentation

◆ ActionWritePaper()

void ActionWritePaper::ActionWritePaper ( )
inlineprivate

Definition at line 37 of file ActionWritePaper.c.

38 {
40 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_VIEWNOTE;
41 m_FullBody = true;
42 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_PRONE;
43 m_Text = "#write_note";
44 }
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
int m_StanceMask
Definition ActionBase.c:53
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

References AnimatedActionBase::m_CallbackClass, AnimatedActionBase::m_CommandUID, m_FullBody, m_StanceMask, and m_Text.

Member Function Documentation

◆ ActionCondition()

override bool ActionWritePaper::ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate

Definition at line 52 of file ActionWritePaper.c.

53 {
54 if ((item && item.ConfigIsExisting("writingColor") && target.GetObject() && Paper.Cast(target.GetObject())) || (target.GetObject() && target.GetObject().ConfigIsExisting("writingColor") && item && Paper.Cast(item)))
55 return true;
56 return false;
57 }

◆ CreateConditionComponents()

override void ActionWritePaper::CreateConditionComponents ( )
inlineprivate

Definition at line 46 of file ActionWritePaper.c.

47 {
49 m_ConditionTarget = new CCTNone;//CCTNonRuined(TARGET_DISTANCE);
50 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56

References m_ConditionItem, and m_ConditionTarget.

◆ OnEndRequest()

override void ActionWritePaper::OnEndRequest ( ActionData action_data)
inlineprivate

Definition at line 86 of file ActionWritePaper.c.

87 {
88 if (action_data.m_Callback)
89 action_data.m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_INTERRUPT);
90 }

◆ OnStartClient()

override void ActionWritePaper::OnStartClient ( ActionData action_data)
inlineprivate

Definition at line 59 of file ActionWritePaper.c.

60 {
61 if (action_data.m_Target.GetObject().ConfigIsExisting("writingColor"))
62 action_data.m_MainItem.GetWrittenNoteData().InitNoteInfo(ItemBase.Cast(action_data.m_Target.GetObject()), action_data.m_MainItem);
63 else
64 ItemBase.Cast(action_data.m_Target.GetObject()).GetWrittenNoteData().InitNoteInfo(action_data.m_MainItem, ItemBase.Cast(action_data.m_Target.GetObject()));
65 }
override WrittenNoteData GetWrittenNoteData()
Definition Paper.c:30

References ItemBase::GetWrittenNoteData().

◆ OnStartServer()

override void ActionWritePaper::OnStartServer ( ActionData action_data)
inlineprivate

Definition at line 67 of file ActionWritePaper.c.

68 {
69 if (action_data.m_Target.GetObject().ConfigIsExisting("writingColor"))
70 action_data.m_MainItem.GetWrittenNoteData().InitNoteInfo(ItemBase.Cast(action_data.m_Target.GetObject()), action_data.m_MainItem);
71 else
72 ItemBase.Cast(action_data.m_Target.GetObject()).GetWrittenNoteData().InitNoteInfo(action_data.m_MainItem, ItemBase.Cast(action_data.m_Target.GetObject()));
73 }

References ItemBase::GetWrittenNoteData().

◆ OnUpdate()

override void ActionWritePaper::OnUpdate ( ActionData action_data)
inlineprivate

Definition at line 75 of file ActionWritePaper.c.

76 {
77 super.OnUpdate(action_data);
78
79 if (!GetGame().IsDedicatedServer())
80 {
81 if (action_data.m_State == UA_FINISHED && GetGame().GetUIManager() && !GetGame().GetUIManager().IsMenuOpen(MENU_NOTE))
82 ActionManagerClient.Cast(action_data.m_Player.GetActionManager()).RequestEndAction();
83 }
84 }
override void RequestEndAction()
proto native CGame GetGame()
const int MENU_NOTE
Definition constants.c:180
const int UA_FINISHED
Definition constants.c:436

References GetGame(), MENU_NOTE, ActionManagerClient::RequestEndAction(), and UA_FINISHED.

Member Data Documentation

◆ TARGET_DISTANCE

const float ActionWritePaper::TARGET_DISTANCE = 2
private

Definition at line 35 of file ActionWritePaper.c.


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