mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 15:04:52 +09:00
started fixing receiveInventory
This commit is contained in:
1 parent
c5b55f27b7
commit
66b64eae1b
1 file changed
+13
-2
@@ -828,7 +828,7 @@ function instanceManagement() {
|
||||
});
|
||||
}
|
||||
// if we got some confirmed orders
|
||||
// console.log("Importing " + confirmedOrders.length + " items! " + JSON.stringify(confirmedOrders));
|
||||
console.log("Importing " + confirmedOrders.length + " items! " + JSON.stringify(confirmedOrders));
|
||||
let cmd="[";
|
||||
for(let i=0;i<confirmedOrders.length;i++)
|
||||
{
|
||||
@@ -864,12 +864,23 @@ function instanceManagement() {
|
||||
inventoryFrame["signal-unixtime"] = Math.floor(Date.now()/1000);
|
||||
// console.log("RCONing inventory! " + JSON.stringify(inventoryFrame));
|
||||
messageInterface("/silent-command remote.call('clusterio', 'receiveInventory', '" + JSON.stringify(inventoryFrame) + "')");
|
||||
/*let cmd="{";
|
||||
for (var key in inventoryFrame)
|
||||
{
|
||||
cmd+='"'+key+'"'+":"+inventoryFrame[key]+",";
|
||||
if(cmd.length>400)//450 //ITS SMALL SO FACTORIO DOESNT SPILT IT INTO MULTIPLE PACKETS
|
||||
{
|
||||
messageInterface("/silent-command remote.call('clusterio', 'receiveInventory', '"+cmd.slice(0, -1)+"}"+ "')");
|
||||
cmd="{";
|
||||
}
|
||||
}
|
||||
messageInterface("/silent-command remote.call('clusterio', 'receiveInventory', '"+cmd.slice(0, -1)+"}"+ "')");*/
|
||||
} catch (e){
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
}, 1500);
|
||||
// Make sure world has its worldID
|
||||
setTimeout(function(){
|
||||
messageInterface("/silent-command remote.call('clusterio','setWorldID',"+instanceconfig.unique+")")
|
||||
|
||||
Reference in new issue
Block a user