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

Thinking about notes #2138

Open
8bitgentleman opened this issue Jul 28, 2014 · 1 comment
Open

Thinking about notes #2138

8bitgentleman opened this issue Jul 28, 2014 · 1 comment
Labels

Comments

@8bitgentleman
Copy link
Contributor

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?

@CalebJohn
Copy link
Member

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.

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

No branches or pull requests

3 participants