You could do it a few ways for this.
Personaly i went with adding in for room_is_dark to take a filename and linenumber like this
bool room_is_dark( ROOM_INDEX_DATA * pRoomIndex, char *filename, int linenumber )
if( !pRoomIndex )
bug( "room_is_dark: NULL pRoomIndex from %s@%d", filename, linenumber );
if( pRoomIndex->light > 0 )
if( IS_SET( pRoomIndex->room_flags, ROOM_DARK ) )
if( pRoomIndex->sector_type == SECT_INSIDE || pRoomIndex->sector_type == SECT_CITY )
if( time_info.sunlight == SUN_SET || time_info.sunlight == SUN_DARK )
Then its just as simple as adding into mud.h for those and on all calls to room_is_dark tossing in for it to send
the filename and linenumber to it. I havent gotten the bug message since I set all this up so I have no idea where the actual issue is yet. Another way would be where all room_is_dark calls are used to toss in a check
null room data and output what function its in etc...