We only care about base parts with locked materials/attachments here. Refund of materials that where used to construct the part are refunded by the ReceiveMaterialsServer method
1222 {
1224
1228 return;
1229
1231 if (!materials)
1232 return;
1233
1236 {
1237 if (dta.m_SkipOnDismantle)
1238 continue;
1239
1240 int slotId = dta.m_MaterialSlotID;
1242 {
1243 ErrorEx(
string.Format(
"DropNonUsableMaterialsServer: invalid cached slot id for '%1' on part %2", dta.m_MaterialSlotName, part_name));
1244 continue;
1245 }
1246
1248 if (!attachment)
1249 {
1250 ErrorEx(
string.Format(
"Attachment is not present for material type '%1' on part %2", dta.m_MaterialType, part_name));
1251 continue;
1252 }
1253
1256
1258
1259
1260
1261
1262 if (dta.m_MaterialQuantity == -1.0 && !dta.m_MaterialLockable)
1263 {
1266
1267 g_Game.ObjectDelete(attachment);
1268 continue;
1269 }
1270
1272 attachment.GetInventory().GetCurrentInventoryLocation(invloc);
1273
1275 }
1276 }
ConstructionPart GetConstructionPart()
class BaseBuildingBase extends ItemBase bsbDebugPrint(string s)
void MoveMaterialAttachmentToGround(notnull EntityAI parent, Man player, notnull ItemBase attachment, notnull InventoryLocation invloc, string partName)
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 bool SetSlotLock(int slot, bool locked)
proto native EntityAI FindAttachment(int slot)
Returns attached entity in slot (you can use InventorySlots.GetSlotIdFromString(name) to get slot id)
script counterpart to engine's class Inventory
const int INVALID
Invalid slot (-1)
provides access to slot configuration
static bool IsBaseBuildingLogEnable()
Result for an object found in CGame.IsBoxCollidingGeometryProxy.