You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I’ve been thinking about how notes can be handled with the current inventory and tooltip code.
To my understanding once an item is added to the inventory the inventory reads the stats on that item from the corresponding file under src/items. src/items contains files for all of the nodes that can be picked up. The problem is that if, for example, there are two swords in the inventory it reads the stats for both from the same file essentially making the two swords identical. What that means is that even if custom info is added to a node via node properties defined in the tmx file once the node is picked up that item loses all custom properties. With the current code the only way I can see notes being able to be read from the inventory tooltip is by making a separate node for each note (which seems like a waste) or adding some code that allows custom node properties to be saved and then read by the inventory tooltip.
What do you all think?
The text was updated successfully, but these errors were encountered:
I think the latter option is better, it seems like a real pain to have to edit the node files every time you need to add/change a note. I don't think it will be to hard to make the necessary changes although it certainly is more difficult than just add them as nodes (which I am against). You could probably just add an additional name or something like that to the note (or any node for that matter) and use it in the src/item/node file to load the additional data.
So I’ve been thinking about how notes can be handled with the current inventory and tooltip code.
To my understanding once an item is added to the inventory the inventory reads the stats on that item from the corresponding file under src/items. src/items contains files for all of the nodes that can be picked up. The problem is that if, for example, there are two swords in the inventory it reads the stats for both from the same file essentially making the two swords identical. What that means is that even if custom info is added to a node via node properties defined in the tmx file once the node is picked up that item loses all custom properties. With the current code the only way I can see notes being able to be read from the inventory tooltip is by making a separate node for each note (which seems like a waste) or adding some code that allows custom node properties to be saved and then read by the inventory tooltip.
What do you all think?
The text was updated successfully, but these errors were encountered: