lighted rooms?

Posted by Nexela on Fri 31 Jan 2003 05:54 AM — 5 posts, 19,247 views.

USA #0
ok heres another problem using the stock areas how would I got about making Darkhaven Academy room 10300 lighted for the newbies that come in and cant see a thing :p


USA #1
Add a mob holding a light source or have a bunch of balls of light load on the ground to be picked up. Also be sure the room isnt flagged as dark.
USA #2
Darn I was hoping not to have to do that but oh well :p

BTW anyone got a snippet for a lighted room flag?
Australia Forum Administrator #3
If you look inside handler.c you see this ...


/*
 * True if room is dark.
 */
bool room_is_dark( ROOM_INDEX_DATA *pRoomIndex )
{
    if ( !pRoomIndex )
    {
        bug( "room_is_dark: NULL pRoomIndex", 0 );
        return TRUE;
    }

    if ( pRoomIndex->light > 0 )
        return FALSE;

    if ( IS_SET(pRoomIndex->room_flags, ROOM_DARK) )
        return TRUE;

    if ( pRoomIndex->sector_type == SECT_INSIDE
    ||   pRoomIndex->sector_type == SECT_CITY )
        return FALSE;

    if ( time_info.sunlight == SUN_SET
    ||   time_info.sunlight == SUN_DARK )
        return TRUE;

    return FALSE;
}



Now it seems it shouldn't be dark if the room sector type is "inside" or "city" however my room 10300 seems to be marked "in a forest" for some reason. Try changing the sector type to "inside" and see if the problem goes away.
USA #4
*worship Nick*

I guess it would help to look at Sector instead of flags in Rstat :P