fantasycalendar / FoundryVTT-ItemPiles

Other
33 stars 54 forks source link

Added explicit references to some item types to create items based on the item piles configurations. #545

Closed p4535992 closed 6 months ago

p4535992 commented 6 months ago

I don't like this solution... but I wanted to do the pr to make the use case as clear as possible.

The use case is that I need to create items in an agnostic system module based on the item piles API the problem is that the Item.create(itemData) method necessarily wants a type to be specified, at this point I could set the configurations on the external module, but I would prefer a solution that allows me to rely on item piles so that I have a single point of reference for that variable.

The problem is that my solution seems "not very dynamic", can you think of any better ideas ?

Haxxer commented 6 months ago

@p4535992 Just saw there are no localization for this - could you please add some?

p4535992 commented 6 months ago

a sorry I only saw this just now, I didn't expect you to accept the pr right away, I was thinking of preparing the properties for the other systems too eventually. If you can give me some time I will try to take a look at it otherwise I will redo the pr from scratch no problem.

Haxxer commented 6 months ago

You can keep pull requests as drafts fyi! :)