Ticket #4507: patch.diff
File patch.diff, 1.1 KB (added by , 7 years ago) |
---|
-
binaries/data/mods/public/simulation/components/ResourceSupply.js
5 5 "<a:example>" + 6 6 "<Amount>1000</Amount>" + 7 7 "<Type>food.meat</Type>" + 8 "<KillBeforeGather>false</KillBeforeGather>" + 9 "<MaxGatherers>25</MaxGatherers>" + 10 "<DiminishingReturns>0.8</DiminishingReturns>" + 8 11 "</a:example>" + 9 12 "<element name='KillBeforeGather' a:help='Whether this entity must be killed (health reduced to 0) before its resources can be gathered'>" + 10 13 "<data type='boolean'/>" + … … 120 123 121 124 ResourceSupply.prototype.IsAvailable = function(player, gathererID) 122 125 { 123 if (this. GetNumGatherers() < this.GetMaxGatherers() || this.gatherers[player].indexOf(gathererID) !== -1)126 if (this.amount !== 0 && (this.GetNumGatherers() < this.GetMaxGatherers() || this.gatherers[player].indexOf(gathererID) !== -1)) 124 127 return true; 125 128 return false; 126 129 };