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

Creating new items does not refresh the ID cache by creating items on top of each other. #58

Closed
scriptsengineer opened this issue Jun 25, 2023 · 2 comments
Assignees

Comments

@scriptsengineer
Copy link
Member

I believed this line:
database.items.append(item)

It would call the "set" of the database items variable, but it doesn't call.

@export var items : Array[InventoryItem] = []:
	set(new_items):
		items = new_items
		update_items_cache()
	get:
		return items
@scriptsengineer
Copy link
Member Author

Confirming this was my mistake, I'll update to forcibly call cache refresh after adding new items/categories
godotengine/godot#17310

@scriptsengineer
Copy link
Member Author

Fixed with 3cd7b29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant