Skip to content
Snippets Groups Projects
Commit 4381dada authored by DarkGod's avatar DarkGod
Browse files

Game will save when a ressurection option is used, to prevent loss in case of crash

parent 4f5920a1
No related branches found
No related tags found
No related merge requests found
......@@ -251,6 +251,7 @@ function _M:use(item)
self:restoreResources(self.actor)
world:gainAchievement("UNSTOPPABLE", actor)
self.actor:check("on_resurrect", "blood_life")
game:saveGame()
elseif act == "lichform" then
local t = self.actor:getTalentFromId(self.actor.T_LICHFORM)
......@@ -261,6 +262,7 @@ function _M:use(item)
t.becomeLich(self.actor, t)
self.actor:updateModdableTile()
self.actor:check("on_resurrect", "lichform")
game:saveGame()
elseif act == "easy_mode" then
self:eidolonPlane()
elseif act == "skeleton" then
......@@ -272,6 +274,7 @@ function _M:use(item)
self:restoreResources(self.actor)
world:gainAchievement("UNSTOPPABLE", actor)
self.actor:check("on_resurrect", "skeleton")
game:saveGame()
elseif act:find("^consume") then
local inven, item, o = item.inven, item.item, item.object
self.actor:removeObject(inven, item)
......@@ -282,6 +285,7 @@ function _M:use(item)
self:restoreResources(self.actor)
world:gainAchievement("UNSTOPPABLE", actor)
self.actor:check("on_resurrect", "consume", o)
game:saveGame()
end
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