97 {
100 array<string> compNames = new array<string>();
101 ent.GetActionComponentNameList(action_data.
m_Target.GetComponentIndex(), compNames);
102 string partName;
103 foreach (string testName : compNames)
104 {
105 if (construction.IsPartConstructed(testName))
106 {
107 partName = testName;
108 break;
109 }
110 }
111
112 if (partName == "")
113 {
114 ErrorEx(
"Invalid part name on component idx: " + action_data.
m_Target.GetComponentIndex());
115 return;
116 }
117
118 string zoneName;
119 PluginRepairing moduleRrepairing = PluginRepairing.Cast(
GetPlugin(PluginRepairing));
120 DamageSystem.GetDamageZoneFromComponentName(ent, partName, zoneName);
122
123
124 construction.TakeMaterialsServer(partName, true);
125
126
127 action_data.
m_MainItem.DecreaseHealth(UADamageApplied.REPAIR,
false);
128 }
void ConstructionBase(EntityAI parent)
PluginBase GetPlugin(typename plugin_type)
ref ActionTarget m_Target