DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Файл ActionSewTarget.c

См. исходные тексты.

Структуры данных

class  ActionSewTargetCB
 

Функции

ActionSewTargetCB ActionContinuousBaseCB ActionSewTarget ()
 
override void CreateActionComponent ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnFinishProgressServer (ActionData action_data)
 
override void ApplyBandage (ItemBase item, PlayerBase player)
 
override bool CanTargetBeInVehicle ()
 

Функции

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
28 {
29 if (!super.ActionCondition(player, target, item))
30 return false;
31
32 PlayerBase otherPlayer = PlayerBase.Cast(target.GetObject());
33 return otherPlayer.IsBleeding();
34 }
Definition EntityAI.c:95
Definition PlayerBaseClient.c:2

◆ ActionSewTarget()

12 {
13 m_CallbackClass = ActionSewTargetCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_INTERACT;
15 m_FullBody = true;
16 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
17
18 m_Text = "#sew_targets_cuts";
19 }
int m_CommandUID
Definition ActionBase.c:31
int m_StanceMask
Definition ActionBase.c:33
Definition ActionSewTarget.c:2
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Используется в ActionConstructor::RegisterActions() и SewingKit::SetActions().

◆ ApplyBandage()

override void ApplyBandage ( ItemBase item,
PlayerBase player )
47 {
48 if (player.GetBleedingManagerServer())
49 player.GetBleedingManagerServer().RemoveMostSignificantBleedingSourceEx(item);
50
51 PluginTransmissionAgents transmissionAgents = PluginTransmissionAgents.Cast(GetPlugin(PluginTransmissionAgents));
53
54 if (item.HasQuantity())
55 item.AddQuantity(-20, true);
56 else
57 item.Delete();
58 }
PluginBase GetPlugin(typename plugin_type)
Definition PluginManager.c:316
const int AGT_ITEM_TO_FLESH
Definition constants.c:483

Перекрестные ссылки AGT_ITEM_TO_FLESH и GetPlugin().

◆ CanTargetBeInVehicle()

override bool CanTargetBeInVehicle ( )
61 {
62 return true;
63 }

◆ CreateActionComponent()

override void CreateActionComponent ( )
12 {
13 m_CallbackClass = ActionSewTargetCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_INTERACT;
15 m_FullBody = true;

Перекрестные ссылки m_CommandUID и m_StanceMask.

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
22 {
23 m_ConditionItem = new CCINonRuined();
24 m_ConditionTarget = new CCTMan(UAMaxDistances.DEFAULT);
25 }
Definition CCINonRuined.c:2
Definition CCTMan.c:2
Definition ActionConstants.c:106
const float DEFAULT
Definition ActionConstants.c:108

Перекрестные ссылки UAMaxDistances::DEFAULT.

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)
37 {
38 if (CanReceiveAction(action_data.m_Target))
39 {
40 PlayerBase player = PlayerBase.Cast(action_data.m_Target.GetObject());
41 if (action_data.m_MainItem && player)
42 ApplyBandage(action_data.m_MainItem, player);
43 }
44 }
override void ApplyBandage(ItemBase item, PlayerBase player)
Definition ActionSewTarget.c:46

Перекрестные ссылки ActionBandageBase::ApplyBandage() и ActionBase::CanReceiveAction().