Timestamp:
Apr 12, 2021, 2:50:17 PM (3 years ago)
Author:
Freagarach
Message:

Minor fixes after Gathering refactoring.

  • initPos was used wrong.
  • There were two CanGather functions in cmpResourceGatherer.
  • Reduced some duplication in the ReturnResource order.

Differential revision: D3838.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ps/trunk/binaries/data/mods/public/simulation/components/ResourceGatherer.js

    r25235 r25243  
    331331
    332332/**
    333  * @param {number} target - The entity ID of the target to check.
    334  * @return {boolean} - Whether we can gather from the target.
    335  */
    336 ResourceGatherer.prototype.CanGather = function(target)
    337 {
    338     return this.GetTargetGatherRate(target) > 0;
    339 };
    340 
    341 /**
    342333 * Returns whether this unit can carry more of the given type of resource.
    343334 * (This ignores whether the unit is actually able to gather that
Note: See TracChangeset for help on using the changeset viewer.