From a9fa92e6578d1972bcb7a3d22f72b9f18a1dc7b4 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Mon, 22 Mar 2021 01:02:07 -0500 Subject: [PATCH] Load keybind.json --- scripts/server/keybind.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/server/keybind.js b/scripts/server/keybind.js index e445efbe..aa13505f 100644 --- a/scripts/server/keybind.js +++ b/scripts/server/keybind.js @@ -130,6 +130,7 @@ let bindableKeys = { function initKeyBindScript() { logToConsole(LOG_DEBUG, "[Asshat.KeyBind]: Initializing key bind script ..."); + getServerConfig().keyBind = loadKeyBindConfiguration(); logToConsole(LOG_DEBUG, "[Asshat.KeyBind]: Key bind script initialized!"); } @@ -306,4 +307,11 @@ function getKeyIdFromParams(params) { } } +// =========================================================================== + +function loadKeyBindConfiguration() { + let keyBindConfigFile = loadTextFile("config/keybind.json"); + return JSON.parse(keyBindConfigFile); +} + // =========================================================================== \ No newline at end of file