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
76 if (tent.GetHealthLevel("" + damageZone) == GameConstants.STATE_RUINED )
77 {
80 break;
81 }else
82 continue;
83 }
84 }
86 {
89 }
90 }
91
93 {
94 return true;
95 }
96 }
97
98 return false;
99 }
PluginBase GetPlugin(typename plugin_type)
int m_LastValidComponentIndex
string m_CurrentDamageZone