Skip to content

Commit 89be26b

Browse files
authored
Added the ability to process files in Config/Input
This allows users to edit the Config/Input/Aircrafts bindings, such as the base and common bindings, which is especially useful to set up general bindings for the lower fidelity modules such as in FC3. Only tested with the Aircrafts subfolder, as apparently it has a differing prefix than the UiLayer despite being in the same directory.
1 parent d206297 commit 89be26b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Inject.lua

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@ local function QuagglesInputCommandInjector(filename, folder, env, result)
1616
if quagglesLoggingEnabled then log.write(quagglesLogName, log.INFO, 'Detected loading of: '..filename) end
1717
-- Only operate on files that are in this folder
1818
local targetPrefixForAircrafts = "./Mods/aircraft/"
19-
local targetPrefixForConfig = "./Config/Input/"
19+
local targetPrefixForDotConfig = "./Config/Input/"
20+
local targetPrefixForConfig = "Config/Input/"
2021
local targetPrefix = nil
2122
if StartsWith(filename, targetPrefixForAircrafts) and StartsWith(folder, targetPrefixForAircrafts) then
2223
targetPrefix = targetPrefixForAircrafts
23-
elseif StartsWith(filename, targetPrefixForConfig) and StartsWith(folder, targetPrefixForConfig) then
24+
elseif StartsWith(filename, targetPrefixForDotConfig) and StartsWith(folder, targetPrefixForDotConfig) then
25+
targetPrefix = targetPrefixForDotConfig
26+
elseif StartsWith(filename, targetPrefixForConfig) then
2427
targetPrefix = targetPrefixForConfig
2528
end
2629
if targetPrefix then
@@ -52,4 +55,4 @@ local function QuagglesInputCommandInjector(filename, folder, env, result)
5255
end
5356
end
5457
end
55-
end
58+
end

0 commit comments

Comments
 (0)