Repository navigation
fix: persist edits to items picked from the in-game furnishing list - #97
Merged
Merged
Conversation
Owner
|
Thanks for the PR! I appreciate the simple change, and I do like the change to |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey! We ran into #56 while decorating, so I dug into why it happens.
The in-game Indoor Furnishings list never actually picks the item up. It only soft-selects it: the game sets
ActiveItemand highlights it, butStatestays atSoftSelect. BDTH shows its controls as soon asActiveItemis set in Rotate mode, so the item moves on screen. But the game only sends a new position to the server when it places an item that was really picked up (State == Active). A soft-selected item just gets dropped, which is why everything reverts when you leave and come back.To fix it,
PluginMemorycallsSelectItemon the soft-selected item right before BDTH's first real change to its position or rotation. That's what the game does when you click a highlighted item, and it's the same call/bdth listalready uses, so from then on the item saves normally when you place it.I also made
WritePositionskip writes that don't change anything. The controls rewrite the position every frame, so without that the item would get picked up the moment you chose it from the list. The in-game list ignores clicks while you're holding something, so you couldn't keep browsing.The one change you'd notice in game: after picking from the in-game list, your first edit in BDTH picks the item up, and you click to place it, just like when you select something in the world.
Tested and working on today's build of FFXIV/Dalamud.