Skip to content
Snippets Groups Projects
Commit 8368b2be authored by dg's avatar dg
Browse files

Ctrl+P (by default) now allows disabling/enabling all automatic talents

git-svn-id: http://svn.net-core.org/repos/t-engine4@6787 51575b47-30f0-44d4-a5cc-537603b46e54
parent c5fc7b81
No related branches found
No related tags found
No related merge requests found
......@@ -1510,6 +1510,11 @@ do return end
self.player:playerLevelup(nil, false)
end,
TOGGLE_AUTOTALENT = function()
self.player.no_automatic_talents = not self.player.no_automatic_talents
game.log("#GOLD#Automatic talent usage: %s", not self.player.no_automatic_talents and "#LIGHT_GREEN#enabled" or "#LIGHT_RED#disabled")
end,
SAVE_GAME = function()
self:saveGame()
end,
......
......@@ -705,6 +705,8 @@ end
--- Try to auto use listed talents
-- This should be called in your actors "act()" method
function _M:automaticTalents()
if self.no_automatic_talents then return end
self:attr("_forbid_sounds", 1)
for tid, c in pairs(self.talents_auto) do
local t = self.talents_def[tid]
......
......@@ -218,4 +218,11 @@ defineAction{
type = "LOCK_TOOLTIP_COMPARE",
group = "interface",
name = "Locks tooltip in place while comparing items",
}
\ No newline at end of file
}
defineAction{
default = { "sym:_p:true:false:false:false" },
type = "TOGGLE_AUTOTALENT",
group = "action",
name = "Toggle automatic talent usage",
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment