From 828fa48bb3ba20f2a146f85b905cd0cae5ee6d7c Mon Sep 17 00:00:00 2001 From: Rumble Date: Wed, 16 Dec 2009 01:07:25 +0000 Subject: [PATCH] [Dec 16 2009] - Rumble Added some missing code for last_ibt in ibt.c. Fixed typos in ibt.c (thanks Elervan) [Dec 13 2009] - Rumble Changed set password to level GRGOD. [Dec 08 2009] - Rumble Added "current zone:" to immortal score. --- changelog | 8 +++++++- src/act.informative.c | 3 +++ src/act.wizard.c | 2 +- src/ibt.c | 21 +++++++++++++++++++-- src/medit.c | 21 ++++++--------------- 5 files changed, 36 insertions(+), 19 deletions(-) diff --git a/changelog b/changelog index d76bef2..a77fda2 100644 --- a/changelog +++ b/changelog @@ -36,11 +36,17 @@ Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist) (lots of major bugfixes too) @ tbaMUD 3.61 +[Dec 16 2009] - Rumble + Added some missing code for last_ibt in ibt.c. + Fixed typos in ibt.c (thanks Elervan) +[Dec 13 2009] - Rumble + Changed set password to level GRGOD. +[Dec 08 2009] - Rumble + Added "current zone:" to immortal score. [Dec 07 2009] - Rumble Renumbered UNUSED triggers to UNUSED# to make it easier to unset them when changing trig types. (thanks Parna) Fixed double free in IBT that caused crash on /a or saving without any description. [Dec 06 2009] - Rumble - Fixed medit sex and position numbering. The numbering was wrong with the new column_list. Fixed medit autoroll so it would recognize a change and save. [Dec 05 2009] - Rumble Changed zedit clear level restrictions to dump you back at main zedit menu instead of in the level menu. diff --git a/src/act.informative.c b/src/act.informative.c index 3e3d4c7..f79dcfb 100644 --- a/src/act.informative.c +++ b/src/act.informative.c @@ -907,6 +907,9 @@ ACMD(do_score) send_to_char(ch, "%sPOOFOUT: %s%s %s%s\r\n", QYEL, QCYN, GET_NAME(ch), POOFOUT(ch), QNRM); else send_to_char(ch, "%sPOOFOUT: %s%s disappears in a puff of smoke.%s\r\n", QYEL, QCYN, GET_NAME(ch), QNRM); + + send_to_char(ch, "Your current zone: %s%d%s\r\n", CCCYN(ch, C_NRM), GET_OLC_ZONE(ch), + CCNRM(ch, C_NRM)); } } diff --git a/src/act.wizard.c b/src/act.wizard.c index 8fa995a..df86971 100644 --- a/src/act.wizard.c +++ b/src/act.wizard.c @@ -2741,7 +2741,7 @@ ACMD(do_show) { "nosummon", LVL_BUILDER, PC, BINARY }, /* 35 */ { "nowizlist", LVL_GRGOD, PC, BINARY }, { "olc", LVL_GRGOD, PC, MISC }, - { "password", LVL_IMPL, PC, MISC }, + { "password", LVL_GRGOD, PC, MISC }, { "poofin", LVL_IMMORT, PC, MISC }, { "poofout", LVL_IMMORT, PC, MISC }, /* 40 */ { "practices", LVL_GOD, PC, NUMBER }, diff --git a/src/ibt.c b/src/ibt.c index 7439935..f2180a1 100755 --- a/src/ibt.c +++ b/src/ibt.c @@ -47,7 +47,7 @@ const char *ibt_types[]={ "Bug", "Idea", "Typo", - "/n" + "\n" }; /* Internal (static) functions */ @@ -55,6 +55,7 @@ static IBT_DATA *new_ibt(void); static void free_ibt_list(IBT_DATA *first_ibt, IBT_DATA *last_ibt); static IBT_DATA *read_ibt(char *filename, FILE *fp); static IBT_DATA *get_first_ibt(int mode); +static IBT_DATA *get_last_ibt(int mode); /* Internal (static) OLC functions */ static void ibtedit_setup(struct descriptor_data *d); static void ibtedit_save(struct descriptor_data *d); @@ -332,6 +333,22 @@ static IBT_DATA *get_first_ibt(int mode) return (first_ibt); } +static IBT_DATA *get_last_ibt(int mode) +{ + IBT_DATA *last_ibt = NULL; + + switch(mode) { + case SCMD_BUG : last_ibt = last_bug; + break; + case SCMD_IDEA: last_ibt = last_idea; + break; + case SCMD_TYPO: last_ibt = last_typo; + break; + default : log("SYSERR: Invalid mode (%d) in get_last_ibt", mode); + break; + } + return (last_ibt); +} IBT_DATA *get_ibt_by_num(int mode, int target_num) { int no=0; @@ -407,7 +424,7 @@ ACMD(do_ibt) argument = two_arguments(argument, arg, arg2); first_ibt = get_first_ibt(subcmd); - last_ibt = get_first_ibt(subcmd); + last_ibt = get_last_ibt(subcmd); if ((!*arg)){ if (GET_LEVEL(ch) >= LVL_GRGOD){ diff --git a/src/medit.c b/src/medit.c index a2b8465..9cc8f9a 100644 --- a/src/medit.c +++ b/src/medit.c @@ -299,28 +299,19 @@ void medit_save_internally(struct descriptor_data *d) Display positions. (sitting, standing, etc) */ static void medit_disp_positions(struct descriptor_data *d) { - int i; - get_char_colors(d->character); clear_screen(d); - - for (i = 0; *position_types[i] != '\n'; i++) { - write_to_output(d, "%s%2d%s) %s\r\n", grn, i, nrm, position_types[i]); - } + column_list(d->character, 0, position_types, NUM_POSITIONS, TRUE); write_to_output(d, "Enter position number : "); } /* Display the gender of the mobile. */ static void medit_disp_sex(struct descriptor_data *d) { - int i; - get_char_colors(d->character); clear_screen(d); - - for (i = 0; i < NUM_GENDERS; i++) { - write_to_output(d, "%s%2d%s) %s\r\n", grn, i, nrm, genders[i]); - } + column_list(d->character, 0, genders, NUM_GENDERS, TRUE); + write_to_output(d, "Enter gender number : "); } /* Display attack types menu. */ @@ -868,7 +859,7 @@ void medit_parse(struct descriptor_data *d, char *arg) /* Numerical responses. */ case MEDIT_SEX: - GET_SEX(OLC_MOB(d)) = LIMIT(i, 0, NUM_GENDERS - 1); + GET_SEX(OLC_MOB(d)) = LIMIT(i - 1, 0, NUM_GENDERS - 1); break; case MEDIT_HITROLL: @@ -998,11 +989,11 @@ void medit_parse(struct descriptor_data *d, char *arg) return; case MEDIT_POS: - GET_POS(OLC_MOB(d)) = LIMIT(i, 0, NUM_POSITIONS - 1); + GET_POS(OLC_MOB(d)) = LIMIT(i - 1, 0, NUM_POSITIONS - 1); break; case MEDIT_DEFAULT_POS: - GET_DEFAULT_POS(OLC_MOB(d)) = LIMIT(i, 0, NUM_POSITIONS - 1); + GET_DEFAULT_POS(OLC_MOB(d)) = LIMIT(i - 1, 0, NUM_POSITIONS - 1); break; case MEDIT_ATTACK: