diff --git a/data/textures/mineral_amethyst.png b/data/textures/mineral_amethyst.png new file mode 100644 index 0000000..9dbc5d9 Binary files /dev/null and b/data/textures/mineral_amethyst.png differ diff --git a/data/textures/mineral_ruby.png b/data/textures/mineral_ruby.png new file mode 100644 index 0000000..22bf015 Binary files /dev/null and b/data/textures/mineral_ruby.png differ diff --git a/data/textures/mineral_sapphire.png b/data/textures/mineral_sapphire.png new file mode 100644 index 0000000..7cc58b9 Binary files /dev/null and b/data/textures/mineral_sapphire.png differ diff --git a/data/textures/mineral_sunstone.png b/data/textures/mineral_sunstone.png new file mode 100644 index 0000000..fc63769 Binary files /dev/null and b/data/textures/mineral_sunstone.png differ diff --git a/data/textures/mineral_turquoise.png b/data/textures/mineral_turquoise.png new file mode 100644 index 0000000..cc28d63 Binary files /dev/null and b/data/textures/mineral_turquoise.png differ diff --git a/src/character_creator.h b/src/character_creator.h index 00e4da7..b5b9ded 100644 --- a/src/character_creator.h +++ b/src/character_creator.h @@ -107,8 +107,6 @@ public: chardef += std::string(":")+m_parts["hairtone"]; chardef += std::string(":")+m_parts["hair"]; chardef += std::string(":")+m_parts["face"]; - - printf("chardef '%s'\n",chardef.c_str()); } private: diff --git a/src/content_nodemeta.cpp b/src/content_nodemeta.cpp index 5cc3c09..1774a82 100644 --- a/src/content_nodemeta.cpp +++ b/src/content_nodemeta.cpp @@ -3020,11 +3020,8 @@ bool ForgeNodeMetadata::step(float dtime, v3s16 pos, ServerEnvironment *env) items[i] && (items[i]->getContent()&CONTENT_CRAFTITEM_MASK) == CONTENT_CRAFTITEM_MASK && items[i]->getData() > 0 - ) { - printf("CRAFT: pre: %X %X\n",data,items[i]->getData()); + ) enchantment_set(&data,items[i]->getData()); - printf("CRAFT: post: %X %X\n",data,items[i]->getData()); - } } result->setData(data); } diff --git a/src/content_toolitem.cpp b/src/content_toolitem.cpp index c2365fe..0e92d1c 100644 --- a/src/content_toolitem.cpp +++ b/src/content_toolitem.cpp @@ -115,6 +115,9 @@ DiggingProperties getDiggingProperties(content_t content, content_t tool, u16 da case ENCHANTMENT_LONGLASTING: wear /= (info.level+1); break; + case ENCHANTMENT_FLAME: + wear *= 2.5; + break; default:; } } diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp index 2ba41dd..03aa802 100644 --- a/src/guiFormSpecMenu.cpp +++ b/src/guiFormSpecMenu.cpp @@ -230,7 +230,6 @@ void GUIFormSpecMenu::regenerateGui(v2u32 screensize) v2s32 pos = basepos; pos.Y = (m_fields.size()+1*50); - printf("%d\n",pos.Y); v2s32 size = DesiredRect.getSize(); rect = core::rect(size.X/2-150, pos.Y, (size.X/2-150)+300, pos.Y+30); }else{ diff --git a/src/mapgen.cpp b/src/mapgen.cpp index cc608f2..6d15926 100644 --- a/src/mapgen.cpp +++ b/src/mapgen.cpp @@ -1494,12 +1494,32 @@ void make_block(BlockMakeData *data) s16 x = mineralrandom.range(node_min.X+1, node_max.X-1); s16 y = mineralrandom.range(node_min.Y+1, node_max.Y-1); s16 z = mineralrandom.range(node_min.Z+1, node_max.Z-1); + // TODO: at random, some should be gems + u8 type = mineralrandom.next()%12; + switch (type) { + case 0: + type = MINERAL_RUBY; + break; + case 1: + type = MINERAL_TURQUOISE; + break; + case 2: + type = MINERAL_AMETHYST; + break; + case 3: + type = MINERAL_SAPPHIRE; + break; + case 4: + type = MINERAL_SUNSTONE; + break; + default: + type = MINERAL_MITHRIL; + } for (u16 i=0; i<27; i++) { v3s16 p = v3s16(x,y,z) + g_27dirs[i]; u32 vi = vmanip.m_area.index(p); - // TODO: at random, some should be gems if (vmanip.m_data[vi].getContent() == base_content && mineralrandom.next()%8 == 0) - vmanip.m_data[vi] = MapNode(base_content,MINERAL_MITHRIL); + vmanip.m_data[vi] = MapNode(base_content,type); } } diff --git a/src/mineral.cpp b/src/mineral.cpp index 84ac985..06ca16e 100644 --- a/src/mineral.cpp +++ b/src/mineral.cpp @@ -134,4 +134,39 @@ void init_mineral() f->texture = "mineral_mithril.png"; f->dug_item = CONTENT_CRAFTITEM_MITHRIL_RAW; f->min_level = 3; + + i = MINERAL_RUBY; + f = &mineral_features(i); + f->texture = "mineral_ruby.png"; + f->dug_item = CONTENT_CRAFTITEM_RUBY; + f->min_level = 3; + f->dug_count_max = 2; + + i = MINERAL_TURQUOISE; + f = &mineral_features(i); + f->texture = "mineral_turquoise.png"; + f->dug_item = CONTENT_CRAFTITEM_TURQUOISE; + f->min_level = 3; + f->dug_count_max = 2; + + i = MINERAL_AMETHYST; + f = &mineral_features(i); + 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->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->texture = "mineral_sunstone.png"; + f->dug_item = CONTENT_CRAFTITEM_SUNSTONE; + f->min_level = 3; + f->dug_count_max = 2; } diff --git a/src/mineral.h b/src/mineral.h index 620de19..18c3a7e 100644 --- a/src/mineral.h +++ b/src/mineral.h @@ -38,6 +38,11 @@ #define MINERAL_GOLD 6 #define MINERAL_QUARTZ 7 #define MINERAL_MITHRIL 8 +#define MINERAL_RUBY 9 +#define MINERAL_TURQUOISE 10 +#define MINERAL_AMETHYST 11 +#define MINERAL_SAPPHIRE 12 +#define MINERAL_SUNSTONE 13 struct MineralFeatures { std::string texture; diff --git a/src/sha1.cpp b/src/sha1.cpp index ec0763a..1f1013c 100644 --- a/src/sha1.cpp +++ b/src/sha1.cpp @@ -90,7 +90,7 @@ SHA1::~SHA1() void SHA1::process() { assert( unprocessedBytes == 64 ); - //printf( "process: " ); hexPrinter( bytes, 64 ); printf( "\n" ); + int t; Uint32 a, b, c, d, e, K, f, W[80]; // starting values @@ -129,7 +129,6 @@ void SHA1::process() c = lrot(b,30); b = a; a = temp; - //printf( "t=%d %08x %08x %08x %08x %08x\n",t,a,b,c,d,e ); } /* add variables */ H0 += a; @@ -137,7 +136,6 @@ void SHA1::process() H2 += c; H3 += d; H4 += e; - //printf( "Current: %08x %08x %08x %08x %08x\n",H0,H1,H2,H3,H4 ); /* all bytes have been processed */ unprocessedBytes = 0; }