====== Food Item - Code References ====== ===== Java Classes ===== * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/items/food/Food.java|Food.java]] - Base abstract class for all food items * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/items/food/ChargrilledMeat.java|ChargrilledMeat.java]] - Chargrilled meat food item * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/items/food/MysteryMeat.java|MysteryMeat.java]] - Mystery meat food item * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/items/food/RottenMeat.java|RottenMeat.java]] - Rotten meat food item * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/items/food/Pasty.java|Pasty.java]] - Pasty food item * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/items/food/PseudoPasty.java|PseudoPasty.java]] - Pseudo-pasty food item * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/items/food/Ration.java|Ration.java]] - Food ration item * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/items/food/SmallRation.java|SmallRation.java]] - Small food ration item * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/items/food/Fruit.java|Fruit.java]] - Fruit food item * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/items/food/Berry.java|Berry.java]] - Berry food item ===== JSON Configuration ===== Food items are primarily implemented in Java. Some food-related configurations may exist in: * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/levelsDesc/Dungeon.json|Dungeon.json]] - Dungeon configuration with food spawn rates * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/mobsDesc/Bestiary.json|Bestiary.json]] - Mob drop tables that may include food items ===== String Resources ===== That food tasted delicious. chargrilled meat It looks like a decent steak. mystery meat It's mystery meat. rotten meat A piece of rotten meat pasty This is an authentic Cornish pasty with traditional filling of beef and potato. food ration It's a large cube of dried meat. small ration Tastes like dried meat. fruit It's a juicy fruit. berry It's a small berry. ===== Lua Scripts ===== Food items are primarily implemented in Java. No specific Lua scripts exist for basic food items. ===== Implementation Details ===== * **Base Class**: `com.watabou.pixeldungeon.items.food.Food` * **Entity Kind**: Varies by subclass (e.g., "Food", "ChargrilledMeat", "MysteryMeat", "RottenMeat", "Pasty", "Ration") * **Sprite**: Defined in [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/sprites/ItemSpriteSheet.java|ItemSpriteSheet]] * **Default Action**: `CommonActions.AC_EAT` * **Time to Eat**: 3 turns (TIME_TO_EAT constant) * **Stackable**: Yes (stackable = true) * **Identified**: Yes (isIdentified() returns true) * **Upgradable**: No (isUpgradable() returns false) ===== Food Mechanics ===== * **Energy**: Each food item provides energy value (varies by type) * **Satiation**: Food restores hunger/satiation meter * **Eating Time**: Takes 3 turns to consume any food item * **Message**: Custom message displayed when eating (defined in each food subclass) ===== Related mr Entities ===== * [[mr:chargrilled_meat_item|Chargrilled Meat (Item)]] * [[mr:mystery_meat_item|Mystery Meat (Item)]] * [[mr:rotten_meat_item|Rotten Meat (Item)]] * [[mr:pasty_item|Pasty (Item)]] * [[mr:ration_item|Food Ration (Item)]]