53 {
54 Object targetObject = target.GetObject();
55 Object targetParent = target.GetParent();
56 if ( !targetParent || !targetParent.IsInherited(TentBase) )
57 return false;
58
59 if ( player && targetObject && targetParent )
60 {
61 array<string> selections = new array<string>;
62 PluginRepairing module_repairing;
63 Class.CastTo(module_repairing,
GetPlugin(PluginRepairing));
64 targetObject.GetActionComponentNameList(target.GetComponentIndex(), selections, "view");
65 TentBase tent = TentBase.Cast( targetParent );
66
67 string damageZone = "";
68
69 for (int s = 0; s < selections.Count(); s++)
70 {
71 if ( DamageSystem.GetDamageZoneFromComponentName(tent, selections[s], damageZone) )
72 {
73
74 break;
75 }
76 }
77
78 if ( damageZone != "" )
79 {
80 if (module_repairing.CanRepair(item,tent,damageZone))
81 {
83 return true;
84 }
85 }
86 }
87 return false;
88 }
PluginBase GetPlugin(typename plugin_type)
string m_CurrentDamageZone