46 if (player.GetBrokenLegs() ==
eBrokenLegs.BROKEN_LEGS)
62 string damageZone =
"";
64 car.GetActionComponentNameList(target.GetComponentIndex(), selections);
66 foreach (
string selection : selections)
69 if (car && DamageSystem.GetDamageZoneFromComponentName(car, selection, damageZone))
71 if (damageZone ==
"Engine")
74 int zoneHP = car.GetHealthLevel(damageZone);
81 WoodenPlank plank = WoodenPlank.Cast(item);
85 if ((tarp || plank) && (damageZone !=
"BackWood" && damageZone !=
"BackTarp"))
101 string damageZone = RepairCarPartActionData.Cast(action_data).m_DamageZone;
102 if (!
GetGame().IsMultiplayer())
105 if (tgObject && damageZone !=
"")
111 float zoneMax = car.GetMaxHealth(damageZone,
"");
131 int qnt = action_data.
m_MainItem.GetQuantity();
133 WoodenPlank usedPlank = WoodenPlank.Cast(action_data.
m_MainItem);
134 if (usedTarp || usedPlank)
140 qnt -= action_data.
m_MainItem.GetQuantityMax() * 0.25;
156 RepairCarPartActionData actionData =
new RepairCarPartActionData();
162 super.WriteToContext(ctx, action_data);
163 RepairCarPartActionData repairActionData;
168 ctx.
Write(repairActionData.m_DamageZone);
174 if (!action_recive_data)
179 super.ReadFromContext(ctx, action_recive_data);
198 super.HandleReciveData(action_recive_data, action_data);
201 RepairCarPartActionData.Cast(action_data).m_DamageZone = recieveDataRepair.
m_DamageZoneRecived;
protected float m_SpecialtyWeight
protected bool m_LockTargetOnUse
ref CCIBase m_ConditionItem
ref CCTBase m_ConditionTarget
protected bool m_FullBody
protected int m_StanceMask
RepairCarChassisActionReciveData m_DamageZone
class ActionTargets ActionTarget
protected ActionData m_ActionData
ref CABase m_ActionComponent
ref ActionTarget m_Target
override void CreateActionComponent()
override void OnFinishProgressServer(ActionData action_data)
void ActionRepairCarChassis()
protected m_LastValidType
override ActionData CreateActionData()
protected string m_CurrentDamageZone
override void CreateConditionComponents()
override bool ReadFromContext(ParamsReadContext ctx, out ActionReciveData action_recive_data)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override void WriteToContext(ParamsWriteContext ctx, ActionData action_data)
protected int m_LastValidComponentIndex
override void HandleReciveData(ActionReciveData action_recive_data, ActionData action_data)
protected int m_CommandUID
protected m_CallbackClass
Super root of all classes in Enforce script.
string m_DamageZoneRecived
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
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
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].