diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-19 03:10:09 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-19 03:10:09 +0000 |
commit | 5b3a525f14d218f3a8efec572ea347c2f6c13c3d (patch) | |
tree | 3aeb27a675d530c26bb2ea99b4a8bba9f8cb4925 /crawl-ref | |
parent | 5e0f84b95bab2e811578cd6021813fa5609e769d (diff) | |
download | crawl-ref-5b3a525f14d218f3a8efec572ea347c2f6c13c3d.tar.gz crawl-ref-5b3a525f14d218f3a8efec572ea347c2f6c13c3d.zip |
Removed detailed_hunger option, the hunger states near starving, very
hungry and very full are now always displayed.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2141 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/docs/crawl_options.txt | 6 | ||||
-rw-r--r-- | crawl-ref/init.txt | 2 | ||||
-rw-r--r-- | crawl-ref/source/externs.h | 1 | ||||
-rw-r--r-- | crawl-ref/source/food.cc | 84 | ||||
-rw-r--r-- | crawl-ref/source/initfile.cc | 5 | ||||
-rw-r--r-- | crawl-ref/source/output.cc | 96 |
6 files changed, 52 insertions, 142 deletions
diff --git a/crawl-ref/docs/crawl_options.txt b/crawl-ref/docs/crawl_options.txt index a2495f7e03..4270556da8 100644 --- a/crawl-ref/docs/crawl_options.txt +++ b/crawl-ref/docs/crawl_options.txt @@ -1458,12 +1458,6 @@ classic_item_colours = false This option will not affect the colour of existing items, only items generated after the option is set. -detailed_hunger = false - If set to true, then Crawl will tell you about three additional - hunger states: near starving, very hungry, and very full. - These hunger states are informational only, and have no effect - upon game play. - 6-b DOS and Windows. ------------------------ diff --git a/crawl-ref/init.txt b/crawl-ref/init.txt index 4a4108cb20..efe63ad663 100644 --- a/crawl-ref/init.txt +++ b/crawl-ref/init.txt @@ -271,8 +271,6 @@ message_colour = lightcyan:LOW MAGIC WARNING # # classic_item_colours = true # -# detailed_hunger = true -# # See crawl_options.txt for the options # char_set, cset_ascii, cset_ibm, cset_dec, cset_any, feature, mon_glyph diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index 8db0139a43..c0a379326a 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -1444,7 +1444,6 @@ public: bool no_dark_brand; // Attribute for branding friendly monsters bool macro_meta_entry; // Allow user to use numeric sequences when // creating macros - bool detailed_hunger; // Informational-only hunger levels int fire_items_start; // index of first item for fire command std::vector<unsigned> fire_order; // missile search order for 'f' command diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc index f2b8301a46..b0945f1fbf 100644 --- a/crawl-ref/source/food.cc +++ b/crawl-ref/source/food.cc @@ -563,77 +563,35 @@ static bool food_change(bool suppress_message) if (newstate != you.hunger_state) { - char oldstate = you.hunger_state; state_changed = true; you.hunger_state = newstate; set_redraw_status( REDRAW_HUNGER ); - // Stop the travel command, if it's in progress and we just got hungry - if (Options.detailed_hunger) - { - if (newstate < HS_SATIATED) - interrupt_activity( AI_HUNGRY ); - } - else - { - // Don't interrupt on changing from hungry to very hungry - // or very hungry to near starving if they don't want - // detailed hunger info. - if (newstate == HS_STARVING || - (newstate < HS_SATIATED && oldstate >= HS_SATIATED)) - interrupt_activity( AI_HUNGRY ); - - // Don't inform user of changing from hungry to very hungry - // or very hungry to near starving if they don't want - // detailed hunger info. - if (newstate < HS_SATIATED && oldstate < HS_SATIATED && - newstate != HS_STARVING) - suppress_message = true; - } + if (newstate < HS_SATIATED) + interrupt_activity( AI_HUNGRY ); if (suppress_message == false) { - if (Options.detailed_hunger) - { - switch (you.hunger_state) - { - case HS_STARVING: - mpr("You are starving!", MSGCH_FOOD); - learned_something_new(TUT_YOU_STARVING); - break; - case HS_HUNGRY: - mpr("You are feeling hungry.", MSGCH_FOOD); - learned_something_new(TUT_YOU_HUNGRY); - break; - case HS_VERY_HUNGRY: - mpr("You are feeling very hungry.", MSGCH_FOOD); - learned_something_new(TUT_YOU_HUNGRY); - break; - case HS_NEAR_STARVING: - mpr("You are near starving.", MSGCH_FOOD); - learned_something_new(TUT_YOU_HUNGRY); - break; - default: - break; - } - } - else + switch (you.hunger_state) { - switch (you.hunger_state) - { - case HS_STARVING: - mpr("You are starving!", MSGCH_FOOD); - learned_something_new(TUT_YOU_STARVING); - break; - case HS_HUNGRY: - case HS_VERY_HUNGRY: - case HS_NEAR_STARVING: - mpr("You are feeling hungry.", MSGCH_FOOD); - learned_something_new(TUT_YOU_HUNGRY); - break; - default: - break; - } + case HS_STARVING: + mpr("You are starving!", MSGCH_FOOD); + learned_something_new(TUT_YOU_STARVING); + break; + case HS_HUNGRY: + mpr("You are feeling hungry.", MSGCH_FOOD); + learned_something_new(TUT_YOU_HUNGRY); + break; + case HS_VERY_HUNGRY: + mpr("You are feeling very hungry.", MSGCH_FOOD); + learned_something_new(TUT_YOU_HUNGRY); + break; + case HS_NEAR_STARVING: + mpr("You are near starving.", MSGCH_FOOD); + learned_something_new(TUT_YOU_HUNGRY); + break; + default: + break; } } } diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index 7fcfe9b9d1..f37ac9da9b 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -662,7 +662,6 @@ void game_options::reset_options() assign_item_slot = SS_FORWARD; macro_meta_entry = true; - detailed_hunger = false; // 10 was the cursor step default on Linux. level_map_cursor_step = 7; @@ -2311,10 +2310,6 @@ void game_options::read_option_line(const std::string &str, bool runscript) { macro_meta_entry = read_bool(field, macro_meta_entry); } - else if (key == "detailed_hunger") - { - detailed_hunger = read_bool(field, detailed_hunger); - } else if (key == "stop_travel" || key == "travel_stop_message") { std::vector<std::string> fragments = split_string(",", field); diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc index cd7261a4a5..e3c60647f6 100644 --- a/crawl-ref/source/output.cc +++ b/crawl-ref/source/output.cc @@ -391,79 +391,45 @@ void print_stats(void) break; } - if (Options.detailed_hunger) + switch (you.hunger_state) { - switch (you.hunger_state) - { - case HS_ENGORGED: - textcolor( LIGHTGREEN ); - cprintf( "Engorged" ); - break; - - case HS_VERY_FULL: - textcolor( GREEN ); - cprintf( "Very Full" ); - break; - - case HS_FULL: - textcolor( GREEN ); - cprintf( "Full" ); - break; - - case HS_SATIATED: - break; - - case HS_HUNGRY: - textcolor( YELLOW ); - cprintf( "Hungry" ); - break; + case HS_ENGORGED: + textcolor( LIGHTGREEN ); + cprintf( "Engorged" ); + break; - case HS_VERY_HUNGRY: - textcolor( YELLOW ); - cprintf( "Very Hungry" ); - break; + case HS_VERY_FULL: + textcolor( GREEN ); + cprintf( "Very Full" ); + break; - case HS_NEAR_STARVING: - textcolor( YELLOW ); - cprintf( "Near Starving" ); - break; + case HS_FULL: + textcolor( GREEN ); + cprintf( "Full" ); + break; - case HS_STARVING: - textcolor( RED ); - cprintf( "Starving" ); - break; - } - } - else - { - switch (you.hunger_state) - { - case HS_ENGORGED: - textcolor( LIGHTGREEN ); - cprintf( "Engorged" ); - break; + case HS_SATIATED: + break; - case HS_VERY_FULL: - case HS_FULL: - textcolor( GREEN ); - cprintf( "Full" ); - break; + case HS_HUNGRY: + textcolor( YELLOW ); + cprintf( "Hungry" ); + break; - case HS_SATIATED: - break; + case HS_VERY_HUNGRY: + textcolor( YELLOW ); + cprintf( "Very Hungry" ); + break; - case HS_HUNGRY: - case HS_VERY_HUNGRY: - case HS_NEAR_STARVING: - textcolor( YELLOW ); - cprintf( "Hungry" ); - break; + case HS_NEAR_STARVING: + textcolor( YELLOW ); + cprintf( "Near Starving" ); + break; - case HS_STARVING: - textcolor( RED ); - cprintf( "Starving" ); - break; - } + case HS_STARVING: + textcolor( RED ); + cprintf( "Starving" ); + break; } textcolor( LIGHTGREY ); |