55 Object targetObject = target.GetObject();
56 Object targetParent = target.GetParent();
57 if ( !targetParent || !targetParent.IsInherited(
TentBase) )
60 if ( player && targetObject && targetParent )
63 PluginRepairing module_repairing;
65 targetObject.GetActionComponentNameList(target.GetComponentIndex(), selections,
"view");
69 string damageZone =
"";
71 for (
int s = 0; s < selections.Count(); s++)
73 if ( DamageSystem.GetDamageZoneFromComponentName(tent, selections[s], damageZone) )
103 Object targetParent = action_data.m_Target.GetParent();
104 ItemBase usedItem = action_data.m_MainItem;
106 string damageZone = RepairTentPartActionData.Cast(action_data).m_DamageZone;
107 if (!
GetGame().IsMultiplayer())
110 if ( targetParent && targetParent.IsInherited(
TentBase) && damageZone !=
"" )
113 float m_RepairedLevel = usedItem.GetHealthLevel();
115 tent.SetAllowDamage(
true);
116 targetParent.SetHealth01(
"" + damageZone,
"", targetParent.GetHealthLevelValue(m_RepairedLevel));
117 tent.ProcessInvulnerabilityCheck(tent.GetInvulnerabilityTypeString());
119 if (usedItem.GetQuantity() > 1)
122 int val = usedItem.GetQuantity();
133 RepairTentPartActionData action_data =
new RepairTentPartActionData;
139 super.WriteToContext(ctx, action_data);
140 RepairTentPartActionData repair_action_data;
145 ctx.
Write(repair_action_data.m_DamageZone);
151 if(!action_recive_data)
155 super.ReadFromContext(ctx, action_recive_data);
161 if ( !ctx.
Read(zone) )
171 super.HandleReciveData(action_recive_data, action_data);
174 RepairTentPartActionData.Cast(action_data).m_DamageZone = recive_data_repair.
m_DamageZoneRecived;
RepairTentActionReciveData m_DamageZone
class ActionTargets ActionTarget
PluginBase GetPlugin(typename plugin_type)
ref CCIBase m_ConditionItem
ref CCTBase m_ConditionTarget
void ActionContinuousBase()
override void WriteToContext(ParamsWriteContext ctx, ActionData action_data)
override void CreateConditionComponents()
override bool HasTarget()
override void HandleReciveData(ActionReciveData action_recive_data, ActionData action_data)
override ActionData CreateActionData()
int m_LastValidComponentIndex
override bool ReadFromContext(ParamsReadContext ctx, out ActionReciveData action_recive_data)
void ActionRepairTentPart()
override void OnFinishProgressServer(ActionData action_data)
string m_CurrentDamageZone
override bool IsUsingProxies()
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override void CreateActionComponent()
Super root of all classes in Enforce script.
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
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
proto native CGame GetGame()
Serializer ParamsWriteContext
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.