#1915 closed enhancement (fixed)
[PATCH] display the current number of garrisoned units when trying to garrison more units
Reported by: | mimo | Owned by: | leper |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 14 |
Component: | Core engine | Keywords: | patch |
Cc: | Patch: |
Description
When garrisoning units, there is no convenient way to know what is the capacity of the building and how many units are already garrisoned. Presently, we have to select the building we want to garrison in (so losing our units selection) and then reselect the units. Not really practical if not in the same portion of the map. Here is a simple patch to display a tooltip with these information when we are about to garrison units.
Attachments (3)
Change History (14)
by , 11 years ago
Attachment: | garrisonCapacity.diff added |
---|
comment:1 by , 11 years ago
Keywords: | patch review garrison added |
---|
comment:2 by , 11 years ago
Keywords: | garrison removed |
---|---|
Milestone: | Backlog → Alpha 14 |
Type: | defect → enhancement |
comment:3 by , 11 years ago
comment:5 by , 11 years ago
Excellent. This looks good, although there are 2 very minor issues:
- In English there is no space between a colon and the word before it, so the message should be "Current garrison: 0/20" instead of the "Current garrison : 0 / 20" (which is the current message). Just a minor grammatical thing.
tooltip = "[color=\"orange\"]" + tooltip;
should have an extra+ "[/color]";
so that the tags are properly formed (each opening tag should have a matching end one). The parser seems to accept it anyway however.
Also, I noticed that this only appears when you hold Ctrl to garrison, not when using the garrison button in the unit commands panel or when setting a rally point. Both of those should display the current/max capacity as well.
comment:6 by , 11 years ago
You are right about the missing color. That's strange that the parser accept it. For the english, I trust you. So I've just replaced the patch by a corrected version.
For the garrison button, I never use it, so I just forget it. I can try to implement also something here. For the rally point, what do you mean exactly ?
by , 11 years ago
Attachment: | garrisonCapacity-v2.diff added |
---|
by , 11 years ago
Attachment: | garrisonCapacity-v3.diff added |
---|
comment:9 by , 11 years ago
I tested it, looked over the code, and this seems ready to commit. Nice work. :)
This looks very good. Two minor things: