1140 {
1144 {
1146 if (!attachment)
1147 continue;
1148
1149 if (repairing && dta.m_SkipOnRepair)
1150 continue;
1151
1152 if (dta.m_MaterialLockable)
1153 {
1154
1156 attachment.GetInventory().GetCurrentInventoryLocation(invloc);
1157
1159 }
1160 else
1161 {
1162 if (dta.m_MaterialQuantity > 0.0)
1163 {
1164 float quantity = dta.m_MaterialQuantity;
1165 if (repairing)
1166 {
1169 }
1170
1171 attachment.AddQuantity(-quantity);
1172 }
1173 else if (dta.m_MaterialQuantity == -1.0)
1174 {
1175 g_Game.ObjectDelete(attachment);
1176 }
1177 }
1178 }
1179 }
ConstructionPart GetConstructionPart()
static const float REPAIR_MATERIAL_PERCENTAGE
instanced data holder for single construction material
array< ref ConstructionMaterialData > GetMaterialsData()
Instanced construction part data classes for dynamic data, statics now stored on EntityType level in ...
proto native int GetSlot()
returns slot id if current type is Attachment
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
static proto float Max(float x, float y)
Returns bigger of two given values.
static proto float Floor(float f)
Returns floor of value.