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

add covers that can hold some items #2593

Merged
merged 15 commits into from
Aug 17, 2024
Merged

add covers that can hold some items #2593

merged 15 commits into from
Aug 17, 2024

Conversation

Glease
Copy link
Contributor

@Glease Glease commented May 11, 2024

This cover allows player to store a small amount of item alongside a machine. The intended use case is for steam to EV player to store extruder shapes and alloy smelter shapes inside the machine. The cover GUI system would then allow player to retrieve the items right from the machine GUI. To facilitate this goal and not make this cover some generic diamond chest, the current line up impose a 1 item per stack limit.

itemholdercover

While this demo showcased a 3-slot gui, the submitted PR contains a 3x3 cover instead. The code is structured in a way that the slot count can be tweaked freely without writing any significant code. Multiple cover with different slot count can also be added to game at the same time.

Depends on this bugfix PR in modular UI to work correctly, but does not require that one to be compiled.

New items added

Basic Item Holder: 9 slots. Each slot can only hold ONE item no matter what it is
Good Item Holder. 12 slots. Each slot can only hold ONE item no matter what it is
Advanced Item Holder. 15 slots. . Each slot can only hold ONE item no matter what it is

Screenshots

gui
in world

Task list

  • basic implementation
  • find item texture
  • find cover texture (what is displayed when it's placed on a machine)
  • determine the tiering
  • ensure the meta item id isn't used by something else in fullpack
  • try to make the window show up on the side when opened, instead of in the center
  • Add recipes

Copy link
Contributor

Warning: 2 uncommitted changes
#2594

Copy link
Contributor

Warning: 2 uncommitted changes
#2595

@Dream-Master Dream-Master marked this pull request as draft August 4, 2024 10:45
@Dream-Master
Copy link
Member

@Glease feel free to set it undraft when its done.

@Glease
Copy link
Contributor Author

Glease commented Aug 13, 2024

gui
in world

image credit @ wilybit on discord.
Unfortunately I'm unable to make the cover icon in gui to switch depending on whether the window is open without substantial refactor

@Glease Glease marked this pull request as ready for review August 13, 2024 10:16
@Glease Glease requested a review from a team August 13, 2024 11:12
Copy link
Contributor

@Nxer Nxer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

It will open a wrong UI when shift right click the cover side on machine block.

@Nxer
Copy link
Contributor

Nxer commented Aug 14, 2024

And when break the machine block, the items in cover will drop in world, but re-place the machine(with these covers), there still are items in cover's inventory.

@YannickMG
Copy link
Contributor

Only somewhat related: I always wished the crafting table cover held an inventory as that would've made it somewhat useful. As it is it behaves like a vanilla crafting table in that all items you place in it are expelled when you close the UI.

If you think it would make sense to upgrade the crafting table cover to hold an inventory then you might balance this new "chest cover" alongside it.

Copy link
Contributor

Warning: 2 uncommitted changes
#2888

Dream-Master pushed a commit that referenced this pull request Aug 14, 2024
spotlessApply

Co-authored-by: GitHub GTNH Actions <>
@Nxer
Copy link
Contributor

Nxer commented Aug 15, 2024

image
Would it be convenient to add an player inventory UI when opening this UI ?

Copy link
Contributor

@Nxer Nxer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worked well. Good stuff for hand-crafting masters.

@Dream-Master Dream-Master enabled auto-merge (squash) August 17, 2024 18:33
@Dream-Master Dream-Master merged commit fc77530 into master Aug 17, 2024
3 checks passed
@Dream-Master Dream-Master deleted the feature/chestcover branch August 17, 2024 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants