Skip to content
Snippets Groups Projects
Commit 402abe91 authored by DarkGod's avatar DarkGod
Browse files

New option to disable the big quest popup

parent 69e29a02
No related branches found
No related tags found
No related merge requests found
......@@ -1566,27 +1566,27 @@ end
function _M:on_quest_grant(quest)
game.logPlayer(game.player, "#LIGHT_GREEN#Accepted quest '%s'! #WHITE#(Press 'j' to see the quest log)", quest.name)
-- game.bignews:saySimple(60, "#LIGHT_GREEN#Accepted quest '%s'!", quest.name)
self:questPopup(quest, -1)
if not config.settings.tome.quest_popup then game.bignews:saySimple(60, "#LIGHT_GREEN#Accepted quest '%s'!", quest.name)
else self:questPopup(quest, -1) end
end
function _M:on_quest_status(quest, status, sub)
if sub then
game.logPlayer(game.player, "#LIGHT_GREEN#Quest '%s' status updated! #WHITE#(Press 'j' to see the quest log)", quest.name)
-- game.bignews:saySimple(60, "#LIGHT_GREEN#Quest '%s' updated!", quest.name)
self:questPopup(quest, engine.Quest.PENDING)
if not config.settings.tome.quest_popup then game.bignews:saySimple(60, "#LIGHT_GREEN#Quest '%s' updated!", quest.name)
else self:questPopup(quest, engine.Quest.PENDING) end
elseif status == engine.Quest.COMPLETED then
game.logPlayer(game.player, "#LIGHT_GREEN#Quest '%s' completed! #WHITE#(Press 'j' to see the quest log)", quest.name)
-- game.bignews:saySimple(60, "#LIGHT_GREEN#Quest '%s' completed!", quest.name)
self:questPopup(quest, status)
if not config.settings.tome.quest_popup then game.bignews:saySimple(60, "#LIGHT_GREEN#Quest '%s' completed!", quest.name)
else self:questPopup(quest, status) end
elseif status == engine.Quest.DONE then
game.logPlayer(game.player, "#LIGHT_GREEN#Quest '%s' is done! #WHITE#(Press 'j' to see the quest log)", quest.name)
-- game.bignews:saySimple(60, "#LIGHT_GREEN#Quest '%s' done!", quest.name)
self:questPopup(quest, status)
if not config.settings.tome.quest_popup then game.bignews:saySimple(60, "#LIGHT_GREEN#Quest '%s' done!", quest.name)
else self:questPopup(quest, status) end
elseif status == engine.Quest.FAILED then
game.logPlayer(game.player, "#LIGHT_RED#Quest '%s' is failed! #WHITE#(Press 'j' to see the quest log)", quest.name)
-- game.bignews:saySimple(60, "#LIGHT_RED#Quest '%s' failed!", quest.name)
self:questPopup(quest, status)
if not config.settings.tome.quest_popup then game.bignews:saySimple(60, "#LIGHT_RED#Quest '%s' failed!", quest.name)
else self:questPopup(quest, status) end
end
end
......
......@@ -423,6 +423,15 @@ function _M:generateListUi()
self.c_list:drawItem(item)
end,}
local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"If enabled new quests and quests updates will display a big popup, if not a simple line of text will fly on the screen.#WHITE#"}
list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Big Quest Popups#WHITE##{normal}#", status=function(item)
return tostring(config.settings.tome.quest_popup and "enabled" or "disabled")
end, fct=function(item)
config.settings.tome.quest_popup = not config.settings.tome.quest_popup
game:saveSettings("tome.quest_popup", ("tome.quest_popup = %s\n"):format(tostring(config.settings.tome.quest_popup)))
self.c_list:drawItem(item)
end,}
self.list = list
end
......
......@@ -57,6 +57,7 @@ if type(config.settings.tome.fullscreen_stun) == "nil" then config.settings.tome
if type(config.settings.tome.fullscreen_confusion) == "nil" then config.settings.tome.fullscreen_confusion = true end
if type(config.settings.tome.show_grid_lines) == "nil" then config.settings.tome.show_grid_lines = false end
if type(config.settings.tome.tinker_auto_switch) == "nil" then config.settings.tome.tinker_auto_switch = true end
if type(config.settings.tome.quest_popup) == "nil" then config.settings.tome.quest_popup = true end
if not config.settings.tome.fonts then config.settings.tome.fonts = {type="fantasy", size="normal"} end
if not config.settings.tome.ui_theme3 then config.settings.tome.ui_theme3 = "dark" end
if not config.settings.tome.uiset_mode then config.settings.tome.uiset_mode = "Minimalist" 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