Skip to content
Snippets Groups Projects
Commit 6ed9e8a0 authored by dg's avatar dg
Browse files

Self-target warning will now show which talent is responsible

git-svn-id: http://svn.net-core.org/repos/t-engine4@1504 51575b47-30f0-44d4-a5cc-537603b46e54
parent 6ba27009
No related branches found
No related tags found
No related merge requests found
......@@ -90,7 +90,7 @@ function _M:targetMode(v, msg, co, typ)
end
end
if self.target_warning and self.target.target.x == self.player.x and self.target.target.y == self.player.y then
Dialog:yesnoPopup("Target yourself?", "Are you sure you want to target yourself?", fct)
Dialog:yesnoPopup(self.target_warning or "Target yourself?", "Are you sure you want to target yourself?", fct)
else
fct(true)
end
......@@ -102,6 +102,11 @@ function _M:targetMode(v, msg, co, typ)
self.target:setActive(true, typ)
self.target_style = "lock"
self.target_warning = true
if type(typ) == "table" and typ.talent then
self.target_warning = typ.talent.name
elseif type(typ) == "table" and typ.__name then
self.target_warning = typ.__name
end
-- Exclusive mode means we disable the current key handler and use a specific one
-- that only allows targetting and resumes talent coroutine when done
......
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