summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_food.cc
Commit message (Collapse)AuthorAgeFilesLines
* Revert "don't eat off the floor (aef094f7fd7. 9c21a484839)"Nicholas Feinberg2014-07-041-0/+10
| | | | | | | | | | | 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.
* Disallow eating off the ground for non-vampires.Shmuale Mark2014-07-021-10/+0
| | | | | It makes the 'e' key less consistent for no obvious benefit. Not to mention that it's incredibly unsanitary.
* Remove player burden and carrying capacitygammafunk2014-05-261-4/+0
| | | | | | | | | | | Item inventory weights (based on item mass) generally don't lead to meaningful decisions that justify the inventory juggling and interface problems that come from having burden states. The 52-slot limit is a better system for limiting inventory and providing inventory-related decisions because it's not so fine-grained and doesn't require the player to examine weights for each slot. Work is ongoing to improve the slot system by consolidating food types and handling strategic consumables in a different way.
* Clean up item eating codeCedor2013-12-121-27/+5
| | | | | | Remove eat_item() from l_food.cc (code inserted in unique caller food_eat()), and use it in food.cc in place of the 2 duplicated functions eat_floor_item() and eat_inventory_item()
* Lua functions food.ismeaty(), food.isveggie().Neil Moore2013-08-101-0/+16
|
* Drop parentheses around scalar values in "return".Adam Borowski2012-07-051-14/+14
|
* Fix a crash on demand on lua food.eat(potion)Adam Borowski2012-06-281-0/+6
|
* Clean up an unused argument.Adam Borowski2011-10-111-4/+2
|
* Fix misinformation when clicking on rotten chunks as a non-saprovore.Johanna Ploog2011-02-171-10/+2
| | | | | | The returned message was "You're not hungry enough" which is completely misleading. Fixed by adding a can_ingest variant that gets the item itself rather than base and subtype, so we can check for rottenness.
* Add lua wrapper for is_fruit.Robert Vollmert2010-03-081-0/+8
| | | | | I went with food.isfruit next to food.ischunk; it would also have fit into the item wrapper.
* Convert items Lua library to use metatable. May case end-user issues.Jude Brown2010-01-241-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like the monster library, the item library now uses a metatable to store its functions. Instead of using lightuserdata, as before, and passing this to the different item.* functions, the functions are now members of the actual item. The item library has also been renamed to "items": this allows for its use in Vault definitions without it clashing with the item specifier and dgn.item function. Example: * Previously, you would use: local x = item.inventory()[1] print(item.name(x, false)) * Now, you would use: local x = items.inventory()[1] print(x.name(false)) This will have an impact on end-user scripts that use the old version of the item library. I have already updated the uses of the items library in the dat/lua scripts, as well as vault definitions and marker definitions. I think I've caught them all. There may be bugs or issues, but hopefully that's everything. (Does cause issues with annotations such as {artefact}, will be fixed shortly.)
* Split itemprop enums out into itemprop-enum.h.Robert Vollmert2009-11-171-0/+1
| | | | Other headers now don't need to include all of itemprop.h.
* Move more macros and functions to cluautil.cc.Robert Vollmert2009-10-211-1/+1
|
* Move remaining libraries from clua.cc.Robert Vollmert2009-10-201-0/+174
That's l_file.cc, l_food.cc, l_global.cc.