Cloned items copy the RequiredItems from the original item. Closes #581

This commit is contained in:
Joonas Rikkonen
2018-08-06 11:19:10 +03:00
parent a8604deeb6
commit e57eb739e2
@@ -492,7 +492,12 @@ namespace Barotrauma
if (!property.Value.Attributes.OfType<Editable>().Any()) continue; if (!property.Value.Attributes.OfType<Editable>().Any()) continue;
clone.components[i].properties[property.Key].TrySetValue(property.Value.GetValue()); clone.components[i].properties[property.Key].TrySetValue(property.Value.GetValue());
} }
for (int j = 0; j < components[i].requiredItems.Count; j++)
{
clone.components[i].requiredItems[j].JoinedNames = components[i].requiredItems[j].JoinedNames;
}
} }
if (ContainedItems != null) if (ContainedItems != null)
{ {
foreach (Item containedItem in ContainedItems) foreach (Item containedItem in ContainedItems)