mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-24 00:23:12 +09:00
Housekeeping
This commit is contained in:
1 parent
c4ead8c699
commit
fdf8a4b4b1
2 files changed
+4
-8
No files matched your search
@@ -12,12 +12,8 @@ process.stdin.on('readable', () => {
|
||||
var chunk = process.stdin.read();
|
||||
// console.log(chunk)
|
||||
if (chunk !== null && isNaN(chunk) && config && isJson(chunk) && !JSON.parse(chunk).factorioPort){
|
||||
// example chunk Stdout: {1:{inventory:{['iron-ore']:100,['steel-plate']:5800,['iron-ore']:50,},
|
||||
// requestSlots:{['underground-belt']:50, ['fast-transport-belt']:50, ['express-underground-belt']:50, ['underground-belt']:50, }},}
|
||||
// returns JS object, throws if there are syntax errors in input string
|
||||
// let inventory = functions.parseJsString(chunk);
|
||||
|
||||
let inventory = JSON.parse(chunk)
|
||||
// console.log(inventory);
|
||||
// process inventory of players and ask master for more stuff
|
||||
functions.handleInventory(inventory, config);
|
||||
} else if(isJson(chunk) && JSON.parse(chunk).factorioPort){
|
||||
|
||||
Reference in new issue
Block a user