diff -BbuprN -x '*.o' -x conf.h suntzu/src/act.informative.c suntzu-test/src/act.informative.c --- suntzu/src/act.informative.c 2003-10-19 22:00:17.000000000 -0500 +++ suntzu-test/src/act.informative.c 2003-10-24 08:07:42.000000000 -0500 @@ -491,7 +491,7 @@ void do_auto_exits(room_rnum target_room if (EXIT_FLAGGED(W_EXIT(target_room, door), EX_CLOSED)) continue; - send_to_char(ch, "%c ", LOWER(*dirs[door])); + send_to_char(ch, "%s ", abbr_dirs[door]); slen++; } @@ -519,10 +519,10 @@ ACMD(do_exits) len++; if (GET_LEVEL(ch) >= LVL_IMMORT) - send_to_char(ch, "%-5s - [%5d] %s\r\n", dirs[door], GET_ROOM_VNUM(EXIT(ch, door)->to_room), + send_to_char(ch, "%-9s - [%5d] %s\r\n", dirs[door], GET_ROOM_VNUM(EXIT(ch, door)->to_room), world[EXIT(ch, door)->to_room].name); else - send_to_char(ch, "%-5s - %s\r\n", dirs[door], IS_DARK(EXIT(ch, door)->to_room) && + send_to_char(ch, "%-9s - %s\r\n", dirs[door], IS_DARK(EXIT(ch, door)->to_room) && !CAN_SEE_IN_DARK(ch) ? "Too dark to tell." : world[EXIT(ch, door)->to_room].name); } @@ -897,24 +897,25 @@ ACMD(do_look) look_at_room(IN_ROOM(ch), ch, 1); else if (find_exdesc(arg, world[IN_ROOM(ch)].ex_description) != NULL) look_at_target(ch, arg); - else if ((is_abbrev(arg, "inside")) || - (is_abbrev(arg, "into"))) + else if (is_abbrev(arg, "inside") && EXIT(ch, INDIR) && !*arg2) + look_in_direction(ch, INDIR); + else if (is_abbrev(arg, "inside") || + is_abbrev(arg, "into") ) look_in_obj(ch, arg2); - else if (((is_abbrev(arg, "outside")) || - (is_abbrev(arg, "through")) || - (is_abbrev(arg, "thru"))) && (*arg2)) + else if ((is_abbrev(arg, "outside") || + is_abbrev(arg, "through") || + is_abbrev(arg, "thru") ) && *arg2) look_out_window(ch, arg2); - else if (is_abbrev(arg, "outside")) - /* Note: If you add a direction including "out", then you will - * need to add a clause to the above test "and not EXIT(ch, OUTDIR)" - */ + else if (is_abbrev(arg, "outside") && !EXIT(ch, OUTDIR)) look_out_window(ch, arg2); /* did the char type 'look ?' */ - else if ((look_type = search_block(arg, dirs, FALSE)) >= 0) + else if ((look_type = search_block(arg, dirs, FALSE)) >= 0 || + (look_type = search_block(arg, abbr_dirs, FALSE)) >= 0) look_in_direction(ch, look_type); /* did the char type 'look towards .?' */ else if ((is_abbrev(arg, "towards")) && - ((look_type = search_block(arg2, dirs, FALSE)) >= 0) ) + ((look_type = search_block(arg2, dirs, FALSE)) >= 0 || + (look_type = search_block(arg2, abbr_dirs, FALSE)) >= 0 )) look_in_direction(ch,look_type); else if (is_abbrev(arg, "at")) look_at_target(ch, arg2); diff -BbuprN -x '*.o' -x conf.h suntzu/src/act.movement.c suntzu-test/src/act.movement.c --- suntzu/src/act.movement.c 2003-10-19 22:00:17.000000000 -0500 +++ suntzu-test/src/act.movement.c 2003-10-24 07:53:54.000000000 -0500 @@ -259,7 +259,8 @@ int find_door(struct char_data *ch, cons int door; if (*dir) { /* a direction was specified */ - if ((door = search_block(dir, dirs, FALSE)) == -1) { /* Partial Match */ + if ((door = search_block(dir, dirs, FALSE)) < 0 && + (door = search_block(dir, abbr_dirs, FALSE)) < 0) { /* Partial Match */ send_to_char(ch, "That's not a direction.\r\n"); return (-1); } diff -BbuprN -x '*.o' -x conf.h suntzu/src/constants.c suntzu-test/src/constants.c --- suntzu/src/constants.c 2003-10-19 22:00:41.000000000 -0500 +++ suntzu-test/src/constants.c 2003-10-24 07:53:54.000000000 -0500 @@ -46,6 +46,7 @@ const char *patch_list[] = "Object stacking version 3.1 (2003/08/30)", "Stacking in cedit version 1.1 (2003/08/30)", "Fixtake in extra descs version 1.1 (2003/06/21)", + "Exits version 3.2 (2003/10/22)", "\n" }; @@ -64,9 +65,30 @@ const char *dirs[] = "west", "up", "down", + "northwest", + "northeast", + "southeast", + "southwest", + "inside", + "outside", + "\n" +}; +const char *abbr_dirs[] = +{ + "n", + "e", + "s", + "w", + "u", + "d", + "nw", + "ne", + "se", + "sw", + "in", + "out", "\n" }; - /* ROOM_x */ const char *room_bits[] = { @@ -976,15 +998,20 @@ const char *npc_class_types[] = { int rev_dir[] = { - 2, - 3, - 0, - 1, - 5, - 4 + /* North */ SOUTH, + /* East */ WEST, + /* South */ NORTH, + /* West */ EAST, + /* Up */ DOWN, + /* Down */ UP, + /* NW */ SOUTHEAST, + /* NE */ SOUTHWEST, + /* SE */ NORTHWEST, + /* SW */ NORTHEAST, + /* In */ OUTDIR, + /* Out */ INDIR }; - int movement_loss[] = { 1, /* Inside */ diff -BbuprN -x '*.o' -x conf.h suntzu/src/constants.h suntzu-test/src/constants.h --- suntzu/src/constants.h 2003-10-19 22:00:18.000000000 -0500 +++ suntzu-test/src/constants.h 2003-10-24 07:53:54.000000000 -0500 @@ -1,6 +1,7 @@ extern const char *circlemud_version; extern const char *oasisolc_version; extern const char *dirs[]; +extern const char *abbr_dirs[]; extern const char *room_bits[]; extern const char *exit_bits[]; extern const char *sector_types[]; diff -BbuprN -x '*.o' -x conf.h suntzu/src/dg_mobcmd.c suntzu-test/src/dg_mobcmd.c --- suntzu/src/dg_mobcmd.c 2003-10-19 22:00:18.000000000 -0500 +++ suntzu-test/src/dg_mobcmd.c 2003-10-24 07:53:54.000000000 -0500 @@ -48,6 +48,7 @@ extern struct index_data *mob_index; extern struct room_data *world; extern int dg_owner_purged; extern const char *dirs[]; +extern const char *abbr_dirs[]; void sub_write(char *arg, char_data *ch, byte find_invis, int targets); bitvector_t asciiflag_conv(char *flag); @@ -1014,7 +1015,8 @@ ACMD(do_mdoor) return; } - if ((dir = search_block(direction, dirs, FALSE)) == -1) { + if ((dir = search_block(direction, dirs, FALSE)) < 0 && + (dir = search_block(direction, abbr_dirs, FALSE)) < 0) { mob_log(ch, "mdoor: invalid direction"); return; } diff -BbuprN -x '*.o' -x conf.h suntzu/src/dg_objcmd.c suntzu-test/src/dg_objcmd.c --- suntzu/src/dg_objcmd.c 2003-10-19 22:00:18.000000000 -0500 +++ suntzu-test/src/dg_objcmd.c 2003-10-24 07:53:54.000000000 -0500 @@ -26,6 +26,7 @@ extern struct room_data *world; extern struct index_data *obj_index; extern const char *dirs[]; +extern const char *abbr_dirs[]; extern int dg_owner_purged; void obj_command_interpreter(obj_data *obj, char *argument); @@ -572,7 +573,8 @@ OCMD(do_odoor) return; } - if ((dir = search_block(direction, dirs, FALSE)) == -1) { + if ((dir = search_block(direction, dirs, FALSE)) < 0 && + (dir = search_block(direction, abbr_dirs, FALSE)) < 0) { obj_log(obj, "odoor: invalid direction"); return; } diff -BbuprN -x '*.o' -x conf.h suntzu/src/dg_scripts.c suntzu-test/src/dg_scripts.c --- suntzu/src/dg_scripts.c 2003-10-19 22:00:18.000000000 -0500 +++ suntzu-test/src/dg_scripts.c 2003-10-24 07:53:54.000000000 -0500 @@ -2017,6 +2017,42 @@ void find_replacement(void *go, struct s } else *str = '\0'; } + else if ((!str_cmp(field, "northwest")) || (!str_cmp(field, "nw"))) { + if (r->dir_option[NORTHWEST]) + sprintbit(r->dir_option[NORTHWEST]->exit_info ,exit_bits, str, sizeof(str)); + else + *str = '\0'; + } + else if ((!str_cmp(field, "northeast")) || (!str_cmp(field, "ne"))) { + if (r->dir_option[NORTHEAST]) + sprintbit(r->dir_option[NORTHEAST]->exit_info ,exit_bits, str, sizeof(str)); + else + *str = '\0'; + } + else if ((!str_cmp(field, "southeast")) || (!str_cmp(field, "se"))) { + if (r->dir_option[SOUTHEAST]) + sprintbit(r->dir_option[SOUTHEAST]->exit_info ,exit_bits, str, sizeof(str)); + else + *str = '\0'; + } + else if ((!str_cmp(field, "southwest")) || (!str_cmp(field, "sw"))) { + if (r->dir_option[SOUTHWEST]) + sprintbit(r->dir_option[SOUTHWEST]->exit_info ,exit_bits, str, sizeof(str)); + else + *str = '\0'; + } + else if (!str_cmp(field, "in")) { + if (r->dir_option[INDIR]) + sprintbit(r->dir_option[INDIR]->exit_info ,exit_bits, str, sizeof(str)); + else + *str = '\0'; + } + else if (!str_cmp(field, "out")) { + if (r->dir_option[OUTDIR]) + sprintbit(r->dir_option[OUTDIR]->exit_info ,exit_bits, str, sizeof(str)); + else + *str = '\0'; + } else if (!str_cmp(field, "vnum")) snprintf(str, slen,"%d",r->number); diff -BbuprN -x '*.o' -x conf.h suntzu/src/dg_wldcmd.c suntzu-test/src/dg_wldcmd.c --- suntzu/src/dg_wldcmd.c 2003-10-19 22:00:18.000000000 -0500 +++ suntzu-test/src/dg_wldcmd.c 2003-10-24 07:53:54.000000000 -0500 @@ -25,6 +25,7 @@ extern struct room_data *world; extern const char *dirs[]; +extern const char *abbr_dirs[]; extern struct zone_data *zone_table; void send_char_pos(struct char_data *ch, int dam); @@ -210,7 +211,8 @@ WCMD(do_wdoor) return; } - if ((dir = search_block(direction, dirs, FALSE)) == -1) { + if ((dir = search_block(direction, dirs, FALSE)) < 0 && + (dir = search_block(direction, abbr_dirs, FALSE)) < 0) { wld_log(room, "wdoor: invalid direction"); return; } diff -BbuprN -x '*.o' -x conf.h suntzu/src/house.c suntzu-test/src/house.c --- suntzu/src/house.c 2003-02-06 22:20:03.000000000 -0600 +++ suntzu-test/src/house.c 2003-10-24 07:53:54.000000000 -0500 @@ -377,7 +377,8 @@ void hcontrol_build_house(struct char_da send_to_char(ch, "%s", HCONTROL_FORMAT); return; } - if ((exit_num = search_block(arg1, dirs, FALSE)) < 0) { + if ((exit_num = search_block(arg1, dirs, FALSE)) < 0 && + (exit_num = search_block(arg1, abbr_dirs, FALSE)) < 0) { send_to_char(ch, "'%s' is not a valid direction.\r\n", arg1); return; } diff -BbuprN -x '*.o' -x conf.h suntzu/src/interpreter.c suntzu-test/src/interpreter.c --- suntzu/src/interpreter.c 2003-10-19 22:00:41.000000000 -0500 +++ suntzu-test/src/interpreter.c 2003-10-24 07:53:54.000000000 -0500 @@ -274,6 +274,14 @@ cpp_extern const struct command_info cmd { "west" , "w" , POS_STANDING, do_move , 0, SCMD_WEST }, { "up" , "u" , POS_STANDING, do_move , 0, SCMD_UP }, { "down" , "d" , POS_STANDING, do_move , 0, SCMD_DOWN }, + { "northwest", "northw" , POS_STANDING, do_move , 0, SCMD_NW }, + { "nw" , "nw" , POS_STANDING, do_move , 0, SCMD_NW }, + { "northeast", "northe" , POS_STANDING, do_move , 0, SCMD_NE }, + { "ne" , "ne" , POS_STANDING, do_move , 0, SCMD_NE }, + { "southeast", "southe" , POS_STANDING, do_move , 0, SCMD_SE }, + { "se" , "se" , POS_STANDING, do_move , 0, SCMD_SE }, + { "southwest", "southw" , POS_STANDING, do_move , 0, SCMD_SW }, + { "sw" , "sw" , POS_STANDING, do_move , 0, SCMD_SW }, /* now, the main list */ { "at" , "at" , POS_DEAD , do_at , LVL_IMMORT, 0 }, @@ -371,12 +379,14 @@ cpp_extern const struct command_info cmd { "holylight", "holy" , POS_DEAD , do_gen_tog , LVL_IMMORT, SCMD_HOLYLIGHT }, { "house" , "house" , POS_RESTING , do_house , 0, 0 }, - { "inventory", "i" , POS_DEAD , do_inventory, 0, 0 }, + { "i" , "i" , POS_DEAD , do_inventory, 0, 0 }, { "idea" , "id" , POS_DEAD , do_gen_write, 0, SCMD_IDEA }, { "imotd" , "imotd" , POS_DEAD , do_gen_ps , LVL_IMMORT, SCMD_IMOTD }, { "immlist" , "imm" , POS_DEAD , do_gen_ps , 0, SCMD_IMMLIST }, + { "inside" , "in" , POS_STANDING, do_move , 0, SCMD_IN }, { "info" , "info" , POS_SLEEPING, do_gen_ps , 0, SCMD_INFO }, { "insult" , "insult" , POS_RESTING , do_insult , 0, 0 }, + { "inventory", "inv" , POS_DEAD , do_inventory, 0, 0 }, { "invis" , "invi" , POS_DEAD , do_invis , LVL_IMMORT, 0 }, { "junk" , "junk" , POS_RESTING , do_drop , 0, SCMD_JUNK }, @@ -422,6 +432,7 @@ cpp_extern const struct command_info cmd { "olc" , "olc" , POS_DEAD , do_oasis , LVL_BUILDER, SCMD_OLC_SAVEINFO }, { "olist" , "olist" , POS_DEAD , do_oasis , LVL_BUILDER, SCMD_OASIS_OLIST }, { "oedit" , "oedit" , POS_DEAD , do_oasis , LVL_BUILDER, SCMD_OASIS_OEDIT }, + { "outside" , "out" , POS_STANDING, do_move , 0, SCMD_OUT }, { "put" , "put" , POS_RESTING , do_put , 0, 0 }, { "page" , "pag" , POS_DEAD , do_page , LVL_GOD, 0 }, diff -BbuprN -x '*.o' -x conf.h suntzu/src/interpreter.h suntzu-test/src/interpreter.h --- suntzu/src/interpreter.h 2003-10-19 22:00:18.000000000 -0500 +++ suntzu-test/src/interpreter.h 2003-10-24 07:53:54.000000000 -0500 @@ -37,7 +37,7 @@ char *delete_doubledollar(char *string); * beginning of the command list.. change this value to 11 or 15 (depending) */ /* reserve these commands to come straight from the cmd list then start * sorting */ -#define RESERVE_CMDS 7 +#define RESERVE_CMDS 15 /* for compatibility with 2.20: */ #define argument_interpreter(a, b, c) two_arguments(a, b, c) @@ -93,6 +93,12 @@ struct alias_data { #define SCMD_WEST 4 #define SCMD_UP 5 #define SCMD_DOWN 6 +#define SCMD_NW 7 +#define SCMD_NE 8 +#define SCMD_SE 9 +#define SCMD_SW 10 +#define SCMD_IN 11 +#define SCMD_OUT 12 /* do_gen_ps */ #define SCMD_INFO 0 diff -BbuprN -x '*.o' -x conf.h suntzu/src/redit.c suntzu-test/src/redit.c --- suntzu/src/redit.c 2003-10-19 22:00:18.000000000 -0500 +++ suntzu-test/src/redit.c 2003-10-24 07:53:54.000000000 -0500 @@ -466,14 +466,14 @@ void redit_disp_menu(struct descriptor_d "%s2%s) Description :\r\n%s%s" "%s3%s) Room flags : %s%s\r\n" "%s4%s) Sector type : %s%s\r\n" - "%s5%s) Exit north : %s%d\r\n" - "%s6%s) Exit east : %s%d\r\n" - "%s7%s) Exit south : %s%d\r\n" - "%s8%s) Exit west : %s%d\r\n" - "%s9%s) Exit up : %s%d\r\n" - "%sA%s) Exit down : %s%d\r\n" - "%sB%s) Extra descriptions menu\r\n" - "%sD%s) Delete Room\r\n" + "%s5%s) Exit north : [%s%6d%s], %sB%s) Exit northwest : [%s%6d%s]\r\n" + "%s6%s) Exit east : [%s%6d%s], %sC%s) Exit northeast : [%s%6d%s]\r\n" + "%s7%s) Exit south : [%s%6d%s], %sD%s) Exit southeast : [%s%6d%s]\r\n" + "%s8%s) Exit west : [%s%6d%s], %sE%s) Exit southwest : [%s%6d%s]\r\n" + "%s9%s) Exit up : [%s%6d%s], %sF%s) Exit in : [%s%6d%s]\r\n" + "%sA%s) Exit down : [%s%6d%s], %sG%s) Exit out : [%s%6d%s]\r\n" + "%sH%s) Extra descriptions menu\r\n" + "%sX%s) Delete Room\r\n" "%sS%s) Script : %s%s\r\n" "%sQ%s) Quit\r\n" "Enter choice : ", @@ -486,22 +486,40 @@ void redit_disp_menu(struct descriptor_d grn, nrm, cyn, buf2, grn, nrm, cyn, room->dir_option[NORTH] && room->dir_option[NORTH]->to_room != NOWHERE ? - world[room->dir_option[NORTH]->to_room].number : -1, + world[room->dir_option[NORTH]->to_room].number : -1, nrm, + grn, nrm, cyn, + room->dir_option[NORTHWEST] && room->dir_option[NORTHWEST]->to_room != NOWHERE ? + world[room->dir_option[NORTHWEST]->to_room].number : -1, nrm, grn, nrm, cyn, room->dir_option[EAST] && room->dir_option[EAST]->to_room != NOWHERE ? - world[room->dir_option[EAST]->to_room].number : -1, + world[room->dir_option[EAST]->to_room].number : -1, nrm, + grn, nrm, cyn, + room->dir_option[NORTHEAST] && room->dir_option[NORTHEAST]->to_room != NOWHERE ? + world[room->dir_option[NORTHEAST]->to_room].number : -1, nrm, grn, nrm, cyn, room->dir_option[SOUTH] && room->dir_option[SOUTH]->to_room != NOWHERE ? - world[room->dir_option[SOUTH]->to_room].number : -1, + world[room->dir_option[SOUTH]->to_room].number : -1, nrm, + grn, nrm, cyn, + room->dir_option[SOUTHEAST] && room->dir_option[SOUTHEAST]->to_room != NOWHERE ? + world[room->dir_option[SOUTHEAST]->to_room].number : -1, nrm, grn, nrm, cyn, room->dir_option[WEST] && room->dir_option[WEST]->to_room != NOWHERE ? - world[room->dir_option[WEST]->to_room].number : -1, + world[room->dir_option[WEST]->to_room].number : -1, nrm, + grn, nrm, cyn, + room->dir_option[NORTHEAST] && room->dir_option[NORTHEAST]->to_room != NOWHERE ? + world[room->dir_option[NORTHEAST]->to_room].number : -1, nrm, grn, nrm, cyn, room->dir_option[UP] && room->dir_option[UP]->to_room != NOWHERE ? - world[room->dir_option[UP]->to_room].number : -1, + world[room->dir_option[UP]->to_room].number : -1, nrm, + grn, nrm, cyn, + room->dir_option[INDIR] && room->dir_option[INDIR]->to_room != NOWHERE ? + world[room->dir_option[INDIR]->to_room].number : -1, nrm, grn, nrm, cyn, room->dir_option[DOWN] && room->dir_option[DOWN]->to_room != NOWHERE ? - world[room->dir_option[DOWN]->to_room].number : -1, + world[room->dir_option[DOWN]->to_room].number : -1, nrm, + grn, nrm, cyn, + room->dir_option[OUTDIR] && room->dir_option[OUTDIR]->to_room != NOWHERE ? + world[room->dir_option[OUTDIR]->to_room].number : -1, nrm, grn, nrm, grn, nrm, grn, nrm, cyn, OLC_SCRIPT(d) ? "Set." : "Not Set.", @@ -611,6 +629,36 @@ void redit_parse(struct descriptor_data break; case 'b': case 'B': + OLC_VAL(d) = NORTHWEST; + redit_disp_exit_menu(d); + break; + case 'c': + case 'C': + OLC_VAL(d) = NORTHEAST; + redit_disp_exit_menu(d); + break; + case 'd': + case 'D': + OLC_VAL(d) = SOUTHEAST; + redit_disp_exit_menu(d); + break; + case 'e': + case 'E': + OLC_VAL(d) = SOUTHWEST; + redit_disp_exit_menu(d); + break; + case 'f': + case 'F': + OLC_VAL(d) = INDIR; + redit_disp_exit_menu(d); + break; + case 'g': + case 'G': + OLC_VAL(d) = OUTDIR; + redit_disp_exit_menu(d); + break; + case 'h': + case 'H': /* * If the extra description doesn't exist. */ @@ -619,8 +667,8 @@ void redit_parse(struct descriptor_data OLC_DESC(d) = OLC_ROOM(d)->ex_description; redit_disp_extradesc_menu(d); break; - case 'd': - case 'D': + case 'x': + case 'X': /* Delete the room, prompt first. */ write_to_output(d, "Are you sure you want to delete this room? "); OLC_MODE(d) = REDIT_DELETE; diff -BbuprN -x '*.o' -x conf.h suntzu/src/structs.h suntzu-test/src/structs.h --- suntzu/src/structs.h 2003-10-19 22:01:16.000000000 -0500 +++ suntzu-test/src/structs.h 2003-10-24 07:53:54.000000000 -0500 @@ -74,7 +74,12 @@ #define WEST 3 #define UP 4 #define DOWN 5 - +#define NORTHWEST 6 +#define NORTHEAST 7 +#define SOUTHEAST 8 +#define SOUTHWEST 9 +#define INDIR 10 +#define OUTDIR 11 /* Room flags: used in room_data.room_flags */ /* WARNING: In the world files, NEVER set the bits marked "R" ("Reserved") */ @@ -604,7 +609,7 @@ /* Level of the 'freeze' command */ #define LVL_FREEZE LVL_GRGOD -#define NUM_OF_DIRS 6 /* number of directions in a room (nsewud) */ +#define NUM_OF_DIRS 12 /* number of directions in a room (nsewud) */ #define MAGIC_NUMBER (0x06) /* Arbitrary number that won't be in a string */ /* diff -BbuprN -x '*.o' -x conf.h suntzu/src/vehicles.c suntzu-test/src/vehicles.c --- suntzu/src/vehicles.c 2003-10-19 22:00:18.000000000 -0500 +++ suntzu-test/src/vehicles.c 2003-10-24 07:53:54.000000000 -0500 @@ -209,7 +209,7 @@ ACMD(do_drive) is_abbrev(arg, "onto") ) { /* Driving into another vehicle */ drive_into_vehicle(ch, vehicle, arg2); - } else if (is_abbrev(arg, "outside")) { + } else if (is_abbrev(arg, "outside") && !EXIT(vehicle, OUTDIR)) { drive_outof_vehicle(ch, vehicle); } else if ((dir = search_block(arg, dirs, FALSE)) >= 0 ) { /* Drive in a direction... */