From ce13ad50e01342158794c9e81cc08a5f09e33d7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Vest=C3=B8l?= Date: Sat, 17 Nov 2018 11:05:10 +0100 Subject: [PATCH] Fixed desync when viewing scenario code in hotpatch --- sharedPlugins/scenario_loader/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sharedPlugins/scenario_loader/index.js b/sharedPlugins/scenario_loader/index.js index 219689ad..d1542eb6 100644 --- a/sharedPlugins/scenario_loader/index.js +++ b/sharedPlugins/scenario_loader/index.js @@ -51,7 +51,8 @@ module.exports = class remoteCommands { for(let k in files){ let name = k.replace(/\\/g, '/'); name = name.replace(/ /g, ''); - fileImportString += `["${name}"] = '${files[k]}', `; + // make sure *not* to include control.lua as it is provided as a seperate argument + if(name != "control") fileImportString += `["${name}"] = '${files[k]}', `; } fileImportString += `\}`; if(files.control) var returnValue = await messageInterface(`/silent-command remote.call('hotpatch', 'update', '${scenarios[i]}', '1.0.0', '${files.control}', ${fileImportString})`);