mirror of
https://github.com/tbamud/tbamud.git
synced 2025-12-23 10:40:13 +01:00
Updated do_scan --Rumble
This commit is contained in:
parent
47cf664310
commit
f48925eb59
3 changed files with 23 additions and 36 deletions
|
|
@ -2583,38 +2583,29 @@ distance, int door)
|
|||
ACMD(do_scan)
|
||||
{
|
||||
int door;
|
||||
char buf[MAX_STRING_LENGTH];
|
||||
|
||||
*buf = '\0';
|
||||
|
||||
int range;
|
||||
int maxrange = 3;
|
||||
|
||||
room_rnum scanned_room = IN_ROOM(ch);
|
||||
|
||||
if (IS_AFFECTED(ch, AFF_BLIND)) {
|
||||
send_to_char(ch, "You can't see a damned thing, you're blind!\r\n");
|
||||
return;
|
||||
}
|
||||
/* may want to add more restrictions here, too */
|
||||
send_to_char(ch, "You quickly scan the area.\r\n");
|
||||
for (door = 0; door < NUM_OF_DIRS - 2; door++) /* don't scan up/down */
|
||||
if (EXIT(ch, door) && EXIT(ch, door)->to_room != NOWHERE &&
|
||||
!IS_SET(EXIT(ch, door)->exit_info, EX_CLOSED)
|
||||
&& !IS_DARK(EXIT(ch, door)->to_room)) {
|
||||
if (world[EXIT(ch, door)->to_room].people) {
|
||||
list_scanned_chars(world[EXIT(ch, door)->to_room].people, ch, 0, door);
|
||||
} else if (_2ND_EXIT(ch, door) && _2ND_EXIT(ch, door)->to_room !=
|
||||
NOWHERE && !IS_SET(_2ND_EXIT(ch, door)->exit_info, EX_CLOSED)
|
||||
&& !IS_DARK(_2ND_EXIT(ch, door)->to_room)) {
|
||||
/* check the second room away */
|
||||
if (world[_2ND_EXIT(ch, door)->to_room].people) {
|
||||
list_scanned_chars(world[_2ND_EXIT(ch, door)->to_room].people, ch, 1, door);
|
||||
} else if (_3RD_EXIT(ch, door) && _3RD_EXIT(ch, door)->to_room !=
|
||||
NOWHERE && !IS_SET(_3RD_EXIT(ch, door)->exit_info, EX_CLOSED)
|
||||
&& !IS_DARK(_3RD_EXIT(ch, door)->to_room)) {
|
||||
/* check the third room */
|
||||
if (world[_3RD_EXIT(ch, door)->to_room].people) {
|
||||
list_scanned_chars(world[_3RD_EXIT(ch, door)->to_room].people, ch, 2,
|
||||
door);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (door = 0; door < NUM_OF_DIRS; door++) {
|
||||
for (range = 1; range<= maxrange; range++) {
|
||||
if (world[scanned_room].dir_option[door] &&
|
||||
!IS_SET(world[scanned_room].dir_option[door]->exit_info, EX_CLOSED)) {
|
||||
scanned_room = world[scanned_room].dir_option[door]->to_room;
|
||||
if (world[scanned_room].people)
|
||||
list_scanned_chars(world[scanned_room].people, ch, range - 1, door);
|
||||
} // end of if
|
||||
else
|
||||
break;
|
||||
} // end of range
|
||||
scanned_room = IN_ROOM(ch);
|
||||
} // end of directions
|
||||
} // end of do_scan
|
||||
|
||||
|
|
|
|||
|
|
@ -4,10 +4,6 @@
|
|||
#ifndef _CONF_H_
|
||||
#define _CONF_H_
|
||||
|
||||
/* Windows complains about standard functions like strcmp() */
|
||||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
#define _CRT_NONSTDC_NO_DEPRECATE
|
||||
|
||||
/* Define to empty if the keyword does not work. */
|
||||
/* #undef const */
|
||||
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@ ACMD(do_export_zone)
|
|||
i = system(sysbuf);
|
||||
|
||||
/* Tar the new copy. */
|
||||
sprintf(sysbuf, "tar -cf %s%s.tar %sqq.info %sqq.wld %sqq.zon %sqq.mob %sqq.obj %sqq.trg", path, f, path, path, path, path, path, path);
|
||||
sprintf(sysbuf, "tar -cf %s%s.tar %sqq.info %sqq.wld %sqq.zon %sqq.mob %sqq.obj %sqq.trg %sqq.shp", path, f, path, path, path, path, path, path, path);
|
||||
i = system(sysbuf);
|
||||
|
||||
/* Gzip it. */
|
||||
|
|
@ -885,11 +885,11 @@ static int export_save_rooms(zone_rnum zrnum)
|
|||
fprintf(room_file, "#QQ%02d\n"
|
||||
"%s%c\n"
|
||||
"%s%c\n"
|
||||
"QQ %d %d %d %d %d %d\n",
|
||||
"QQ %d %d %d %d %d\n",
|
||||
room->number%100,
|
||||
room->name ? room->name : "Untitled", STRING_TERMINATOR,
|
||||
buf, STRING_TERMINATOR,
|
||||
zone_table[room->zone].number, room->room_flags[0], room->room_flags[1],
|
||||
room->room_flags[0], room->room_flags[1],
|
||||
room->room_flags[2], room->room_flags[3], room->sector_type
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue