Lua triggers to cover remaining deprecated actions

pull/3236/head
uramer 5 months ago
parent ae0660db0a
commit 2df8c13525

@ -82,3 +82,49 @@ SmoothMoveLeft_description: "Left movement adjusted for smooth Walk-Run transiti
SmoothMoveRight_name: "Smooth Move Right"
SmoothMoveRight_description: "Right movement adjusted for smooth Walk-Run transitions."
# Non-dehardcoded actions
Activate_name: "Activate"
Activate_description: "Fallback for input.ACTIONS.Activate, binding does not do anything yet"
Console_name: "Console"
Console_description: "Fallback for input.ACTIONS.Console, binding does not do anything yet"
CycleSpellLeft_name: "CycleSpellLeft"
CycleSpellLeft_description: "Fallback for input.ACTIONS.CycleSpellLeft, binding does not do anything yet"
CycleSpellRight_name: "CycleSpellRight"
CycleSpellRight_description: "Fallback for input.ACTIONS.CycleSpellRight, binding does not do anything yet"
CycleWeaponLeft_name: "CycleWeaponLeft"
CycleWeaponLeft_description: "Fallback for input.ACTIONS.CycleWeaponLeft, binding does not do anything yet"
CycleWeaponRight_name: "CycleWeaponRight"
CycleWeaponRight_description: "Fallback for input.ACTIONS.CycleWeaponRight, binding does not do anything yet"
GameMenu_name: "GameMenu"
GameMenu_description: "Fallback for input.ACTIONS.GameMenu, binding does not do anything yet"
QuickLoad_name: "QuickLoad"
QuickLoad_description: "Fallback for input.ACTIONS.QuickLoad, binding does not do anything yet"
QuickSave_name: "QuickSave"
QuickSave_description: "Fallback for input.ACTIONS.QuickSave, binding does not do anything yet"
Screenshot_name: "Screenshot"
Screenshot_description: "Fallback for input.ACTIONS.Screenshot, binding does not do anything yet"
ToggleDebug_name: "ToggleDebug"
ToggleDebug_description: "Fallback for input.ACTIONS.ToggleDebug, binding does not do anything yet"
ToggleHUD_name: "ToggleHUD"
ToggleHUD_description: "Fallback for input.ACTIONS.ToggleHUD, binding does not do anything yet"
TogglePostProcessorHUD_name: "TogglePostProcessorHUD"
TogglePostProcessorHUD_description: "Fallback for input.ACTIONS.TogglePostProcessorHUD, binding does not do anything yet"
QuickKey1_name: "QuickKey1"
QuickKey1_description: "Fallback for input.ACTIONS.QuickKey1, binding does not do anything yet"
QuickKey2_name: "QuickKey2"
QuickKey2_description: "Fallback for input.ACTIONS.QuickKey2, binding does not do anything yet"
QuickKey3_name: "QuickKey3"
QuickKey3_description: "Fallback for input.ACTIONS.QuickKey3, binding does not do anything yet"
QuickKey4_name: "QuickKey4"
QuickKey4_description: "Fallback for input.ACTIONS.QuickKey4, binding does not do anything yet"
QuickKey5_name: "QuickKey5"
QuickKey5_description: "Fallback for input.ACTIONS.QuickKey5, binding does not do anything yet"
QuickKey6_name: "QuickKey6"
QuickKey6_description: "Fallback for input.ACTIONS.QuickKey6, binding does not do anything yet"
QuickKey7_name: "QuickKey7"
QuickKey7_description: "Fallback for input.ACTIONS.QuickKey7, binding does not do anything yet"
QuickKey8_name: "QuickKey8"
QuickKey8_description: "Fallback for input.ACTIONS.QuickKey8, binding does not do anything yet"
QuickKey9_name: "QuickKey9"
QuickKey9_description: "Fallback for input.ACTIONS.QuickKey9, binding does not do anything yet"

@ -29,6 +29,38 @@ local function bindTrigger(key, actionid)
end)
end
do -- Actions and Triggers currently unused by builtin scripts
-- TODO: as more mechanics are dehardcoded, move these declarations to relevant files
local triggers = {
Activate = input.ACTION.Activate,
Console = input.ACTION.Console,
CycleSpellLeft = input.ACTION.CycleSpellLeft,
CycleSpellRight = input.ACTION.CycleSpellRight,
CycleWeaponLeft = input.ACTION.CycleWeaponLeft,
CycleWeaponRight = input.ACTION.CycleWeaponRight,
GameMenu = input.ACTION.GameMenu,
QuickLoad = input.ACTION.QuickLoad,
QuickSave = input.ACTION.QuickSave,
Screenshot = input.ACTION.Screenshot,
ToggleDebug = input.ACTION.ToggleDebug,
ToggleHUD = input.ACTION.ToggleHUD,
TogglePostProcessorHUD = input.ACTION.ToggleHUD,
}
for i = 1, 9 do
local key = string.format('QuickKey%s', i)
triggers[key] = input.ACTION[key]
end
for key, action in pairs(triggers) do
input.registerTrigger {
key = key,
l10n = 'OMWControls',
name = key .. '_name',
description = key .. '_description',
}
bindTrigger(key, action)
end
end
bindTrigger('AlwaysRun', input.ACTION.AlwaysRun)
bindTrigger('ToggleSneak', input.ACTION.Sneak)
bindTrigger('ToggleWeapon', input.ACTION.ToggleWeapon)

Loading…
Cancel
Save