Load keybind.json

This commit is contained in:
Vortrex
2021-03-22 01:02:07 -05:00
parent c18b5a2e50
commit a9fa92e657

View File

@@ -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);
}
// ===========================================================================