diff --git a/game/engines/default/engine/Tooltip.lua b/game/engines/default/engine/Tooltip.lua index 7b0a4da5182e7f92ab15d88c45576377aefafbe6..41f55ea8c74e678d2293c02cde010e4119577049 100644 --- a/game/engines/default/engine/Tooltip.lua +++ b/game/engines/default/engine/Tooltip.lua @@ -246,9 +246,11 @@ function _M:set(str, ...) if str.is_tstring then self:erase() self.default_ui[1]:switchItem(str, str) + self.empty = str:isEmpty() else if self.uids == self.default_ui then self.uids = {} end self.uids[#self.uids+1] = str + self.empty = false end local uih = 0 @@ -260,6 +262,7 @@ end function _M:erase() self.uis = self.default_ui self.default_ui[1].list = nil + self.empty = true end function _M:display() end @@ -359,7 +362,7 @@ function _M:displayAtMap(tmx, tmy, mx, my, text) end end --- if self.texture then + if not self.empty then -- mx = mx - self.w / 2 + game.level.map.tile_w / 2 -- my = my - self.h if mx < 0 then mx = 0 end @@ -369,5 +372,5 @@ function _M:displayAtMap(tmx, tmy, mx, my, text) self.last_display_x = mx self.last_display_y = my self:toScreen(mx, my) --- end + end end diff --git a/game/engines/default/engine/utils.lua b/game/engines/default/engine/utils.lua index f2b55125588e4029440aca6e7f0eb4754928d2e1..ce8e002d3072bdd4587532b5ade96965820a1114 100644 --- a/game/engines/default/engine/utils.lua +++ b/game/engines/default/engine/utils.lua @@ -725,6 +725,10 @@ function tstring:extractLines() return rets end +function tstring:isEmpty() + return #self == 0 +end + function tstring:makeLineTextures(max_width, font, no_split, r, g, b) local list = no_split and self or self:splitLines(max_width, font) local fh = font:lineSkip() diff --git a/game/modules/tome/data/general/objects/world-artifacts-far-east.lua b/game/modules/tome/data/general/objects/world-artifacts-far-east.lua index 1e39786d3e1700429b64e86a7794fe315eaa2a46..26d6750df8d82d9be49654f9951977981ec7c464 100644 --- a/game/modules/tome/data/general/objects/world-artifacts-far-east.lua +++ b/game/modules/tome/data/general/objects/world-artifacts-far-east.lua @@ -123,3 +123,34 @@ newEntity{ base = "BASE_HEAVY_BOOTS", inc_damage = { [DamageType.BLIGHT] = 15 }, }, } + +newEntity{ base = "BASE_GEM", + power_source = {arcane=true}, + unique = true, + unided_name = "unearthly black stone", + name = "Goedalath Rock", subtype = "black", + color = colors.PURPLE, image="object/onyx.png", + level_range = {42, 50}, + desc = [[A small rock that seems from beyond this world, vibrating with a fierce energy. It feels warped and terrible and evil... and yet oh so powerful.]], + rarity = 300, + cost = 300, + material_level = 5, + carrier = { + on_melee_hit = {[DamageType.HEAL] = 34}, + life_regen = -2, + lite = -2, + combat_mentalresist = -18, + healing_factor = -0.5, + }, + imbue_powers = { + combat_dam = 12, + combat_spellpower = 16, + see_invisible = 14, + infravision = 3, + inc_damage = {all = 9}, + inc_damage_type = {demon = 20}, + esp = {["demon/major"]=1, ["demon/minor"]=1}, + on_melee_hit = {[DamageType.DARKNESS] = 34}, + healing_factor = 0.5, + }, +} diff --git a/game/modules/tome/dialogs/GraphicMode.lua b/game/modules/tome/dialogs/GraphicMode.lua index bd2cfd47ac4a3440c7a50b7ebe2e415a05e66c10..f47fcd7244ff5a346a08e4b398b2a3a6a4e80360 100644 --- a/game/modules/tome/dialogs/GraphicMode.lua +++ b/game/modules/tome/dialogs/GraphicMode.lua @@ -25,7 +25,7 @@ module(..., package.seeall, class.inherit(Dialog)) local tiles_packs = { shockbolt = {name= "Shockbolt", order=1}, - mushroom = {name= "Mushroom", order=2}, +-- mushroom = {name= "Mushroom", order=2}, ascii = {name= "ASCII", order=5}, ascii_full = {name= "ASCII with background", order=6}, } diff --git a/game/modules/tome/load.lua b/game/modules/tome/load.lua index 2b87180d03910cc42ff14f0d6a18c30ba3235701..3271dfe93be4284b11d13715b11bd439da12438b 100644 --- a/game/modules/tome/load.lua +++ b/game/modules/tome/load.lua @@ -49,6 +49,7 @@ profile.mod.allow_build = profile.mod.allow_build or {} if type(config.settings.tome.autosave) == "nil" then config.settings.tome.autosave = true end if not config.settings.tome.smooth_move then config.settings.tome.smooth_move = 3 end if not config.settings.tome.gfx then config.settings.tome.gfx = {size="32x32", tiles="shockbolt"} end +if config.settings.tome.gfx.tiles == "mushroom" then config.settings.tome.gfx.tiles="shockbolt" end if type(config.settings.tome.weather_effects) == "nil" then config.settings.tome.weather_effects = true end if type(config.settings.tome.smooth_fov) == "nil" then config.settings.tome.smooth_fov = true end if type(config.settings.tome.daynight) == "nil" then config.settings.tome.daynight = true end