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

remove [C]ontainer from advanced inventory #34542

Closed

Conversation

akozhevn
Copy link
Contributor

@akozhevn akozhevn commented Oct 7, 2019

Summary

SUMMARY: Infrastructure "Remove [C]ontainer from advanced inventory"

Purpose of change

part of advanced inventory refactoring #34502
Why this first? Easy to do, and makes code a lot cleaner.

Describe the solution

Describe alternatives you've considered

Additional context

copied from #34502:
What does [C]ontainer actually do?

  • I believe the only thing you can do with it is reload a container with liquid

What's bad for user?

  • hard to understand (I didn't know what it was, for like first 100 hours of play)
  • doesn't filter items you can put in
  • can't unload (even though it looks like you can);
  • can't swap contents between containers (even though it looks like you can);

What's bad for dev?

  • It's a huge hack - every location in the menu represents location in the world, but this represents an item and it's contents. To make up the difference there's a check and separate handling all throughout the code. Meaning more cases and chances for errors in any future dev.

What else?

  • I believe [r]eload handles this functionality much better, so there's no need for it.
  • If you really want the [c]ontainer-like behavior, I can add shortcut for [r]eloading (which is basically same thing but better)

data/raw/keybindings.json Outdated Show resolved Hide resolved
@molkero
Copy link
Contributor

molkero commented Oct 8, 2019

Won't this be useful with planned container sensitive inventory system?

@AMurkin
Copy link
Contributor

AMurkin commented Oct 8, 2019

How can I quickly pour 20 bottles into one tank if this PR is accepted?

@akozhevn
Copy link
Contributor Author

akozhevn commented Oct 8, 2019

How can I quickly pour 20 bottles into one tank if this PR is accepted?

I judge this using some mental arithmetic:

  1. How often do you need this?
    Personally I never run into that situation.
    If you are the kind of person that prefers having 1 gallon jug of antiseptic, you would probably fill it as soon as new small bottle arrive rather than in bulk.
    If you have 60L container that you want to fill, you can carry it, rather than making many trips with all your bottles
    You can't fill a car tank using [c]ontainer
    Overall in my estimation use case is <1 per 100 hours

  2. How bad is it compare to alternative?
    When you need to fill 20 bottles from a puddle or refill a car, you just have to press 20 times. So users already have certain expectation, this isn't something out of the ordinary.
    Pressing (c, tab, /, some search string, move all) takes maybe 10 - 15 sec. Pressing (r, enter)*X will take let say 1.5*X sec; so at the very least you need 10 small containers for this functionality to be better. At 20 containers you lose about 15 seconds.

  3. This is kind of aside, but 8 plastic bottles take same amount of space and can contain same amount of liquid as a gallon jug, so what's the point of transferring?

So what do we get, even with these crude estimates - lose 15 sec every 100 hours, without breaking user expectation. Doesn't seem bad at all.

There's also familiarity thing, so even if [c]ontaner is better in some situation, user will likely go for 'r'eload anyway, because that's what they are used to. Basically if some function is used very rarely it needs to be substantially better than alternative, and calculation shows that it's not.

P.S. 1.5 can shrink to 0.1 if 'r'eload would reopen automatically when container isn't full and other containers of the same time a present.

@akozhevn
Copy link
Contributor Author

akozhevn commented Oct 8, 2019

Won't this be useful with planned container sensitive inventory system?

Can you link it? I don't know what you are referring to.
My guess would be no, because current functionality is very limited. It looks fancier than it is =P

@kevingranade
Copy link
Member

every location in the menu represents location in the world

This is incorrect, there are more use cases where targets are a tile on the map, but the container and grabbed vehicle targets are equally valid. I expect to add more of these non-location-based targets rather than remove any.

The features as implemented and the code implementing them having differences is something to fix by rearranging the code, not by slashing features.

I judge this using some mental arithmetic:

Your mental arithmetic has a fatal flaw, which is that's not how users perceive system responsiveness. Users don't generally evaluate overall system efficiency, they only notice when they try to do a task and it takes longer than they think it should take.

@KorGgenT KorGgenT added Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON labels Oct 8, 2019
@molkero
Copy link
Contributor

molkero commented Oct 9, 2019

Won't this be useful with planned container sensitive inventory system?

Can you link it? I don't know what you are referring to.
My guess would be no, because current functionality is very limited. It looks fancier than it is =P

https://github.com/CleverRaven/Cataclysm-DDA/projects/31

It is planned, not much there yet. Still could be useful having containers in AI if you're gonna have backpacks full of stuff lying around.

@akozhevn akozhevn closed this Oct 10, 2019
@akozhevn akozhevn deleted the adv_inv_remove_container branch October 10, 2019 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones [JSON] Changes (can be) made in JSON
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants