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

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

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

class  ActionSewSelfCB
 

Функции

ActionSewSelfCB ActionContinuousBaseCB ActionSewSelf ()
 
override void CreateActionComponent ()
 
override void CreateConditionComponents ()
 
override bool HasTarget ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnFinishProgressServer (ActionData action_data)
 
override void ApplyBandage (ItemBase item, PlayerBase player)
 

Функции

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
33 {
34 if (!super.ActionCondition(player, target, item))
35 return false;
36
37 return player.IsBleeding();
38 }
Definition EntityAI.c:95

◆ ActionSewSelf()

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

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

◆ ApplyBandage()

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

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

◆ CreateActionComponent()

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

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

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
22 {
23 m_ConditionItem = new CCINonRuined();
24 m_ConditionTarget = new CCTSelf();
25 }
Definition CCINonRuined.c:2
Definition CCTSelf.c:2

◆ HasTarget()

override bool HasTarget ( )
28 {
29 return false;
30 }

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)
41 {
42 PlayerBase player = PlayerBase.Cast(action_data.m_Player);
43 if (action_data.m_MainItem && player)
44 ApplyBandage(action_data.m_MainItem, player);
45 }
override void ApplyBandage(ItemBase item, PlayerBase player)
Definition ActionSewSelf.c:47
Definition PlayerBaseClient.c:2

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