bugfix: Remove superfluous borders from all Special Power buttons in the sidebar#128
Conversation
| Options = NEED_TARGET_POS CONTEXTMODE_COMMAND NEED_SPECIAL_POWER_SCIENCE OK_FOR_MULTI_SELECT | ||
| TextLabel = OBJECT:SpyDrone | ||
| ButtonImage = SAScout | ||
| ; ButtonBorderType = ACTION |
There was a problem hiding this comment.
How about write it like so
; ButtonBorderType = ACTION ; Special Power Shortcut buttons are not supposed to show a border
This comment will be erased on Mod Build.
There was a problem hiding this comment.
What is the rule for leaving in commented logic vs deleting it?
There was a problem hiding this comment.
It documents that adding this field is not intended for this button. If this information is missing, then the next person looking at it may think: "hmm, why does this button have no border? let's add it!"
There was a problem hiding this comment.
Wouldn't that next person have at least some vague idea of what they're doing?
There was a problem hiding this comment.
EA made this mistake, so we can expect many modders will do the same mistake.
There was a problem hiding this comment.
Do you think this is likely? I can't imagine anyone doing that without knowing what the field does.
There was a problem hiding this comment.
Very likely. We cannot expect modders to be smarter than EA, and EA already butchered this.
There was a problem hiding this comment.
Is that not the case with every other field in the game that is removed when not needed?
There was a problem hiding this comment.
It is difficult to quantify mistake rate. For buttons I expects copy-pasting, because 2 buttons need to be created, one for Control Bar and one for Special Power Bar. On this copy step mistake will happen. The fact that EA made this mistake many times is enough evidence that this is super easy to make in this particular case and is best avoided by documenting that shortcuts are not supposed to have borders. It tells the modder to pay special attention. Otherwise there is no feedback and it can go unnoticed.
There was a problem hiding this comment.
I can chime in and say from what I have personally done when modding/map.ini and what I've seen other do it is blantly copy paste of other CommandButtons and small incremental changes until the feature wanted "works". So there is a high change that this will be added to places where it is not needed.
Maybe a better solutions could be having a glossary at the top similar to the CommandSet explaining the field structure and how it maps to the CommandBar.
xezon
left a comment
There was a problem hiding this comment.
In the reference change 18 ButtonBorderType's were removed. Here just 17.
|
This change does not apply to Generals? |
|
This pull is not linked to TheSuperHackers/GeneralsGamePatch#1573 in Migration Project. |
This change removes superfluous borders from all Special Power buttons in the sidebar.
This affects the following Special Power buttons:
Plus a few single-player exclusives, such as the battleship powers.
Button borders are used for distinguishing button types in the control bar, but serve no function in the sidebar, where all buttons are actions.
For reference:
🟦 Blue = build
🟩 Green = action
🟧 Orange = upgrade
🟨 Yellow = system
Before
After