RottenFood is the base class for all spoiled food items in Remixed Dungeon. Rotten food has negative effects when consumed but can be purified into edible food.
Item Base Class (Food Category)
RottenFood Base Class: RottenFood.java
Subclasses:
Item Factory: ItemFactory.java
Food Base Class: Food.java
Moistening Mechanics: Potion.java (moistenRottenFood)
Implemented in Java, no JSON configuration for base class. Subclasses registered in ItemFactory.
English (values/strings_all.xml):
<!-- RottenRation --> <string name="RottenRation_Name">rotten ration</string> <string name="RottenRation_Info">it might once have been a ration, now it\'s just disgusting</string> <!-- RottenMeat --> <string name="RottenMeat_Name">rotten meat</string> <string name="RottenMeat_Info">this meat has gone bad, but fire could make it edible again</string> <!-- RottenPasty --> <string name="RottenPasty_Name">rotten pasty</string> <string name="RottenPasty_Info">it might once have been a pasty, now it\'s just disgusting</string> <!-- RottenPumpkinPie --> <string name="RottenPumpkinPie_Name">rotten pumpkin pie</string> <string name="RottenPumpkinPie_Info">this pie looks revolting, but can be restored</string> <!-- RottenFish --> <string name="RottenFish_Name">rotten fish</string> <string name="RottenFish_Info">this fish smells terrible, but cooking might help</string>
Russian (values-ru/strings_all.xml):
<string name="RottenRation_Name">испорченный пайок</string> <string name="RottenRation_Info">когда-то это был пайок, теперь это просто отвратительно</string> <string name="RottenMeat_Name">испорченное мясо</string> <string name="RottenMeat_Info">мясо испортилось, но огонь может сделать его съедобным снова</string> <string name="RottenPasty_Name">тухлый пирог</string> <string name="RottenPasty_Info">выглядит мерзко</string> <string name="RottenPumpkinPie_Name">испорченный тыквенный пирог</string> <string name="RottenPumpkinPie_Info">этот пирог выглядит отвратительно, но его можно восстановить</string> <string name="RottenFish_Name">испорченная рыба</string> <string name="RottenFish_Info">эта рыба пахнет ужасно, но приготовление может помочь</string>
RottenFood base class:
package com.watabou.pixeldungeon.items.food; public class RottenFood extends Food { // Base class for all rotten foods // Implements negative consumption effects // Subclasses must implement purify() }
RottenPasty implementation:
public class RottenPasty extends RottenFood { public RottenPasty() { image = ItemSpriteSheet.ROTTEN_PASTY; } @Override public Food purify() { return new Pasty(); // Returns fresh pasty } }
ItemFactory registration:
// ItemFactory.java line 261-265 registerItemClass(RottenPasty.class); registerItemClass(RottenRation.class); registerItemClass(RottenMeat.class); registerItemClass(RottenPumpkinPie.class); registerItemClass(RottenFish.class);
Moistening interaction:
// Potion.java line 345-348 if(item instanceof RottenFood) { moistenRottenFood((RottenFood) item, item.getOwner()); }
Lua “disgusting” food list:
local disgusting = { RottenRation = true, RottenPasty = true, RottenPumpkinPie = true, RottenFish = true } -- Black Cat AI refuses these
| Rotten Variant | Purifies To | Sprite |
| — | — | — |
| RottenRation | Ration | RATION |
| RottenMeat | ChargrilledMeat | CHARGRILLED_MEAT |
| RottenPasty | Pasty | PASTY |
| RottenPumpkinPie | PumpkinPie | PUMPKIN_PIE |
| RottenFish | RawFish | RAW_FISH |