diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-13 12:37:07 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-13 12:37:07 +0000 |
commit | 38f4816dab5c71b632cc06748f531282f158e91c (patch) | |
tree | 4984aa0b0d734a18a8833136df0874261520163a /crawl-ref/source/clua.cc | |
parent | f19ffb0cf2b7db6897674d73191525cb54831723 (diff) | |
download | crawl-ref-38f4816dab5c71b632cc06748f531282f158e91c.tar.gz crawl-ref-38f4816dab5c71b632cc06748f531282f158e91c.zip |
'q' (or Escape) when prompted for food on the floor now cancels out of
eating completely, rather than moving to inventory.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2847 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/clua.cc')
-rw-r--r-- | crawl-ref/source/clua.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/crawl-ref/source/clua.cc b/crawl-ref/source/clua.cc index 2bca2b3562..3f9c7b55b9 100644 --- a/crawl-ref/source/clua.cc +++ b/crawl-ref/source/clua.cc @@ -1510,10 +1510,14 @@ static int food_do_eat(lua_State *ls) static int food_prompt_floor(lua_State *ls) { - bool eaten = false; - if (!you.turn_is_over && (eaten = eat_from_floor())) - burden_change(); - lua_pushboolean(ls, eaten); + int eaten = 0; + if (!you.turn_is_over) + { + eaten = eat_from_floor(); + if ( eaten == 1 ) + burden_change(); + } + lua_pushboolean(ls, (eaten != 0)); return (1); } |