-
-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Objective - ability to make inventories read only (player should be able to click things in the inventory and still emit a click event, this can be useful for creating inventory menus. - closes #427 - related #307 #355 # Solution - adds a public ``readonly: bool`` field to the ``Inventory`` component, that will make any interactions with this item impossible (includes: moving, shift moving, hotbar moving, dropping) if a player inventory is readonly, then the player will also not be able to drop items (even when not in the inventory), so the drop event will not be emitted (this could be changed if requested) - when implementing this i discovered a bug where a player is not able to put a item from a open inventory in the offhand (by hitting F) that will cause a desync. On the client the item will be in the offhand, but if you try to interact with that it dissapears. (unrelated to this PR and will not be fixed in this PR) --------- Co-authored-by: Carson McManus <[email protected]>
- Loading branch information
1 parent
35b8e96
commit 9a0c82f
Showing
2 changed files
with
929 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.