Skip to content
Snippets Groups Projects
Commit 62b4637b authored by DarkGod's avatar DarkGod
Browse files

update contingency

parent 7b095511
No related branches found
No related tags found
No related merge requests found
......@@ -124,13 +124,9 @@ newTalent{
return tostring(math.ceil(val)), fnt
end,
activate = function(self, t)
local d = require("mod.dialogs.talents.ChronomancyContingency").new(self)
game:registerDialog(d)
local co = coroutine.running()
d.unload = function() coroutine.resume(co, d.contingecy_talent) end
if not coroutine.yield() then return nil end
local talent = d.contingecy_talent
local talent = self:talentDialog(require("mod.dialogs.talents.ChronomancyContingency").new(self))
if not talent then return nil end
return {
talent = talent, rest_count = 0
}
......
......@@ -83,7 +83,7 @@ end
function _M:use(item)
if not item or not item.talent then return end
self.contingecy_talent = item.talent
self.actor:talentDialogReturn(item.talent)
game:unregisterDialog(self)
end
......
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