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) )
77 if ( damageZone !=
"" )
79 if (module_repairing.CanRepair(item,tent,damageZone))
94 string damageZone = RepairTentActionData.Cast(action_data).m_DamageZone;
95 if (!
g_Game.IsMultiplayer())
98 if ( targetParent && targetParent.IsInherited(
TentBase) && damageZone !=
"" )
101 PluginRepairing module_repairing;
111 RepairTentActionData action_data =
new RepairTentActionData;
117 super.WriteToContext(ctx, action_data);
118 RepairTentActionData repair_action_data;
123 ctx.
Write(repair_action_data.m_DamageZone);
129 if(!action_recive_data)
133 super.ReadFromContext(ctx, action_recive_data);
139 if ( !ctx.
Read(zone) )
149 super.HandleReciveData(action_recive_data, action_data);
152 RepairTentActionData.Cast(action_data).m_DamageZone = recive_data_repair.
m_DamageZoneRecived;
157 float transfer_to_global_coef = 0;
159 string path =
"" +
CFG_VEHICLESPATH +
" " + item.GetType() +
" DamageSystem DamageZones " + damage_zone;
160 PluginRepairing module_repairing;
163 g_Game.ConfigGetTextArray(
"" +
path +
" transferToZonesNames", transfer_zones);
165 for (
int i = 0; i < transfer_zones.Count(); i++)
167 transfer_to_global_coef +=
g_Game.ConfigGetFloat(
"" +
path +
" Health transferToGlobalCoef");
168 if (transfer_zones.Get(i) == damage_zone)
171 module_repairing.Repair(player,repair_kit,item,specialty_weight,transfer_zones.Get(i),
false);
175 if (transfer_to_global_coef > 0)
177 module_repairing.Repair(player,repair_kit,item,specialty_weight,
"",
false);
ref CCIBase m_ConditionItem
ref CCTBase m_ConditionTarget
RepairTentActionReciveData m_DamageZone
void ActionTarget(Object object, Object parent, int componentIndex, vector cursorHitPos, float utility, string surfaceName="")
PluginBase GetPlugin(typename plugin_type)
void ActionContinuousBase()
ref ActionTarget m_Target
override void OnFinishProgressServer(ActionData action_data)
override void WriteToContext(ParamsWriteContext ctx, ActionData action_data)
override ActionData CreateActionData()
override void CreateConditionComponents()
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)
string m_CurrentDamageZone
int m_LastValidComponentIndex
override bool HasTarget()
override bool IsUsingProxies()
override void HandleReciveData(ActionReciveData action_recive_data, ActionData action_data)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override void CreateActionComponent()
Super root of all classes in Enforce script.
string m_DamageZoneRecived
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++
Serializer ParamsReadContext
Serializer ParamsWriteContext
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.