From eab9643b84dded5b8bc112d02a4785cf070334f5 Mon Sep 17 00:00:00 2001 From: Dan Hamik Date: Tue, 26 Apr 2022 23:51:44 -0500 Subject: [PATCH] Enable market selling globally --- Room.Phase1.js | 3 +++ proc.market.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Room.Phase1.js b/Room.Phase1.js index c7bda4c..a3b87ab 100644 --- a/Room.Phase1.js +++ b/Room.Phase1.js @@ -49,6 +49,9 @@ let Phase1 = { require('proc.spawning').spawnminer(room) } else { if(Game.flags.debug && Game.flags.debug.room == Game.rooms[room]){console.log("Not spawning miner in " + room + ", waiting for regen")}} } + if((game.rooms[room].terminal.store[RESOURCE_ENERGY] > 200000 )){ + require('proc.market').sellEnergy(room) + } //require('proc.market').sellEnergy(room) } } diff --git a/proc.market.js b/proc.market.js index 0dbd563..8adf34a 100644 --- a/proc.market.js +++ b/proc.market.js @@ -11,7 +11,7 @@ let gomarket={ try{ let availtosell= Game.rooms[myroom].terminal.store[RESOURCE_ENERGY] - if(availtosell>5000){ + if(availtosell>200000){ console.log(myroom + ":" + availtosell) //console.log(JSON.stringify(Game.market.orders)) // if(Game.market.orders.length > 9){