wraitii, on 19 April 2012 - 10:33 AM, said:
resourceSupplyAmount: function() {
if(this._entity.resourceSupplyAmount == undefined)
return undefined;
return this._entity.resourceSupplyAmount;
},
resourceCarrying: function() {
if(this._entity.resourceCarrying == undefined)
return undefined;
return this._entity.resourceCarrying;
},You have used a weak equality check so null, 0, ""and false will be changed to undefined, is that intentional and why would you want that to happen? If it wasn't intentional then you have basically inserted a null operation (though from a quick search we do seem to have some of these checks in the entity.js file already).











