RelativePath=".\src\mapsector.cpp"\r
>\r
</File>\r
+ <File\r
+ RelativePath=".\src\materials.cpp"\r
+ >\r
+ </File>\r
<File\r
RelativePath=".\src\player.cpp"\r
>\r
basename = "../data/tool_wpick.png";
else if(m_toolname == "STPick")
basename = "../data/tool_stpick.png";
+ else if(m_toolname == "MesePick")
+ basename = "../data/tool_mesepick.png";
// Default to cloud texture
else
basename = tile_texture_path_get(TILE_CLOUD);
u32 barwidth = size.Width - barpad_x*2;
v2u32 barpos(barpad_x, size.Height - barheight - barpad_y);
- u32 barvalue_i = round((float)barwidth * value);
+ u32 barvalue_i = (u32)(((float)barwidth * value) + 0.5);
video::SColor active(255,255,0,0);
video::SColor inactive(255,0,0,0);
for(u16 i=0; i<to_be_removed_count; i++)\r
{\r
core::list<ChatLine>::Iterator\r
- i = chat_lines.begin();\r
- chat_lines.erase(i);\r
+ it = chat_lines.begin();\r
+ chat_lines.erase(it);\r
}\r
chat_guitext->setText(whole.c_str());\r
// Update gui element size and position\r
{
g_material_properties[material].setDiggingProperties("",
DiggingProperties(true, 15.0*toughness, 0));
+
g_material_properties[material].setDiggingProperties("WPick",
DiggingProperties(true, 2.0*toughness, 65535./20.*toughness));
g_material_properties[material].setDiggingProperties("STPick",
DiggingProperties(true, 1.0*toughness, 65535./50.*toughness));
+
+ /*g_material_properties[material].setDiggingProperties("MesePick",
+ DiggingProperties(true, 0.0*toughness, 65535./20.*toughness));*/
}
void initializeMaterialProperties()
g_material_properties[CONTENT_WOOD].setDiggingProperties("",
DiggingProperties(true, 1.0, 0));
-
+
+ /*
+ Add MesePick to everything
+ */
+ for(u16 i=0; i<MATERIAL_PROPERTIES_COUNT; i++)
+ {
+ g_material_properties[i].setDiggingProperties("MesePick",
+ DiggingProperties(true, 0.0, 65535./20.));
+ }
g_material_properties_initialized = true;
}
}
}
+ // Mese pick
+ if(!found)
+ {
+ ItemSpec specs[9];
+ specs[0] = ItemSpec(ITEM_MATERIAL, CONTENT_MESE);
+ specs[1] = ItemSpec(ITEM_MATERIAL, CONTENT_MESE);
+ specs[2] = ItemSpec(ITEM_MATERIAL, CONTENT_MESE);
+ specs[4] = ItemSpec(ITEM_CRAFT, "Stick");
+ specs[7] = ItemSpec(ITEM_CRAFT, "Stick");
+ if(checkItemCombination(items, specs))
+ {
+ rlist->addItem(new ToolItem("MesePick", 0));
+ found = true;
+ }
+ }
+
}
/*
}
else
{
+ /*{
+ InventoryItem *item = new MaterialItem(CONTENT_MESE, 6);
+ void* r = player->inventory.addItem("main", item);
+ assert(r == NULL);
+ }
{
InventoryItem *item = new MaterialItem(CONTENT_COALSTONE, 6);
void* r = player->inventory.addItem("main", item);
InventoryItem *item = new ToolItem("STPick", 32000);
void* r = player->inventory.addItem("main", item);
assert(r == NULL);
- }
+ }*/
/*// Give some lights
{
InventoryItem *item = new MaterialItem(CONTENT_TORCH, 999);
#include "constants.h"
#include "strfnd.h"
#include "porting.h"
-//#include "irrlichtwrapper.h"
+#include "materials.h"
/*
Settings.