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

Fix encumbrance window in character info and armor layer screens #33276

Merged
merged 3 commits into from
Aug 20, 2019

Conversation

Qrox
Copy link
Contributor

@Qrox Qrox commented Aug 16, 2019

Summary

SUMMARY: Bugfixes "Fix encumbrance window in character info and armor layer screens"

Purpose of change

The encumbrance window has been glitchy in many ways such as scollbar that cannot be scrolled to the end, wrong localization text when multiple bodyparts are combined, etc. This PR fixes these issues.

Describe the solution

  1. It now extracts bodypart names and combined bodypart names as separate strings instead of singular and plural forms, so they can be correctly translated in languages without plural forms.
  2. Re-wrote the displayed bodypart list generation code. The only thing I could say about the original code is that it was too grotesque for me to even try to understand it... This fixes the buggy scrollbar.
  3. Changed the combining condition so that when a piece of clothing covering only one side of the body is selected in the armor layer screen, the corresponding bodyparts will always be shown separately and correctly highlighted.

@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Mechanics: Character / Player Character / Player mechanics Info / User Interface Game - player communication, menus, etc. labels Aug 16, 2019
src/bodypart.cpp Outdated Show resolved Hide resolved
@ZhilkinSerg ZhilkinSerg merged commit 32304c4 into CleverRaven:master Aug 20, 2019
@Qrox Qrox deleted the fix-encumbrance-window branch August 21, 2019 05:08
misterprimus pushed a commit to misterprimus/Cataclysm-DDA that referenced this pull request Sep 21, 2019
…verRaven#33276)

* Fix names of paired bodyparts (such as arms, legs, etc) cannot be translated for languages without plural forms

* Fix encumbrance window in character info and armor layer screens

* Apply suggestion from review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. Mechanics: Character / Player Character / Player mechanics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants