sound cleanup
+ Separate the two uses of flags.soundok. + Player-settable option is now called "acoustics". + Deafness is now handled as a full-fledged attribute. + Check for deafness in You_hear(), rather than caller. + Check for deafness in caller, rather than verbalize(), because gods can speak to characters in spite of deafness. + Since changes are being made to prop.h, reorder it to the same order as youprop.h and enlightenment. There are still some extraneous checks and missing checks for deafness, which will be followed up in a future patch. Because of the size of this patch and its savefile incompatibilities, it is only being applied to the trunk code. Portions of this patch were written by Michael Allison.
This commit is contained in:
10
src/shk.c
10
src/shk.c
@@ -321,7 +321,7 @@ register boolean nearshop;
|
||||
|
||||
if(!shkp) return;
|
||||
|
||||
if (flags.soundok)
|
||||
if (!Deaf)
|
||||
pline("An alarm sounds!");
|
||||
|
||||
nokops = ((mvitals[PM_KEYSTONE_KOP].mvflags & G_GONE) &&
|
||||
@@ -329,8 +329,8 @@ register boolean nearshop;
|
||||
(mvitals[PM_KOP_LIEUTENANT].mvflags & G_GONE) &&
|
||||
(mvitals[PM_KOP_KAPTAIN].mvflags & G_GONE));
|
||||
|
||||
if(!angry_guards(!flags.soundok) && nokops) {
|
||||
if(flags.verbose && flags.soundok)
|
||||
if(!angry_guards(!!Deaf) && nokops) {
|
||||
if(flags.verbose && !Deaf)
|
||||
pline("But no one seems to respond to it.");
|
||||
return;
|
||||
}
|
||||
@@ -2994,7 +2994,7 @@ register boolean croaked;
|
||||
pline("Suddenly, the trap is removed from the floor!");
|
||||
else if (inside_shop(u.ux, u.uy) == ESHK(shkp)->shoproom)
|
||||
You_feel("more claustrophobic than before.");
|
||||
else if (flags.soundok && !rn2(10))
|
||||
else if (!Deaf && !rn2(10))
|
||||
Norep("The dungeon acoustics noticeably change.");
|
||||
}
|
||||
if (stop_picking)
|
||||
@@ -3482,7 +3482,7 @@ boolean cant_mollify;
|
||||
* yanked the hapless critter out of the way.
|
||||
*/
|
||||
if (MON_AT(x, y)) {
|
||||
if(flags.soundok) {
|
||||
if(!Deaf) {
|
||||
You_hear("an angry voice:");
|
||||
verbalize("Out of my way, scum!");
|
||||
wait_synch();
|
||||
|
||||
Reference in New Issue
Block a user