-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[WIP]advanced_inv refactor #34502
[WIP]advanced_inv refactor #34502
Conversation
split all the classes inside advanced_inv.h/cpp into separate files split functionality needed for item transfer into inventory_transfer.h/cpp this keeps other files more generic, so we can use them as parents
delete advanced_inv.h/cpp
Fix bug with moving from all Merge branch 'master' into advanced_inv_refactor
Just to clarify: If there are items on the ground on the same tile as vehicle storage (i.e. on the ground under the vehicle because the vehicle tile ran out of space) will you still swap between the two? |
You need to break up this PR. It's too many lines of change for one PR. |
No, you would have to press V. I believe it's same in the current implementation. |
no, V is referring to the vehicle you're grabbing. he's talking about when you're looking at a space that has a vehicle on it, you can access the ground and the vehicle both: (screenshot to follow) |
How would I even go about it? |
Pretty sure you are referring to [D]ragged. |
Well, i'd start out with a PR that splits the file up with no code changes. if you split files and make changes all at once, the whole thing needs to be reviewed very carefully, but if you just do file splits someone can write a little script to see that the code is all the same. |
Have not attempted to review the actual code changes (as korg says, they're large enough to essentially be unreviewable), but just your description raises a couple of concerns:
This runs the risk of being a significant functionality regression: the
This is definitely a significant functionality regression: Swapping panes is deliberate, not a bug. this lets you swap which pane a location is in with a single keypress. I rely on this functionality constantly in my gameplay. |
The problem I run into is let say I want to move items from [1] to [6]. I open menu press 1 tab 6 tab - at this point I expect things to be set up correctly, but actually pressing 1 doesn't guarantee to move pane to [1]. So instead of like 0.2 seconds it takes 5+ to set everything up. What is the exact situation where you feel pressing active pane location is substantially better than pressing other pane location or tab? The bug part I refer to is because the behavior is inconsistent. Let say [1] has vehicle and [9] doesn't. Pressing 9 repeatedly will now swap locations and pressing 1 repeatedly will not. |
As long as the functionality is preserved.
If there's a bug in one use case with a piece of otherwise useful functionality, the first resort should be to fix the functionality, not remove it. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered. |
Feel free to reopen if you want working on it again. |
Summary
SUMMARY: Infrastructure "Refactor advanced inventroy"
Purpose of change
These changes make advanced inventroy extendable, so child classes can be created
Describe the solution
Describe alternatives you've considered
Additional context
I will break this into multiple commits, but keep it as a reference to what the goal is (approximately)
List of PRs so far:
The following changes are not final, but reflect the implementation.
If you saw Eat menu: #33304
These are mostly unchanged:
comestible_inv_base -> advanced_inv_base
comestible_inv_pane -> advanced_inv_pane
comestible_inv_listitem -> advanced_inv_listitem
comestible_inv_area -> advanced_inv_area
All the special advanced inventroy functions are here:
inventroy_transfer
Fixes and changes: old behavior -> new
long explanation:
What does it actually do?
What's bad for user?
What's bad for dev?
What else?