DayZ Scripts
v1.21.156300 ยท Jun 20, 2023
 
Loading...
Searching...
No Matches
ActionSewSelf.c
Go to the documentation of this file.
2{
3 override void CreateActionComponent()
4 {
6 }
7};
8
10{
12 {
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_STITCHUPSELF;
15 m_FullBody = true;
16 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
18 m_Text = "#sew_cuts";
19 }
20
22 {
25 }
26
27 override bool HasTarget()
28 {
29 return false;
30 }
31 /*
32 override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
33 {
34 return player.IsBleeding();
35 }
36*/
37 override void OnFinishProgressServer( ActionData action_data )
38 {
39 PlayerBase target = PlayerBase.Cast(action_data.m_Player);
40 if(action_data.m_MainItem && target)
41 {
42 ApplyBandage( action_data.m_MainItem, target );
43 action_data.m_Player.GetSoftSkillsManager().AddSpecialty( m_SpecialtyWeight );
44 }
45 }
46
47 override void ApplyBandage( ItemBase item, PlayerBase player )
48 {
49 if (player.GetBleedingManagerServer() )
50 {
51 player.GetBleedingManagerServer().RemoveMostSignificantBleedingSourceEx(item);
52 }
53
54 PluginTransmissionAgents m_mta = PluginTransmissionAgents.Cast(GetPlugin(PluginTransmissionAgents));
55 m_mta.TransmitAgents(item, player, AGT_ITEM_TO_FLESH);
56
57 if (item.HasQuantity())
58 {
59 item.AddQuantity(-20,true);
60 }
61 else
62 {
63 item.Delete();
64 }
65 }
66};
protected float m_SpecialtyWeight
Definition ActionBase.c:68
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
protected string m_Text
Definition ActionBase.c:49
protected bool m_FullBody
Definition ActionBase.c:52
protected int m_StanceMask
Definition ActionBase.c:53
PluginBase GetPlugin(typename plugin_type)
protected ActionData m_ActionData
ItemBase m_MainItem
Definition ActionBase.c:28
PlayerBase m_Player
Definition ActionBase.c:33
ref CABase m_ActionComponent
Definition ActionBase.c:30
override void CreateActionComponent()
override void OnFinishProgressServer(ActionData action_data)
void ActionSewSelf()
override void ApplyBandage(ItemBase item, PlayerBase player)
override void CreateConditionComponents()
override bool HasTarget()
const float PRECISE_MEDIUM
const float SEW_CUTS
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602
const int AGT_ITEM_TO_FLESH
Definition constants.c:459