output(output_), width(width_), recipe(recipe_), replacements(replacements_)
{
if (hasGroupItem(recipe))
- priority = SHAPED_AND_GROUPS;
+ priority = PRIORITY_SHAPED_AND_GROUPS;
else
- priority = SHAPED;
+ priority = PRIORITY_SHAPED;
}
std::string CraftDefinitionShaped::getName() const
output(output_), recipe(recipe_), replacements(replacements_)
{
if (hasGroupItem(recipe))
- priority = SHAPELESS_AND_GROUPS;
+ priority = PRIORITY_SHAPELESS_AND_GROUPS;
else
- priority = SHAPELESS;
+ priority = PRIORITY_SHAPELESS;
}
std::string CraftDefinitionShapeless::getName() const
CraftDefinitionToolRepair::CraftDefinitionToolRepair(float additional_wear_):
additional_wear(additional_wear_)
{
- priority = TOOLREPAIR;
+ priority = PRIORITY_TOOLREPAIR;
}
static ItemStack craftToolRepair(
output(output_), recipe(recipe_), cooktime(cooktime_), replacements(replacements_)
{
if (isGroupRecipeStr(recipe))
- priority = SHAPELESS_AND_GROUPS;
+ priority = PRIORITY_SHAPELESS_AND_GROUPS;
else
- priority = SHAPELESS;
+ priority = PRIORITY_SHAPELESS;
}
std::string CraftDefinitionCooking::getName() const
recipe(recipe_), burntime(burntime_), replacements(replacements_)
{
if (isGroupRecipeStr(recipe_name))
- priority = SHAPELESS_AND_GROUPS;
+ priority = PRIORITY_SHAPELESS_AND_GROUPS;
else
- priority = SHAPELESS;
+ priority = PRIORITY_SHAPELESS;
}
std::string CraftDefinitionFuel::getName() const
// Try hash types with increasing collision rate
// while remembering the latest, highest priority recipe.
CraftDefinition::RecipePriority priority_best =
- CraftDefinition::NO_RECIPE;
+ CraftDefinition::PRIORITY_NO_RECIPE;
CraftDefinition *def_best = nullptr;
for (int type = 0; type <= craft_hash_type_max; type++) {
u64 hash = getHashForGrid((CraftHashType) type, input_names);
}
}
}
- if (priority_best == CraftDefinition::NO_RECIPE)
+ if (priority_best == CraftDefinition::PRIORITY_NO_RECIPE)
return false;
if (decrementInput)
def_best->decrementInput(input, output_replacement, gamedef);