Divergent/mods/Nitpicker's Modpack/gamedata/scripts/ish_ui_mutant_loot.script

22 lines
643 B
Plaintext
Raw Normal View History

2024-03-17 20:18:03 -04:00
-- SkinningWithSpace - Nitpicker's Modpack
-- Last modified: 2022.04.10
-- https://github.com/Ishmaeel/NitpickerModpack
function Ishy_OnKeyboard(sender, dik, keyboard_action)
local res = CUIScriptWnd.OnKeyboard(sender, dik, keyboard_action)
if (res == false) then
sender.CC:OnKeyboard(dik, keyboard_action)
if (dik == DIK_keys.DIK_RETURN or dik == DIK_keys.DIK_SPACE) then
sender:OnButton_LootAll()
elseif (dik == DIK_keys.DIK_ESCAPE) then
sender:Close()
end
end
return res
end
function on_game_start()
ui_mutant_loot.UIMutantLoot.OnKeyboard = Ishy_OnKeyboard
end