mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-20 15:43:13 +09:00
1 parent
a3aafd8b1d
commit
87cfe1bc46
1 file changed
+3
-3
@@ -114,7 +114,7 @@ setInterval(function() {
|
|||||||
if(response && response.body && typeof response.body == "object" && response.body[0]) {
|
if(response && response.body && typeof response.body == "object" && response.body[0]) {
|
||||||
// buffer confirmed orders
|
// buffer confirmed orders
|
||||||
console.log("YESSSSSSSS" + JSON.stringify(response.body[0]));
|
console.log("YESSSSSSSS" + JSON.stringify(response.body[0]));
|
||||||
client.exec("/c remote.call('clusterio', 'receiveFrame', '" + JSON.stringify(response.body[0]) + "')");
|
client.exec("/silent-command remote.call('clusterio', 'receiveFrame', '" + JSON.stringify(response.body[0].frame) + "')");
|
||||||
// confirmedSignals[confirmedSignals.length] = {[response.body.name]: response.body.count}
|
// confirmedSignals[confirmedSignals.length] = {[response.body.name]: response.body.count}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -127,8 +127,8 @@ setInterval(function() {
|
|||||||
for(i = 0;i < signals.length; i++) {
|
for(i = 0;i < signals.length; i++) {
|
||||||
(function(i){
|
(function(i){
|
||||||
if(signals[i]) {
|
if(signals[i]) {
|
||||||
// signals[i] is a JSON array, we need to unnest it
|
// signals[i] is a JSON array called a "frame" of signals. We timestamp it for storage on master
|
||||||
// actually, we don't. That array is our "frame", and we pass that along instead of seperate signals.
|
// then we unpack and RCON in this.frame to the game.
|
||||||
framepart = JSON.parse(signals[i])
|
framepart = JSON.parse(signals[i])
|
||||||
doneframe = {
|
doneframe = {
|
||||||
time: Date.now(),
|
time: Date.now(),
|
||||||
|
|||||||
Reference in new issue
Block a user