aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Ouellette <oue.paul18@gmail.com>2019-07-22 01:26:22 -0400
committersfan5 <sfan5@live.de>2019-07-27 14:42:41 +0200
commitfe6c666da26e08b726bd21f34d25558cf456bd1f (patch)
tree91e182ec9189d72313acbd144d7f2904589d0189 /src
parent395b1b33462c6de9801b77457d347bf62024c2de (diff)
downloadminetest-fe6c666da26e08b726bd21f34d25558cf456bd1f.tar.gz
minetest-fe6c666da26e08b726bd21f34d25558cf456bd1f.tar.bz2
minetest-fe6c666da26e08b726bd21f34d25558cf456bd1f.zip
Prefix RecipePriority elements with PRIORITY_
Diffstat (limited to 'src')
-rw-r--r--src/craftdef.cpp22
-rw-r--r--src/craftdef.h12
2 files changed, 17 insertions, 17 deletions
diff --git a/src/craftdef.cpp b/src/craftdef.cpp
index fb82bb396..24b7437cb 100644
--- a/src/craftdef.cpp
+++ b/src/craftdef.cpp
@@ -337,9 +337,9 @@ CraftDefinitionShaped::CraftDefinitionShaped(
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
@@ -473,9 +473,9 @@ CraftDefinitionShapeless::CraftDefinitionShapeless(
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
@@ -588,7 +588,7 @@ std::string CraftDefinitionShapeless::dump() const
CraftDefinitionToolRepair::CraftDefinitionToolRepair(float additional_wear_):
additional_wear(additional_wear_)
{
- priority = TOOLREPAIR;
+ priority = PRIORITY_TOOLREPAIR;
}
static ItemStack craftToolRepair(
@@ -693,9 +693,9 @@ CraftDefinitionCooking::CraftDefinitionCooking(
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
@@ -795,9 +795,9 @@ CraftDefinitionFuel::CraftDefinitionFuel(
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
@@ -927,7 +927,7 @@ public:
// 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);
@@ -970,7 +970,7 @@ public:
}
}
}
- if (priority_best == CraftDefinition::NO_RECIPE)
+ if (priority_best == CraftDefinition::PRIORITY_NO_RECIPE)
return false;
if (decrementInput)
def_best->decrementInput(input, output_replacement, gamedef);
diff --git a/src/craftdef.h b/src/craftdef.h
index a385a5c88..37ae6df43 100644
--- a/src/craftdef.h
+++ b/src/craftdef.h
@@ -141,12 +141,12 @@ public:
*/
enum RecipePriority
{
- NO_RECIPE,
- TOOLREPAIR,
- SHAPELESS_AND_GROUPS,
- SHAPELESS,
- SHAPED_AND_GROUPS,
- SHAPED,
+ PRIORITY_NO_RECIPE,
+ PRIORITY_TOOLREPAIR,
+ PRIORITY_SHAPELESS_AND_GROUPS,
+ PRIORITY_SHAPELESS,
+ PRIORITY_SHAPED_AND_GROUPS,
+ PRIORITY_SHAPED,
};
CraftDefinition() = default;