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

Make inventories reusable for multiple players #44

Closed
DSeeLP opened this issue Feb 15, 2021 · 1 comment · Fixed by #47
Closed

Make inventories reusable for multiple players #44

DSeeLP opened this issue Feb 15, 2021 · 1 comment · Fixed by #47
Labels
code quality Something about the code style, logic or quality in general enhancement New feature or request

Comments

@DSeeLP
Copy link
Contributor

DSeeLP commented Feb 15, 2021

Is your feature request related to a problem? Please describe.
For every Widget that needs a player you need to call the Widget#player method. With this setup Inventories/Widgets can't be reused.

Describe the solution you'd like
A player parameter would be added to the KelpInventory#render and Widget#render method so the inventory can be reused.

@PXAV PXAV added code quality Something about the code style, logic or quality in general enhancement New feature or request labels Feb 15, 2021
@PXAV
Copy link
Member

PXAV commented Feb 15, 2021

Hi, yes you are right that would be a cleaner design and I initially planned to do it like this. But if the KelpPlayer was passed on render, it would be more difficult to create widget-bound listeners. Currently, they are registered before the widget is actually rendered. I'll look at what can be done.

If you have an idea about how this can be solved, I would appreciate a comment.

@PXAV PXAV linked a pull request Mar 2, 2021 that will close this issue
@PXAV PXAV closed this as completed in #47 Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Something about the code style, logic or quality in general enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants