DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
ActionRepairShelter.c
См. документацию.
1//used for shelters (non-proxy tent objects)
3{
5 {
7 m_SpecialtyWeight = UASoftSkillsWeight.PRECISE_LOW;
8
9 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_INTERACT;
10 m_FullBody = true;
11 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
12 }
13
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};
int m_StanceMask
Определения ActionBase.c:33
ActionBase ActionData
Определения ActionBase.c:30
class ActionTargets ActionTarget
PluginBase GetPlugin(typename plugin_type)
Определения PluginManager.c:316
float m_SpecialtyWeight
Определения ActionBase.c:77
ref CCIBase m_ConditionItem
Определения ActionBase.c:64
bool m_FullBody
Определения ActionBase.c:61
ref CCTBase m_ConditionTarget
Определения ActionBase.c:65
void ActionRepairShelter()
Определения ActionRepairShelter.c:4
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Определения ActionRepairShelter.c:25
override void CreateConditionComponents()
Определения ActionRepairShelter.c:14
override bool IsUsingProxies()
Определения ActionRepairShelter.c:20
override void OnFinishProgressServer(ActionData action_data)
Определения ActionRepairShelter.c:44
void ActionRepairTent()
Определения ActionRepairTent.c:25
int m_CommandUID
Определения AnimatedActionBase.c:143
Определения CCINonRuined.c:2
Определения CCTCursor.c:2
Super root of all classes in Enforce script.
Определения EnScript.c:11
Определения InventoryItem.c:731
Определения PlayerBaseClient.c:2
Определения Shelter.c:101
const float SMALL
Определения ActionConstants.c:111
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.