forked from kyonshi/grenzland-mud
Added diagonal directions, hidden exits flag and bug fixes
This commit is contained in:
@@ -408,15 +408,20 @@ static void do_auto_exits(struct char_data *ch)
|
||||
|
||||
send_to_char(ch, "%s[ Exits: ", CCCYN(ch, C_NRM));
|
||||
|
||||
for (door = 0; door < NUM_OF_DIRS; door++) {
|
||||
for (door = 0; door < DIR_COUNT; door++) {
|
||||
if (!EXIT(ch, door) || EXIT(ch, door)->to_room == NOWHERE)
|
||||
continue;
|
||||
if (EXIT_FLAGGED(EXIT(ch, door), EX_CLOSED) && !CONFIG_DISP_CLOSED_DOORS)
|
||||
continue;
|
||||
if (EXIT_FLAGGED(EXIT(ch, door), EX_HIDDEN) && !ADM_FLAGGED(ch, ADM_SEESECRET))
|
||||
continue;
|
||||
|
||||
if (EXIT_FLAGGED(EXIT(ch, door), EX_CLOSED))
|
||||
send_to_char(ch, "%s(%c)%s ", CCRED(ch, C_NRM), LOWER(*dirs[door]), CCCYN(ch, C_NRM));
|
||||
send_to_char(ch, "%s(%s)%s ", EXIT_FLAGGED(EXIT(ch, door), EX_HIDDEN) ? CCWHT(ch, C_NRM) : CCRED(ch, C_NRM), autoexits[door], CCCYN(ch, C_NRM));
|
||||
else if (EXIT_FLAGGED(EXIT(ch, door), EX_HIDDEN))
|
||||
send_to_char(ch, "%s%s%s ", CCWHT(ch, C_NRM), autoexits[door], CCCYN(ch, C_NRM));
|
||||
else
|
||||
send_to_char(ch, "%c ", LOWER(*dirs[door]));
|
||||
send_to_char(ch, "%s ", autoexits[door]);
|
||||
slen++;
|
||||
}
|
||||
|
||||
@@ -434,20 +439,24 @@ ACMD(do_exits)
|
||||
|
||||
send_to_char(ch, "Obvious exits:\r\n");
|
||||
|
||||
for (door = 0; door < NUM_OF_DIRS; door++) {
|
||||
for (door = 0; door < DIR_COUNT; door++) {
|
||||
if (!EXIT(ch, door) || EXIT(ch, door)->to_room == NOWHERE)
|
||||
continue;
|
||||
if (EXIT_FLAGGED(EXIT(ch, door), EX_CLOSED) && !CONFIG_DISP_CLOSED_DOORS)
|
||||
continue;
|
||||
if (EXIT_FLAGGED(EXIT(ch, door), EX_HIDDEN) && !ADM_FLAGGED(ch, ADM_SEESECRET))
|
||||
continue;
|
||||
|
||||
len++;
|
||||
|
||||
if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_SHOWVNUMS) && !EXIT_FLAGGED(EXIT(ch, door), EX_CLOSED))
|
||||
send_to_char(ch, "%-5s - [%5d] %s\r\n", dirs[door], GET_ROOM_VNUM(EXIT(ch, door)->to_room), world[EXIT(ch, door)->to_room].name);
|
||||
send_to_char(ch, "%-5s - [%5d]%s %s\r\n", dirs[door], GET_ROOM_VNUM(EXIT(ch, door)->to_room),
|
||||
EXIT_FLAGGED(EXIT(ch, door), EX_HIDDEN) ? " [HIDDEN]" : "", world[EXIT(ch, door)->to_room].name);
|
||||
else if (CONFIG_DISP_CLOSED_DOORS && EXIT_FLAGGED(EXIT(ch, door), EX_CLOSED)) {
|
||||
/* But we tell them the door is closed */
|
||||
send_to_char(ch, "%-5s - The %s is closed.\r\n", dirs[door],
|
||||
(EXIT(ch, door)->keyword)? fname(EXIT(ch, door)->keyword) : "opening" );
|
||||
send_to_char(ch, "%-5s - The %s is closed%s\r\n", dirs[door],
|
||||
(EXIT(ch, door)->keyword)? fname(EXIT(ch, door)->keyword) : "opening",
|
||||
EXIT_FLAGGED(EXIT(ch, door), EX_HIDDEN) ? " and hidden." : ".");
|
||||
}
|
||||
else
|
||||
send_to_char(ch, "%-5s - %s\r\n", dirs[door], IS_DARK(EXIT(ch, door)->to_room) &&
|
||||
@@ -2673,10 +2682,11 @@ ACMD(do_scan)
|
||||
return;
|
||||
}
|
||||
|
||||
for (door = 0; door < NUM_OF_DIRS; door++) {
|
||||
for (door = 0; door < DIR_COUNT; door++) {
|
||||
for (range = 1; range<= maxrange; range++) {
|
||||
if (world[scanned_room].dir_option[door] && world[scanned_room].dir_option[door]->to_room != NOWHERE &&
|
||||
!IS_SET(world[scanned_room].dir_option[door]->exit_info, EX_CLOSED)) {
|
||||
!IS_SET(world[scanned_room].dir_option[door]->exit_info, EX_CLOSED) &&
|
||||
!IS_SET(world[scanned_room].dir_option[door]->exit_info, EX_HIDDEN)) {
|
||||
scanned_room = world[scanned_room].dir_option[door]->to_room;
|
||||
if (IS_DARK(scanned_room) && !CAN_SEE_IN_DARK(ch)) {
|
||||
if (world[scanned_room].people)
|
||||
|
||||
Reference in New Issue
Block a user