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

Inventory API Explanation #139

Closed
Inscrutable opened this issue Mar 14, 2015 · 15 comments
Closed

Inventory API Explanation #139

Inscrutable opened this issue Mar 14, 2015 · 15 comments
Labels
FLARD This is gathering dust help wanted We would appreciate contributions high priority This needs to be fixed ASAP
Milestone

Comments

@Inscrutable
Copy link
Member

The text from the PR says it all. SpongePowered/SpongeAPI#443
@Mumfrey can we shoe-horn a butchered version of your delicious explanation into the SpongeDocs? It will need to lose some fat, but some of that may be helpful on #62 (Best Practices, WIP).

@Inscrutable Inscrutable added this to the Finish /plugins Pages milestone Mar 14, 2015
@Mumfrey
Copy link
Member

Mumfrey commented Mar 23, 2015

Of course, although you should bear in mind that the PR document precedes the API itself and basically takes a kind of stream-of-consciousness approach to explaining how the API design was formulated, in order to marshall the reader through the same steps I went through and to give them a better understanding of the reasoning behind a system which is quite different to what they may be familiar with.

Because the document preceded the APi, you should be aware that most of the code examples are subtly wrong, this is because they were effectively pseudocode I wrote to explain my intentions for how the API should work rather than documentation of how it actually does work. I suggest the best way to handle this is for someone to write a draft PR for docs and then tag me on it and I'll note the corrections needed (I'd write it myself but I'm stupidly busy IRL and away from home at the moment for the next week or so).

You may also wish to doctor the diagrams to suit your documentation style and I'm happy to give someone the original vsd file if they want to change the colours/fonts/layout etc.

@Inscrutable Inscrutable added the help wanted We would appreciate contributions label Mar 24, 2015
@Tzky
Copy link
Contributor

Tzky commented Jan 10, 2016

Inventory is partially done, we need to document this asap.

@Tzky Tzky modified the milestones: v4.0.0, v3.0.0 Mar 9, 2016
@FabioZumbi12
Copy link

Is implemented? Only need docs? We can start to use to create custom inventory guis?
Thanks.

@Inscrutable
Copy link
Member Author

Some of it has been implemented, and some is still WIP. If you want to volunteer and help document the bits that are currently working, we would be delighted.

I'm not sure what parts are functional,
we could use a summary of some kind.
@Mumfrey could you kindly bring us all
up to speed on this rather ancient bind?

@FabioZumbi12
Copy link

I trying to use this on my plugin:

this.inv = CustomInventory.builder()
                .size(this.size)
                .name(new FixedTranslation(this.name))
                .build();

But i still getting the message: Could not find a Supplier for the provided builder class: org.spongepowered.api.item.inventory.custom.CustomInventory.Builder

Is this te correct or i forgetting some part of API?

@12awsomeman34
Copy link
Contributor

It's not implemented. There's a PR currently sitting at SpongePowered/SpongeAPI#1258 and will possibly be merged before 5.0 is released. Until then, I wouldn't bother using custom inventories as they're going to be changed with the PR.

Also, your error shouldn't be posted on the SpongeDocs. This is the wrong place to find support. Follow the PR for updates on the refactor and ask for support on the forums/IRC (unless it's a problem with the docs).

@12awsomeman34 12awsomeman34 modified the milestones: v5.0.0, v4.0.0 Aug 12, 2016
@Inscrutable Inscrutable added the high priority This needs to be fixed ASAP label Jan 18, 2017
@XakepSDK
Copy link

Bump

@Inscrutable
Copy link
Member Author

There is a clean-up/refactoring/implementation of some inventory stuff going on at present by @Faithcaio and others. That may eventually lead to some actual documentation... but HELP is still wanted.

@Inscrutable Inscrutable modified the milestones: v5.0.0, v5.1.0 Jan 8, 2018
@MinusKube
Copy link
Contributor

Is someone actually working on this? Maybe you can create a branch so we can start working on it together? :)

@ryantheleach
Copy link
Contributor

@MinusKube Not to my knowledge, but any sort of a start would be appreciated.

@Inscrutable
Copy link
Member Author

The person who knows the most about how this is supposed to work in its' current form is @Faithcaio so it would be of great use if @MinusKube and anyone else available could collaborate and eke out something for this great absence, which also happens to be the VERY OLDEST ISSUE IN THIS REPOSITORY.

@ST-DDT
Copy link
Member

ST-DDT commented Sep 4, 2018

Are there any plugins that could be used as an example/demo (for the future doc author)?
Or would it be possible to get the documentation from the ones who actually designed it?

AFAICT There is currently nothing about inventories in the docs at all.

Is Item the right place to create the documentation or should it be in its own category?

@Inscrutable
Copy link
Member Author

It's quite possible that inventory handling will be quite large, so keeping it separate might help. It's difficult to predict in advance. Otherwise we could simply rename "Items" to "Items and Inventories".

@ryantheleach
Copy link
Contributor

It's been a common problem for people to adjust the inventories directly, rather then using the transactions, or cancelling the event and making modifications to the inventory, and seeing them rollback and getting confused.

So if an example of a GUI menu is used anywhere, I suggest addressing that, either by showing the user a brand new inventory maybe, or modifying the transactions on the inventory event.

@Inscrutable Inscrutable modified the milestones: v5.1.0, v7.X May 15, 2020
@Inscrutable Inscrutable added the FLARD This is gathering dust label Sep 3, 2021
@Inscrutable
Copy link
Member Author

This can be closed with the merging of #897
Let there be CAKE! 🍰

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FLARD This is gathering dust help wanted We would appreciate contributions high priority This needs to be fixed ASAP
Projects
None yet
Development

No branches or pull requests

9 participants