fix store to storage

This commit is contained in:
Dan Hamik 2022-04-26 23:53:30 -05:00
parent f5c34b6abb
commit 1d54eae2a6
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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<myorders.length; i++){
let recheckavailtosell= Game.rooms[myroom].terminal.store[RESOURCE_ENERGY]
let recheckavailtosell= Game.rooms[myroom].terminal.storage[RESOURCE_ENERGY]
if(recheckavailtosell<1000){
console.log("too little to mess with")
} else {