diff options
author | Nicholas Feinberg <pleasingfung@gmail.com> | 2014-07-04 13:22:50 -0700 |
---|---|---|
committer | Nicholas Feinberg <pleasingfung@gmail.com> | 2014-07-04 13:27:57 -0700 |
commit | 6ac7d81753c15112e4a9e6ba03f0dca6ffea0c11 (patch) | |
tree | 390e743fbaaeb69d4e35de2430efbde971bc4571 /crawl-ref/source/l_food.cc | |
parent | cd56c43f5f521a65129bce5d809650d16fa37553 (diff) | |
download | crawl-ref-6ac7d81753c15112e4a9e6ba03f0dca6ffea0c11.tar.gz crawl-ref-6ac7d81753c15112e4a9e6ba03f0dca6ffea0c11.zip |
Revert "don't eat off the floor (aef094f7fd7. 9c21a484839)"
It was enormously inconvenient, especially now that weightless
means that everyone's running around with 52-item inventories,
and didn't offer any strong benefits beyond the ideological.
It would be better to have a unified "use items from the floor"
interface, which would essentially turn this into a special case,
but until then, let players eat in however unsanitary a manner
they please.
Diffstat (limited to 'crawl-ref/source/l_food.cc')
-rw-r--r-- | crawl-ref/source/l_food.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crawl-ref/source/l_food.cc b/crawl-ref/source/l_food.cc index e76a464a11..8efc4be418 100644 --- a/crawl-ref/source/l_food.cc +++ b/crawl-ref/source/l_food.cc @@ -31,6 +31,15 @@ static int food_prompt_eat_chunks(lua_State *ls) return 1; } +static int food_prompt_floor(lua_State *ls) +{ + int eaten = 0; + if (!you.turn_is_over) + eaten = eat_from_floor(); + lua_pushboolean(ls, (eaten != 0)); + return 1; +} + static int food_prompt_inventory(lua_State *ls) { bool eaten = false; @@ -140,6 +149,7 @@ static const struct luaL_reg food_lib[] = { { "do_eat", food_do_eat }, { "prompt_eat_chunks", food_prompt_eat_chunks }, + { "prompt_floor", food_prompt_floor }, { "prompt_inventory", food_prompt_inventory }, { "prompt_inv_menu", food_prompt_inventory_menu }, { "can_eat", food_can_eat }, |