According to wiki we should use the data:extend method as preferred solution - I see small drawback in it for objects that have a lot of attributes.
Will I run into any trouble using the old assignment method with code like this:
Code: Select all
towerCopy = deepCopy(data.raw["ammo-turret"]["gun-turret"])
towerCopy.max_health = 500
towerCopy.name = "gun-turret-1"
towerCopy.minable.result = "gun-turret-1"
data.raw["ammo-turret"]["gun-turret-1"] = towerCopy
Only thing that would need to be added separately are the object names/descriptions for locale.