Load keybind.json
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
Reference in New Issue
Block a user