diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index 02884c71f4045a2f50773143a6af467a2f6ece90..e94fd3d0104c5dfe75e46c9aab9f721d8ab64f6d 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -2453,7 +2453,7 @@ function _M:die(src, death_note) world:gainAchievement("PEST_CONTROL", p, self) world:gainAchievement("REAVER", p, self) - if self.unique then + if self.unique and not self.randboss then game.player:registerUniqueKilled(self) end diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index f0ed6ff51715b2f53cdd124b8e92f74182edcb9d..5d944107f24730345ec0d7fa9cc8c54dc52f412b 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -475,6 +475,15 @@ function _M:setupMiniMap() if self.level and self.level.map and self.level.map.finished then self.uiset:setupMinimap(self.level) end end +--- Sets up a text flyers +function _M:setFlyingText(fl) + self.flyers = fl + function self.flyers:add(x, y, duration, xvel, yvel, str, color, bigfont) + local slowness = (config.settings.tome.flyers_fade_time or 10)/10 + return FlyingText.add(fl, x, y, duration*slowness, xvel/slowness, yvel/slowness, str, color, bigfont) + end +end + function _M:save() self.total_playtime = (self.total_playtime or 0) + (os.time() - (self.last_update or self.real_starttime)) self.last_update = os.time() diff --git a/game/modules/tome/dialogs/GameOptions.lua b/game/modules/tome/dialogs/GameOptions.lua index 499a30177a299150d575990af977e7a3f03a50f8..fa3b7203869052f41bc15f8beb74e9551be87d5e 100644 --- a/game/modules/tome/dialogs/GameOptions.lua +++ b/game/modules/tome/dialogs/GameOptions.lua @@ -212,7 +212,19 @@ function _M:generateList() self.c_list:drawItem(item) end, 0)) end,} - + + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"How long will flying text messages be visible on screen.\nThe range is 1 (very short) to 100 (10x slower) than the normal duration, which varies with each individual message."} + list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Duration of flying text#WHITE##{normal}#", status=function(item) + return tostring((config.settings.tome.flyers_fade_time or 10) ) + end, fct=function(item) + game:registerDialog(GetQuantity.new("Relative duration", "From 1 to 100", (config.settings.tome.flyers_fade_time or 10), 100, function(qty) + qty = util.bound(qty, 1, 100) + config.settings.tome.flyers_fade_time = qty + game:saveSettings("tome.flyers_fade_time", ("tome.flyers_fade_time = %d\n"):format(qty)) + self.c_list:drawItem(item) + end, 1)) + end,} + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Configure the chat filters to select what kind of messages to see.#WHITE#"} list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Chat message filters#WHITE##{normal}#", status=function(item) return "select to configure"