Possible to reach negativ pixels



  • Yesterday i wrote a code to sell my generated pixels.

    StructureTerminal.prototype.sellPixels = function(min_price, lower_limit) {
    	if (Game.resources[PIXEL] <= lower_limit) return;
    	var orders = Game.market.getAllOrders(
    				order => order.resourceType == PIXEL &&
    						order.type == ORDER_BUY &&
    						order.price >= min_price);
    	if (!orders.length) return
    	best_order = _.max(orders, function(order){ return order['price']; });
    	var result = Game.market.deal(best_order.id,
    		 						  Math.min(Game.resources[PIXEL] - lower_limit,
    									 	   best_order.amount),
    								  this.roomName);
    };
    

    When executing the following code for all my rooms in the same tick I reached a negative pixel balance of over 5000.


  • Dev Team

    Thanks for the report, we'll take a look


  • Dev Team

    The fix is deployed.

    ☺