Fix error in JSAI cargo scooping routine

This commit is contained in:
cim 2014-05-17 22:42:11 +01:00
parent bd855878a9
commit d8591c7c55

View File

@ -5469,7 +5469,10 @@ PriorityAIController.prototype.responseComponent_standard_shipLaunchedFromStatio
PriorityAIController.prototype.responseComponent_standard_shipScoopedOther = function(other) PriorityAIController.prototype.responseComponent_standard_shipScoopedOther = function(other)
{ {
this.communicate("oolite_scoopedCargo",{"oolite_goodsDescription":displayNameForCommodity(other.commodity)},4); if (other.commodity)
{
this.communicate("oolite_scoopedCargo",{"oolite_goodsDescription":displayNameForCommodity(other.commodity)},4);
}
this.setParameter("oolite_cargoDropped",null); this.setParameter("oolite_cargoDropped",null);
this.reconsiderNow(); this.reconsiderNow();
} }