DayZ
1.27
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
ActionRepairWithToolFromHands.c
См. документацию.
1
// This is just a test action!
2
class
ActionRepairWithToolFromHands
:
ActionSingleUseBase
3
{
4
void
ActionRepairWithToolFromHands
()
5
{
6
m_SpecialtyWeight
= UASoftSkillsWeight.PRECISE_HIGH;
7
m_Text
=
"#repair"
;
8
}
9
10
override
void
CreateConditionComponents
()
11
{
12
m_ConditionItem
=
new
CCINonRuined
;
13
m_ConditionTarget
=
new
CCTNonRuined
(
UAMaxDistances
.
DEFAULT
);
14
}
15
16
override
bool
ActionCondition
(
PlayerBase
player,
ActionTarget
target,
ItemBase
item )
17
{
18
Object
targetObject = target.GetObject();
19
if
( targetObject
/*&& targetObject.IsKindOf("ItemBase")*/
)
20
{
21
ItemBase
item_to_repair =
ItemBase
.Cast( targetObject );
22
bool
can_repair = item_to_repair.CanRepair(item);
23
return
can_repair;
24
}
25
26
return
false
;
27
}
28
29
override
void
OnExecuteServer
(
ActionData
action_data )
30
{
31
Object
targetObject = action_data.m_Target.GetObject();
32
if
( targetObject
/* && targetObject.IsKindOf("ItemBase")*/
)
33
{
34
ItemBase
item_to_repair =
ItemBase
.Cast( targetObject );
35
Param1<float> nacdata = Param1<float>.Cast( action_data.m_ActionComponent.GetACData() );
36
bool
was_repaired = item_to_repair.Repair(action_data.m_Player, action_data.m_MainItem, nacdata.param1);
37
}
38
}
39
};
ActionData
ActionBase ActionData
Определения
ActionBase.c:30
ActionTarget
class ActionTargets ActionTarget
ActionBase::m_SpecialtyWeight
float m_SpecialtyWeight
Определения
ActionBase.c:77
ActionBase::m_Text
string m_Text
Определения
ActionBase.c:58
ActionBase::m_ConditionItem
ref CCIBase m_ConditionItem
Определения
ActionBase.c:64
ActionBase::m_ConditionTarget
ref CCTBase m_ConditionTarget
Определения
ActionBase.c:65
ActionRepairWithToolFromHands::ActionRepairWithToolFromHands
void ActionRepairWithToolFromHands()
Определения
ActionRepairWithToolFromHands.c:4
ActionRepairWithToolFromHands::OnExecuteServer
override void OnExecuteServer(ActionData action_data)
Определения
ActionRepairWithToolFromHands.c:29
ActionRepairWithToolFromHands::ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Определения
ActionRepairWithToolFromHands.c:16
ActionRepairWithToolFromHands::CreateConditionComponents
override void CreateConditionComponents()
Определения
ActionRepairWithToolFromHands.c:10
ActionSingleUseBase::ActionSingleUseBase
void ActionSingleUseBase()
Определения
ActionSingleUseBase.c:31
CCINonRuined
Определения
CCINonRuined.c:2
CCTNonRuined
Определения
CCTNonRuined.c:2
ItemBase
Определения
InventoryItem.c:731
Object
Определения
ObjectTyped.c:2
PlayerBase
Определения
PlayerBaseClient.c:2
UAMaxDistances::DEFAULT
const float DEFAULT
Определения
ActionConstants.c:112
UAMaxDistances
Определения
ActionConstants.c:110
Ishodniki
scripts
4_World
Classes
UserActionsComponent
Actions
SingleUse
ActionRepairWithToolFromHands.c
Создано системой
1.13.2