53 {
54
55 Object targetObject = target.GetObject();
56 Object targetParent = target.GetParent();
57 if ( !targetParent || !targetParent.IsInherited(TentBase) )
58 return false;
59
60 if ( player && targetObject && targetParent )
61 {
62 array<string> selections = new array<string>;
63 PluginRepairing module_repairing;
64 Class.CastTo(module_repairing,
GetPlugin(PluginRepairing));
65 targetObject.GetActionComponentNameList(target.GetComponentIndex(), selections, "view");
66 TentBase tent = TentBase.Cast( targetParent );
68 {
69 string damageZone = "";
70
71 for (int s = 0; s < selections.Count(); s++)
72 {
73 if ( DamageSystem.GetDamageZoneFromComponentName(tent, selections[s], damageZone) )
74 {
75 if (tent.GetHealthLevel("" + damageZone) == GameConstants.STATE_RUINED )
76 {
79 break;
80 }else
81 continue;
82 }
83 }
85 {
88 }
89 }
90
92 {
93 return true;
94 }
95 }
96
97 return false;
98 }
PluginBase GetPlugin(typename plugin_type)
int m_LastValidComponentIndex
string m_CurrentDamageZone