From 1d54eae2a6a81418b08fc656e7f86f25bf1312f6 Mon Sep 17 00:00:00 2001 From: Dan Hamik Date: Tue, 26 Apr 2022 23:53:30 -0500 Subject: [PATCH] fix store to storage --- Room.Phase1.js | 2 +- proc.market.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Room.Phase1.js b/Room.Phase1.js index 8630849..8ad5e6c 100644 --- a/Room.Phase1.js +++ b/Room.Phase1.js @@ -49,7 +49,7 @@ 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 )){ + if((Game.rooms[room].terminal.storage[RESOURCE_ENERGY] > 200000 )){ require('proc.market').sellEnergy(room) } //require('proc.market').sellEnergy(room) diff --git a/proc.market.js b/proc.market.js index 8adf34a..f234586 100644 --- a/proc.market.js +++ b/proc.market.js @@ -9,7 +9,7 @@ let gomarket={ sellEnergy: function(myroom) { try{ - let availtosell= Game.rooms[myroom].terminal.store[RESOURCE_ENERGY] + let availtosell= Game.rooms[myroom].terminal.storage[RESOURCE_ENERGY] if(availtosell>200000){ console.log(myroom + ":" + availtosell) @@ -18,7 +18,7 @@ let gomarket={ let myorders = Game.market.getAllOrders(order=>order.resourceType == RESOURCE_ENERGY && order.type == ORDER_BUY) //console.log(myorders.length) for(let i=0; i