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
Recruit list shows experience in blue #4736
Comments
Hi! Thanks for helping make Wesnoth even better! |
I can't recall any particular scenario where you are permitted to recruit such advanced units straight away - can you give some examples for testing? |
Hey, for testing I'd advise to start a multiplayer game with Era of Heroes (Multiplayer -> local game -> choose Era of Heroes on the right side, select any map, start the match), then you can recruit all level 2 units of your faction (e.g., Loyalists have Lancer and Javelineer which can't advance). |
My guess is that since this situation of having fully-advanced units available for recruiting is so rare, it's easy to see how this one got missed. It could also be a deliberate decision, though I don't see a reason for it to be. Anyway, confirmed on master and 1.14, with the penultimate scenario for Northern Rebirth, 'Get the Gold'. |
If I've found the right place I think the issue is here: wesnoth/src/gui/widgets/unit_preview_pane.cpp Lines 343 to 357 in 396b258
The problem is that in this particular spot we're looking at generic unit types, not a specific unit. Otherwise we can use wesnoth/src/gui/widgets/unit_preview_pane.cpp Lines 503 to 517 in 396b258
Since the colours are hard-coded at the moment (not a great situation to begin with), the unit type display would need to know if a given unit type is the max level for that line of units and then change the colour of the display accordingly. Is there a method to determine if a given unit type is the last in its line? |
* Note this will retain the problem of hard-coded colour values in the unit type display.
Game and System Information
Describe the bug
Unit that cannot further advance (e.g., Gryphon Master, Lancer, etc.) show experience bar in blue in the recruit menu.
To Reproduce
Found in NR, tested for various factions in arbitrary Era of Heroes maps. So far as I can tell the issue is global.
Expected behavior
Exp bar should be violet to show that now further advancements are possible. (Same as in recall, etc.)
Screenshots
The text was updated successfully, but these errors were encountered: