45 if (player.GetBrokenLegs() ==
eBrokenLegs.BROKEN_LEGS)
48 Object targetObject = target.GetObject();
49 Object targetParent = target.GetParent();
52 if (!carDoor || !player)
61 if (targetParent != null)
64 bool isPresent = carDoor.GetInventory().GetCurrentInventoryLocation(loc);
66 if (!isPresent || loc.
GetSlot() == -1)
75 int zoneHP = carDoor.GetHealthLevel(
"");
86 string damageZone = RepairCarPartActionData.Cast(action_data).m_DamageZone;
96 float zoneMax = carDoor.GetMaxHealth(
"",
"");
121 int qnt = action_data.
m_MainItem.GetQuantity();
122 qnt -= action_data.
m_MainItem.GetQuantityMax() * 0.25;
134 RepairCarPartActionData actionData =
new RepairCarPartActionData();
140 super.WriteToContext(ctx, action_data);
141 RepairCarPartActionData repairActionData;
146 ctx.
Write(repairActionData.m_DamageZone);
152 if (!action_recive_data)
155 super.ReadFromContext(ctx, action_recive_data);
172 super.HandleReciveData(action_recive_data, action_data);
175 RepairCarPartActionData.Cast(action_data).m_DamageZone = reciveDataRepair.
m_DamageZoneRecived;
ActionData CreateActionData()
void CreateConditionComponents()
protected float m_SpecialtyWeight
protected bool m_LockTargetOnUse
ref CCIBase m_ConditionItem
ref CCTBase m_ConditionTarget
void HandleReciveData(ActionReciveData action_recive_data, ActionData action_data)
protected bool m_FullBody
protected int m_StanceMask
RepairCarChassisActionReciveData m_DamageZone
int m_LastValidComponentIndex
ActionRepairCarEngineCB m_LastValidType
string m_CurrentDamageZone
void ActionRepairCarPart()
class ActionTargets ActionTarget
void ReadFromContext(ParamsReadContext ctx)
void WriteToContext(ParamsWriteContext ctx)
protected ActionData m_ActionData
protected void OnFinishProgressServer(ActionData action_data)
ref CABase m_ActionComponent
ref ActionTarget m_Target
override void CreateActionComponent()
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override int GetCarDoorsState(string slotType)
Super root of all classes in Enforce script.
proto native int GetSlot()
returns slot id if current type is Attachment
provides access to slot configuration
static proto native owned string GetSlotName(int id)
converts slot_id to string
string m_DamageZoneRecived
Serialization general interface. Serializer API works with:
proto bool Write(void value_out)
proto bool Read(void value_in)
const float BASEBUILDING_REPAIR_FAST
DayZPlayerConstants
defined in C++
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
const float DAMAGE_RUINED_VALUE
const float DAMAGE_DAMAGED_VALUE
const float DAMAGE_BADLY_DAMAGED_VALUE
const int STATE_BADLY_DAMAGED
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].