Skip to content
Snippets Groups Projects
Commit 148dd553 authored by dg's avatar dg
Browse files

cannot unlock and gain achievements in easy mode

git-svn-id: http://svn.net-core.org/repos/t-engine4@666 51575b47-30f0-44d4-a5cc-537603b46e54
parent b7335a10
No related branches found
No related tags found
No related merge requests found
......@@ -218,7 +218,7 @@ function _M:setupMiniMap()
end
function _M:save()
return class.save(self, self:defaultSavedFields{}, true)
return class.save(self, self:defaultSavedFields{difficulty=true}, true)
end
function _M:getSaveDescription()
......@@ -821,6 +821,9 @@ function _M:saveGame()
end
function _M:setAllowedBuild(what, notify)
-- Do not unlock things in easy mode
if game.difficulty == game.DIFFICULTY_EASY then return end
config.settings.tome = config.settings.tome or {}
config.settings.tome.allow_build = config.settings.tome.allow_build or {}
if config.settings.tome.allow_build[what] then return false end
......
......@@ -42,3 +42,13 @@ end
function _M:achievementWho(src)
return src.name.." the "..game.player.descriptor.subrace.." "..game.player.descriptor.subclass
end
--- Gain an achievement
-- @param id the achivement to gain
-- @param src who did it
function _M:gainAchievement(id, src, ...)
-- Do not unlock things in easy mode
if game.difficulty == game.DIFFICULTY_EASY then return end
engine.interface.WorldAchievements.gainAchievement(self, id, src, ...)
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