diff --git a/game/modules/tome/class/PlayerDisplay.lua b/game/modules/tome/class/PlayerDisplay.lua index d04a414a109b62932e3d3032dde52b68e4c9edaf..854afe7f66e03a586dc32fe96089b4da0fd1d218 100644 --- a/game/modules/tome/class/PlayerDisplay.lua +++ b/game/modules/tome/class/PlayerDisplay.lua @@ -173,7 +173,7 @@ function _M:handleEffect(eff_id, e, p, ex, h) desc = ("#{bold}##GOLD#%s\n(%s: %s)#WHITE##{normal}#\n"):format(name, e.type, eff_subtype)..e.long_desc(player, p) end - if config.settings.tome.hotkey_icons and e.display_entity then + if config.settings.tome.effects_icons and e.display_entity then local txt = nil if e.decrease > 0 then dur = tostring(dur) @@ -398,7 +398,7 @@ function _M:display() if t.getDisplayName then displayName = t.getDisplayName(player, t, player:isTalentActive(tid)) end local desc = "#GOLD##{bold}#"..displayName.."#{normal}##WHITE#\n"..tostring(player:getTalentFullDescription(t)) - if config.settings.tome.hotkey_icons and t.display_entity then + if config.settings.tome.effects_icons and t.display_entity then self:makeEntityIcon(t.display_entity, game.hotkeys_display_icons.tiles, ex, h, desc, txt, self.icon_yellow) ex = ex + 40 if ex + 40 >= self.w then ex = 0 h = h + 40 end @@ -408,7 +408,7 @@ function _M:display() end end end - h = h + 40 ex = 0 + if config.settings.tome.effects_icons then h = h + 40 ex = 0 end local good_e, bad_e = {}, {} for eff_id, p in pairs(player.tmp) do local e = player.tempeffect_def[eff_id] @@ -419,7 +419,7 @@ function _M:display() local e = player.tempeffect_def[eff_id] ex, h = self:handleEffect(eff_id, e, p, ex, h) end - h = h + 40 ex = 0 + if config.settings.tome.effects_icons then h = h + 40 ex = 0 end for eff_id, p in pairs(bad_e) do local e = player.tempeffect_def[eff_id] ex, h = self:handleEffect(eff_id, e, p, ex, h) diff --git a/game/modules/tome/data/timed_effects/physical.lua b/game/modules/tome/data/timed_effects/physical.lua index c52ddb1df5c7929179fc7631f97e95fcdf723ca7..395d79e6be5c3fec12989d1ae8ae4a782a1e8e2c 100644 --- a/game/modules/tome/data/timed_effects/physical.lua +++ b/game/modules/tome/data/timed_effects/physical.lua @@ -92,7 +92,7 @@ newEffect{ desc = "Poisoned", long_desc = function(self, eff) return ("The target is poisoned, taking %0.2f nature damage per turn."):format(eff.power) end, type = "physical", - subtype = { poison=true, nature=true }, + subtype = { poison=true, nature=true }, no_ct_effect = true, status = "detrimental", parameters = { power=10 }, on_gain = function(self, err) return "#Target# is poisoned!", "+Poison" end, diff --git a/game/modules/tome/dialogs/GameOptions.lua b/game/modules/tome/dialogs/GameOptions.lua index 66c3d275e84afe7b602458ac073d81721d87ab29..216e453880c50fd24a21ac46c612aac841093480 100644 --- a/game/modules/tome/dialogs/GameOptions.lua +++ b/game/modules/tome/dialogs/GameOptions.lua @@ -214,6 +214,16 @@ function _M:generateList() })) end,} + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Uses the icons for status effects instead of text.#WHITE#"} + list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Icons status effects#WHITE##{normal}#", status=function(item) + return tostring(config.settings.tome.effects_icons and "enabled" or "disabled") + end, fct=function(item) + config.settings.tome.effects_icons = not config.settings.tome.effects_icons + game:saveSettings("tome.effects_icons", ("tome.effects_icons = %s\n"):format(tostring(config.settings.tome.effects_icons))) + game.player.changed = true + self.c_list:drawItem(item) + end,} + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Uses the icons hotkeys toolbar or the textual one.#WHITE#"} list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Icons hotkey toolbar#WHITE##{normal}#", status=function(item) return tostring(config.settings.tome.hotkey_icons and "enabled" or "disabled") diff --git a/game/modules/tome/load.lua b/game/modules/tome/load.lua index 20183caa2d18ec7c2acdc93afe7d96d02a0aa436..56d3360e18d1681219ff9e0d7eca6ed092d9b863 100644 --- a/game/modules/tome/load.lua +++ b/game/modules/tome/load.lua @@ -64,6 +64,7 @@ if type(config.settings.tome.weather_effects) == "nil" then config.settings.tome 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 if type(config.settings.tome.hotkey_icons) == "nil" then config.settings.tome.hotkey_icons = true end +if type(config.settings.tome.effects_icons) == "nil" then config.settings.tome.effects_icons = true end if type(config.settings.tome.autoassign_talents_on_birth) == "nil" then config.settings.tome.autoassign_talents_on_birth = true end if type(config.settings.tome.chat_log) == "nil" then config.settings.tome.chat_log = true end if type(config.settings.tome.actor_based_movement_mode) == "nil" then config.settings.tome.actor_based_movement_mode = true end