Page 1 of 1

b30:infravis and heightened senses don't stack in char sheet

Posted: Wed Jul 20, 2011 3:17 am
by tiger_eye
heightened senses currently doesn't show up in the character sheet. It is supposed to stack with infravision. Below is a simple patch to fix this:

Code: Select all

Index: game/modules/tome/dialogs/CharacterSheet.lua
===================================================================
--- game/modules/tome/dialogs/CharacterSheet.lua	(revision 3914)
+++ game/modules/tome/dialogs/CharacterSheet.lua	(working copy)
@@ -394,7 +394,7 @@
 		if text then
 			self:mouseTooltip(self.TOOLTIP_VISION_SIGHT,  s:drawColorStringBlended(self.font, ("Vision range   : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
 		end
-		text = compare_fields(player, actor_to_compare, "infravision", "%d", "%+.0f")
+		text = compare_fields(player, actor_to_compare, function(actor) return (actor:attr("infravision") or actor:attr("heightened_senses")) and (actor.heightened_senses or 0) + (actor.infravision or 0) end, "%d", "%+.0f")
 		if text then
 			self:mouseTooltip(self.TOOLTIP_VISION_INFRA,  s:drawColorStringBlended(self.font, ("Infravision    : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
 		end

Re: b30:infravis and heightened senses don't stack in char s

Posted: Wed Jul 20, 2011 4:52 am
by Canderel
Tiger_eye: could you check if it stacks in-game for light radius purposes, cause I recall that I had both wintertide and senses, but I still only had a 1 light radius. I was a cursed at the time so there may have been some -1 light radius curses on me, but that was exactly why I went that route so they would not affect me.

Re: b30:infravis and heightened senses don't stack in char s

Posted: Wed Jul 20, 2011 2:43 pm
by tiger_eye
Canderel wrote:Tiger_eye: could you check if it stacks in-game for light radius purposes, cause I recall that I had both wintertide and senses, but I still only had a 1 light radius. I was a cursed at the time so there may have been some -1 light radius curses on me, but that was exactly why I went that route so they would not affect me.
Infravision and heightened senses works correctly for me in-game. With 12 infravision via wintertide and heightened senses, I had effective light radius of 3 (which isn't shown in the char sheet). This is not actually a light radius, though, so the light radius in the character sheet still showed 1.