Duplicate property changes variableName by default

This commit is contained in:
Stefan Zermatten
2023-06-21 13:10:22 +02:00
parent b42a873a5f
commit bc1c57de85

View File

@@ -42,6 +42,11 @@ const duplicateProperty = new ValidatedMethod({
let propertyId = randomSrc.id();
property._id = propertyId;
// Change the variableName so it isn't immediately overridden
if (property.variableName) {
property.variableName += 'Copy'
}
// Get all the descendants
let nodes = CreatureProperties.find({
'ancestors.id': _id,