Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionrepairshelter.c
Go to the documentation of this file.
1 //used for shelters (non-proxy tent objects)
3 {
5  {
6  m_CallbackClass = ActionRepairTentCB;
8 
9  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_INTERACT;
10  m_FullBody = true;
11  m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
12  }
13 
14  override void CreateConditionComponents()
15  {
18  }
19 
20  override bool IsUsingProxies()
21  {
22  return false;
23  }
24 
25  override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
26  {
27  ShelterBase shelter = ShelterBase.Cast( target.GetObject() );
28  if ( !shelter )
29  return false;
30 
31  if ( player && shelter )
32  {
33  PluginRepairing module_repairing;
34  Class.CastTo(module_repairing, GetPlugin(PluginRepairing));
35  if (module_repairing.CanRepair(item,shelter))
36  {
37  return true;
38  }
39  }
40 
41  return false;
42  }
43 
44  override void OnFinishProgressServer( ActionData action_data )
45  {
46  ShelterBase shelter = ShelterBase.Cast( action_data.m_Target.GetObject() );
47 
48  if ( shelter )
49  {
50  PluginRepairing module_repairing;
51  Class.CastTo(module_repairing, GetPlugin(PluginRepairing));
52  module_repairing.Repair(action_data.m_Player,action_data.m_MainItem,shelter,m_SpecialtyWeight);
53  }
54  }
55 };
ItemBase
Definition: inventoryitem.c:730
UASoftSkillsWeight
Definition: actionconstants.c:118
ActionRepairTent
Definition: actionrepairtent.c:19
UAMaxDistances
Definition: actionconstants.c:104
GetPlugin
PluginBase GetPlugin(typename plugin_type)
Definition: pluginmanager.c:316
ActionRepairTentCB
Definition: actionrepairtent.c:11
m_FullBody
protected bool m_FullBody
Definition: actionbase.c:52
PlayerBase
Definition: playerbaseclient.c:1
ShelterBase
Definition: shelter.c:100
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
CCTCursor
Definition: cctcursor.c:1
m_ConditionItem
ref CCIBase m_ConditionItem
Definition: actionbase.c:55
CCINonRuined
Definition: ccinonruined.c:1
ActionRepairShelter
Definition: actionrepairshelter.c:2
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56
Class
Super root of all classes in Enforce script.
Definition: enscript.c:10
m_SpecialtyWeight
protected float m_SpecialtyWeight
Definition: actionbase.c:68
m_StanceMask
protected int m_StanceMask
Definition: actionbase.c:53