I used Lharc's post to make a start with the blind toggle. Btw, why do we need a braille and an audio toggle? I can imagine you want to skip the graphical stuff for both but what's the difference between them?
Anyway, here's the code. I only did worth and tier so far, should i keep working on it?
diff --git a/act.informative.cpp b/act.informative.cpp
index 5d086e1..581a6a3 100755
--- a/act.informative.cpp
+++ b/act.informative.cpp
@@ -751,7 +751,14 @@ void list_one_char ( Character *i, Character *ch )
return;
}
}
- ch->Send ( "%s%s", TIER_COLOUR_LIST ( ( IS_NPC ( i ) ? MOB_TIER ( i ) : current_class_is_tier_num ( i ) ) ) , CBCYN ( ch, C_NRM ) );
+
+ if ( PRF_FLAGGED ( ch, PRF_BRAILLE ))
+ {
+ char tier_string[] = "T0.";
+ tier_string[1] += ( IS_NPC ( i ) ? MOB_TIER ( i ) : current_class_is_tier_num ( i ) );
+ ch->Send ( "%s%s", tier_string, CBCYN ( ch, C_NRM ) );
+ }
+ else ch->Send ( "%s%s", TIER_COLOUR_LIST ( ( IS_NPC ( i ) ? MOB_TIER ( i ) : current_class_is_tier_num ( i ) ) ) , CBCYN ( ch, C_NRM ) );
if ( AFF_FLAGGED ( i, AFF_POLY_TOAD ) )
{
@@ -4868,7 +4875,7 @@ ACMD ( do_toggle )
" Keep Title: %-3s "
" IC Channel: %-3s\r\n"
" Color Level: %-8s"
- " NoBattlespam: %-3s "
+ " NoBattlespam: %-3s "
" NoMail Prompt: %-3s\r\n"
" NOCTalk: %-3s "
" AFKTELL: %-3s "
@@ -4888,7 +4895,9 @@ ACMD ( do_toggle )
" NOGATE: %-3s "
" FishTally: %-3s "
" NOTELEPORT: %-3s\r\n"
- " NoDisplayTitle: %-3s ",
+ " NoDisplayTitle: %-3s "
+ " Audio Mode: %-3s "
+ " Braille Mode: %-3s\r\n",
ONOFF ( PRF_FLAGGED ( ch, PRF_DISPHP ) ),
ONOFF ( PRF_FLAGGED ( ch, PRF_BRIEF ) ),
ONOFF ( !PRF_FLAGGED ( ch, PRF_SUMMONABLE ) ),
@@ -4935,7 +4944,9 @@ ACMD ( do_toggle )
ONOFF ( !PRF_FLAGGED ( ch, PRF_GATEABLE ) ),
ONOFF ( !PRF_FLAGGED ( ch, PRF_FISHPROMPT ) ),
ONOFF ( !PRF_FLAGGED ( ch, PRF_TELEPORTABLE ) ),
- ONOFF ( !PRF_FLAGGED ( ch, PRF_NOTITLE) )
+ ONOFF ( !PRF_FLAGGED ( ch, PRF_NOTITLE) ),
+ ONOFF ( PRF_FLAGGED ( ch, PRF_AUDIO) ),
+ ONOFF ( PRF_FLAGGED ( ch, PRF_BRAILLE) )
);
}
@@ -5287,6 +5298,48 @@ ACMD ( do_worth )
if ( GET_MASTERY ( ch, i ) )
len += snprintf ( buf+len, sizeof ( buf ) - len, "%c ", UPPER ( *pc_class_types[i] ) );
+ if ( PRF_FLAGGED ( ch, PRF_BRAILLE ))
+ {
+ ch->Send ( "\r\n"
+ "{cwRemorts: {cg%-3d{cy 1:%3s 2:%3s 3:%3s \r\n"
+ "{cwNatural Accuracy Rating: {cg%-3d{cy \r\n"
+ "{cwNatural Evasion Rating: {cg%-3d{cy \r\n"
+ "{cwRegenerating per mud hour:{cy \r\n"
+ "{cyHp:{cc%-3d{cy Ma:{cc%-3d{cy Mv:{cc%-3d{cy St:{cc%-3d{cy \r\n"
+ "{cwHead And Neck Armor: {cL%%%-3d{cy \r\n"
+ "{cwUpper Left Body Armor: {cL%%%-3d{cy \r\n"
+ "{cwUpper Right Body Armor: {cL%%%-3d{cy \r\n"
+ "{cwTorso Armor: {cL%%%-3d{cy \r\n"
+ "{cwLower Left Body Armor: {cL%%%-3d{cy \r\n"
+ "{cwLower Right Body Armor: {cL%%%-3d{cy \r\n"
+ "{cwCoolness: {cg%-3d{cy \r\n"
+ "{cwAward Points: {cg%-3d{cw Ethos: {cg%-3s{cy \r\n"
+ "{cwStamina: {cC%d/%d{cw Detector: {cg%-3s{cy \r\n"
+ "{cwMastered Classes: {cg%s{cy\r\n"
+ "{cwElemental Weakness: {cr%s{cy\r\n"
+ "{cwElemental Strength: {cc%s{cy\r\n",
+ REMORTS ( ch ),
+ GET_REMORT ( ch ) == -1 ? "---" : class_abbrevs[ ( int ) GET_REMORT ( ch ) ],
+ GET_REMORT_TWO ( ch ) == -1 ? "---" : class_abbrevs[ ( int ) GET_REMORT_TWO ( ch ) ],
+ GET_REMORT_THREE ( ch ) == -1 ? "---" : class_abbrevs[ ( int ) GET_REMORT_THREE ( ch ) ],
+ GET_PERM_ACCURACY ( ch ),
+ GET_PERM_EVASION ( ch ),
+ hit_gain ( ch ), mana_gain ( ch ), move_gain ( ch ), stamina_gain ( ch ),
+ chance_hit_part ( ch, PART_HEAD ),
+ chance_hit_part ( ch, PART_LEFT_ARM ),
+ chance_hit_part ( ch, PART_RIGHT_ARM ),
+ chance_hit_part ( ch, PART_TORSO ),
+ chance_hit_part ( ch, PART_LEFT_LEG ),
+ chance_hit_part ( ch, PART_LEFT_LEG ),
+ GET_COOLNESS ( ch ),
+ update_award ( ch ), *ethos,
+ GET_STAMINA ( ch ), GET_MAX_STAMINA ( ch ), *detector,
+ buf,
+ print_elemental ( GET_CLASS ( ch ), TRUE, buf1, sizeof ( buf1 ) ),
+ print_elemental ( GET_CLASS ( ch ), FALSE, buf2, sizeof ( buf2 ) ) );
+ return;
+ }
+
ch->Send ( "\r\n{cy"
"O=====================================================================O\r\n"
"|%-32s{cy|#| {cwRemorts: {cg%-3d{cy 1:%3s 2:%3s 3:%3s \r\n"
diff --git a/act.other.cpp b/act.other.cpp
index ca465af..060f51c 100755
--- a/act.other.cpp
+++ b/act.other.cpp
@@ -1528,8 +1528,11 @@ ACMD ( do_gen_tog )
{ "You will NOT automaticly agree to group people when they request to follow.\r\n",
"You will automaticly agree to group people when they request to follow.\r\n"},
{"You will no longer see players' full titles.\r\n",
- "You can now see players' full titles.\r\n"}
-
+ "You can now see players' full titles.\r\n"},
+ {"Audio mode off.\r\n",
+ "Audio mode on.\r\n"},
+ {"Braille mode off.\r\n",
+ "Braille mode on.\r\n"},
};
@@ -1723,6 +1726,12 @@ ACMD ( do_gen_tog )
case SCMD_NOTITLE1:
result = PRF_TOG_CHK ( ch, PRF_NOTITLE );
break;
+ case SCMD_AUDIO:
+ result = PRF_TOG_CHK ( ch, PRF_AUDIO );
+ break;
+ case SCMD_BRAILLE:
+ result = PRF_TOG_CHK ( ch, PRF_BRAILLE );
+ break;
default:
log ( "SYSERR: Unknown subcmd %d in do_gen_toggle.", subcmd );
return;
diff --git a/interpreter.cpp b/interpreter.cpp
index 2131c05..8d0e6a6 100755
--- a/interpreter.cpp
+++ b/interpreter.cpp
@@ -500,6 +500,7 @@ const command_info cmd_info[] =
{ "ask" , "ask" , POS_RESTING , do_spec_comm, 0, SCMD_ASK, 0 },
{ "auction" , "auc" , POS_RESTING , do_auction , 1, 0, 0 },
{ "auctalk" , "auct" , POS_SLEEPING, do_gen_comm , 0, SCMD_AUCTION, 0 },
+ { "audio" , "audio", POS_DEAD , do_gen_tog , 0, SCMD_AUDIO, 0 },
{ "autoassist","autoa", POS_DEAD , do_gen_tog , 0, SCMD_AUTOASSIST, 0 },
{ "autocompress","autoc", POS_DEAD , do_gen_tog , 0, SCMD_AUTOZLIB, 0 },
{ "autoexit" , "autoe", POS_DEAD , do_gen_tog , 0, SCMD_AUTOEXIT, 0 },
@@ -520,6 +521,7 @@ const command_info cmd_info[] =
{ "bid" , "bid" , POS_RESTING , do_bid , 1, 0, 0 },
{ "blowup" , "blow" , POS_STANDING, do_blowup , LVL_SEN, 0, WIZ_IMPL_GRP},
{ "bprompt" , "bpromp", POS_DEAD , /*do_display*/ do_prompt_new , 0, SCMD_BPROMPT, 0 },
+ { "braille" , "braille", POS_DEAD , do_gen_tog , 0, SCMD_BRAILLE, 0 },
{ "brief" , "br" , POS_DEAD , do_gen_tog , 0, SCMD_BRIEF, 0 },
//{ "brew" , "brew" , POS_SITTING , do_assemble , 0, SUB_BREW, 0 },
{ "buildwalk", "buildwalk", POS_STANDING, do_gen_tog, LVL_IMMORT, SCMD_BUILDWALK, WIZ_OLC_GRP },
diff --git a/interpreter.h b/interpreter.h
index eadace9..164e98a 100755
--- a/interpreter.h
+++ b/interpreter.h
@@ -193,7 +193,9 @@ struct alias_data {
#define SCMD_FISHTALLY 48
#define SCMD_NOTELEPORT 49
#define SCMD_AUTOGROUP 50
-#define SCMD_NOTITLE1 51
+#define SCMD_NOTITLE1 51
+#define SCMD_AUDIO 52
+#define SCMD_BRAILLE 53
/* do_wizutil */
#define SCMD_REROLL 0
diff --git a/structs.h b/structs.h
index 0fd987d..534979d 100755
--- a/structs.h
+++ b/structs.h
@@ -665,6 +665,8 @@ class Room;
#define PRF_RETIRED 55 /* For retired clan leaders */
#define PRF_NOTITLE 56
#define PRF_DEED_MASTER 57
+#define PRF_AUDIO 58 /* For players with an audio converter */
+#define PRF_BRAILLE 59 /* For players with a braille converter */
/* Descriptor flags */
#define DESC_CANZLIB (1 << 0) /* Client says compression capable. */