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

Display current firemode on sidebar #55377

Merged
merged 2 commits into from
Feb 17, 2022
Merged

Conversation

Hirmuolio
Copy link
Contributor

@Hirmuolio Hirmuolio commented Feb 14, 2022

Summary

Interface "Display current firemode on sidebar"

Purpose of change

If you have gun with fireable gunmod (for example underslung shotgun) the sidebar would always show the name of the gun even when you were firing the gunmod.

Describe the solution

Show the active gunmod.

Cycling firemodes on M27 assault rifle with underslung shotgun:
Before:
before

After:
after

The name shown on the sidebar is now also a bit more cut down. For example the ammo name doesn't show up in it anymore (it usually doesn't fit in the narrow sidebar anyways). Things like rotten status and frozen status are also not shown anymore, probably they don't matter much in this context. Basically most things that were handled by item::display_name() are left out since that function is not used anymore.

Describe alternatives you've considered

Testing

M27 assault rifle with and without underslung shotgun shows up fine.
A7 laser rifle with and without underslung shotgun shows up fine.

Additional context

weapon.gun_current_mode()->tname() returns the name of the thing (for example "underslung shotgun").
weapon.gun_current_mode().tname() returns firemode of the thing (for example "semi-auto").
That is pretty weird.

@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Feb 14, 2022
@catdach
Copy link
Contributor

catdach commented Feb 14, 2022

Dang, I hoped I had fixed this in #54058. Probably wishful thinking in retrospect. Now I'm not even sure what my little change actually did 😨. Which is really my own fault for not testing it beforehand. If you wouldn't mind, could you look into it for me (and make sure I didn't break anything 🙏 )?

@Maleclypse Maleclypse added [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. labels Feb 14, 2022
@Hirmuolio
Copy link
Contributor Author

Hirmuolio commented Feb 14, 2022

Your fix maybe fixed the "semi-auto"/"auto" being displayed on the gun depending on the current gunmod mode.

@kevingranade kevingranade merged commit 4c1b290 into CleverRaven:master Feb 17, 2022
@Hirmuolio Hirmuolio deleted the gunname branch February 17, 2022 07:16
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 BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants