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 break;
74 }
75 }
76
77 if ( damageZone != "" )
78 {
79 if (module_repairing.CanRepair(item,tent,damageZone))
80 {
82 return true;
83 }
84 }
85 }
86 return false;
87 }
PluginBase GetPlugin(typename plugin_type)
string m_CurrentDamageZone