Page 1 of 1

Path of Light display bug in ASCII mode

Posted: Thu Jul 16, 2015 7:29 am
by Grawmad
Hey, all, I've noticed a bug--or, more accurately, noticed that behavior *was* a bug--with the display of Path of the Sun (the Sun Paladin talent) in ASCII mode. With the standard tileset, the squares that are affected by Path get a nice yellow border on them to show you where it's safe to step, but this doesn't appear in ASCII mode. I habitually play ASCII mode, and I just never knew there was supposed to be a border; I didn't actually realize that there was supposed to be one until I started working on a mod to do something similar, and found code that seemed to be doing something I didn't recognize.

There are some related Lua errors in the logs:

Code: Select all

Map z-callback error: Z 19: /engine/Map.lua:1164: attempt to index a nil value
Map z-callback error: Z 19: /engine/Map.lua:1179: attempt to index a nil value
Map z-callback error: Z 19: /engine/Map.lua:1179: attempt to index a nil value
...
The line 1179 error is repeated a *lot*.

Thanks!

Re: Path of Light display bug in ASCII mode

Posted: Thu Jul 16, 2015 8:28 am
by Grawmad
I've since figured out that it's the Tiles:loadImage(e.overlay.effect_shader) call that returns nil; e.overlay.effect_shader is non-nil (and checked for such), but it apparently causes that function to return nil. I fixed it in addon form by adding a nil check for the function return as well as the variable to line 1145, so that it now goes to the simple yellow background fallback instead of failing. The addon is here.