-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better worn container display (#48109)
* wip: first test * wip: first working conditions * feat: add unit_to_string wrapper to handle most units display, add the ability to use compact param to remove whitespaces for to_string functions, add remove_trailing_zeroes to to_string functions to have the ability to remove trailing zeros, add round function to be able to round a double specifying decimal places * feat: add bool is_restricted method * feat: add divers utility get method to obtain capacity and weight capacity of contents, add unrestricted_pockets_only argument in some of get capacity related methods to limit the total of capacities to contained unrestricted pockets only * feat: add some utility get methods to obtain capacity related data and pocket restriction, add unrestricted_pockets_only argument to some of capacity related get methods to be able to only calculate capacity based upon unrestricted pockets only * feat: add container_data struct to handle item container data, add display to inventory_ui to display `(remains $REMAINING_UNRESTRICTED_VOLUME, $REMAINING_UNRESTRICTED_WEIGHT), max length $MAX_UNRESTRICTED_ITEM_LENGTH` after item name and item filling, if : the item is worn, the item is a container, the item has at least 1 unrestricted pocket * rm: duplicated debugmsg * fix : int to size_t comparison through static_cast * fix: custom_category attribute previously moved to public for testing purposes, put back to private members as it should * astyle: update * fix?: private public shenanigans * fix: quick fix for unwanted behaviour extension to all inventory panes * fix: wrongly associating item if within worn items menu `;` but not worn - due to item_category handling * astyle: update * fix: trying to fix clang-tidy errors * astyle: update * fix?: clang it up * fix: clang it up * fix: lgtm * fix: omitted declaration rename * fit: default decimal places with a variable * fix: wrong behaviour on restricted pockets * fix: string format error for vol_to_string when remove_trailing_zeroes == false * fix: inverted condition for max_containable_length with unrestricted_pockets_only * fix: formatting error for weight_to_string when remove_trailing_zeroes is false * fix: clang-tidy * chore - astyle: update * fix: } supression while resolving conflicts * fix: string_id to static * fix: duplicated addition made during conflict resolve Co-authored-by: Kevin Granade <kevin.granade@gmail.com>
- Loading branch information
1 parent
4ac5f71
commit cfc00fa
Showing
10 changed files
with
305 additions
and
47 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.