Ticket #3823: upgradev3.patch

File upgradev3.patch, 2.0 KB (added by Imarok, 3 years ago)

style fix

  • binaries/data/mods/public/gui/session/selection_panels.js

    diff --git binaries/data/mods/public/gui/session/selection_panels.js binaries/data/mods/public/gui/session/selection_panels.js
    index bff2a6f..abc026c 100644
    g_SelectionPanels.Upgrade = { 
    11111111
    11121112        let neededResources;
    11131113        if (data.item.cost)
     1114        {
     1115            for(let cost in data.item.cost)
     1116                if (cost != "time")
     1117                    data.item.cost[cost] *= data.unitEntStates.length;
     1118
    11141119            neededResources = Engine.GuiInterfaceCall("GetNeededResources", {
    11151120                "cost": data.item.cost,
    11161121                "player": data.player
    11171122            });
     1123        }
    11181124
    11191125        let limits = getEntityLimitAndCount(data.playerState, data.item.entity);
    11201126        let progress = data.unitEntStates[0].upgrade.progress || 0;
    g_SelectionPanels.Upgrade = { 
    11761182        data.icon.sprite = modifier + "stretched:session/" +
    11771183            (data.item.icon || "portraits/" + template.icon);
    11781184
     1185        data.countDisplay.caption = data.unitEntStates.length > 1 ? data.unitEntStates.length : "";
     1186
    11791187        let progressOverlay = Engine.GetGUIObjectByName("unitUpgradeProgressSlider[" + data.i + "]");
    11801188        if (isUpgrading)
    11811189        {
  • binaries/data/mods/public/gui/session/selection_panels_right/upgrade_panel.xml

    diff --git binaries/data/mods/public/gui/session/selection_panels_right/upgrade_panel.xml binaries/data/mods/public/gui/session/selection_panels_right/upgrade_panel.xml
    index e1bbea2..329c4ac 100644
     
    99        <object name="unitUpgradeUpgradeIcon[n]" type="image" ghost="true" size="3 3 43 43" sprite="stretched:session/icons/upgrade.png"/>
    1010        <object name="unitUpgradeProgressSlider[n]" type="image" sprite="queueProgressSlider" ghost="true" size="3 3 43 43" z="20"/>
    1111        <object name="unitUpgradeSelection[n]" hidden="true" type="image" ghost="true" size="3 3 43 43" sprite="stretched:session/icons/corners.png"/>
     12        <object name="unitUpgradeCount[n]" ghost="true" style="groupIconsText" type="text" z="30"/>
    1213        </object>
    1314    </repeat>
    1415    </object>