Fixed persistence error that would occur when dropping a modular item and then picking up that same item in the same persistence cycle.

This commit is contained in:
Sam 2021-11-06 19:18:18 -04:00
parent 5acb8cf74e
commit 539c3307a6

View File

@ -758,6 +758,10 @@ impl Item {
} else {
self.item_id = Arc::new(AtomicCell::new(None));
}
// Reset item id for every component of an item too
for component in self.components.iter_mut() {
component.reset_item_id();
}
}
/// Removes the unique identity of an item - used when dropping an item on