From 617f5c91d4488052d96497c35d8022e0a2a3f870 Mon Sep 17 00:00:00 2001 From: JonnyW Date: Fri, 2 Mar 2018 21:38:33 +0000 Subject: [PATCH] Put flint before copper and bronze before iron as this is how things progressed historically. Consistent values for uses/time/level for each material, defined in content_toolitem.h All weapons and none core tools have a dig level of 1. --- src/content_toolitem.cpp | 398 +++++++++++++++++++-------------------- src/content_toolitem.h | 52 +++++ src/mineral.cpp | 262 +++++++++++++------------- 3 files changed, 384 insertions(+), 328 deletions(-) diff --git a/src/content_toolitem.cpp b/src/content_toolitem.cpp index a205890..41d59d0 100644 --- a/src/content_toolitem.cpp +++ b/src/content_toolitem.cpp @@ -287,9 +287,9 @@ void content_toolitem_init() f->texture = "tool_handle.png^tool_head_pick_stone.png^tool_binding_pick.png"; f->description = gettext("Stone Pick"); f->type = TT_PICK; - f->diginfo.uses = 32; - f->diginfo.time = 3.0; - f->diginfo.level = 1; + f->diginfo.uses = STONE_USES; + f->diginfo.time = STONE_TIME; + f->diginfo.level = STONE_LEVEL; { content_t r[9] = { CONTENT_ROCK, CONTENT_ROCK, CONTENT_ROCK, @@ -303,41 +303,41 @@ void content_toolitem_init() content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); - i = CONTENT_TOOLITEM_COPPER_PICK; - f = &g_content_toolitem_features[i]; - f->content = i; - f->texture = "tool_handle.png^tool_head_pick_copper.png^tool_binding_pick.png"; - f->description = gettext("Copper Pick"); - f->type = TT_PICK; - f->diginfo.uses = 64; - f->diginfo.time = 1.5; - f->diginfo.level = 2; - crafting::setPickRecipe(CONTENT_CRAFTITEM_COPPER_INGOT,CONTENT_TOOLITEM_COPPER_PICK); - content_list_add("craftguide",i,1,0); - content_list_add("creative",i,1,0); - i = CONTENT_TOOLITEM_FLINTPICK; f = &g_content_toolitem_features[i]; f->content = i; f->texture = "tool_handle.png^tool_head_pick_flint.png^tool_binding_pick.png"; f->description = gettext("Flint Pick"); f->type = TT_PICK; - f->diginfo.uses = 64; - f->diginfo.time = 1.5; - f->diginfo.level = 2; + f->diginfo.uses = FLINT_USES; + f->diginfo.time = FLINT_TIME; + f->diginfo.level = FLINT_LEVEL; crafting::setPickRecipe(CONTENT_CRAFTITEM_FLINT,CONTENT_TOOLITEM_FLINTPICK); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); + i = CONTENT_TOOLITEM_COPPER_PICK; + f = &g_content_toolitem_features[i]; + f->content = i; + f->texture = "tool_handle.png^tool_head_pick_copper.png^tool_binding_pick.png"; + f->description = gettext("Copper Pick"); + f->type = TT_PICK; + f->diginfo.uses = COPPER_USES; + f->diginfo.time = COPPER_TIME; + f->diginfo.level = COPPER_LEVEL; + crafting::setPickRecipe(CONTENT_CRAFTITEM_COPPER_INGOT,CONTENT_TOOLITEM_COPPER_PICK); + content_list_add("craftguide",i,1,0); + content_list_add("creative",i,1,0); + i = CONTENT_TOOLITEM_BRONZE_PICK; f = &g_content_toolitem_features[i]; f->content = i; f->texture = "tool_handle.png^tool_head_pick_bronze.png^tool_binding_pick.png"; f->description = gettext("Bronze Pick"); f->type = TT_PICK; - f->diginfo.uses = 128; - f->diginfo.time = 1.25; - f->diginfo.level = 3; + f->diginfo.uses = BRONZE_USES; + f->diginfo.time = BRONZE_TIME; + f->diginfo.level = BRONZE_LEVEL; crafting::setPickRecipe(CONTENT_CRAFTITEM_BRONZE_INGOT,CONTENT_TOOLITEM_BRONZE_PICK); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); @@ -348,9 +348,9 @@ void content_toolitem_init() f->texture = "tool_handle.png^tool_head_pick_iron.png^tool_binding_pick.png"; f->description = gettext("Iron Pick"); f->type = TT_PICK; - f->diginfo.uses = 256; - f->diginfo.time = 1.0; - f->diginfo.level = 4; + f->diginfo.uses = IRON_USES; + f->diginfo.time = IRON_TIME; + f->diginfo.level = IRON_LEVEL; crafting::setPickRecipe(CONTENT_CRAFTITEM_IRON_INGOT,CONTENT_TOOLITEM_IRON_PICK); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); @@ -361,9 +361,9 @@ void content_toolitem_init() f->texture = "tool_handle.png^tool_head_pick_mithril.png^tool_binding_pick.png"; f->description = gettext("Unbound Mithril Pick"); f->type = TT_PICK; - f->diginfo.uses = 1024; - f->diginfo.time = 0.6; - f->diginfo.level = 5; + f->diginfo.uses = U_MITHRIL_USES; + f->diginfo.time = U_MITHRIL_TIME; + f->diginfo.level = U_MITHRIL_LEVEL; crafting::setPickRecipe(CONTENT_CRAFTITEM_MITHRIL_UNBOUND,CONTENT_TOOLITEM_MITHRIL_UNBOUND_PICK); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); @@ -375,9 +375,9 @@ void content_toolitem_init() f->description = gettext("Mithril Pick"); f->type = TT_PICK; f->param_type = CPT_ENCHANTMENT; - f->diginfo.uses = 2048; - f->diginfo.time = 0.4; - f->diginfo.level = 6; + f->diginfo.uses = E_MITHRIL_USES; + f->diginfo.time = E_MITHRIL_TIME; + f->diginfo.level = E_MITHRIL_LEVEL; f->has_punch_effect = false; crafting::setPickRecipe(CONTENT_CRAFTITEM_MITHRIL,CONTENT_TOOLITEM_MITHRIL_PICK); content_list_add("craftguide",i,1,0); @@ -403,49 +403,36 @@ void content_toolitem_init() f->texture = "tool_handle.png^tool_head_shovel_stone.png^tool_binding_shovel.png"; f->description = gettext("Stone Shovel"); f->type = TT_SHOVEL; - f->diginfo.uses = 32; - f->diginfo.time = 3.0; - f->diginfo.level = 1; + f->diginfo.uses = STONE_USES; + f->diginfo.time = STONE_TIME; + f->diginfo.level = STONE_LEVEL; crafting::set1over1Recipe(CONTENT_ROCK,CONTENT_CRAFTITEM_STICK,i); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); - i = CONTENT_TOOLITEM_COPPER_SHOVEL; - f = &g_content_toolitem_features[i]; - f->content = i; - f->texture = "tool_handle.png^tool_head_shovel_copper.png^tool_binding_shovel.png"; - f->description = gettext("Copper Shovel"); - f->type = TT_SHOVEL; - f->diginfo.uses = 64; - f->diginfo.time = 1.5; - f->diginfo.level = 1; - crafting::setShovelRecipe(CONTENT_CRAFTITEM_COPPER_INGOT,CONTENT_TOOLITEM_COPPER_SHOVEL); - content_list_add("craftguide",i,1,0); - content_list_add("creative",i,1,0); - i = CONTENT_TOOLITEM_FLINTSHOVEL; f = &g_content_toolitem_features[i]; f->content = i; f->texture = "tool_handle.png^tool_head_shovel_flint.png^tool_binding_shovel.png"; f->description = gettext("Flint Shovel"); f->type = TT_SHOVEL; - f->diginfo.uses = 128; - f->diginfo.time = 1.75; - f->diginfo.level = 2; + f->diginfo.uses = FLINT_USES; + f->diginfo.time = FLINT_TIME; + f->diginfo.level = FLINT_LEVEL; crafting::setShovelRecipe(CONTENT_CRAFTITEM_FLINT,CONTENT_TOOLITEM_FLINTSHOVEL); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); - i = CONTENT_TOOLITEM_IRON_SHOVEL; + i = CONTENT_TOOLITEM_COPPER_SHOVEL; f = &g_content_toolitem_features[i]; f->content = i; - f->texture = "tool_handle.png^tool_head_shovel_iron.png^tool_binding_shovel.png"; - f->description = gettext("Iron Shovel"); + f->texture = "tool_handle.png^tool_head_shovel_copper.png^tool_binding_shovel.png"; + f->description = gettext("Copper Shovel"); f->type = TT_SHOVEL; - f->diginfo.uses = 256; - f->diginfo.time = 1.0; - f->diginfo.level = 3; - crafting::setShovelRecipe(CONTENT_CRAFTITEM_IRON_INGOT,CONTENT_TOOLITEM_IRON_SHOVEL); + f->diginfo.uses = COPPER_USES; + f->diginfo.time = COPPER_TIME; + f->diginfo.level = COPPER_LEVEL; + crafting::setShovelRecipe(CONTENT_CRAFTITEM_COPPER_INGOT,CONTENT_TOOLITEM_COPPER_SHOVEL); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); @@ -455,22 +442,35 @@ void content_toolitem_init() f->texture = "tool_handle.png^tool_head_shovel_bronze.png^tool_binding_shovel.png"; f->description = gettext("Bronze Shovel"); f->type = TT_SHOVEL; - f->diginfo.uses = 512; - f->diginfo.time = 0.75; - f->diginfo.level = 4; + f->diginfo.uses = BRONZE_USES; + f->diginfo.time = BRONZE_TIME; + f->diginfo.level = BRONZE_LEVEL; crafting::setShovelRecipe(CONTENT_CRAFTITEM_BRONZE_INGOT,CONTENT_TOOLITEM_BRONZE_SHOVEL); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); + i = CONTENT_TOOLITEM_IRON_SHOVEL; + f = &g_content_toolitem_features[i]; + f->content = i; + f->texture = "tool_handle.png^tool_head_shovel_iron.png^tool_binding_shovel.png"; + f->description = gettext("Iron Shovel"); + f->type = TT_SHOVEL; + f->diginfo.uses = IRON_USES; + f->diginfo.time = IRON_TIME; + f->diginfo.level = IRON_LEVEL; + crafting::setShovelRecipe(CONTENT_CRAFTITEM_IRON_INGOT,CONTENT_TOOLITEM_IRON_SHOVEL); + content_list_add("craftguide",i,1,0); + content_list_add("creative",i,1,0); + i = CONTENT_TOOLITEM_MITHRIL_UNBOUND_SHOVEL; f = &g_content_toolitem_features[i]; f->content = i; f->texture = "tool_handle.png^tool_head_shovel_mithril.png^tool_binding_shovel.png"; f->description = gettext("Unbound Mithril Shovel"); f->type = TT_SHOVEL; - f->diginfo.uses = 1024; - f->diginfo.time = 0.6; - f->diginfo.level = 5; + f->diginfo.uses = U_MITHRIL_USES; + f->diginfo.time = U_MITHRIL_TIME; + f->diginfo.level = U_MITHRIL_LEVEL; crafting::setShovelRecipe(CONTENT_CRAFTITEM_MITHRIL_UNBOUND,CONTENT_TOOLITEM_MITHRIL_UNBOUND_SHOVEL); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); @@ -482,9 +482,9 @@ void content_toolitem_init() f->description = gettext("Mithril Shovel"); f->type = TT_SHOVEL; f->param_type = CPT_ENCHANTMENT; - f->diginfo.uses = 2048; - f->diginfo.time = 0.4; - f->diginfo.level = 5; + f->diginfo.uses = E_MITHRIL_USES; + f->diginfo.time = E_MITHRIL_TIME; + f->diginfo.level = E_MITHRIL_LEVEL; crafting::setShovelRecipe(CONTENT_CRAFTITEM_MITHRIL,CONTENT_TOOLITEM_MITHRIL_SHOVEL); content_list_add("craftguide",i,1,0); @@ -496,9 +496,9 @@ void content_toolitem_init() f->texture = "tool_handle.png^tool_head_axe_stone.png^tool_binding_axe.png"; f->description = gettext("Stone Axe"); f->type = TT_AXE; - f->diginfo.uses = 32; - f->diginfo.time = 3.0; - f->diginfo.level = 1; + f->diginfo.uses = STONE_USES; + f->diginfo.time = STONE_TIME; + f->diginfo.level = STONE_LEVEL; { content_t r[9] = { CONTENT_ROCK, CONTENT_ROCK, CONTENT_IGNORE, @@ -513,42 +513,29 @@ void content_toolitem_init() content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); - i = CONTENT_TOOLITEM_COPPER_AXE; - f = &g_content_toolitem_features[i]; - f->content = i; - f->texture = "tool_handle.png^tool_head_axe_copper.png^tool_binding_axe.png"; - f->description = gettext("Copper Axe"); - f->type = TT_AXE; - f->diginfo.uses = 64; - f->diginfo.time = 1.5; - f->diginfo.level = 1; - crafting::setAxeRecipe(CONTENT_CRAFTITEM_COPPER_INGOT,CONTENT_TOOLITEM_COPPER_AXE); - content_list_add("craftguide",i,1,0); - content_list_add("creative",i,1,0); - i = CONTENT_TOOLITEM_FLINTAXE; f = &g_content_toolitem_features[i]; f->content = i; f->texture = "tool_handle.png^tool_head_axe_flint.png^tool_binding_axe.png"; f->description = gettext("Flint Axe"); f->type = TT_AXE; - f->diginfo.uses = 128; - f->diginfo.time = 1.75; - f->diginfo.level = 2; + f->diginfo.uses = FLINT_USES; + f->diginfo.time = FLINT_TIME; + f->diginfo.level = FLINT_LEVEL; crafting::setAxeRecipe(CONTENT_CRAFTITEM_FLINT,CONTENT_TOOLITEM_FLINTAXE); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); - i = CONTENT_TOOLITEM_IRON_AXE; + i = CONTENT_TOOLITEM_COPPER_AXE; f = &g_content_toolitem_features[i]; f->content = i; - f->texture = "tool_handle.png^tool_head_axe_iron.png^tool_binding_axe.png"; - f->description = gettext("Iron Axe"); + f->texture = "tool_handle.png^tool_head_axe_copper.png^tool_binding_axe.png"; + f->description = gettext("Copper Axe"); f->type = TT_AXE; - f->diginfo.uses = 256; - f->diginfo.time = 1.0; - f->diginfo.level = 3; - crafting::setAxeRecipe(CONTENT_CRAFTITEM_IRON_INGOT,CONTENT_TOOLITEM_IRON_AXE); + f->diginfo.uses = COPPER_USES; + f->diginfo.time = COPPER_TIME; + f->diginfo.level = COPPER_LEVEL; + crafting::setAxeRecipe(CONTENT_CRAFTITEM_COPPER_INGOT,CONTENT_TOOLITEM_COPPER_AXE); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); @@ -558,22 +545,35 @@ void content_toolitem_init() f->texture = "tool_handle.png^tool_head_axe_bronze.png^tool_binding_axe.png"; f->description = gettext("Bronze Axe"); f->type = TT_AXE; - f->diginfo.uses = 512; - f->diginfo.time = 0.75; - f->diginfo.level = 4; + f->diginfo.uses = BRONZE_USES; + f->diginfo.time = BRONZE_TIME; + f->diginfo.level = BRONZE_LEVEL; crafting::setAxeRecipe(CONTENT_CRAFTITEM_BRONZE_INGOT,CONTENT_TOOLITEM_BRONZE_AXE); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); + i = CONTENT_TOOLITEM_IRON_AXE; + f = &g_content_toolitem_features[i]; + f->content = i; + f->texture = "tool_handle.png^tool_head_axe_iron.png^tool_binding_axe.png"; + f->description = gettext("Iron Axe"); + f->type = TT_AXE; + f->diginfo.uses = IRON_USES; + f->diginfo.time = IRON_TIME; + f->diginfo.level = IRON_LEVEL; + crafting::setAxeRecipe(CONTENT_CRAFTITEM_IRON_INGOT,CONTENT_TOOLITEM_IRON_AXE); + content_list_add("craftguide",i,1,0); + content_list_add("creative",i,1,0); + i = CONTENT_TOOLITEM_MITHRIL_UNBOUND_AXE; f = &g_content_toolitem_features[i]; f->content = i; f->texture = "tool_handle.png^tool_head_axe_mithril.png^tool_binding_axe.png"; f->description = gettext("Unbound Mithril Axe"); f->type = TT_AXE; - f->diginfo.uses = 1024; - f->diginfo.time = 0.6; - f->diginfo.level = 5; + f->diginfo.uses = U_MITHRIL_USES; + f->diginfo.time = U_MITHRIL_TIME; + f->diginfo.level = U_MITHRIL_LEVEL; crafting::setAxeRecipe(CONTENT_CRAFTITEM_MITHRIL_UNBOUND,CONTENT_TOOLITEM_MITHRIL_UNBOUND_AXE); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); @@ -585,9 +585,9 @@ void content_toolitem_init() f->description = gettext("Mithril Axe"); f->type = TT_AXE; f->param_type = CPT_ENCHANTMENT; - f->diginfo.uses = 2048; - f->diginfo.time = 0.4; - f->diginfo.level = 5; + f->diginfo.uses = E_MITHRIL_USES; + f->diginfo.time = E_MITHRIL_TIME; + f->diginfo.level = E_MITHRIL_LEVEL; crafting::setAxeRecipe(CONTENT_CRAFTITEM_MITHRIL,CONTENT_TOOLITEM_MITHRIL_AXE); content_list_add("craftguide",i,1,0); @@ -613,9 +613,9 @@ void content_toolitem_init() f->texture = "tool_bow.png"; f->description = gettext("Bow"); f->type = TT_SPECIAL; - f->diginfo.uses = 256; - f->diginfo.time = 1.0; - f->diginfo.level = 2; + f->diginfo.uses = BOW_USES; + f->diginfo.time = BOW_TIME; + f->diginfo.level = BOW_LEVEL; f->thrown_item = CONTENT_CRAFTITEM_ARROW; { content_t r[9] = { @@ -636,49 +636,36 @@ void content_toolitem_init() f->texture = "tool_handle_long.png^tool_head_spear_stone.png^tool_binding_spear.png"; f->description = gettext("Stone Spear"); f->type = TT_SPEAR; - f->diginfo.uses = 64; - f->diginfo.time = 1.5; + f->diginfo.uses = STONE_USES; + f->diginfo.time = STONE_TIME; f->diginfo.level = 1; crafting::setSpearRecipe(CONTENT_ROCK,CONTENT_TOOLITEM_STONE_SPEAR); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); - i = CONTENT_TOOLITEM_COPPER_SPEAR; - f = &g_content_toolitem_features[i]; - f->content = i; - f->texture = "tool_handle_long.png^tool_head_spear_copper.png^tool_binding_spear.png"; - f->description = gettext("Copper Spear"); - f->type = TT_SPEAR; - f->diginfo.uses = 64; - f->diginfo.time = 1.5; - f->diginfo.level = 1; - crafting::setSpearRecipe(CONTENT_CRAFTITEM_COPPER_INGOT,CONTENT_TOOLITEM_COPPER_SPEAR); - content_list_add("craftguide",i,1,0); - content_list_add("creative",i,1,0); - i = CONTENT_TOOLITEM_FLINTSPEAR; f = &g_content_toolitem_features[i]; f->content = i; f->texture = "tool_handle_long.png^tool_head_spear_flint.png^tool_binding_spear.png"; f->description = gettext("Flint Spear"); f->type = TT_SPEAR; - f->diginfo.uses = 128; - f->diginfo.time = 1.75; - f->diginfo.level = 2; + f->diginfo.uses = FLINT_USES; + f->diginfo.time = FLINT_TIME; + f->diginfo.level = 1; crafting::setSpearRecipe(CONTENT_CRAFTITEM_FLINT,CONTENT_TOOLITEM_FLINTSPEAR); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); - i = CONTENT_TOOLITEM_IRON_SPEAR; + i = CONTENT_TOOLITEM_COPPER_SPEAR; f = &g_content_toolitem_features[i]; f->content = i; - f->texture = "tool_handle_long.png^tool_head_spear_iron.png^tool_binding_spear.png"; - f->description = gettext("Iron Spear"); + f->texture = "tool_handle_long.png^tool_head_spear_copper.png^tool_binding_spear.png"; + f->description = gettext("Copper Spear"); f->type = TT_SPEAR; - f->diginfo.uses = 256; - f->diginfo.time = 1.0; - f->diginfo.level = 3; - crafting::setSpearRecipe(CONTENT_CRAFTITEM_IRON_INGOT,CONTENT_TOOLITEM_IRON_SPEAR); + f->diginfo.uses = COPPER_USES; + f->diginfo.time = COPPER_TIME; + f->diginfo.level = 1; + crafting::setSpearRecipe(CONTENT_CRAFTITEM_COPPER_INGOT,CONTENT_TOOLITEM_COPPER_SPEAR); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); @@ -688,22 +675,35 @@ void content_toolitem_init() f->texture = "tool_handle_long.png^tool_head_spear_bronze.png^tool_binding_spear.png"; f->description = gettext("Bronze Spear"); f->type = TT_SPEAR; - f->diginfo.uses = 512; - f->diginfo.time = 0.75; - f->diginfo.level = 4; + f->diginfo.uses = BRONZE_USES; + f->diginfo.time = BRONZE_TIME; + f->diginfo.level = 1; crafting::setSpearRecipe(CONTENT_CRAFTITEM_BRONZE_INGOT,CONTENT_TOOLITEM_BRONZE_SPEAR); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); + i = CONTENT_TOOLITEM_IRON_SPEAR; + f = &g_content_toolitem_features[i]; + f->content = i; + f->texture = "tool_handle_long.png^tool_head_spear_iron.png^tool_binding_spear.png"; + f->description = gettext("Iron Spear"); + f->type = TT_SPEAR; + f->diginfo.uses = IRON_USES; + f->diginfo.time = IRON_TIME; + f->diginfo.level = 1; + crafting::setSpearRecipe(CONTENT_CRAFTITEM_IRON_INGOT,CONTENT_TOOLITEM_IRON_SPEAR); + content_list_add("craftguide",i,1,0); + content_list_add("creative",i,1,0); + i = CONTENT_TOOLITEM_MITHRIL_UNBOUND_SPEAR; f = &g_content_toolitem_features[i]; f->content = i; f->texture = "tool_handle_long.png^tool_head_spear_mithril.png^tool_binding_spear.png"; f->description = gettext("Unbound Mithril Spear"); f->type = TT_SPEAR; - f->diginfo.uses = 1024; - f->diginfo.time = 0.6; - f->diginfo.level = 5; + f->diginfo.uses = U_MITHRIL_USES; + f->diginfo.time = U_MITHRIL_TIME; + f->diginfo.level = 1; crafting::setSpearRecipe(CONTENT_CRAFTITEM_MITHRIL_UNBOUND,CONTENT_TOOLITEM_MITHRIL_UNBOUND_SPEAR); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); @@ -715,9 +715,9 @@ void content_toolitem_init() f->description = gettext("Mithril Spear"); f->type = TT_SPEAR; f->param_type = CPT_ENCHANTMENT; - f->diginfo.uses = 2048; - f->diginfo.time = 0.4; - f->diginfo.level = 5; + f->diginfo.uses = E_MITHRIL_USES; + f->diginfo.time = E_MITHRIL_TIME; + f->diginfo.level = 1; crafting::setSpearRecipe(CONTENT_CRAFTITEM_MITHRIL,CONTENT_TOOLITEM_MITHRIL_SPEAR); content_list_add("craftguide",i,1,0); @@ -729,8 +729,8 @@ void content_toolitem_init() f->texture = "tool_handle.png^tool_head_sword_copper.png^tool_binding_sword.png"; f->description = gettext("Copper Sword"); f->type = TT_SWORD; - f->diginfo.uses = 64; - f->diginfo.time = 1.5; + f->diginfo.uses = COPPER_USES; + f->diginfo.time = COPPER_TIME; f->diginfo.level = 1; crafting::setSwordRecipe(CONTENT_CRAFTITEM_COPPER_INGOT,CONTENT_TOOLITEM_COPPER_SWORD); content_list_add("craftguide",i,1,0); @@ -742,9 +742,9 @@ void content_toolitem_init() f->texture = "tool_handle.png^tool_head_sword_bronze.png^tool_binding_sword.png"; f->description = gettext("Bronze Sword"); f->type = TT_SWORD; - f->diginfo.uses = 128; - f->diginfo.time = 1.5; - f->diginfo.level = 4; + f->diginfo.uses = BRONZE_USES; + f->diginfo.time = BRONZE_TIME; + f->diginfo.level = 1; crafting::setSwordRecipe(CONTENT_CRAFTITEM_BRONZE_INGOT,CONTENT_TOOLITEM_BRONZE_SWORD); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); @@ -755,9 +755,9 @@ void content_toolitem_init() f->texture = "tool_handle.png^tool_head_sword_iron.png^tool_binding_sword.png"; f->description = gettext("Iron Sword"); f->type = TT_SWORD; - f->diginfo.uses = 256; - f->diginfo.time = 1.0; - f->diginfo.level = 3; + f->diginfo.uses = IRON_USES; + f->diginfo.time = IRON_TIME; + f->diginfo.level = 1; crafting::setSwordRecipe(CONTENT_CRAFTITEM_IRON_INGOT,CONTENT_TOOLITEM_IRON_SWORD); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); @@ -768,9 +768,9 @@ void content_toolitem_init() f->texture = "tool_handle.png^tool_head_sword_mithril.png^tool_binding_sword.png"; f->description = gettext("Unbound Mithril Sword"); f->type = TT_SWORD; - f->diginfo.uses = 1024; - f->diginfo.time = 0.6; - f->diginfo.level = 5; + f->diginfo.uses = U_MITHRIL_USES; + f->diginfo.time = U_MITHRIL_TIME; + f->diginfo.level = 1; crafting::setSwordRecipe(CONTENT_CRAFTITEM_MITHRIL_UNBOUND,CONTENT_TOOLITEM_MITHRIL_UNBOUND_SWORD); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); @@ -782,9 +782,9 @@ void content_toolitem_init() f->description = gettext("Mithril Sword"); f->type = TT_SWORD; f->param_type = CPT_ENCHANTMENT; - f->diginfo.uses = 2048; - f->diginfo.time = 0.4; - f->diginfo.level = 5; + f->diginfo.uses = E_MITHRIL_USES; + f->diginfo.time = E_MITHRIL_TIME; + f->diginfo.level = 1; crafting::setSwordRecipe(CONTENT_CRAFTITEM_MITHRIL,CONTENT_TOOLITEM_MITHRIL_SWORD); content_list_add("craftguide",i,1,0); @@ -796,9 +796,9 @@ void content_toolitem_init() f->texture = "tool_flintshears.png"; f->description = gettext("Flint Shears"); f->type = TT_SHEAR; - f->diginfo.uses = 128; - f->diginfo.time = 1.5; - f->diginfo.level = 2; + f->diginfo.uses = FLINT_USES; + f->diginfo.time = FLINT_TIME; + f->diginfo.level = 1; crafting::setShearsRecipe(CONTENT_CRAFTITEM_FLINT,CONTENT_TOOLITEM_FLINTSHEARS); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); @@ -809,9 +809,9 @@ void content_toolitem_init() f->texture = "tool_copper_shears.png"; f->description = gettext("Copper Shears"); f->type = TT_SHEAR; - f->diginfo.uses = 128; - f->diginfo.time = 1.5; - f->diginfo.level = 2; + f->diginfo.uses = COPPER_USES; + f->diginfo.time = COPPER_TIME; + f->diginfo.level = 1; crafting::setShearsRecipe(CONTENT_CRAFTITEM_COPPER_INGOT,CONTENT_TOOLITEM_COPPER_SHEARS); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); @@ -822,9 +822,9 @@ void content_toolitem_init() f->texture = "tool_ironshears.png"; f->description = gettext("Iron Shears"); f->type = TT_SHEAR; - f->diginfo.uses = 256; - f->diginfo.time = 1.0; - f->diginfo.level = 2; + f->diginfo.uses = IRON_USES; + f->diginfo.time = IRON_TIME; + f->diginfo.level = 1; crafting::setShearsRecipe(CONTENT_CRAFTITEM_IRON_INGOT,CONTENT_TOOLITEM_IRON_SHEARS); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); @@ -839,8 +839,8 @@ void content_toolitem_init() f->liquids_pointable = true; f->type = TT_BUCKET; f->param_type = CPT_CONTENT; - f->diginfo.uses = 64; - f->diginfo.time = 1.5; + f->diginfo.uses = WOOD_BUCKET_USES; + f->diginfo.time = WOOD_BUCKET_TIME; f->diginfo.level = 1; f->damaging_nodes_diggable = false; crafting::setURecipe(CONTENT_CRAFTITEM_JUNGLE_PLANK,CONTENT_TOOLITEM_WBUCKET); @@ -857,9 +857,9 @@ void content_toolitem_init() f->liquids_pointable = true; f->type = TT_BUCKET; f->param_type = CPT_CONTENT; - f->diginfo.uses = 128; - f->diginfo.time = 1.75; - f->diginfo.level = 2; + f->diginfo.uses = TIN_BUCKET_USES; + f->diginfo.time = TIN_BUCKET_TIME; + f->diginfo.level = 1; f->damaging_nodes_diggable = false; crafting::setURecipe(CONTENT_CRAFTITEM_TIN_INGOT,CONTENT_TOOLITEM_TINBUCKET); content_list_add("craftguide",i,1,0); @@ -874,9 +874,9 @@ void content_toolitem_init() f->liquids_pointable = true; f->type = TT_BUCKET; f->param_type = CPT_CONTENT; - f->diginfo.uses = 256; - f->diginfo.time = 1.0; - f->diginfo.level = 3; + f->diginfo.uses = IRON_BUCKET_USES; + f->diginfo.time = IRON_BUCKET_TIME; + f->diginfo.level = 1; crafting::setURecipe(CONTENT_CRAFTITEM_IRON_INGOT,CONTENT_TOOLITEM_IRON_BUCKET); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); @@ -891,47 +891,47 @@ void content_toolitem_init() f->texture = "tool_handle_short.png^tool_head_knife_stone.png"; f->description = gettext("Stone Knife"); f->type = TT_KNIFE; - f->diginfo.uses = 32; - f->diginfo.time = 3.0; + f->diginfo.uses = STONE_USES; + f->diginfo.time = STONE_TIME; f->diginfo.level = 1; crafting::setKnifeRecipe(CONTENT_ROCK,CONTENT_TOOLITEM_STONE_KNIFE); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); - i = CONTENT_TOOLITEM_COPPER_KNIFE; - f = &g_content_toolitem_features[i]; - f->content = i; - f->texture = "tool_handle_short.png^tool_head_knife_copper.png"; - f->description = gettext("Copper Knife"); - f->type = TT_KNIFE; - f->diginfo.uses = 64; - f->diginfo.time = 2.0; - f->diginfo.level = 1; - crafting::setKnifeRecipe(CONTENT_CRAFTITEM_COPPER_INGOT,CONTENT_TOOLITEM_COPPER_KNIFE); - content_list_add("craftguide",i,1,0); - content_list_add("creative",i,1,0); - i = CONTENT_TOOLITEM_FLINT_KNIFE; f = &g_content_toolitem_features[i]; f->content = i; f->texture = "tool_handle_short.png^tool_head_knife_flint.png"; f->description = gettext("Flint Knife"); f->type = TT_KNIFE; - f->diginfo.uses = 64; - f->diginfo.time = 2.0; + f->diginfo.uses = FLINT_USES; + f->diginfo.time = FLINT_TIME; f->diginfo.level = 1; crafting::setKnifeRecipe(CONTENT_CRAFTITEM_FLINT,CONTENT_TOOLITEM_FLINT_KNIFE); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); + i = CONTENT_TOOLITEM_COPPER_KNIFE; + f = &g_content_toolitem_features[i]; + f->content = i; + f->texture = "tool_handle_short.png^tool_head_knife_copper.png"; + f->description = gettext("Copper Knife"); + f->type = TT_KNIFE; + f->diginfo.uses = COPPER_USES; + f->diginfo.time = COPPER_TIME; + f->diginfo.level = 1; + crafting::setKnifeRecipe(CONTENT_CRAFTITEM_COPPER_INGOT,CONTENT_TOOLITEM_COPPER_KNIFE); + content_list_add("craftguide",i,1,0); + content_list_add("creative",i,1,0); + i = CONTENT_TOOLITEM_BRONZE_KNIFE; f = &g_content_toolitem_features[i]; f->content = i; f->texture = "tool_handle_short.png^tool_head_knife_bronze.png"; f->description = gettext("Bronze Knife"); f->type = TT_KNIFE; - f->diginfo.uses = 128; - f->diginfo.time = 1.5; + f->diginfo.uses = BRONZE_USES; + f->diginfo.time = BRONZE_TIME; f->diginfo.level = 1; crafting::setKnifeRecipe(CONTENT_CRAFTITEM_BRONZE_INGOT,CONTENT_TOOLITEM_BRONZE_KNIFE); content_list_add("craftguide",i,1,0); @@ -943,8 +943,8 @@ void content_toolitem_init() f->texture = "tool_handle_short.png^tool_head_knife_iron.png"; f->description = gettext("Iron Knife"); f->type = TT_KNIFE; - f->diginfo.uses = 256; - f->diginfo.time = 1.0; + f->diginfo.uses = IRON_USES; + f->diginfo.time = IRON_TIME; f->diginfo.level = 1; crafting::setKnifeRecipe(CONTENT_CRAFTITEM_IRON_INGOT,CONTENT_TOOLITEM_IRON_KNIFE); content_list_add("craftguide",i,1,0); @@ -956,8 +956,8 @@ void content_toolitem_init() f->texture = "tool_handle_short.png^tool_head_knife_mithril.png"; f->description = gettext("Unbound Mithril Knife"); f->type = TT_KNIFE; - f->diginfo.uses = 1024; - f->diginfo.time = 0.5; + f->diginfo.uses = U_MITHRIL_USES; + f->diginfo.time = U_MITHRIL_TIME; f->diginfo.level = 1; crafting::setKnifeRecipe(CONTENT_CRAFTITEM_MITHRIL_UNBOUND,CONTENT_TOOLITEM_MITHRIL_UNBOUND_KNIFE); content_list_add("craftguide",i,1,0); @@ -970,8 +970,8 @@ void content_toolitem_init() f->description = gettext("Mithril Knife"); f->type = TT_KNIFE; f->param_type = CPT_ENCHANTMENT; - f->diginfo.uses = 2048; - f->diginfo.time = 0.5; + f->diginfo.uses = E_MITHRIL_USES; + f->diginfo.time = E_MITHRIL_TIME; f->diginfo.level = 1; crafting::setKnifeRecipe(CONTENT_CRAFTITEM_MITHRIL,CONTENT_TOOLITEM_MITHRIL_KNIFE); content_list_add("craftguide",i,1,0); @@ -986,7 +986,7 @@ void content_toolitem_init() f->description = gettext("Fire Starter"); f->liquids_pointable = true; f->type = TT_SPECIAL; - f->diginfo.level = 3; + f->diginfo.level = 1; f->has_fire_effect = true; crafting::set1Any2Recipe(CONTENT_CRAFTITEM_FLINT,CONTENT_CRAFTITEM_IRON_INGOT,CONTENT_TOOLITEM_FIRESTARTER); content_list_add("craftguide",i,1,0); @@ -998,7 +998,7 @@ void content_toolitem_init() f->texture = "tool_crowbar.png"; f->description = gettext("Crowbar"); f->type = TT_SPECIAL; - f->diginfo.level = 3; + f->diginfo.level = 1; f->has_rotate_effect = true; crafting::set1over1Recipe(CONTENT_CRAFTITEM_IRON_INGOT,CONTENT_CRAFTITEM_IRON_INGOT,CONTENT_TOOLITEM_CROWBAR); content_list_add("craftguide",i,1,0); @@ -1010,7 +1010,7 @@ void content_toolitem_init() f->texture = "tool_key.png"; f->description = gettext("Key"); f->type = TT_SPECIAL; - f->diginfo.level = 4; + f->diginfo.level = 1; f->has_unlock_effect = true; crafting::set1To1Recipe(CONTENT_CRAFTITEM_GOLD_INGOT,CONTENT_TOOLITEM_KEY); content_list_add("craftguide",i,1,0); @@ -1022,7 +1022,7 @@ void content_toolitem_init() f->texture = "tool_mithril_key.png"; f->description = gettext("Mithril Key"); f->type = TT_SPECIAL; - f->diginfo.level = 5; + f->diginfo.level = 1; f->has_unlock_effect = true; f->has_super_unlock_effect = true; /* this can only be crafted by server admin */ @@ -1041,7 +1041,7 @@ void content_toolitem_init() f->texture = "tool_mob_spawner.png"; f->description = gettext("Mob Spawner"); f->type = TT_SPECIAL; - f->diginfo.level = 4; + f->diginfo.level = 1; f->param_type = CPT_DROP; { content_t r[9] = { diff --git a/src/content_toolitem.h b/src/content_toolitem.h index 71a96d6..27a6b6c 100644 --- a/src/content_toolitem.h +++ b/src/content_toolitem.h @@ -177,4 +177,56 @@ ToolItemFeatures & content_toolitem_features(std::string subname); #define CONTENT_TOOLITEM_COPPER_SPEAR (CONTENT_TOOLITEM_MASK | 0x39) #define CONTENT_TOOLITEM_COPPER_SHEARS (CONTENT_TOOLITEM_MASK | 0x3A) +// times are calculated as : +// Stone : 3.0 +// Flint : 3.0 - 1.0 = 2.0 +// Copper : 2.0 - 0.5 = 1.5 +// Bronze : 1.5 - 0.4 = 1.1 +// Iron : 1.1 - 0.3 = 0.8 +// Mithril : 0.8 - 0.2 = 0.6 Unbound +// Mithril : 0.6 - 0.2 = 0.4 Enchanted +#define STONE_USES 32 +#define STONE_TIME 3.0 +#define STONE_LEVEL 1 + +#define FLINT_USES 64 +#define FLINT_TIME 2.0 +#define FLINT_LEVEL 2 + +#define COPPER_USES 128 +#define COPPER_TIME 1.5 +#define COPPER_LEVEL 2 + +#define BRONZE_USES 256 +#define BRONZE_TIME 1.1 +#define BRONZE_LEVEL 3 + +#define IRON_USES 512 +#define IRON_TIME 0.8 +#define IRON_LEVEL 4 + +// Unbound Mithril +#define U_MITHRIL_USES 1024 +#define U_MITHRIL_TIME 0.6 +#define U_MITHRIL_LEVEL 5 + +// Enchanted Mithril +#define E_MITHRIL_USES 2048 +#define E_MITHRIL_TIME 0.4 +#define E_MITHRIL_LEVEL 5 + +#define BOW_USES 256 +#define BOW_TIME 1.0 +#define BOW_LEVEL 1 + +#define WOOD_BUCKET_USES 64 +#define WOOD_BUCKET_TIME 1.5 + +#define TIN_BUCKET_USES 128 +#define TIN_BUCKET_TIME 1.75 + +#define IRON_BUCKET_USES 256 +#define IRON_BUCKET_TIME 1.0 + + #endif diff --git a/src/mineral.cpp b/src/mineral.cpp index 2c3a41a..91f0317 100644 --- a/src/mineral.cpp +++ b/src/mineral.cpp @@ -31,164 +31,168 @@ struct MineralFeatures g_mineral_features[MINERAL_MAX+1]; MineralFeatures & mineral_features(u8 i) { - return g_mineral_features[i]; + return g_mineral_features[i]; } CraftItem *getDiggedMineralItem(u8 mineral, Player *player, InventoryItem *tool) { - MineralFeatures m = mineral_features(mineral); - if (m.dug_item == CONTENT_IGNORE) - return NULL; + MineralFeatures m = mineral_features(mineral); + if (m.dug_item == CONTENT_IGNORE) + return NULL; - if (content_craftitem_features(m.dug_item)->content == CONTENT_IGNORE) - return NULL; + if (content_craftitem_features(m.dug_item)->content == CONTENT_IGNORE) + return NULL; - if (!tool && m.min_level > 0) - return NULL; + if (!tool && m.min_level > 0) + return NULL; - ToolItemFeatures *t = &content_toolitem_features(tool->getContent()); - if (t->content == CONTENT_IGNORE && m.min_level > 0) - return NULL; + ToolItemFeatures *t = &content_toolitem_features(tool->getContent()); + if (t->content == CONTENT_IGNORE && m.min_level > 0) + return NULL; - if (t->diginfo.level < m.min_level) - return NULL; + if (t->diginfo.level < m.min_level) + return NULL; - u16 count = m.dug_count_min; - u16 count_max = t->diginfo.level; - u16 data = tool->getData(); + u16 count = m.dug_count_min; + u16 count_max = t->diginfo.level; + u16 data = tool->getData(); - if (data != 0) { - EnchantmentInfo info; - while (enchantment_get(&data,&info)) { - switch (info.type) { - case ENCHANTMENT_MORE: // amplius increases the amount given - count += (info.level+1)/2; - count_max += info.level; - break; - case ENCHANTMENT_DONTBREAK: // gives no mineral - return NULL; - break; - default:; - } - } - } + if (data != 0) { + EnchantmentInfo info; + while (enchantment_get(&data,&info)) { + switch (info.type) { + case ENCHANTMENT_MORE: // amplius increases the amount given + count += (info.level+1)/2; + count_max += info.level; + break; + case ENCHANTMENT_DONTBREAK: // gives no mineral + return NULL; + break; + default:; + } + } + } - if (count_max > count) { - count = myrand_range(m.dug_count_min,count_max); - } + if (count_max > count) { + count = myrand_range(m.dug_count_min,count_max); + } - if (count > m.dug_count_max) - count = m.dug_count_max; + if (count > m.dug_count_max) + count = m.dug_count_max; - return new CraftItem(m.dug_item, count, 0); + return new CraftItem(m.dug_item, count, 0); } void init_mineral() { - u8 i; - MineralFeatures *f = NULL; + u8 i; + MineralFeatures *f = NULL; - i = MINERAL_COAL; - f = &mineral_features(i); - f->description = gettext("Coal"); - f->texture = "mineral_coal.png"; - f->dug_item = CONTENT_CRAFTITEM_COAL; + i = MINERAL_COAL; + f = &mineral_features(i); + f->description = gettext("Coal"); + f->texture = "mineral_coal.png"; + f->dug_item = CONTENT_CRAFTITEM_COAL; - i = MINERAL_IRON; - f = &mineral_features(i); - f->description = gettext("Iron"); - f->texture = "mineral_iron.png"; - f->dug_item = CONTENT_CRAFTITEM_IRON; - f->min_level = 2; + // Flint from gravel for level 2 tools - i = MINERAL_TIN; - f = &mineral_features(i); - f->description = gettext("Tin"); - f->texture = "mineral_tin.png"; - f->dug_item = CONTENT_CRAFTITEM_TIN; - f->min_level = 2; + i = MINERAL_COPPER; + f = &mineral_features(i); + f->description = gettext("Copper"); + f->texture = "mineral_copper.png"; + f->dug_item = CONTENT_CRAFTITEM_COPPER; + f->dug_count_max = 4; + f->min_level = 2; - i = MINERAL_COPPER; - f = &mineral_features(i); - f->description = gettext("Copper"); - f->texture = "mineral_copper.png"; - f->dug_item = CONTENT_CRAFTITEM_COPPER; - f->dug_count_max = 4; - f->min_level = 2; + i = MINERAL_TIN; + f = &mineral_features(i); + f->description = gettext("Tin"); + f->texture = "mineral_tin.png"; + f->dug_item = CONTENT_CRAFTITEM_TIN; + f->min_level = 2; - i = MINERAL_SILVER; - f = &mineral_features(i); - f->description = gettext("Silver"); - f->texture = "mineral_silver.png"; - f->dug_item = CONTENT_CRAFTITEM_SILVER; - f->min_level = 3; + // bronze for level 3 tools - i = MINERAL_GOLD; - f = &mineral_features(i); - f->description = gettext("Gold"); - f->texture = "mineral_gold.png"; - f->dug_item = CONTENT_CRAFTITEM_GOLD; - f->min_level = 3; + i = MINERAL_IRON; + f = &mineral_features(i); + f->description = gettext("Iron"); + f->texture = "mineral_iron.png"; + f->dug_item = CONTENT_CRAFTITEM_IRON; + f->min_level = 3; - i = MINERAL_QUARTZ; - f = &mineral_features(i); - f->description = gettext("Quartz"); - f->texture = "mineral_quartz.png"; - f->dug_item = CONTENT_CRAFTITEM_QUARTZ; - f->min_level = 3; + i = MINERAL_MITHRIL; + f = &mineral_features(i); + f->description = gettext("Mithril"); + f->texture = "mineral_mithril.png"; + f->dug_item = CONTENT_CRAFTITEM_MITHRIL_RAW; + f->min_level = 4; - i = MINERAL_MITHRIL; - f = &mineral_features(i); - f->description = gettext("Mithril"); - f->texture = "mineral_mithril.png"; - f->dug_item = CONTENT_CRAFTITEM_MITHRIL_RAW; - f->min_level = 3; + i = MINERAL_SALT; + f = &mineral_features(i); + f->description = gettext("Salt"); + f->texture = "mineral_salt.png"; + f->dug_item = CONTENT_CRAFTITEM_SALT; + f->min_level = 1; + f->dug_count_max = 2; - i = MINERAL_RUBY; - f = &mineral_features(i); - f->description = gettext("Ruby"); - f->texture = "mineral_ruby.png"; - f->dug_item = CONTENT_CRAFTITEM_RUBY; - f->min_level = 3; - f->dug_count_max = 2; + i = MINERAL_SILVER; + f = &mineral_features(i); + f->description = gettext("Silver"); + f->texture = "mineral_silver.png"; + f->dug_item = CONTENT_CRAFTITEM_SILVER; + f->min_level = 3; - i = MINERAL_TURQUOISE; - f = &mineral_features(i); - f->description = gettext("Turquoise"); - f->texture = "mineral_turquoise.png"; - f->dug_item = CONTENT_CRAFTITEM_TURQUOISE; - f->min_level = 3; - f->dug_count_max = 2; + i = MINERAL_GOLD; + f = &mineral_features(i); + f->description = gettext("Gold"); + f->texture = "mineral_gold.png"; + f->dug_item = CONTENT_CRAFTITEM_GOLD; + f->min_level = 3; - i = MINERAL_AMETHYST; - f = &mineral_features(i); - f->description = gettext("Amethyst"); - f->texture = "mineral_amethyst.png"; - f->dug_item = CONTENT_CRAFTITEM_AMETHYST; - f->min_level = 3; - f->dug_count_max = 2; + i = MINERAL_QUARTZ; + f = &mineral_features(i); + f->description = gettext("Quartz"); + f->texture = "mineral_quartz.png"; + f->dug_item = CONTENT_CRAFTITEM_QUARTZ; + f->min_level = 3; - i = MINERAL_SAPPHIRE; - f = &mineral_features(i); - f->description = gettext("Sapphire"); - f->texture = "mineral_sapphire.png"; - f->dug_item = CONTENT_CRAFTITEM_SAPPHIRE; - f->min_level = 3; - f->dug_count_max = 2; + i = MINERAL_RUBY; + f = &mineral_features(i); + f->description = gettext("Ruby"); + f->texture = "mineral_ruby.png"; + f->dug_item = CONTENT_CRAFTITEM_RUBY; + f->min_level = 3; + f->dug_count_max = 2; - i = MINERAL_SUNSTONE; - f = &mineral_features(i); - f->description = gettext("Sunstone"); - f->texture = "mineral_sunstone.png"; - f->dug_item = CONTENT_CRAFTITEM_SUNSTONE; - f->min_level = 3; - f->dug_count_max = 2; + i = MINERAL_TURQUOISE; + f = &mineral_features(i); + f->description = gettext("Turquoise"); + f->texture = "mineral_turquoise.png"; + f->dug_item = CONTENT_CRAFTITEM_TURQUOISE; + f->min_level = 3; + f->dug_count_max = 2; - i = MINERAL_SALT; - f = &mineral_features(i); - f->description = gettext("Salt"); - f->texture = "mineral_salt.png"; - f->dug_item = CONTENT_CRAFTITEM_SALT; - f->min_level = 1; - f->dug_count_max = 2; + i = MINERAL_AMETHYST; + f = &mineral_features(i); + f->description = gettext("Amethyst"); + f->texture = "mineral_amethyst.png"; + f->dug_item = CONTENT_CRAFTITEM_AMETHYST; + f->min_level = 3; + f->dug_count_max = 2; + + i = MINERAL_SAPPHIRE; + f = &mineral_features(i); + f->description = gettext("Sapphire"); + f->texture = "mineral_sapphire.png"; + f->dug_item = CONTENT_CRAFTITEM_SAPPHIRE; + f->min_level = 3; + f->dug_count_max = 2; + + i = MINERAL_SUNSTONE; + f = &mineral_features(i); + f->description = gettext("Sunstone"); + f->texture = "mineral_sunstone.png"; + f->dug_item = CONTENT_CRAFTITEM_SUNSTONE; + f->min_level = 3; + f->dug_count_max = 2; }