From 67fef2e543c13c2d9a872fcdc90dff9de61ee5a4 Mon Sep 17 00:00:00 2001 From: Danielv123 Date: Thu, 20 Oct 2016 13:25:52 +0200 Subject: [PATCH] Resolves #30 --- client.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/client.js b/client.js index ae637ede..ef59cc74 100644 --- a/client.js +++ b/client.js @@ -107,6 +107,22 @@ setInterval(function() { } }, 3000) // COMBINATOR SIGNALS --------------------------------------------------------- +// get inventory from Master and RCON it to our slave +setInterval(function() { + needle.get(config.masterIP + ":" + config.masterPort + '/inventory', function(err, response, body){ + if(response && response.body) { + // Take the inventory we (hopefully) got and turn it into the format LUA accepts + // console.log(response.body) + var inventory = response.body; + var inventoryFrame = {}; + for(i = 0;i