From 42c2d02593158662a2b241d42b301baa9343fed6 Mon Sep 17 00:00:00 2001 From: DarkGod <darkgod@net-core.org> Date: Sat, 19 Oct 2019 00:34:10 +0200 Subject: [PATCH] New keybind for automatic target accept option, no default binding --- game/modules/tome/class/Game.lua | 5 +++++ game/modules/tome/data/keybinds/tome.lua | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index 292371b6f3..b9cb523c76 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -2256,6 +2256,11 @@ do return end game.log("#GOLD#Automatic talent usage: %s", not self.player.no_automatic_talents and "#LIGHT_GREEN#enabled" or "#LIGHT_RED#disabled") end, + TOGGLE_AUTOACCEPT_TARGET = function() + config.settings.auto_accept_target = not config.settings.auto_accept_target + game:saveSettings("auto_accept_target", ("auto_accept_target = %s\n"):format(tostring(config.settings.auto_accept_target))) + end, + SAVE_GAME = function() self:saveGame() end, diff --git a/game/modules/tome/data/keybinds/tome.lua b/game/modules/tome/data/keybinds/tome.lua index deb253b1db..a62a441e0a 100644 --- a/game/modules/tome/data/keybinds/tome.lua +++ b/game/modules/tome/data/keybinds/tome.lua @@ -240,3 +240,10 @@ defineAction{ group = "action", name = "Toggle automatic talent usage", } + +defineAction{ + default = { }, + type = "TOGGLE_AUTOACCEPT_TARGET", + group = "action", + name = "Toggle automatic accept target option", +} -- GitLab