From e2777de5d4ff9aee790fb91a67081f38016d5ac8 Mon Sep 17 00:00:00 2001 From: Alexander Sedov <alex0player@gmail.com> Date: Tue, 13 Jan 2015 00:57:04 +0300 Subject: [PATCH] Fixed sorting and made log messages more enticing. --- game/modules/tome/class/Player.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player.lua index 0e469a5633..4c3c417ddc 100644 --- a/game/modules/tome/class/Player.lua +++ b/game/modules/tome/class/Player.lua @@ -855,7 +855,7 @@ function _M:automaticTalents() local cd = self:getTalentCooldown(t) or 0 local turns_used = util.getval(t.no_energy, self, t) == true and 0 or 1 if cd <= turns_used then - game.logPlayer(self, "Automatic use of talent %s skipped: cooldown too low (%d).", t.name, cd) + game.logPlayer(self, "Automatic use of talent %s #DARK_RED#skipped#LAST#: cooldown too low (%d).", t.name, cd) elseif (t.mode ~= "sustained" or not self.sustain_talents[tid]) and not self.talents_cd[tid] and self:preUseTalent(t, true, true) and (not t.auto_use_check or t.auto_use_check(self, t)) then if (c == 1) or (c == 2 and #spotted <= 0) or (c == 3 and #spotted > 0) then if c ~= 2 then @@ -876,7 +876,7 @@ function _M:automaticTalents() end end table.sort(uses, function(a, b) - local an, nb = a.tunrs_used, b.turns_used + local an, nb = a.turns_used, b.turns_used if an < nb then return true elseif an > nb then return false else -- GitLab