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

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
tiger_eye
Perspiring Physicist
Posts: 889
Joined: Thu Feb 17, 2011 5:20 am

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

#1 Post 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
Attachments
infravision_char_sheet.txt
(975 Bytes) Downloaded 120 times

Canderel
Sher'Tul
Posts: 1252
Joined: Mon Nov 24, 2003 2:31 pm
Location: South Africa

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

#2 Post 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.

tiger_eye
Perspiring Physicist
Posts: 889
Joined: Thu Feb 17, 2011 5:20 am

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

#3 Post 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.

Post Reply