Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate(true) not creating a deep copy of Card Resources #9

Closed
guladam opened this issue May 20, 2024 · 0 comments
Closed

Duplicate(true) not creating a deep copy of Card Resources #9

guladam opened this issue May 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@guladam
Copy link
Owner

guladam commented May 20, 2024

As described by Alex on my Ko-Fi page:

"Just wanted to let you know about a really funky Godot bug I ran into while working off your StS videos, namely that duplicate(true) doesn't actually duplicate resources stored in arrays, AKA the Card array stored in CardPile. Bug has been reported here: godotengine/godot#74918. I don't know if it will actually come up for your video series at all, but when I was trying to dynamically modify cards and every other card with the same resource was getting changed too it was both confusing and frustrating.

Once I discovered it was actually an engine bug it was a pretty easy fix to write my own duplicate function for CardPile, but I wanted to let you know because you use duplicate(true) at least once in the code and it was kind of a hard issue to find that made me question my understanding of resources and duplicate in general."

@guladam guladam added the bug Something isn't working label May 20, 2024
guladam added a commit that referenced this issue Jun 25, 2024
@guladam guladam closed this as completed Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant