diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index 292371b6f3becc4c64e237d3d5e4d6f6bbfabfd3..b9cb523c766e895855e35814478ef6bfd66a57da 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 deb253b1dbc643eb64f554d237572c08a2dac0a2..a62a441e0acbdc64d69b9f7544562e08cbbc3e26 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", +}