expressobits / inventory-system

Modular inventory system for godot 4 with nodes, compatible with multiplayer, separate logic from the UI, Using items as separate resources.
MIT License
459 stars 31 forks source link

fix linked variables in newly created items #57

Closed Lodugh closed 1 year ago

Lodugh commented 1 year ago

Now it should be finally fixed. I couldnt think of any other way. Reverted the old commit as well.

scriptsengineer commented 1 year ago

I analyzed the previous commits and they solved the problem, this pr solves when the creation was already done wrong and placed new items with the same array and dictionaries, I ask you to do the test to know if I'm missing something, I created a database and two items and they have different list already.

scriptsengineer commented 1 year ago

Update: Categories work fine, but here properties keep getting created in duplicate.

Lodugh commented 1 year ago

I analyzed the previous commits and they solved the problem, this pr solves when the creation was already done wrong and placed new items with the same array and dictionaries, I ask you to do the test to know if I'm missing something, I created a database and two items and they have different list already.

The previous commit did solve the problem, but only for newly created items and only as long as the resource doesn't get reloaded. As mentioned in the issue if the value is saved as the global default value of the resource it will be linked to it on the next project load.

What do you mean exactly with "properties keep getting created in duplicate"? I don't have any issues with properties.

scriptsengineer commented 1 year ago

The creation of categories is normal with your last PR, however the problem still occurs with the dictionaries (I said duplicated wrongly, I meant that new items are taking the dictionary from the other items as the issue presents here), I am analyzing now if not linked with issue #58 i fixed now

I analyzed the previous commits and they solved the problem, this pr solves when the creation was already done wrong and placed new items with the same array and dictionaries, I ask you to do the test to know if I'm missing something, I created a database and two items and they have different list already.

The previous commit did solve the problem, but only for newly created items and only as long as the resource doesn't get reloaded. As mentioned in the issue if the value is saved as the global default value of the resource it will be linked to it on the next project load.

What do you mean exactly with "properties keep getting created in duplicate"? I don't have any issues with properties.