mirror of
https://github.com/tbamud/tbamud.git
synced 2025-09-21 21:40:49 +02:00
Added PRF_VERBOSE for toggling long output in where command.
Fixes #141
This commit is contained in:
parent
0c9fc332d8
commit
0649dd5962
3 changed files with 41 additions and 10 deletions
|
@ -1636,11 +1636,14 @@ static size_t print_object_location(const int num, const obj_data *obj, const ch
|
|||
nlen = snprintf(buf + len, buf_size - len, "carried by [%5d] %s%s\r\n", GET_MOB_VNUM(obj->carried_by), PERS(obj->carried_by, ch), QNRM);
|
||||
else
|
||||
nlen = snprintf(buf + len, buf_size - len, "carried by %s%s\r\n", PERS(obj->carried_by, ch), QNRM);
|
||||
if (PRF_FLAGGED(ch, PRF_SHOWVNUMS) && IN_ROOM(obj->carried_by) != NOWHERE && len + nlen < buf_size)
|
||||
if (PRF_FLAGGED(ch, PRF_VERBOSE) && IN_ROOM(obj->carried_by) != NOWHERE && len + nlen < buf_size)
|
||||
nlen += snprintf(buf + len + nlen, buf_size - len - nlen, "%37sin [%5d] %s%s\r\n", " - ", GET_ROOM_VNUM(IN_ROOM(obj->carried_by)), world[IN_ROOM(obj->carried_by)].name, QNRM);
|
||||
} else if (obj->worn_by) {
|
||||
nlen = snprintf(buf + len, buf_size - len, "worn by %s%s\r\n", PERS(obj->worn_by, ch), QNRM);
|
||||
if (PRF_FLAGGED(ch, PRF_SHOWVNUMS) && IN_ROOM(obj->worn_by) != NOWHERE && len + nlen < buf_size)
|
||||
if (PRF_FLAGGED(ch, PRF_SHOWVNUMS))
|
||||
nlen = snprintf(buf + len, buf_size - len, "worn by [%5d] %s%s\r\n", GET_MOB_VNUM(obj->worn_by), PERS(obj->worn_by, ch), QNRM);
|
||||
else
|
||||
nlen = snprintf(buf + len, buf_size - len, "worn by %s%s\r\n", PERS(obj->worn_by, ch), QNRM);
|
||||
if (PRF_FLAGGED(ch, PRF_VERBOSE) && IN_ROOM(obj->worn_by) != NOWHERE && len + nlen < buf_size)
|
||||
nlen += snprintf(buf + len + nlen, buf_size - len - nlen, "%37sin [%5d] %s%s\r\n", " - ", GET_ROOM_VNUM(IN_ROOM(obj->worn_by)), world[IN_ROOM(obj->worn_by)].name, QNRM);
|
||||
} else if (obj->in_obj) {
|
||||
nlen = snprintf(buf + len, buf_size - len, "inside %s%s%s\r\n", obj->in_obj->short_description, QNRM, (recur ? ", which is" : " "));
|
||||
|
@ -2001,6 +2004,9 @@ ACMD(do_toggle)
|
|||
{"pagelength", 0, 0, "\n", "\n"},
|
||||
{"screenwidth", 0, 0, "\n", "\n"},
|
||||
{"color", 0, 0, "\n", "\n"},
|
||||
{"verbose", PRF_VERBOSE, LVL_IMMORT,
|
||||
"You will no longer see verbose output in listings.\n",
|
||||
"You will now see verbose listings.\n"},
|
||||
{"\n", 0, -1, "\n", "\n"} /* must be last */
|
||||
};
|
||||
|
||||
|
@ -2034,7 +2040,8 @@ ACMD(do_toggle)
|
|||
" NoHassle: %-3s "
|
||||
" Holylight: %-3s "
|
||||
" ShowVnums: %-3s\r\n"
|
||||
" Syslog: %-3s%s ",
|
||||
" Syslog: %-3s "
|
||||
" Verbose: %-3s%s ",
|
||||
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_BUILDWALK)),
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_NOWIZ)),
|
||||
|
@ -2043,6 +2050,7 @@ ACMD(do_toggle)
|
|||
ONOFF(PRF_FLAGGED(ch, PRF_HOLYLIGHT)),
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_SHOWVNUMS)),
|
||||
types[(PRF_FLAGGED(ch, PRF_LOG1) ? 1 : 0) + (PRF_FLAGGED(ch, PRF_LOG2) ? 2 : 0)],
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_VERBOSE)),
|
||||
GET_LEVEL(ch) == LVL_IMPL ? "" : "\r\n");
|
||||
}
|
||||
if (GET_LEVEL(ch) >= LVL_IMPL) {
|
||||
|
|
|
@ -146,7 +146,8 @@ static void prefedit_disp_main_menu(struct descriptor_data *d)
|
|||
"%sImmortal Preferences\r\n"
|
||||
"%s1%s) Syslog Level %s[%s%8s%s] %s4%s) ClsOLC %s[%s%3s%s]\r\n"
|
||||
"%s2%s) Show Flags %s[%s%3s%s] %s5%s) No WizNet %s[%s%3s%s]\r\n"
|
||||
"%s3%s) No Hassle %s[%s%3s%s] %s6%s) Holylight %s[%s%3s%s]\r\n",
|
||||
"%s3%s) No Hassle %s[%s%3s%s] %s6%s) Holylight %s[%s%3s%s]\r\n"
|
||||
"%s7%s) Verbose %s[%s%3s%s] ",
|
||||
CBWHT(d->character, C_NRM),
|
||||
/* Line 1 - syslog and clsolc */
|
||||
CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM), CCCYN(d->character, C_NRM), CCYEL(d->character, C_NRM),
|
||||
|
@ -159,12 +160,17 @@ static void prefedit_disp_main_menu(struct descriptor_data *d)
|
|||
/* Line 3 - nohassle and holylight */
|
||||
CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM), CCCYN(d->character, C_NRM), CCYEL(d->character, C_NRM),
|
||||
ONOFF(PREFEDIT_FLAGGED(PRF_NOHASSLE)), CCCYN(d->character, C_NRM), CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM),
|
||||
CCCYN(d->character, C_NRM), CCYEL(d->character, C_NRM), ONOFF(PREFEDIT_FLAGGED(PRF_HOLYLIGHT)), CCCYN(d->character, C_NRM)
|
||||
CCCYN(d->character, C_NRM), CCYEL(d->character, C_NRM), ONOFF(PREFEDIT_FLAGGED(PRF_HOLYLIGHT)), CCCYN(d->character, C_NRM),
|
||||
/* Line 4 - Verbose */
|
||||
CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM), CCCYN(d->character, C_NRM), CCYEL(d->character, C_NRM),
|
||||
ONOFF(PREFEDIT_FLAGGED(PRF_VERBOSE)), CCCYN(d->character, C_NRM)
|
||||
);
|
||||
if (GET_LEVEL(PREFEDIT_GET_CHAR) == LVL_IMPL)
|
||||
send_to_char(d->character, "%s7%s) Zone Resets %s[%s%3s%s]\r\n",
|
||||
send_to_char(d->character, "%s8%s) Zone Resets %s[%s%3s%s]\r\n",
|
||||
CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM), CCCYN(d->character, C_NRM), CCYEL(d->character, C_NRM),
|
||||
ONOFF(PREFEDIT_FLAGGED(PRF_ZONERESETS)), CCCYN(d->character, C_NRM));
|
||||
else
|
||||
send_to_char(d->character, "\r\n");
|
||||
}
|
||||
|
||||
/* Finishing Off */
|
||||
|
@ -505,7 +511,19 @@ void prefedit_parse(struct descriptor_data * d, char *arg)
|
|||
}
|
||||
break;
|
||||
|
||||
case '7':
|
||||
case '7':
|
||||
if (GET_LEVEL(PREFEDIT_GET_CHAR) < LVL_IMMORT)
|
||||
{
|
||||
send_to_char(d->character, "%sInvalid choice!%s\r\n", CBRED(d->character, C_NRM), CCNRM(d->character, C_NRM));
|
||||
prefedit_disp_main_menu(d);
|
||||
}
|
||||
else
|
||||
{
|
||||
TOGGLE_BIT_AR(PREFEDIT_GET_FLAGS, PRF_VERBOSE);
|
||||
}
|
||||
break;
|
||||
|
||||
case '8':
|
||||
if (GET_LEVEL(PREFEDIT_GET_CHAR) < LVL_IMPL)
|
||||
{
|
||||
send_to_char(d->character, "%sInvalid choice!%s\r\n", CBRED(d->character, C_NRM), CCNRM(d->character, C_NRM));
|
||||
|
@ -901,6 +919,10 @@ void prefedit_Restore_Defaults(struct descriptor_data *d)
|
|||
if (PREFEDIT_FLAGGED(PRF_AUTODOOR))
|
||||
SET_BIT_AR(PREFEDIT_GET_FLAGS, PRF_AUTODOOR);
|
||||
|
||||
/* PRF_VERBOSE - On */
|
||||
if (PREFEDIT_FLAGGED(PRF_VERBOSE))
|
||||
SET_BIT_AR(PREFEDIT_GET_FLAGS, PRF_VERBOSE);
|
||||
|
||||
/* Other (non-toggle) options */
|
||||
PREFEDIT_GET_WIMP_LEV = 0; /* Wimpy off by default */
|
||||
PREFEDIT_GET_PAGELENGTH = 22; /* Default telnet screen is 22 lines */
|
||||
|
|
|
@ -262,9 +262,10 @@
|
|||
#define PRF_AUTOMAP 31 /**< Show map at the side of room descs */
|
||||
#define PRF_AUTOKEY 32 /**< Automatically unlock locked doors when opening */
|
||||
#define PRF_AUTODOOR 33 /**< Use the next available door */
|
||||
#define PRF_ZONERESETS 34
|
||||
#define PRF_ZONERESETS 34 /**< Show when zones reset */
|
||||
#define PRF_VERBOSE 35 /**< Listings like where are more verbose */
|
||||
/** Total number of available PRF flags */
|
||||
#define NUM_PRF_FLAGS 35
|
||||
#define NUM_PRF_FLAGS 36
|
||||
|
||||
/* Affect bits: used in char_data.char_specials.saved.affected_by */
|
||||
/* WARNING: In the world files, NEVER set the bits marked "R" ("Reserved") */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue