doors not showing on look

Posted by Ithildin on Wed 26 Feb 2003 06:38 PM — 3 posts, 13,641 views.

USA #0
ok, i've been tryin to mess with the doors on my smaug to show up. i've tried a messin with the code, but i'm still messin it up somewhere. here is the code.

void do_exits( CHAR_DATA *ch, char *argument )
{
    char buf[MAX_STRING_LENGTH];
    EXIT_DATA *pexit;
    bool found;
    bool fAuto;

    set_char_color( AT_EXITS, ch );
    buf[0] = '\0';
    fAuto  = !str_cmp( argument, "auto" );

    if ( !check_blind(ch) )
	return;

    strcpy( buf, fAuto ? "Exits:" : "Obvious exits:\n\r" );

    found = FALSE;
    for ( pexit = ch->in_room->first_exit; pexit; pexit = pexit->next )
    {
	if ( pexit->to_room
	&&  !IS_SET(pexit->exit_info, EX_CLOSED)
	&& (!IS_SET(pexit->exit_info, EX_WINDOW)
	||   IS_SET(pexit->exit_info, EX_ISDOOR))
	&&  !IS_SET(pexit->exit_info, EX_HIDDEN) )
	{
	    found = TRUE;
	    if ( fAuto )
	    {
		strcat( buf, " " );
		strcat( buf, dir_name[pexit->vdir] );
/*	        if ( fAuto )
			{(pexit->exit_info, EX_CLOSED);
			  strcat( buf, " #" );
		      strcat(buf, dir_name[pexit->vdir]);
			}
			else 
			{   strcat( buf, " " );
		        strcat( buf, dir_name[pexit->vdir] );
			}*/
		}
	    else
	    {
		sprintf( buf + strlen(buf), "%-5s - %s\n\r",
		    capitalize( dir_name[pexit->vdir] ),
		    room_is_dark( pexit->to_room )
			?  "Too dark to tell"
			: pexit->to_room->name
		    );
	    }
	}
    }

    if ( !found )
	strcat( buf, fAuto ? " none.\n\r" : "None.\n\r" );
    else
      if ( fAuto )
	strcat( buf, ".\n\r" );
    send_to_char( buf, ch );
    return;
}


the commented out part is what i tried. i also had the

&& !IS_SET(pexit->exit_info, EX_CLOSED) and
|| IS_SET(pexit->exit_info, EX_ISDOOR))

commented out. when it came up on the mud, it would show:

North #North South #South so i have the idea of what i need, just not know how to do it. any helps would be great.

Thanks,
Ithildin
Amended on Wed 26 Feb 2003 06:39 PM by Ithildin
USA #1
ok, i've messed with it some more. i've come up with this.

if ( pexit->to_room	
	||  IS_SET(pexit->exit_info, EX_CLOSED) 
	&&   (!IS_SET(pexit->exit_info, EX_WINDOW)
	||   IS_SET(pexit->exit_info, EX_ISDOOR))
	&&  !IS_SET(pexit->exit_info, EX_HIDDEN) )
	{
	    found = TRUE;
	    if ( fAuto )
		{  //IS_SET(pexit->exit_info, EX_CLOSED);
			  strcat( buf, " -" );
		      strcat(buf, dir_name[pexit->vdir]);
		    
		}
			  else
			{
                IS_SET(pexit->exit_info, EX_CLOSED);  
				strcat( buf, " -#" );
				strcat( buf, dir_name[pexit->vdir]);
		/*	}
		
		if ( fAuto )
	    {
		strcat( buf, " -" );
		strcat( buf, dir_name[pexit->vdir] );
	        if ( fAuto )
			{(pexit->exit_info, EX_CLOSED);
			  strcat( buf, "-#" );
		      strcat(buf, dir_name[pexit->vdir]);
			}		
		}

		
	    else
	    {*/
		sprintf( buf + strlen(buf), "%-5s - %s\n\r",
		    capitalize( dir_name[pexit->vdir] ),
		    room_is_dark( pexit->to_room )
			?  "Too dark to tell"
			: pexit->to_room->name
		    );
	    }
	}
    }


it shows all the exits now, but when i make an exit a door, it still stays the same, here's what it shows:

Exits: -north -east -south.

when south is made a door and closed, i want it to show:

Exits: -north -east -#south.

any suggestions?
anything stupid i missed?


Amended on Sat 01 Mar 2003 09:12 PM by Ithildin
USA #2
found out what i was looking for. so here's to anyone who's wanting to try this.

this is is do_exits, act_info.c

if ( pexit->to_room
	  ||   IS_SET(pexit->exit_info, EX_CLOSED)
	  && (!IS_SET(pexit->exit_info, EX_WINDOW)
	  ||   IS_SET(pexit->exit_info, EX_ISDOOR))
	  &&  !IS_SET(pexit->exit_info, EX_HIDDEN) )
	{
	    found = TRUE;
	    if ( fAuto )
	    {
		//strcat( buf, " " );
		//strcat( buf, dir_name[pexit->vdir] );
	        if ( pexit->to_room
			
			  && IS_SET(pexit->exit_info, EX_CLOSED))
			{  strcat( buf, " &W&g-#&Y&c" );
		      strcat(buf, dir_name[pexit->vdir]);
			}
			else 
			{   strcat( buf, " &W&g-&Y&c" );
		        strcat( buf, dir_name[pexit->vdir] );
			}
		}
	    else
	    {
		sprintf( buf + strlen(buf), "%-5s - %s\n\r",
		    capitalize( dir_name[pexit->vdir] ),
		    room_is_dark( pexit->to_room )
			?  "Too dark to tell"
			: pexit->to_room->name
		    );
	    }
	}
    }


whoo hoo.