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

JSON flag for default collapse of container contents #51434

Merged
merged 1 commit into from
Sep 21, 2021

Conversation

RoyBerube
Copy link
Contributor

@RoyBerube RoyBerube commented Sep 6, 2021

Summary

Interface "JSON flag for default collapse of container contents"

Purpose of change

Adds JSON control over the default collapse of containers in inventory view.

Describe the solution

The flag COLLAPSE_CONTENTS when added to a container will make it collapsed by default. Anything - item groups etc - that is created in that container will be collapsed.

Collapse is done in the item constructor so will not affect existing items in the game.

Items set to collapse in JSON: IFAK, wallets, first aid kits, MRE.

Describe alternatives you've considered

Testing

Found natural sources of the items and opened inventory. MREs and wallets from soldiers, and first aid kits from evac shelter basements. Containers were collapsed.

Also confirmed that settings persist on a save/load.

Additional context

@actual-nh actual-nh added <Enhancement / Feature> New features, or enhancements on existing [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Code: Performance Performance boosting code (CPU, memory, etc.) Info / User Interface Game - player communication, menus, etc. Items: Containers Things that hold other things labels Sep 6, 2021
@kevingranade kevingranade merged commit 99dc03c into CleverRaven:master Sep 21, 2021
@RoyBerube RoyBerube deleted the jsonize-default-collapse branch September 21, 2021 22:22
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` Code: Performance Performance boosting code (CPU, memory, etc.) <Enhancement / Feature> New features, or enhancements on existing Info / User Interface Game - player communication, menus, etc. Items: Containers Things that hold other things [JSON] Changes (can be) made in JSON
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants