54 Object targetObject = target.GetObject();
55 Object targetParent = target.GetParent();
56 if ( !targetParent || !targetParent.IsInherited(
TentBase) )
59 if ( player && targetObject && targetParent )
62 PluginRepairing module_repairing;
64 targetObject.GetActionComponentNameList(target.GetComponentIndex(), selections,
"view");
67 string damageZone =
"";
69 for (
int s = 0; s < selections.Count(); s++)
71 if ( DamageSystem.GetDamageZoneFromComponentName(tent, selections[s], damageZone) )
78 if ( damageZone !=
"" )
80 if (module_repairing.CanRepair(item,tent,damageZone))
95 string damageZone = RepairTentActionData.Cast(action_data).m_DamageZone;
99 if ( targetParent && targetParent.IsInherited(
TentBase) && damageZone !=
"" )
102 PluginRepairing module_repairing;
112 RepairTentActionData action_data =
new RepairTentActionData;
118 super.WriteToContext(ctx, action_data);
119 RepairTentActionData repair_action_data;
124 ctx.
Write(repair_action_data.m_DamageZone);
130 if(!action_recive_data)
134 super.ReadFromContext(ctx, action_recive_data);
140 if ( !ctx.
Read(zone) )
150 super.HandleReciveData(action_recive_data, action_data);
153 RepairTentActionData.Cast(action_data).m_DamageZone = recive_data_repair.
m_DamageZoneRecived;
158 float transfer_to_global_coef = 0;
160 string path =
"" +
CFG_VEHICLESPATH +
" " + item.GetType() +
" DamageSystem DamageZones " + damage_zone;
161 PluginRepairing module_repairing;
166 for (
int i = 0; i < transfer_zones.Count(); i++)
169 if (transfer_zones.Get(i) == damage_zone)
172 module_repairing.Repair(player,repair_kit,item,specialty_weight,transfer_zones.Get(i),
false);
176 if (transfer_to_global_coef > 0)
178 module_repairing.Repair(player,repair_kit,item,specialty_weight,
"",
false);
protected float m_SpecialtyWeight
ref CCIBase m_ConditionItem
ref CCTBase m_ConditionTarget
protected bool m_FullBody
protected int m_StanceMask
RepairCarChassisActionReciveData m_DamageZone
class ActionTargets ActionTarget
PluginBase GetPlugin(typename plugin_type)
protected ActionData m_ActionData
ref CABase m_ActionComponent
ref ActionTarget m_Target
override void CreateActionComponent()
override void OnFinishProgressServer(ActionData action_data)
override ActionData CreateActionData()
override void CreateConditionComponents()
int m_LastValidComponentIndex
void RepairDamageTransfer(PlayerBase player, ItemBase repair_kit, ItemBase item, float specialty_weight, string damage_zone="")
override bool ReadFromContext(ParamsReadContext ctx, out ActionReciveData action_recive_data)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override bool HasTarget()
override void WriteToContext(ParamsWriteContext ctx, ActionData action_data)
override bool IsUsingProxies()
override void HandleReciveData(ActionReciveData action_recive_data, ActionData action_data)
string m_CurrentDamageZone
protected int m_CommandUID
protected m_CallbackClass
proto native float ConfigGetFloat(string path)
Get float value from config on path.
proto native void ConfigGetTextArray(string path, out TStringArray values)
Get array of strings from config on path.
Super root of all classes in Enforce script.
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.