Skip to content
Snippets Groups Projects
Commit 38d3c781 authored by dg's avatar dg
Browse files

option to display status effects as text

git-svn-id: http://svn.net-core.org/repos/t-engine4@4654 51575b47-30f0-44d4-a5cc-537603b46e54
parent e0fb1cb0
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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,
......
......@@ -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")
......
......@@ -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
......
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