From 9665cc2588cf37afbe6ede2bd5e5f36d23b1ffc6 Mon Sep 17 00:00:00 2001 From: darkrose Date: Mon, 21 Aug 2017 16:51:27 +1000 Subject: [PATCH] fix leaf drops, add desert sandstone --- data/textures/sandstone_block.png | Bin 661 -> 0 bytes data/textures/sandstone_brick.png | Bin 679 -> 0 bytes src/content_mapnode.cpp | 77 ++++++++++++++++++++++-------- src/content_mapnode.h | 5 +- src/content_mapnode_plants.cpp | 14 +++--- 5 files changed, 69 insertions(+), 27 deletions(-) delete mode 100644 data/textures/sandstone_block.png delete mode 100644 data/textures/sandstone_brick.png diff --git a/data/textures/sandstone_block.png b/data/textures/sandstone_block.png deleted file mode 100644 index 3d33f00e8bd5554c11f4bccf0972a7e7e01f1e44..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 661 zcmV;G0&4wPx#32;bRa{vGf6951U69E94oEQKA00(qQO+^RY3Kt9wIB~q~VE_OECrLy>R4C7t zQtNV>U=Wo%h<+#+r>3zc7;j{zlbOCl|Mn^RHhqOYSKBmb#3;yBi69`CZXEgm+4=U@ zw`cd9vy1)w@xAe$AR))9+Ua!k#X{4x@HK2;cv<9*>nchwNlu>YPG>WUB)6ui>x(zQ zF^b@2XD7yZn-i_iYssX;| zg<)8hrGOAaQ{^T0`#sAtIF1KFAc~@G+ei>zBay8&w&_F{nJehCNxa?HxkM-t9P!wJghbJtQDSQLNqWV(WMW zf;g7lyu4&Z*1(F%WRzwZ^+Cyt%<~;>exIf(cvVvZ%NdFW8hKF;hlAUj8)Lo3a15cg z=X%rW#57G1*+T6az&AO=Fc^jfmD|nM^_;7V7{genSqc_w+WjHeL&tj4mSvL^39vjD zFam*|eRu$WXqrA}S-0DLeqK&yQ^Q!*6BJqQAoQd!GKkY@sV}dut{X)K)n#6gBnfu= zzAuSVJ%OTWSi2<2Jl|Zc7M-pDt`j67HoML_-}^xvpWru5{%@M)SdyZmQ*2qgb6&Lg vHmpKG0`!KvI_J5pDC6-MxIr=Y-t+zkwEjAlPx#32;bRa{vGf6951U69E94oEQKA00(qQO+^RY3Kt9y6$Vw)mH+?(IY~r8R4C7t zl4)+*P!xsz22YsS#sg`Z5`>#TLZm92>TbG&s*5QSTWB-Z2x4#mV@B8Gd%biAx$;kc z=bU@)L%#;!m&;}I^t9=^!{PA5`NyItkbn@zoU$+K*0w76}<2djq#e%Ru9N+_nGd5o=G)?n7ZxzR!^E6G* z&d#RbQ>!Vm3;_0hpK*TCZlAYWkB?8RI?iM=p@cY&?btSu4aBKtq<^;%J6jBy;t zmSxT7bKNkGz;3tua(5Tb!m_F$t|*G&u;1^aD1tDU5ZiJ3H#c=nn@y(xpda793hxHr{&bnRs1k9xiCY&N5m*7Xz4I0jU!spIijmKE4?8cdhb0<2+~@pzKu8C2Zw--0|S z5=t=mhT$9$44AGPj@u-d008B{bt$1uw>cX5-RoWsr%f~Jx=u}1;n_UD{4opz31tu* z+Yl;Vdescription = gettext("Sand Stone"); + f->description = gettext("Sandstone"); f->setAllTextures("sandstone.png"); f->setInventoryTextureCube("sandstone.png", "sandstone.png", "sandstone.png"); f->draw_type = CDT_CUBELIKE; f->is_ground_content = true; - f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SAND)+" 4"; - f->type = CMT_DIRT; - f->dig_time = 1.0; + f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1"; + f->type = CMT_STONE; + f->dig_time = 0.5; crafting::setSoftBlockRecipe(CONTENT_SAND,CONTENT_SANDSTONE); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); - content_list_add("decrafting",i,1,0); i = CONTENT_SANDSTONE_BRICK; f = &content_features(i); - f->description = gettext("Sand Stone Bricks"); - f->setAllTextures("sandstone_brick.png"); - f->setInventoryTextureCube("sandstone_brick.png", "sandstone_brick.png", "sandstone_brick.png"); + f->description = gettext("Sandstone Bricks"); + f->setAllTextures("sandstone.png^overlay_brick.png"); + f->setInventoryTextureCube("sandstone.png^overlay_brick.png", "sandstone.png^overlay_brick.png", "sandstone.png^overlay_brick.png"); f->draw_type = CDT_CUBELIKE; f->is_ground_content = true; - f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SAND)+" 4"; - f->type = CMT_DIRT; - f->dig_time = 1.0; + f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1"; + f->type = CMT_STONE; + f->dig_time = 0.5; crafting::setBrickRecipe(CONTENT_SANDSTONE,CONTENT_SANDSTONE_BRICK); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); - content_list_add("decrafting",i,1,0); i = CONTENT_SANDSTONE_BLOCK; f = &content_features(i); - f->description = gettext("Sand Stone Blocks"); - f->setAllTextures("sandstone_block.png"); - f->setInventoryTextureCube("sandstone_block.png", "sandstone_block.png", "sandstone_block.png"); + f->description = gettext("Sandstone Blocks"); + f->setAllTextures("sandstone.png^overlay_block.png"); + f->setInventoryTextureCube("sandstone.png^overlay_block.png", "sandstone.png^overlay_block.png", "sandstone.png^overlay_block.png"); f->draw_type = CDT_CUBELIKE; f->is_ground_content = true; - f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SAND)+" 4"; - f->type = CMT_DIRT; - f->dig_time = 1.0; + f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1"; + f->type = CMT_STONE; + f->dig_time = 0.5; crafting::setBlockRecipe(CONTENT_SANDSTONE,CONTENT_SANDSTONE_BLOCK); content_list_add("craftguide",i,1,0); content_list_add("creative",i,1,0); - content_list_add("decrafting",i,1,0); + + i = CONTENT_DESERT_SANDSTONE; + f = &content_features(i); + f->description = gettext("Desert Sandstone"); + f->setAllTextures("sandstone_desert.png"); + f->setInventoryTextureCube("sandstone_desert.png", "sandstone_desert.png", "sandstone_desert.png"); + f->draw_type = CDT_CUBELIKE; + f->is_ground_content = true; + f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1"; + f->type = CMT_STONE; + f->dig_time = 0.5; + crafting::setSoftBlockRecipe(CONTENT_DESERT_SAND,CONTENT_DESERT_SANDSTONE); + content_list_add("craftguide",i,1,0); + content_list_add("creative",i,1,0); + + i = CONTENT_DESERT_SANDSTONE_BRICK; + f = &content_features(i); + f->description = gettext("Desert Sandstone Bricks"); + f->setAllTextures("sandstone_desert.png^overlay_brick.png"); + f->setInventoryTextureCube("sandstone_desert.png^overlay_brick.png", "sandstone_desert.png^overlay_brick.png", "sandstone_desert.png^overlay_brick.png"); + f->draw_type = CDT_CUBELIKE; + f->is_ground_content = true; + f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1"; + f->type = CMT_STONE; + f->dig_time = 0.5; + crafting::setBrickRecipe(CONTENT_DESERT_SANDSTONE,CONTENT_DESERT_SANDSTONE_BRICK); + content_list_add("craftguide",i,1,0); + content_list_add("creative",i,1,0); + + i = CONTENT_DESERT_SANDSTONE_BLOCK; + f = &content_features(i); + f->description = gettext("Desert Sandstone Blocks"); + f->setAllTextures("sandstone_desert.png^overlay_block.png"); + f->setInventoryTextureCube("sandstone_desert.png^overlay_block.png", "sandstone_desert.png^overlay_block.png", "sandstone_desert.png^overlay_block.png"); + f->draw_type = CDT_CUBELIKE; + f->is_ground_content = true; + f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1"; + f->type = CMT_STONE; + f->dig_time = 0.5; + crafting::setBlockRecipe(CONTENT_DESERT_SANDSTONE,CONTENT_DESERT_SANDSTONE_BLOCK); + content_list_add("craftguide",i,1,0); + content_list_add("creative",i,1,0); i = CONTENT_CLAY; f = &content_features(i); diff --git a/src/content_mapnode.h b/src/content_mapnode.h index 681b25e..b77cc0c 100644 --- a/src/content_mapnode.h +++ b/src/content_mapnode.h @@ -130,7 +130,10 @@ MapNode mapnode_translate_to_internal(MapNode n_from, u8 version); #define CONTENT_PINE_BARREL_SEALED 0x049 #define CONTENT_CLAY_VESSEL 0x04A #define CONTENT_CLAY_VESSEL_RAW 0x04B -// FREE 0x04C-0x07C +#define CONTENT_DESERT_SANDSTONE 0x04C +#define CONTENT_DESERT_SANDSTONE_BRICK 0x04D +#define CONTENT_DESERT_SANDSTONE_BLOCK 0x04E +// FREE 0x04F-0x07C // 0x7D-0x7F reserved values, air, ignore, etc #define CONTENT_CHAIR_CENTRE 0x080 #define CONTENT_CHAIR_ENDL 0x081 diff --git a/src/content_mapnode_plants.cpp b/src/content_mapnode_plants.cpp index a9dd504..f830575 100644 --- a/src/content_mapnode_plants.cpp +++ b/src/content_mapnode_plants.cpp @@ -255,7 +255,7 @@ void content_mapnode_plants(bool repeat) f->cook_result = std::string("CraftItem2 ")+itos(CONTENT_CRAFTITEM_RESIN)+" 1"; f->extra_dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SAPLING)+" 1"; f->extra_dug_item_rarity = 20; - f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_CRAFTITEM_STICK)+" 2"; + f->dug_item = std::string("CraftItem2 ")+itos(CONTENT_CRAFTITEM_STICK)+" 2"; f->ondig_special_drop = CONTENT_TRIMMED_LEAVES; f->ondig_special_drop_count = 1; f->ondig_special_tool = TT_SHEAR; @@ -287,7 +287,7 @@ void content_mapnode_plants(bool repeat) f->cook_result = std::string("CraftItem2 ")+itos(CONTENT_CRAFTITEM_RESIN)+" 1"; f->extra_dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SAPLING)+" 1"; f->extra_dug_item_rarity = 20; - f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_CRAFTITEM_STICK)+" 2"; + f->dug_item = std::string("CraftItem2 ")+itos(CONTENT_CRAFTITEM_STICK)+" 2"; f->ondig_special_drop = CONTENT_TRIMMED_LEAVES_AUTUMN; f->ondig_special_drop_count = 1; f->ondig_special_tool = TT_SHEAR; @@ -319,7 +319,7 @@ void content_mapnode_plants(bool repeat) f->cook_result = std::string("CraftItem2 ")+itos(CONTENT_CRAFTITEM_ASH)+" 1"; f->extra_dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SAPLING)+" 1"; f->extra_dug_item_rarity = 20; - f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_CRAFTITEM_STICK)+" 2"; + f->dug_item = std::string("CraftItem2 ")+itos(CONTENT_CRAFTITEM_STICK)+" 2"; f->ondig_special_drop = CONTENT_TRIMMED_LEAVES_WINTER; f->ondig_special_drop_count = 1; f->ondig_special_tool = TT_SHEAR; @@ -351,7 +351,7 @@ void content_mapnode_plants(bool repeat) f->cook_result = std::string("CraftItem2 ")+itos(CONTENT_CRAFTITEM_ASH)+" 1"; f->extra_dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SAPLING)+" 1"; f->extra_dug_item_rarity = 20; - f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_CRAFTITEM_STICK)+" 2"; + f->dug_item = std::string("CraftItem2 ")+itos(CONTENT_CRAFTITEM_STICK)+" 2"; f->ondig_special_drop = CONTENT_TRIMMED_LEAVES_WINTER; f->ondig_special_drop_count = 1; f->ondig_special_tool = TT_SHEAR; @@ -384,7 +384,7 @@ void content_mapnode_plants(bool repeat) f->cook_result = std::string("CraftItem2 ")+itos(CONTENT_CRAFTITEM_RESIN)+" 1"; f->extra_dug_item = std::string("MaterialItem2 ")+itos(CONTENT_APPLE_SAPLING)+" 1"; f->extra_dug_item_rarity = 20; - f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_CRAFTITEM_STICK)+" 2"; + f->dug_item = std::string("CraftItem2 ")+itos(CONTENT_CRAFTITEM_STICK)+" 2"; f->ondig_special_drop = CONTENT_TRIMMED_APPLE_LEAVES; f->ondig_special_drop_count = 1; f->ondig_special_tool = TT_SHEAR; @@ -416,7 +416,7 @@ void content_mapnode_plants(bool repeat) f->cook_result = std::string("CraftItem2 ")+itos(CONTENT_CRAFTITEM_RESIN)+" 1"; f->extra_dug_item = std::string("MaterialItem2 ")+itos(CONTENT_JUNGLESAPLING)+" 1"; f->extra_dug_item_rarity = 20; - f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_CRAFTITEM_STICK)+" 2"; + f->dug_item = std::string("CraftItem2 ")+itos(CONTENT_CRAFTITEM_STICK)+" 2"; f->ondig_special_drop = CONTENT_TRIMMED_JUNGLE_LEAVES; f->ondig_special_drop_count = 1; f->ondig_special_tool = TT_SHEAR; @@ -448,7 +448,7 @@ void content_mapnode_plants(bool repeat) f->cook_result = std::string("CraftItem2 ")+itos(CONTENT_CRAFTITEM_RESIN)+" 1"; f->extra_dug_item = std::string("MaterialItem2 ")+itos(CONTENT_CONIFER_SAPLING)+" 1"; f->extra_dug_item_rarity = 20; - f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_CRAFTITEM_STICK)+" 2"; + f->dug_item = std::string("CraftItem2 ")+itos(CONTENT_CRAFTITEM_STICK)+" 2"; f->ondig_special_drop = CONTENT_TRIMMED_CONIFER_LEAVES; f->ondig_special_drop_count = 1; f->ondig_special_tool = TT_SHEAR;