3 Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #include "content_mapnode.h"
25 #include "content_nodemeta.h"
27 #define WATER_ALPHA 160
29 // TODO: Get rid of these and set up some attributes like toughness,
30 // fluffyness, and a funciton to calculate time and durability loss
31 // (and sound? and whatever else) from them
32 void setStoneLikeDiggingProperties(DiggingPropertiesList &list, float toughness);
33 void setDirtLikeDiggingProperties(DiggingPropertiesList &list, float toughness);
34 void setWoodLikeDiggingProperties(DiggingPropertiesList &list, float toughness);
36 content_t trans_table_19[21][2] = {
40 {CONTENT_GRASS_FOOTSTEPS, 6},
44 {CONTENT_COALSTONE, 11},
50 {CONTENT_MOSSYCOBBLE, 22},
52 {CONTENT_SANDSTONE, 24},
56 {CONTENT_PAPYRUS, 28},
57 {CONTENT_BOOKSHELF, 29},
60 MapNode mapnode_translate_from_internal(MapNode n_from, u8 version)
62 MapNode result = n_from;
65 content_t c_from = n_from.getContent();
66 for(u32 i=0; i<sizeof(trans_table_19)/sizeof(trans_table_19[0]); i++)
68 if(trans_table_19[i][0] == c_from)
70 result.setContent(trans_table_19[i][1]);
77 MapNode mapnode_translate_to_internal(MapNode n_from, u8 version)
79 MapNode result = n_from;
82 content_t c_from = n_from.getContent();
83 for(u32 i=0; i<sizeof(trans_table_19)/sizeof(trans_table_19[0]); i++)
85 if(trans_table_19[i][1] == c_from)
87 result.setContent(trans_table_19[i][0]);
95 void content_mapnode_init()
98 bool new_style_water = g_settings.getBool("new_style_water");
99 bool new_style_leaves = g_settings.getBool("new_style_leaves");
100 bool invisible_stone = g_settings.getBool("invisible_stone");
103 ContentFeatures *f = NULL;
106 f = &content_features(i);
107 f->setAllTextures("stone.png");
108 f->setInventoryTextureCube("stone.png", "stone.png", "stone.png");
109 f->param_type = CPT_MINERAL;
110 f->is_ground_content = true;
111 f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_COBBLE)+" 1";
112 setStoneLikeDiggingProperties(f->digging_properties, 1.0);
114 f->solidness = 0; // For debugging, hides regular stone
117 f = &content_features(i);
118 f->setAllTextures("mud.png^grass_side.png");
119 f->setTexture(0, "grass.png");
120 f->setTexture(1, "mud.png");
121 f->param_type = CPT_MINERAL;
122 f->is_ground_content = true;
123 f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_MUD)+" 1";
124 setDirtLikeDiggingProperties(f->digging_properties, 1.0);
126 i = CONTENT_GRASS_FOOTSTEPS;
127 f = &content_features(i);
128 f->setAllTextures("mud.png^grass_side.png");
129 f->setTexture(0, "grass_footsteps.png");
130 f->setTexture(1, "mud.png");
131 f->param_type = CPT_MINERAL;
132 f->is_ground_content = true;
133 f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_MUD)+" 1";
134 setDirtLikeDiggingProperties(f->digging_properties, 1.0);
137 f = &content_features(i);
138 f->setAllTextures("mud.png");
139 f->setInventoryTextureCube("mud.png", "mud.png", "mud.png");
140 f->param_type = CPT_MINERAL;
141 f->is_ground_content = true;
142 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
143 setDirtLikeDiggingProperties(f->digging_properties, 1.0);
146 f = &content_features(i);
147 f->setAllTextures("sand.png");
148 f->setInventoryTextureCube("sand.png", "sand.png", "sand.png");
149 f->param_type = CPT_MINERAL;
150 f->is_ground_content = true;
151 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
152 setDirtLikeDiggingProperties(f->digging_properties, 1.0);
155 f = &content_features(i);
156 f->setAllTextures("gravel.png");
157 f->setInventoryTextureCube("gravel.png", "gravel.png", "gravel.png");
158 f->param_type = CPT_MINERAL;
159 f->is_ground_content = true;
160 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
161 setDirtLikeDiggingProperties(f->digging_properties, 1.75);
163 i = CONTENT_SANDSTONE;
164 f = &content_features(i);
165 f->setAllTextures("sandstone.png");
166 f->setInventoryTextureCube("sandstone.png", "sandstone.png", "sandstone.png");
167 f->param_type = CPT_MINERAL;
168 f->is_ground_content = true;
169 f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SAND)+" 1";
170 setDirtLikeDiggingProperties(f->digging_properties, 1.0);
173 f = &content_features(i);
174 f->setAllTextures("clay.png");
175 f->setInventoryTextureCube("clay.png", "clay.png", "clay.png");
176 f->param_type = CPT_MINERAL;
177 f->is_ground_content = true;
178 f->dug_item = std::string("CraftItem lump_of_clay 4");
179 setDirtLikeDiggingProperties(f->digging_properties, 1.0);
182 f = &content_features(i);
183 f->setAllTextures("brick.png");
184 f->setInventoryTextureCube("brick.png", "brick.png", "brick.png");
185 f->param_type = CPT_MINERAL;
186 f->is_ground_content = true;
187 f->dug_item = std::string("CraftItem clay_brick 4");
188 setStoneLikeDiggingProperties(f->digging_properties, 1.0);
191 f = &content_features(i);
192 f->setAllTextures("tree.png");
193 f->setTexture(0, "tree_top.png");
194 f->setTexture(1, "tree_top.png");
195 f->param_type = CPT_MINERAL;
196 f->is_ground_content = true;
197 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
198 setWoodLikeDiggingProperties(f->digging_properties, 1.0);
200 i = CONTENT_JUNGLETREE;
201 f = &content_features(i);
202 f->setAllTextures("jungletree.png");
203 f->setTexture(0, "jungletree_top.png");
204 f->setTexture(1, "jungletree_top.png");
205 f->param_type = CPT_MINERAL;
206 //f->is_ground_content = true;
207 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
208 setWoodLikeDiggingProperties(f->digging_properties, 1.0);
210 i = CONTENT_JUNGLEGRASS;
211 f = &content_features(i);
212 f->setInventoryTexture("junglegrass.png");
213 f->light_propagates = true;
214 f->param_type = CPT_LIGHT;
215 //f->is_ground_content = true;
216 f->air_equivalent = false; // grass grows underneath
217 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
218 f->solidness = 0; // drawn separately, makes no faces
220 setWoodLikeDiggingProperties(f->digging_properties, 0.10);
223 f = &content_features(i);
224 f->light_propagates = true;
225 //f->param_type = CPT_MINERAL;
226 f->param_type = CPT_LIGHT;
227 //f->is_ground_content = true;
230 f->solidness = 0; // drawn separately, makes no faces
231 f->setInventoryTextureCube("leaves.png", "leaves.png", "leaves.png");
235 f->setAllTextures("[noalpha:leaves.png");
237 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
238 setWoodLikeDiggingProperties(f->digging_properties, 0.15);
241 f = &content_features(i);
242 f->setAllTextures("cactus_side.png");
243 f->setTexture(0, "cactus_top.png");
244 f->setTexture(1, "cactus_top.png");
245 f->setInventoryTextureCube("cactus_top.png", "cactus_side.png", "cactus_side.png");
246 f->param_type = CPT_MINERAL;
247 f->is_ground_content = true;
248 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
249 setWoodLikeDiggingProperties(f->digging_properties, 0.75);
252 f = &content_features(i);
253 f->setInventoryTexture("papyrus.png");
254 f->light_propagates = true;
255 f->param_type = CPT_LIGHT;
256 f->is_ground_content = true;
257 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
258 f->solidness = 0; // drawn separately, makes no faces
260 setWoodLikeDiggingProperties(f->digging_properties, 0.25);
262 i = CONTENT_BOOKSHELF;
263 f = &content_features(i);
264 f->setAllTextures("bookshelf.png");
265 f->setTexture(0, "wood.png");
266 f->setTexture(1, "wood.png");
267 // FIXME: setInventoryTextureCube() only cares for the first texture
268 f->setInventoryTextureCube("bookshelf.png", "bookshelf.png", "bookshelf.png");
269 //f->setInventoryTextureCube("wood.png", "bookshelf.png", "bookshelf.png");
270 f->param_type = CPT_MINERAL;
271 f->is_ground_content = true;
272 setWoodLikeDiggingProperties(f->digging_properties, 0.75);
275 f = &content_features(i);
276 f->light_propagates = true;
277 f->sunlight_propagates = true;
278 f->param_type = CPT_LIGHT;
279 f->is_ground_content = true;
280 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
281 f->solidness = 0; // drawn separately, makes no faces
282 f->setInventoryTextureCube("glass.png", "glass.png", "glass.png");
283 setWoodLikeDiggingProperties(f->digging_properties, 0.15);
286 f = &content_features(i);
287 f->light_propagates = true;
288 f->param_type = CPT_LIGHT;
289 f->is_ground_content = true;
290 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
291 f->solidness = 0; // drawn separately, makes no faces
292 f->air_equivalent = true; // grass grows underneath
293 f->setInventoryTexture("item_fence.png");
294 setWoodLikeDiggingProperties(f->digging_properties, 0.75);
297 f = &content_features(i);
298 f->setInventoryTexture("rail.png");
299 f->light_propagates = true;
300 f->param_type = CPT_LIGHT;
301 f->is_ground_content = true;
302 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
303 f->solidness = 0; // drawn separately, makes no faces
304 f->air_equivalent = true; // grass grows underneath
306 setDirtLikeDiggingProperties(f->digging_properties, 0.75);
309 f = &content_features(i);
310 f->setInventoryTexture("ladder.png");
311 f->light_propagates = true;
312 f->param_type = CPT_LIGHT;
313 f->is_ground_content = true;
314 f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
315 f->wall_mounted = true;
317 f->air_equivalent = true;
320 setWoodLikeDiggingProperties(f->digging_properties, 0.5);
323 i = CONTENT_COALSTONE;
324 f = &content_features(i);
325 f->setAllTextures("stone.png^mineral_coal.png");
326 f->is_ground_content = true;
327 setStoneLikeDiggingProperties(f->digging_properties, 1.5);
330 f = &content_features(i);
331 f->setAllTextures("wood.png");
332 f->setInventoryTextureCube("wood.png", "wood.png", "wood.png");
333 f->is_ground_content = true;
334 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
335 setWoodLikeDiggingProperties(f->digging_properties, 0.75);
338 f = &content_features(i);
339 f->setAllTextures("mese.png");
340 f->setInventoryTextureCube("mese.png", "mese.png", "mese.png");
341 f->is_ground_content = true;
342 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
343 setStoneLikeDiggingProperties(f->digging_properties, 0.5);
346 f = &content_features(i);
347 f->setAllTextures("cloud.png");
348 f->setInventoryTextureCube("cloud.png", "cloud.png", "cloud.png");
349 f->is_ground_content = true;
350 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
353 f = &content_features(i);
354 f->param_type = CPT_LIGHT;
355 f->light_propagates = true;
356 f->sunlight_propagates = true;
359 f->pointable = false;
361 f->buildable_to = true;
362 f->air_equivalent = true;
365 f = &content_features(i);
366 f->setInventoryTextureCube("water.png", "water.png", "water.png");
367 f->param_type = CPT_LIGHT;
368 f->light_propagates = true;
369 f->solidness = 0; // Drawn separately, makes no faces
371 f->pointable = false;
373 f->buildable_to = true;
374 f->liquid_type = LIQUID_FLOWING;
375 f->liquid_alternative_flowing = CONTENT_WATER;
376 f->liquid_alternative_source = CONTENT_WATERSOURCE;
377 f->vertex_alpha = WATER_ALPHA;
378 if(f->special_material == NULL && g_texturesource)
380 // Flowing water material
381 f->special_material = new video::SMaterial;
382 f->special_material->setFlag(video::EMF_LIGHTING, false);
383 f->special_material->setFlag(video::EMF_BACK_FACE_CULLING, false);
384 f->special_material->setFlag(video::EMF_BILINEAR_FILTER, false);
385 f->special_material->setFlag(video::EMF_FOG_ENABLE, true);
386 f->special_material->MaterialType = video::EMT_TRANSPARENT_VERTEX_ALPHA;
387 AtlasPointer *pa_water1 = new AtlasPointer(g_texturesource->getTexture(
388 g_texturesource->getTextureId("water.png")));
389 f->special_material->setTexture(0, pa_water1->atlas);
390 f->special_atlas = pa_water1;
393 i = CONTENT_WATERSOURCE;
394 f = &content_features(i);
395 //f->setInventoryTexture("water.png");
396 f->setInventoryTextureCube("water.png", "water.png", "water.png");
399 f->solidness = 0; // drawn separately, makes no faces
407 t.texture = g_texturesource->getTexture("water.png");
409 t.alpha = WATER_ALPHA;
410 t.material_type = MATERIAL_ALPHA_VERTEX;
411 t.material_flags &= ~MATERIAL_FLAG_BACKFACE_CULLING;
414 f->param_type = CPT_LIGHT;
415 f->light_propagates = true;
417 f->pointable = false;
419 f->buildable_to = true;
420 f->liquid_type = LIQUID_SOURCE;
421 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
422 f->liquid_alternative_flowing = CONTENT_WATER;
423 f->liquid_alternative_source = CONTENT_WATERSOURCE;
424 f->vertex_alpha = WATER_ALPHA;
425 if(f->special_material == NULL && g_texturesource)
427 // Flowing water material
428 f->special_material = new video::SMaterial;
429 f->special_material->setFlag(video::EMF_LIGHTING, false);
430 f->special_material->setFlag(video::EMF_BACK_FACE_CULLING, false);
431 f->special_material->setFlag(video::EMF_BILINEAR_FILTER, false);
432 f->special_material->setFlag(video::EMF_FOG_ENABLE, true);
433 f->special_material->MaterialType = video::EMT_TRANSPARENT_VERTEX_ALPHA;
434 AtlasPointer *pa_water1 = new AtlasPointer(g_texturesource->getTexture(
435 g_texturesource->getTextureId("water.png")));
436 f->special_material->setTexture(0, pa_water1->atlas);
437 f->special_atlas = pa_water1;
441 f = &content_features(i);
442 f->setInventoryTextureCube("lava.png", "lava.png", "lava.png");
443 f->param_type = CPT_LIGHT;
444 f->light_propagates = false;
445 f->light_source = LIGHT_MAX-1;
446 f->solidness = 0; // Drawn separately, makes no faces
448 f->pointable = false;
450 f->buildable_to = true;
451 f->liquid_type = LIQUID_FLOWING;
452 f->liquid_alternative_flowing = CONTENT_LAVA;
453 f->liquid_alternative_source = CONTENT_LAVASOURCE;
454 f->damage_per_second = 4*2;
455 if(f->special_material == NULL && g_texturesource)
457 // Flowing lava material
458 f->special_material = new video::SMaterial;
459 f->special_material->setFlag(video::EMF_LIGHTING, false);
460 f->special_material->setFlag(video::EMF_BACK_FACE_CULLING, false);
461 f->special_material->setFlag(video::EMF_BILINEAR_FILTER, false);
462 f->special_material->setFlag(video::EMF_FOG_ENABLE, true);
463 f->special_material->MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF;
464 AtlasPointer *pa_lava1 = new AtlasPointer(
465 g_texturesource->getTexture(
466 g_texturesource->getTextureId("lava.png")));
467 f->special_material->setTexture(0, pa_lava1->atlas);
468 f->special_atlas = pa_lava1;
471 i = CONTENT_LAVASOURCE;
472 f = &content_features(i);
473 f->setInventoryTextureCube("lava.png", "lava.png", "lava.png");
476 f->solidness = 0; // drawn separately, makes no faces
484 t.texture = g_texturesource->getTexture("lava.png");
487 //t.material_type = MATERIAL_ALPHA_VERTEX;
488 //t.material_flags &= ~MATERIAL_FLAG_BACKFACE_CULLING;
491 f->param_type = CPT_LIGHT;
492 f->light_propagates = false;
493 f->light_source = LIGHT_MAX-1;
495 f->pointable = false;
497 f->buildable_to = true;
498 f->liquid_type = LIQUID_SOURCE;
499 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
500 f->liquid_alternative_flowing = CONTENT_LAVA;
501 f->liquid_alternative_source = CONTENT_LAVASOURCE;
502 f->damage_per_second = 4*2;
503 if(f->special_material == NULL && g_texturesource)
505 // Flowing lava material
506 f->special_material = new video::SMaterial;
507 f->special_material->setFlag(video::EMF_LIGHTING, false);
508 f->special_material->setFlag(video::EMF_BACK_FACE_CULLING, false);
509 f->special_material->setFlag(video::EMF_BILINEAR_FILTER, false);
510 f->special_material->setFlag(video::EMF_FOG_ENABLE, true);
511 f->special_material->MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF;
512 AtlasPointer *pa_lava1 = new AtlasPointer(
513 g_texturesource->getTexture(
514 g_texturesource->getTextureId("lava.png")));
515 f->special_material->setTexture(0, pa_lava1->atlas);
516 f->special_atlas = pa_lava1;
520 f = &content_features(i);
521 f->setInventoryTexture("torch_on_floor.png");
522 f->param_type = CPT_LIGHT;
523 f->light_propagates = true;
524 f->sunlight_propagates = true;
525 f->solidness = 0; // drawn separately, makes no faces
527 f->wall_mounted = true;
528 f->air_equivalent = true;
529 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
530 f->light_source = LIGHT_MAX-1;
531 f->digging_properties.set("", DiggingProperties(true, 0.0, 0));
533 i = CONTENT_SIGN_WALL;
534 f = &content_features(i);
535 f->setInventoryTexture("sign_wall.png");
536 f->param_type = CPT_LIGHT;
537 f->light_propagates = true;
538 f->sunlight_propagates = true;
539 f->solidness = 0; // drawn separately, makes no faces
541 f->wall_mounted = true;
542 f->air_equivalent = true;
543 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
544 if(f->initial_metadata == NULL)
545 f->initial_metadata = new SignNodeMetadata("Some sign");
546 f->digging_properties.set("", DiggingProperties(true, 0.5, 0));
549 f = &content_features(i);
550 f->param_type = CPT_FACEDIR_SIMPLE;
551 f->setAllTextures("chest_side.png");
552 f->setTexture(0, "chest_top.png");
553 f->setTexture(1, "chest_top.png");
554 f->setTexture(5, "chest_front.png"); // Z-
555 f->setInventoryTexture("chest_top.png");
556 //f->setInventoryTextureCube("chest_top.png", "chest_side.png", "chest_side.png");
557 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
558 if(f->initial_metadata == NULL)
559 f->initial_metadata = new ChestNodeMetadata();
560 setWoodLikeDiggingProperties(f->digging_properties, 1.0);
563 f = &content_features(i);
564 f->param_type = CPT_FACEDIR_SIMPLE;
565 f->setAllTextures("furnace_side.png");
566 f->setTexture(5, "furnace_front.png"); // Z-
567 f->setInventoryTexture("furnace_front.png");
568 //f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
569 f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_COBBLE)+" 6";
570 if(f->initial_metadata == NULL)
571 f->initial_metadata = new FurnaceNodeMetadata();
572 setStoneLikeDiggingProperties(f->digging_properties, 3.0);
575 f = &content_features(i);
576 f->setAllTextures("cobble.png");
577 f->setInventoryTextureCube("cobble.png", "cobble.png", "cobble.png");
578 f->param_type = CPT_NONE;
579 f->is_ground_content = true;
580 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
581 setStoneLikeDiggingProperties(f->digging_properties, 0.9);
583 i = CONTENT_MOSSYCOBBLE;
584 f = &content_features(i);
585 f->setAllTextures("mossycobble.png");
586 f->setInventoryTextureCube("mossycobble.png", "mossycobble.png", "mossycobble.png");
587 f->param_type = CPT_NONE;
588 f->is_ground_content = true;
589 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
590 setStoneLikeDiggingProperties(f->digging_properties, 0.8);
593 f = &content_features(i);
594 f->setAllTextures("steel_block.png");
595 f->setInventoryTextureCube("steel_block.png", "steel_block.png",
597 f->param_type = CPT_NONE;
598 f->is_ground_content = true;
599 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
600 setStoneLikeDiggingProperties(f->digging_properties, 5.0);
603 f = &content_features(i);
604 f->param_type = CPT_FACEDIR_SIMPLE;
605 f->setAllTextures("nc_side.png");
606 f->setTexture(5, "nc_front.png"); // Z-
607 f->setTexture(4, "nc_back.png"); // Z+
608 f->setInventoryTexture("nc_front.png");
609 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
610 setStoneLikeDiggingProperties(f->digging_properties, 3.0);
613 f = &content_features(i);
614 f->setAllTextures("nc_rb.png");
615 f->setInventoryTexture("nc_rb.png");
616 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
617 setStoneLikeDiggingProperties(f->digging_properties, 3.0);
619 // NOTE: Remember to add frequently used stuff to the texture atlas in tile.cpp
623 Add MesePick to everything
625 for(u16 i=0; i<=MAX_CONTENT; i++)
627 content_features(i).digging_properties.set("MesePick",
628 DiggingProperties(true, 0.0, 65535./1337));
633 void setStoneLikeDiggingProperties(DiggingPropertiesList &list, float toughness)
636 DiggingProperties(true, 15.0*toughness, 0));
639 DiggingProperties(true, 1.3*toughness, 65535./30.*toughness));
641 DiggingProperties(true, 0.75*toughness, 65535./100.*toughness));
642 list.set("SteelPick",
643 DiggingProperties(true, 0.50*toughness, 65535./333.*toughness));
645 /*list.set("MesePick",
646 DiggingProperties(true, 0.0*toughness, 65535./20.*toughness));*/
649 void setDirtLikeDiggingProperties(DiggingPropertiesList &list, float toughness)
652 DiggingProperties(true, 0.75*toughness, 0));
655 DiggingProperties(true, 0.4*toughness, 65535./50.*toughness));
657 DiggingProperties(true, 0.2*toughness, 65535./150.*toughness));
658 list.set("SteelShovel",
659 DiggingProperties(true, 0.15*toughness, 65535./400.*toughness));
662 void setWoodLikeDiggingProperties(DiggingPropertiesList &list, float toughness)
665 DiggingProperties(true, 3.0*toughness, 0));
668 DiggingProperties(true, 1.5*toughness, 65535./30.*toughness));
670 DiggingProperties(true, 0.75*toughness, 65535./100.*toughness));
672 DiggingProperties(true, 0.5*toughness, 65535./333.*toughness));