mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-15 07:24:52 +09:00
Merge remote-tracking branch 'MCRcortex/dev' into dev
This commit is contained in:
commit
6e5585c86c
1 file changed
+15
-5
@@ -828,7 +828,8 @@ 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));
|
||||
//if (!(confirmedOrders.length>0)){return;}
|
||||
let cmd="[";
|
||||
for(let i=0;i<confirmedOrders.length;i++)
|
||||
{
|
||||
@@ -839,8 +840,7 @@ function instanceManagement() {
|
||||
cmd="[";
|
||||
}
|
||||
}
|
||||
messageInterface("/silent-command remote.call('clusterio', 'importMany', '"+cmd.slice(0, -1)+"]"+ "')");
|
||||
confirmedOrders=[];
|
||||
if (!(cmd=="[")){messageInterface("/silent-command remote.call('clusterio', 'importMany', '"+cmd.slice(0, -1)+"]"+ "')");}confirmedOrders=[];
|
||||
}
|
||||
}, 1000);
|
||||
// COMBINATOR SIGNALS ---------------------------------------------------------
|
||||
@@ -863,13 +863,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="{";
|
||||
}
|
||||
}
|
||||
if (!(cmd=="[")){messageInterface("/silent-command remote.call('clusterio', 'receiveInventory', '"+cmd.slice(0, -1)+"}"+ "')");}
|
||||
} catch (e){
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
}, 1550);
|
||||
// Make sure world has its worldID
|
||||
setTimeout(function(){
|
||||
messageInterface("/silent-command remote.call('clusterio','setWorldID',"+instanceconfig.unique+")")
|
||||
|
||||
Reference in new issue
Block a user