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
32 // TODO: Get rid of these and set up some attributes like toughness,
33 // fluffyness, and a funciton to calculate time and durability loss
34 // (and sound? and whatever else) from them
35 void setStoneLikeDiggingProperties(DiggingPropertiesList &list, float toughness);
36 void setDirtLikeDiggingProperties(DiggingPropertiesList &list, float toughness);
37 void setWoodLikeDiggingProperties(DiggingPropertiesList &list, float toughness);
39 content_t trans_table_19[21][2] = {
43 {CONTENT_GRASS_FOOTSTEPS, 6},
47 {CONTENT_COALSTONE, 11},
53 {CONTENT_MOSSYCOBBLE, 22},
55 {CONTENT_SANDSTONE, 24},
59 {CONTENT_PAPYRUS, 28},
60 {CONTENT_BOOKSHELF, 29},
63 MapNode mapnode_translate_from_internal(MapNode n_from, u8 version)
65 MapNode result = n_from;
68 content_t c_from = n_from.getContent();
69 for(u32 i=0; i<sizeof(trans_table_19)/sizeof(trans_table_19[0]); i++)
71 if(trans_table_19[i][0] == c_from)
73 result.setContent(trans_table_19[i][1]);
80 MapNode mapnode_translate_to_internal(MapNode n_from, u8 version)
82 MapNode result = n_from;
85 content_t c_from = n_from.getContent();
86 for(u32 i=0; i<sizeof(trans_table_19)/sizeof(trans_table_19[0]); i++)
88 if(trans_table_19[i][1] == c_from)
90 result.setContent(trans_table_19[i][0]);
98 void content_mapnode_init()
100 // Read some settings
101 bool new_style_water = g_settings.getBool("new_style_water");
102 bool new_style_leaves = g_settings.getBool("new_style_leaves");
103 bool invisible_stone = g_settings.getBool("invisible_stone");
106 ContentFeatures *f = NULL;
109 f = &content_features(i);
110 f->setAllTextures("stone.png");
111 f->setInventoryTextureCube("stone.png", "stone.png", "stone.png");
112 f->param_type = CPT_MINERAL;
113 f->is_ground_content = true;
114 f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_COBBLE)+" 1";
115 setStoneLikeDiggingProperties(f->digging_properties, 1.0);
117 f->solidness = 0; // For debugging, hides regular stone
120 f = &content_features(i);
121 f->setAllTextures("mud.png^grass_side.png");
122 f->setTexture(0, "grass.png");
123 f->setTexture(1, "mud.png");
124 f->param_type = CPT_MINERAL;
125 f->is_ground_content = true;
126 f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_MUD)+" 1";
127 setDirtLikeDiggingProperties(f->digging_properties, 1.0);
129 i = CONTENT_GRASS_FOOTSTEPS;
130 f = &content_features(i);
131 f->setAllTextures("mud.png^grass_side.png");
132 f->setTexture(0, "grass_footsteps.png");
133 f->setTexture(1, "mud.png");
134 f->param_type = CPT_MINERAL;
135 f->is_ground_content = true;
136 f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_MUD)+" 1";
137 setDirtLikeDiggingProperties(f->digging_properties, 1.0);
140 f = &content_features(i);
141 f->setAllTextures("mud.png");
142 f->setInventoryTextureCube("mud.png", "mud.png", "mud.png");
143 f->param_type = CPT_MINERAL;
144 f->is_ground_content = true;
145 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
146 setDirtLikeDiggingProperties(f->digging_properties, 1.0);
149 f = &content_features(i);
150 f->setAllTextures("sand.png");
151 f->setInventoryTextureCube("sand.png", "sand.png", "sand.png");
152 f->param_type = CPT_MINERAL;
153 f->is_ground_content = true;
154 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
155 setDirtLikeDiggingProperties(f->digging_properties, 1.0);
158 f = &content_features(i);
159 f->setAllTextures("gravel.png");
160 f->setInventoryTextureCube("gravel.png", "gravel.png", "gravel.png");
161 f->param_type = CPT_MINERAL;
162 f->is_ground_content = true;
163 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
164 setDirtLikeDiggingProperties(f->digging_properties, 1.75);
166 i = CONTENT_SANDSTONE;
167 f = &content_features(i);
168 f->setAllTextures("sandstone.png");
169 f->setInventoryTextureCube("sandstone.png", "sandstone.png", "sandstone.png");
170 f->param_type = CPT_MINERAL;
171 f->is_ground_content = true;
172 f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SAND)+" 1";
173 setDirtLikeDiggingProperties(f->digging_properties, 1.0);
176 f = &content_features(i);
177 f->setAllTextures("clay.png");
178 f->setInventoryTextureCube("clay.png", "clay.png", "clay.png");
179 f->param_type = CPT_MINERAL;
180 f->is_ground_content = true;
181 f->dug_item = std::string("CraftItem lump_of_clay 4");
182 setDirtLikeDiggingProperties(f->digging_properties, 1.0);
185 f = &content_features(i);
186 f->setAllTextures("brick.png");
187 f->setInventoryTextureCube("brick.png", "brick.png", "brick.png");
188 f->param_type = CPT_MINERAL;
189 f->is_ground_content = true;
190 f->dug_item = std::string("CraftItem clay_brick 4");
191 setStoneLikeDiggingProperties(f->digging_properties, 1.0);
194 f = &content_features(i);
195 f->setAllTextures("tree.png");
196 f->setTexture(0, "tree_top.png");
197 f->setTexture(1, "tree_top.png");
198 f->param_type = CPT_MINERAL;
199 f->is_ground_content = true;
200 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
201 setWoodLikeDiggingProperties(f->digging_properties, 1.0);
203 i = CONTENT_JUNGLETREE;
204 f = &content_features(i);
205 f->setAllTextures("jungletree.png");
206 f->setTexture(0, "jungletree_top.png");
207 f->setTexture(1, "jungletree_top.png");
208 f->param_type = CPT_MINERAL;
209 //f->is_ground_content = true;
210 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
211 setWoodLikeDiggingProperties(f->digging_properties, 1.0);
213 i = CONTENT_JUNGLEGRASS;
214 f = &content_features(i);
215 f->setInventoryTexture("junglegrass.png");
216 f->light_propagates = true;
217 f->param_type = CPT_LIGHT;
218 //f->is_ground_content = true;
219 f->air_equivalent = false; // grass grows underneath
220 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
221 f->solidness = 0; // drawn separately, makes no faces
223 setWoodLikeDiggingProperties(f->digging_properties, 0.10);
226 f = &content_features(i);
227 f->light_propagates = true;
228 //f->param_type = CPT_MINERAL;
229 f->param_type = CPT_LIGHT;
230 //f->is_ground_content = true;
233 f->solidness = 0; // drawn separately, makes no faces
234 f->setInventoryTextureCube("leaves.png", "leaves.png", "leaves.png");
238 f->setAllTextures("[noalpha:leaves.png");
240 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
241 setWoodLikeDiggingProperties(f->digging_properties, 0.15);
244 f = &content_features(i);
245 f->setAllTextures("cactus_side.png");
246 f->setTexture(0, "cactus_top.png");
247 f->setTexture(1, "cactus_top.png");
248 f->setInventoryTextureCube("cactus_top.png", "cactus_side.png", "cactus_side.png");
249 f->param_type = CPT_MINERAL;
250 f->is_ground_content = true;
251 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
252 setWoodLikeDiggingProperties(f->digging_properties, 0.75);
255 f = &content_features(i);
256 f->setInventoryTexture("papyrus.png");
257 f->light_propagates = true;
258 f->param_type = CPT_LIGHT;
259 f->is_ground_content = true;
260 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
261 f->solidness = 0; // drawn separately, makes no faces
263 setWoodLikeDiggingProperties(f->digging_properties, 0.25);
265 i = CONTENT_BOOKSHELF;
266 f = &content_features(i);
267 f->setAllTextures("bookshelf.png");
268 f->setTexture(0, "wood.png");
269 f->setTexture(1, "wood.png");
270 // FIXME: setInventoryTextureCube() only cares for the first texture
271 f->setInventoryTextureCube("bookshelf.png", "bookshelf.png", "bookshelf.png");
272 //f->setInventoryTextureCube("wood.png", "bookshelf.png", "bookshelf.png");
273 f->param_type = CPT_MINERAL;
274 f->is_ground_content = true;
275 setWoodLikeDiggingProperties(f->digging_properties, 0.75);
278 f = &content_features(i);
279 f->light_propagates = true;
280 f->sunlight_propagates = true;
281 f->param_type = CPT_LIGHT;
282 f->is_ground_content = true;
283 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
284 f->solidness = 0; // drawn separately, makes no faces
285 f->setInventoryTextureCube("glass.png", "glass.png", "glass.png");
286 setWoodLikeDiggingProperties(f->digging_properties, 0.15);
289 f = &content_features(i);
290 f->light_propagates = true;
291 f->param_type = CPT_LIGHT;
292 f->is_ground_content = true;
293 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
294 f->solidness = 0; // drawn separately, makes no faces
295 f->air_equivalent = true; // grass grows underneath
296 f->setInventoryTexture("item_fence.png");
297 setWoodLikeDiggingProperties(f->digging_properties, 0.75);
300 f = &content_features(i);
301 f->setInventoryTexture("rail.png");
302 f->light_propagates = true;
303 f->param_type = CPT_LIGHT;
304 f->is_ground_content = true;
305 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
306 f->solidness = 0; // drawn separately, makes no faces
307 f->air_equivalent = true; // grass grows underneath
309 setDirtLikeDiggingProperties(f->digging_properties, 0.75);
312 f = &content_features(i);
313 f->setInventoryTexture("ladder.png");
314 f->light_propagates = true;
315 f->param_type = CPT_LIGHT;
316 f->is_ground_content = true;
317 f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
318 f->wall_mounted = true;
320 f->air_equivalent = true;
323 setWoodLikeDiggingProperties(f->digging_properties, 0.5);
326 i = CONTENT_COALSTONE;
327 f = &content_features(i);
328 f->setAllTextures("stone.png^mineral_coal.png");
329 f->is_ground_content = true;
330 setStoneLikeDiggingProperties(f->digging_properties, 1.5);
333 f = &content_features(i);
334 f->setAllTextures("wood.png");
335 f->setInventoryTextureCube("wood.png", "wood.png", "wood.png");
336 f->is_ground_content = true;
337 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
338 setWoodLikeDiggingProperties(f->digging_properties, 0.75);
341 f = &content_features(i);
342 f->setAllTextures("mese.png");
343 f->setInventoryTextureCube("mese.png", "mese.png", "mese.png");
344 f->is_ground_content = true;
345 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
346 setStoneLikeDiggingProperties(f->digging_properties, 0.5);
349 f = &content_features(i);
350 f->setAllTextures("cloud.png");
351 f->setInventoryTextureCube("cloud.png", "cloud.png", "cloud.png");
352 f->is_ground_content = true;
353 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
356 f = &content_features(i);
357 f->param_type = CPT_LIGHT;
358 f->light_propagates = true;
359 f->sunlight_propagates = true;
362 f->pointable = false;
364 f->buildable_to = true;
365 f->air_equivalent = true;
368 f = &content_features(i);
369 f->setInventoryTextureCube("water.png", "water.png", "water.png");
370 f->param_type = CPT_LIGHT;
371 f->light_propagates = true;
372 f->solidness = 0; // Drawn separately, makes no faces
374 f->pointable = false;
376 f->buildable_to = true;
377 f->liquid_type = LIQUID_FLOWING;
378 f->liquid_alternative_flowing = CONTENT_WATER;
379 f->liquid_alternative_source = CONTENT_WATERSOURCE;
380 f->liquid_viscosity = WATER_VISC;
381 f->vertex_alpha = WATER_ALPHA;
382 if(f->special_material == NULL && g_texturesource)
384 // Flowing water material
385 f->special_material = new video::SMaterial;
386 f->special_material->setFlag(video::EMF_LIGHTING, false);
387 f->special_material->setFlag(video::EMF_BACK_FACE_CULLING, false);
388 f->special_material->setFlag(video::EMF_BILINEAR_FILTER, false);
389 f->special_material->setFlag(video::EMF_FOG_ENABLE, true);
390 f->special_material->MaterialType = video::EMT_TRANSPARENT_VERTEX_ALPHA;
391 AtlasPointer *pa_water1 = new AtlasPointer(g_texturesource->getTexture(
392 g_texturesource->getTextureId("water.png")));
393 f->special_material->setTexture(0, pa_water1->atlas);
394 f->special_atlas = pa_water1;
397 i = CONTENT_WATERSOURCE;
398 f = &content_features(i);
399 //f->setInventoryTexture("water.png");
400 f->setInventoryTextureCube("water.png", "water.png", "water.png");
403 f->solidness = 0; // drawn separately, makes no faces
411 t.texture = g_texturesource->getTexture("water.png");
413 t.alpha = WATER_ALPHA;
414 t.material_type = MATERIAL_ALPHA_VERTEX;
415 t.material_flags &= ~MATERIAL_FLAG_BACKFACE_CULLING;
418 f->param_type = CPT_LIGHT;
419 f->light_propagates = true;
421 f->pointable = false;
423 f->buildable_to = true;
424 f->liquid_type = LIQUID_SOURCE;
425 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
426 f->liquid_alternative_flowing = CONTENT_WATER;
427 f->liquid_alternative_source = CONTENT_WATERSOURCE;
428 f->liquid_viscosity = WATER_VISC;
429 f->vertex_alpha = WATER_ALPHA;
430 if(f->special_material == NULL && g_texturesource)
432 // Flowing water material
433 f->special_material = new video::SMaterial;
434 f->special_material->setFlag(video::EMF_LIGHTING, false);
435 f->special_material->setFlag(video::EMF_BACK_FACE_CULLING, false);
436 f->special_material->setFlag(video::EMF_BILINEAR_FILTER, false);
437 f->special_material->setFlag(video::EMF_FOG_ENABLE, true);
438 f->special_material->MaterialType = video::EMT_TRANSPARENT_VERTEX_ALPHA;
439 AtlasPointer *pa_water1 = new AtlasPointer(g_texturesource->getTexture(
440 g_texturesource->getTextureId("water.png")));
441 f->special_material->setTexture(0, pa_water1->atlas);
442 f->special_atlas = pa_water1;
446 f = &content_features(i);
447 f->setInventoryTextureCube("lava.png", "lava.png", "lava.png");
448 f->param_type = CPT_LIGHT;
449 f->light_propagates = false;
450 f->light_source = LIGHT_MAX-1;
451 f->solidness = 0; // Drawn separately, makes no faces
453 f->pointable = false;
455 f->buildable_to = true;
456 f->liquid_type = LIQUID_FLOWING;
457 f->liquid_alternative_flowing = CONTENT_LAVA;
458 f->liquid_alternative_source = CONTENT_LAVASOURCE;
459 f->liquid_viscosity = LAVA_VISC;
460 f->damage_per_second = 4*2;
461 if(f->special_material == NULL && g_texturesource)
463 // Flowing lava material
464 f->special_material = new video::SMaterial;
465 f->special_material->setFlag(video::EMF_LIGHTING, false);
466 f->special_material->setFlag(video::EMF_BACK_FACE_CULLING, false);
467 f->special_material->setFlag(video::EMF_BILINEAR_FILTER, false);
468 f->special_material->setFlag(video::EMF_FOG_ENABLE, true);
469 f->special_material->MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF;
470 AtlasPointer *pa_lava1 = new AtlasPointer(
471 g_texturesource->getTexture(
472 g_texturesource->getTextureId("lava.png")));
473 f->special_material->setTexture(0, pa_lava1->atlas);
474 f->special_atlas = pa_lava1;
477 i = CONTENT_LAVASOURCE;
478 f = &content_features(i);
479 f->setInventoryTextureCube("lava.png", "lava.png", "lava.png");
482 f->solidness = 0; // drawn separately, makes no faces
490 t.texture = g_texturesource->getTexture("lava.png");
493 //t.material_type = MATERIAL_ALPHA_VERTEX;
494 //t.material_flags &= ~MATERIAL_FLAG_BACKFACE_CULLING;
497 f->param_type = CPT_LIGHT;
498 f->light_propagates = false;
499 f->light_source = LIGHT_MAX-1;
501 f->pointable = false;
503 f->buildable_to = true;
504 f->liquid_type = LIQUID_SOURCE;
505 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
506 f->liquid_alternative_flowing = CONTENT_LAVA;
507 f->liquid_alternative_source = CONTENT_LAVASOURCE;
508 f->liquid_viscosity = LAVA_VISC;
509 f->damage_per_second = 4*2;
510 if(f->special_material == NULL && g_texturesource)
512 // Flowing lava material
513 f->special_material = new video::SMaterial;
514 f->special_material->setFlag(video::EMF_LIGHTING, false);
515 f->special_material->setFlag(video::EMF_BACK_FACE_CULLING, false);
516 f->special_material->setFlag(video::EMF_BILINEAR_FILTER, false);
517 f->special_material->setFlag(video::EMF_FOG_ENABLE, true);
518 f->special_material->MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF;
519 AtlasPointer *pa_lava1 = new AtlasPointer(
520 g_texturesource->getTexture(
521 g_texturesource->getTextureId("lava.png")));
522 f->special_material->setTexture(0, pa_lava1->atlas);
523 f->special_atlas = pa_lava1;
527 f = &content_features(i);
528 f->setInventoryTexture("torch_on_floor.png");
529 f->param_type = CPT_LIGHT;
530 f->light_propagates = true;
531 f->sunlight_propagates = true;
532 f->solidness = 0; // drawn separately, makes no faces
534 f->wall_mounted = true;
535 f->air_equivalent = true;
536 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
537 f->light_source = LIGHT_MAX-1;
538 f->digging_properties.set("", DiggingProperties(true, 0.0, 0));
540 i = CONTENT_SIGN_WALL;
541 f = &content_features(i);
542 f->setInventoryTexture("sign_wall.png");
543 f->param_type = CPT_LIGHT;
544 f->light_propagates = true;
545 f->sunlight_propagates = true;
546 f->solidness = 0; // drawn separately, makes no faces
548 f->wall_mounted = true;
549 f->air_equivalent = true;
550 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
551 if(f->initial_metadata == NULL)
552 f->initial_metadata = new SignNodeMetadata("Some sign");
553 f->digging_properties.set("", DiggingProperties(true, 0.5, 0));
556 f = &content_features(i);
557 f->param_type = CPT_FACEDIR_SIMPLE;
558 f->setAllTextures("chest_side.png");
559 f->setTexture(0, "chest_top.png");
560 f->setTexture(1, "chest_top.png");
561 f->setTexture(5, "chest_front.png"); // Z-
562 f->setInventoryTexture("chest_top.png");
563 //f->setInventoryTextureCube("chest_top.png", "chest_side.png", "chest_side.png");
564 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
565 if(f->initial_metadata == NULL)
566 f->initial_metadata = new ChestNodeMetadata();
567 setWoodLikeDiggingProperties(f->digging_properties, 1.0);
570 f = &content_features(i);
571 f->param_type = CPT_FACEDIR_SIMPLE;
572 f->setAllTextures("furnace_side.png");
573 f->setTexture(5, "furnace_front.png"); // Z-
574 f->setInventoryTexture("furnace_front.png");
575 //f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
576 f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_COBBLE)+" 6";
577 if(f->initial_metadata == NULL)
578 f->initial_metadata = new FurnaceNodeMetadata();
579 setStoneLikeDiggingProperties(f->digging_properties, 3.0);
582 f = &content_features(i);
583 f->setAllTextures("cobble.png");
584 f->setInventoryTextureCube("cobble.png", "cobble.png", "cobble.png");
585 f->param_type = CPT_NONE;
586 f->is_ground_content = true;
587 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
588 setStoneLikeDiggingProperties(f->digging_properties, 0.9);
590 i = CONTENT_MOSSYCOBBLE;
591 f = &content_features(i);
592 f->setAllTextures("mossycobble.png");
593 f->setInventoryTextureCube("mossycobble.png", "mossycobble.png", "mossycobble.png");
594 f->param_type = CPT_NONE;
595 f->is_ground_content = true;
596 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
597 setStoneLikeDiggingProperties(f->digging_properties, 0.8);
600 f = &content_features(i);
601 f->setAllTextures("steel_block.png");
602 f->setInventoryTextureCube("steel_block.png", "steel_block.png",
604 f->param_type = CPT_NONE;
605 f->is_ground_content = true;
606 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
607 setStoneLikeDiggingProperties(f->digging_properties, 5.0);
610 f = &content_features(i);
611 f->param_type = CPT_FACEDIR_SIMPLE;
612 f->setAllTextures("nc_side.png");
613 f->setTexture(5, "nc_front.png"); // Z-
614 f->setTexture(4, "nc_back.png"); // Z+
615 f->setInventoryTexture("nc_front.png");
616 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
617 setStoneLikeDiggingProperties(f->digging_properties, 3.0);
620 f = &content_features(i);
621 f->setAllTextures("nc_rb.png");
622 f->setInventoryTexture("nc_rb.png");
623 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
624 setStoneLikeDiggingProperties(f->digging_properties, 3.0);
626 // NOTE: Remember to add frequently used stuff to the texture atlas in tile.cpp
630 Add MesePick to everything
632 for(u16 i=0; i<=MAX_CONTENT; i++)
634 content_features(i).digging_properties.set("MesePick",
635 DiggingProperties(true, 0.0, 65535./1337));
640 void setStoneLikeDiggingProperties(DiggingPropertiesList &list, float toughness)
643 DiggingProperties(true, 15.0*toughness, 0));
646 DiggingProperties(true, 1.3*toughness, 65535./30.*toughness));
648 DiggingProperties(true, 0.75*toughness, 65535./100.*toughness));
649 list.set("SteelPick",
650 DiggingProperties(true, 0.50*toughness, 65535./333.*toughness));
652 /*list.set("MesePick",
653 DiggingProperties(true, 0.0*toughness, 65535./20.*toughness));*/
656 void setDirtLikeDiggingProperties(DiggingPropertiesList &list, float toughness)
659 DiggingProperties(true, 0.75*toughness, 0));
662 DiggingProperties(true, 0.4*toughness, 65535./50.*toughness));
664 DiggingProperties(true, 0.2*toughness, 65535./150.*toughness));
665 list.set("SteelShovel",
666 DiggingProperties(true, 0.15*toughness, 65535./400.*toughness));
669 void setWoodLikeDiggingProperties(DiggingPropertiesList &list, float toughness)
672 DiggingProperties(true, 3.0*toughness, 0));
675 DiggingProperties(true, 1.5*toughness, 65535./30.*toughness));
677 DiggingProperties(true, 0.75*toughness, 65535./100.*toughness));
679 DiggingProperties(true, 0.5*toughness, 65535./333.*toughness));