From ba83b532b160a372197cc69b3891bdefb48bb82f Mon Sep 17 00:00:00 2001 From: JamDog Date: Thu, 16 Dec 2010 00:32:58 +0000 Subject: [PATCH] Minor bug fixes and ZONE_WORLDMAP flag --- changelog | 4 ++++ src/asciimap.c | 12 +++++++++++- src/constants.c | 2 ++ src/medit.c | 1 + src/oasis_list.c | 4 ++-- src/structs.h | 3 ++- 6 files changed, 22 insertions(+), 4 deletions(-) diff --git a/changelog b/changelog index 2ce1a07..3089675 100644 --- a/changelog +++ b/changelog @@ -35,6 +35,10 @@ export (QQ's a zone into a tarball) Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist) (lots of major bugfixes too) @ +[Dec 10 2010] - Jamdog + Minor bug fixes, added MAIL flag names and fixed compile warnings + Bug Fix: Alignment in medit now saves when it's the only thing edited (thanks cosine_omerta) + Added ZONE_WORLDMAP flag to set a whole zone to worldmap style maps [Dec 08 2010] - Jamdog Added olist page_string now uses player's screen width and correctly parses ANSI color codes diff --git a/src/asciimap.c b/src/asciimap.c index 1911dfa..9d5579b 100644 --- a/src/asciimap.c +++ b/src/asciimap.c @@ -589,6 +589,16 @@ MapArea(target_room, ch, centre, centre, min, max, ns_size/2, ew_size/2, worldma } +bool show_worldmap(struct char_data *ch) { + room_rnum rm = IN_ROOM(ch); + zone_rnum zn = GET_ROOM_ZONE(rm); + + if (ROOM_FLAGGED(rm, ROOM_WORLDMAP)) return TRUE; + if (ZONE_FLAGGED(zn, ZONE_WORLDMAP)) return TRUE; + + return FALSE; +} + ACMD(do_map) { if (!can_see_map(ch)) { send_to_char(ch, "Sorry, the map is disabled!\r\n"); @@ -601,7 +611,7 @@ ACMD(do_map) { send_to_char(ch, "You can't see the map while blind!\r\n"); return; } - perform_map(ch, argument, ROOM_FLAGGED(IN_ROOM(ch), ROOM_WORLDMAP) ? 1 : 0 ); + perform_map(ch, argument, show_worldmap(ch)); } diff --git a/src/constants.c b/src/constants.c index 4d2a414..d133821 100644 --- a/src/constants.c +++ b/src/constants.c @@ -159,6 +159,7 @@ const char *room_bits[] = { "OLC", "*", /* The BFS Mark. */ "WORLDMAP", + "MAIL", "\n" }; @@ -285,6 +286,7 @@ const char *action_bits[] = { "NO_BASH", "NO_BLIND", "NO_KILL", + "MAILMAN", "DEAD", /* You should never see this. */ "\n" }; diff --git a/src/medit.c b/src/medit.c index ad7e835..85dc273 100644 --- a/src/medit.c +++ b/src/medit.c @@ -1058,6 +1058,7 @@ void medit_parse(struct descriptor_data *d, char *arg) case MEDIT_ALIGNMENT: GET_ALIGNMENT(OLC_MOB(d)) = LIMIT(i, -1000, 1000); + OLC_VAL(d) = TRUE; medit_disp_stats_menu(d); return; diff --git a/src/oasis_list.c b/src/oasis_list.c index 60a1928..1f27194 100644 --- a/src/oasis_list.c +++ b/src/oasis_list.c @@ -384,8 +384,8 @@ ACMD(do_oasis_list) send_to_char(ch, "Usage: %smlist %s - List mobiles in a zone\r\n", QYEL, QNRM); send_to_char(ch, " %smlist %s - List a range of mobiles by vnum\r\n", QYEL, QNRM); send_to_char(ch, " %smlist level %s - List all mobiles of a specified level\r\n", QYEL, QNRM); - send_to_char(ch, " %smlist flags %s - List all mobiles with flag set\r\n", QYEL, QNRM, MAX_OBJ_LIST); - send_to_char(ch, "Just type %smlist flags%s to view available options.\r\n", QYEL, QNRM, QYEL, QNRM); + send_to_char(ch, " %smlist flags %s - List all mobiles with flag set\r\n", QYEL, QNRM); + send_to_char(ch, "Just type %smlist flags%s to view available options.\r\n", QYEL, QNRM); return; } else if (is_abbrev(arg, "level") || is_abbrev(arg, "flags")) { diff --git a/src/structs.h b/src/structs.h index 3f54ebe..9c1e375 100644 --- a/src/structs.h +++ b/src/structs.h @@ -103,8 +103,9 @@ #define ZONE_GRID 3 /**< Zone is 'on the grid', connected, show on 'areas' */ #define ZONE_NOBUILD 4 /**< Building is not allowed in the zone */ #define ZONE_NOASTRAL 5 /**< No teleportation magic will work to or from this zone */ +#define ZONE_WORLDMAP 6 /**< Whole zone uses the WORLDMAP by default */ /** The total number of Zone Flags */ -#define NUM_ZONE_FLAGS 6 +#define NUM_ZONE_FLAGS 7 /* Exit info: used in room_data.dir_option.exit_info */ #define EX_ISDOOR (1 << 0) /**< Exit is a door */