Fix duplicating/copying `TileMap`
Using force_parent_owned to prevent issues duplicating
Think this covers all cases
- Fixes: https://github.com/godotengine/godot/issues/88104
Something with the test project needs tweaking or some exception case needs managing, will look in a bit
Appears the internal node is still accessible to scripting and therefore causes some problems, will investigate
Will need some tweaking possibly to handle the ability to instance these types, but unsure, the alternative would be to deal somehow with the duplication of the child nodes in a way that prevents breaking, but unsure how that would work best
It seems this is relatively trivial, will look at a different fix leveraging is_owned_by_parent
Edit: Better solution, will push momentarily
I've identified a few other places where force_parent_owned might be needed and will look at a PR for that too
They shouldn't be removed even then, the layers would be doubled because the recreation of the data from the properties, I didn't realise that in my first attempt but it had extra layers because the map doesn't detect them being added, granted with more such details that would work but alone these lines shouldn't be removed even if the layer is exposed
Thanks!
Thank you!