Skip to content
Snippets Groups Projects
Commit f55f91be authored by Rumen Nikiforov's avatar Rumen Nikiforov
Browse files

BETA: Simplify some checks in Recipes item handler.

parent 647cce36
No related branches found
No related tags found
No related merge requests found
......@@ -59,19 +59,17 @@ public class Recipes implements IItemHandler
boolean canCraft = false;
boolean recipeLevel = false;
boolean recipeLimit = false;
if (rp.isDwarvenRecipe() && (canCraft = activeChar.hasDwarvenCraft()))
if (rp.isDwarvenRecipe())
{
if (recipeLevel = (rp.getLevel() > activeChar.getDwarvenCraft()))
{
recipeLimit = activeChar.getDwarvenRecipeBook().length >= activeChar.getDwarfRecipeLimit();
}
canCraft = activeChar.hasDwarvenCraft();
recipeLevel = (rp.getLevel() > activeChar.getDwarvenCraft());
recipeLimit = (activeChar.getDwarvenRecipeBook().length >= activeChar.getDwarfRecipeLimit());
}
else if (canCraft = activeChar.hasCommonCraft())
else
{
if (recipeLevel = (rp.getLevel() > activeChar.getCommonCraft()))
{
recipeLimit = activeChar.getCommonRecipeBook().length >= activeChar.getCommonRecipeLimit();
}
canCraft = activeChar.hasCommonCraft();
recipeLevel = (rp.getLevel() > activeChar.getCommonCraft());
recipeLimit = (activeChar.getCommonRecipeBook().length >= activeChar.getCommonRecipeLimit());
}
if (!canCraft)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment