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

Hide bullets and magazines in guns when character wielding items #53437

Closed
wants to merge 1 commit into from
Closed

Hide bullets and magazines in guns when character wielding items #53437

wants to merge 1 commit into from

Conversation

wwkk222208
Copy link
Contributor

@wwkk222208 wwkk222208 commented Dec 14, 2021

Summary

Features "Hide bullets and magazines in guns when character wielding items"

Purpose of change

When the player finds a new gun, he might:

  1. wield this gun
  2. pick it up
  3. unload it and pick bullets or the magazin up.

But he is not likely to wield a magazine or bullets.

In current game, magazines and bullets in guns are hidden by default in 'Inventory' and displayed in 'Wield item' and 'Pick up'. It is more reasonable to hide them in 'Wield item'.
This change can make the window more concise.

Describe the solution

Hide magazines and bullets in guns when the character attempt to wield something just like how they behave in Inventory window.

Describe alternatives you've considered

Testing

This feature is successfully implemented.

Additional context

@andrei8l
Copy link
Contributor

It'd be better to set magazine and ammo pockets to be collapsed by default, but that needs a few more changes: start by adding a pocket filter to {item,item_contents}::get_all_contained_pockets(), then update the couple of places that handle collapsed pockets - let me know if you want to do this and need help.

@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Dec 14, 2021
@NetSysFire
Copy link
Member

Consider not using SUMMARY: None for this PR as this is a noteworthy change imo.

@NetSysFire NetSysFire added <Enhancement / Feature> New features, or enhancements on existing [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. Items: Magazines Ammo holding items and objects. Quality of Life QoL: degree to which players are comfortable, and able to enjoy CDDA labels Dec 14, 2021
@wwkk222208
Copy link
Contributor Author

wwkk222208 commented Dec 14, 2021

It'd be better to set magazine and ammo pockets to be collapsed by default, but that needs a few more changes: start by adding a pocket filter to {item,item_contents}::get_all_contained_pockets(), then update the couple of places that handle collapsed pockets - let me know if you want to do this and need help.

If set magazine and ammo pockets to be collapsed by default, they will also be hidden in the pick up window. I consulted a friend of mine who felt it necessary to show them in the pick up window. Players often want to directly pick up ammunition or magazines instead of guns. Maybe I should find out what other people think of this issue.
In addition, get_all_contained_pockets() does not seem to be applicable to this issue, because this function will only retrieve pockets of the container type.

@wwkk222208
Copy link
Contributor Author

Consider not using SUMMARY: None for this PR as this is a noteworthy change imo.

Thanks for your suggestion.

@github-actions github-actions bot added BasicBuildPassed This PR builds correctly, label assigned by github actions and removed BasicBuildPassed This PR builds correctly, label assigned by github actions labels Dec 14, 2021
@I-am-Erk
Copy link
Member

I think the solution here is to collapse them by default, or at least collapse them automatically when wielded. That way they still follow the rules of other containers. Having them follow their own special rule is likely to be confusing

@wwkk222208 wwkk222208 marked this pull request as draft December 15, 2021 20:15
@wwkk222208
Copy link
Contributor Author

I think the solution here is to collapse them by default, or at least collapse them automatically when wielded. That way they still follow the rules of other containers. Having them follow their own special rule is likely to be confusing

The magazine well is not regarded as a container, so some additional code is needed to implement this feature in this way.
This PR will remain as a draft until this it is completed,

@wwkk222208
Copy link
Contributor Author

wwkk222208 commented Dec 16, 2021

code

The magazines are intentionally hidden in ‘Inventory’. If we allow the player to set whether the magazine is hidden without changing this setting, it will be confusing. I am not sure if it can be modified.

@I-am-Erk
Copy link
Member

If the magazines already behave that way, there's no need to change them. I just don't want their behaviour to change when they're wielded.

@wwkk222208
Copy link
Contributor Author

wwkk222208 commented Dec 16, 2021

If the magazines already behave that way, there's no need to change them. I just don't want their behaviour to change when they're wielded.

In the current game, the magazine is displayed in ‘pick up’ and ‘wield item’ and hidden in ‘inventory’, which is also somewhat confusing.(Many people try to wield a gun but get a magazine. lol..)

In terms of practicality of gameplay, it is more reasonable for the magazine to be displayed in the ‘pick up’ and to be hidden in the ‘wield item’ and ‘inventory’.

In terms of consistency, the magazine should be hidden/displayed in ‘pick up’, ‘wield item’ and ‘inventory’ at the same time as the player decides.

In terms of reality, hide it directly in all windows just like how it behaves in 'inventory'. Players can only get them through ‘unload’, which is reasonable to some extent.

Which one do you think is more reasonable?

@github-actions github-actions bot added BasicBuildPassed This PR builds correctly, label assigned by github actions and removed BasicBuildPassed This PR builds correctly, label assigned by github actions labels Dec 16, 2021
@stale
Copy link

stale bot commented Mar 2, 2022

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.

@stale stale bot added the stale Closed for lack of activity, but still valid. label Mar 2, 2022
@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically closed due to lack of activity. This does not mean that we do not value the issue. Feel free to request that it be re-opened if you are going to actively work on it

@stale stale bot closed this Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` <Enhancement / Feature> New features, or enhancements on existing Info / User Interface Game - player communication, menus, etc. Items: Magazines Ammo holding items and objects. json-styled JSON lint passed, label assigned by github actions Quality of Life QoL: degree to which players are comfortable, and able to enjoy CDDA stale Closed for lack of activity, but still valid.
Projects
Status: Abandoned PRs with no one to pick them up
Development

Successfully merging this pull request may close these issues.

4 participants