Ticket #2179: resourceCarried.diff

File resourceCarried.diff, 1.8 KB (added by mimo, 10 years ago)
  • binaries/data/mods/public/gui/session/selection_panels.js

     
    808808        data.count = ents.length;
    809809        for (var i in ents)
    810810        {
    811             var state = GetExtendedEntityState(ents[i]);
     811            var state = GetEntityState(ents[i]);
    812812
    813813            if (state.resourceCarrying && state.resourceCarrying.length !== 0)
    814814            {
  • binaries/data/mods/public/simulation/components/GuiInterface.js

     
    198198        "position": null,
    199199        "production": null,
    200200        "rallyPoint": null,
     201        "resourceCarrying": null,
    201202        "rotation": null,
    202203        "trader": null,
    203204        "unitAI": null,
     
    345346        };
    346347    }
    347348
     349    var cmpResourceGatherer = Engine.QueryInterface(ent, IID_ResourceGatherer);
     350    if (cmpResourceGatherer)
     351    {
     352        ret.resourceCarrying = cmpResourceGatherer.GetCarryingStatus();
     353    }
     354
    348355    var cmpGate = Engine.QueryInterface(ent, IID_Gate);
    349356    if (cmpGate)
    350357    {
     
    384391        "obstruction": null,
    385392        "turretParent":null,
    386393        "promotion": null,
    387         "resourceCarrying": null,
    388394        "resourceDropsite": null,
    389395        "resourceGatherRates": null,
    390396        "resourceSupply": null,
     
    502508    if (cmpResourceGatherer)
    503509    {
    504510        ret.resourceGatherRates = cmpResourceGatherer.GetGatherRates();
    505         ret.resourceCarrying = cmpResourceGatherer.GetCarryingStatus();
    506511    }
    507512   
    508513    var cmpResourceDropsite = Engine.QueryInterface(ent, IID_ResourceDropsite);