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);
40 A conversion table for backwards compatibility.
41 Maps <=v19 content types to current ones.
42 Should never be touched.
44 content_t trans_table_19[21][2] = {
48 {CONTENT_GRASS_FOOTSTEPS, 6},
52 {CONTENT_COALSTONE, 11},
58 {CONTENT_MOSSYCOBBLE, 22},
60 {CONTENT_SANDSTONE, 24},
64 {CONTENT_PAPYRUS, 28},
65 {CONTENT_BOOKSHELF, 29},
68 MapNode mapnode_translate_from_internal(MapNode n_from, u8 version)
70 MapNode result = n_from;
73 content_t c_from = n_from.getContent();
74 for(u32 i=0; i<sizeof(trans_table_19)/sizeof(trans_table_19[0]); i++)
76 if(trans_table_19[i][0] == c_from)
78 result.setContent(trans_table_19[i][1]);
85 MapNode mapnode_translate_to_internal(MapNode n_from, u8 version)
87 MapNode result = n_from;
90 content_t c_from = n_from.getContent();
91 for(u32 i=0; i<sizeof(trans_table_19)/sizeof(trans_table_19[0]); i++)
93 if(trans_table_19[i][1] == c_from)
95 result.setContent(trans_table_19[i][0]);
103 void content_mapnode_init()
105 // Read some settings
106 bool new_style_water = g_settings.getBool("new_style_water");
107 bool new_style_leaves = g_settings.getBool("new_style_leaves");
108 bool invisible_stone = g_settings.getBool("invisible_stone");
111 ContentFeatures *f = NULL;
114 f = &content_features(i);
115 f->setAllTextures("stone.png");
116 f->setInventoryTextureCube("stone.png", "stone.png", "stone.png");
117 f->param_type = CPT_MINERAL;
118 f->is_ground_content = true;
119 f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_COBBLE)+" 1";
120 setStoneLikeDiggingProperties(f->digging_properties, 1.0);
122 f->solidness = 0; // For debugging, hides regular stone
125 f = &content_features(i);
126 f->setAllTextures("mud.png^grass_side.png");
127 f->setTexture(0, "grass.png");
128 f->setTexture(1, "mud.png");
129 f->param_type = CPT_MINERAL;
130 f->is_ground_content = true;
131 f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_MUD)+" 1";
132 setDirtLikeDiggingProperties(f->digging_properties, 1.0);
134 i = CONTENT_GRASS_FOOTSTEPS;
135 f = &content_features(i);
136 f->setAllTextures("mud.png^grass_side.png");
137 f->setTexture(0, "grass_footsteps.png");
138 f->setTexture(1, "mud.png");
139 f->param_type = CPT_MINERAL;
140 f->is_ground_content = true;
141 f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_MUD)+" 1";
142 setDirtLikeDiggingProperties(f->digging_properties, 1.0);
145 f = &content_features(i);
146 f->setAllTextures("mud.png");
147 f->setInventoryTextureCube("mud.png", "mud.png", "mud.png");
148 f->param_type = CPT_MINERAL;
149 f->is_ground_content = true;
150 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
151 setDirtLikeDiggingProperties(f->digging_properties, 1.0);
154 f = &content_features(i);
155 f->setAllTextures("sand.png");
156 f->setInventoryTextureCube("sand.png", "sand.png", "sand.png");
157 f->param_type = CPT_MINERAL;
158 f->is_ground_content = true;
159 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
160 setDirtLikeDiggingProperties(f->digging_properties, 1.0);
163 f = &content_features(i);
164 f->setAllTextures("gravel.png");
165 f->setInventoryTextureCube("gravel.png", "gravel.png", "gravel.png");
166 f->param_type = CPT_MINERAL;
167 f->is_ground_content = true;
168 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
169 setDirtLikeDiggingProperties(f->digging_properties, 1.75);
171 i = CONTENT_SANDSTONE;
172 f = &content_features(i);
173 f->setAllTextures("sandstone.png");
174 f->setInventoryTextureCube("sandstone.png", "sandstone.png", "sandstone.png");
175 f->param_type = CPT_MINERAL;
176 f->is_ground_content = true;
177 f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SAND)+" 1";
178 setDirtLikeDiggingProperties(f->digging_properties, 1.0);
181 f = &content_features(i);
182 f->setAllTextures("clay.png");
183 f->setInventoryTextureCube("clay.png", "clay.png", "clay.png");
184 f->param_type = CPT_MINERAL;
185 f->is_ground_content = true;
186 f->dug_item = std::string("CraftItem lump_of_clay 4");
187 setDirtLikeDiggingProperties(f->digging_properties, 1.0);
190 f = &content_features(i);
191 f->setAllTextures("brick.png");
192 f->setInventoryTextureCube("brick.png", "brick.png", "brick.png");
193 f->param_type = CPT_MINERAL;
194 f->is_ground_content = true;
195 f->dug_item = std::string("CraftItem clay_brick 4");
196 setStoneLikeDiggingProperties(f->digging_properties, 1.0);
199 f = &content_features(i);
200 f->setAllTextures("tree.png");
201 f->setTexture(0, "tree_top.png");
202 f->setTexture(1, "tree_top.png");
203 f->param_type = CPT_MINERAL;
204 f->is_ground_content = true;
205 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
206 setWoodLikeDiggingProperties(f->digging_properties, 1.0);
208 i = CONTENT_JUNGLETREE;
209 f = &content_features(i);
210 f->setAllTextures("jungletree.png");
211 f->setTexture(0, "jungletree_top.png");
212 f->setTexture(1, "jungletree_top.png");
213 f->param_type = CPT_MINERAL;
214 //f->is_ground_content = true;
215 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
216 setWoodLikeDiggingProperties(f->digging_properties, 1.0);
218 i = CONTENT_JUNGLEGRASS;
219 f = &content_features(i);
220 f->setInventoryTexture("junglegrass.png");
221 f->light_propagates = true;
222 f->param_type = CPT_LIGHT;
223 //f->is_ground_content = true;
224 f->air_equivalent = false; // grass grows underneath
225 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
226 f->solidness = 0; // drawn separately, makes no faces
228 setWoodLikeDiggingProperties(f->digging_properties, 0.10);
231 f = &content_features(i);
232 f->light_propagates = true;
233 //f->param_type = CPT_MINERAL;
234 f->param_type = CPT_LIGHT;
235 //f->is_ground_content = true;
238 f->solidness = 0; // drawn separately, makes no faces
239 f->setInventoryTextureCube("leaves.png", "leaves.png", "leaves.png");
243 f->setAllTextures("[noalpha:leaves.png");
245 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
246 setWoodLikeDiggingProperties(f->digging_properties, 0.15);
249 f = &content_features(i);
250 f->setAllTextures("cactus_side.png");
251 f->setTexture(0, "cactus_top.png");
252 f->setTexture(1, "cactus_top.png");
253 f->setInventoryTextureCube("cactus_top.png", "cactus_side.png", "cactus_side.png");
254 f->param_type = CPT_MINERAL;
255 f->is_ground_content = true;
256 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
257 setWoodLikeDiggingProperties(f->digging_properties, 0.75);
260 f = &content_features(i);
261 f->setInventoryTexture("papyrus.png");
262 f->light_propagates = true;
263 f->param_type = CPT_LIGHT;
264 f->is_ground_content = true;
265 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
266 f->solidness = 0; // drawn separately, makes no faces
268 setWoodLikeDiggingProperties(f->digging_properties, 0.25);
270 i = CONTENT_BOOKSHELF;
271 f = &content_features(i);
272 f->setAllTextures("bookshelf.png");
273 f->setTexture(0, "wood.png");
274 f->setTexture(1, "wood.png");
275 // FIXME: setInventoryTextureCube() only cares for the first texture
276 f->setInventoryTextureCube("bookshelf.png", "bookshelf.png", "bookshelf.png");
277 //f->setInventoryTextureCube("wood.png", "bookshelf.png", "bookshelf.png");
278 f->param_type = CPT_MINERAL;
279 f->is_ground_content = true;
280 setWoodLikeDiggingProperties(f->digging_properties, 0.75);
283 f = &content_features(i);
284 f->light_propagates = true;
285 f->sunlight_propagates = true;
286 f->param_type = CPT_LIGHT;
287 f->is_ground_content = true;
288 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
289 f->solidness = 0; // drawn separately, makes no faces
290 f->setInventoryTextureCube("glass.png", "glass.png", "glass.png");
291 setWoodLikeDiggingProperties(f->digging_properties, 0.15);
294 f = &content_features(i);
295 f->light_propagates = true;
296 f->param_type = CPT_LIGHT;
297 f->is_ground_content = true;
298 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
299 f->solidness = 0; // drawn separately, makes no faces
300 f->air_equivalent = true; // grass grows underneath
301 f->setInventoryTexture("fence.png");
302 setWoodLikeDiggingProperties(f->digging_properties, 0.75);
305 f = &content_features(i);
306 f->setInventoryTexture("rail.png");
307 f->light_propagates = true;
308 f->param_type = CPT_LIGHT;
309 f->is_ground_content = true;
310 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
311 f->solidness = 0; // drawn separately, makes no faces
312 f->air_equivalent = true; // grass grows underneath
314 setDirtLikeDiggingProperties(f->digging_properties, 0.75);
317 f = &content_features(i);
318 f->setInventoryTexture("ladder.png");
319 f->light_propagates = true;
320 f->param_type = CPT_LIGHT;
321 f->is_ground_content = true;
322 f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
323 f->wall_mounted = true;
325 f->air_equivalent = true;
328 setWoodLikeDiggingProperties(f->digging_properties, 0.5);
331 i = CONTENT_COALSTONE;
332 f = &content_features(i);
333 f->setAllTextures("stone.png^mineral_coal.png");
334 f->is_ground_content = true;
335 setStoneLikeDiggingProperties(f->digging_properties, 1.5);
338 f = &content_features(i);
339 f->setAllTextures("wood.png");
340 f->setInventoryTextureCube("wood.png", "wood.png", "wood.png");
341 f->is_ground_content = true;
342 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
343 setWoodLikeDiggingProperties(f->digging_properties, 0.75);
346 f = &content_features(i);
347 f->setAllTextures("mese.png");
348 f->setInventoryTextureCube("mese.png", "mese.png", "mese.png");
349 f->is_ground_content = true;
350 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
351 setStoneLikeDiggingProperties(f->digging_properties, 0.5);
354 f = &content_features(i);
355 f->setAllTextures("cloud.png");
356 f->setInventoryTextureCube("cloud.png", "cloud.png", "cloud.png");
357 f->is_ground_content = true;
358 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
361 f = &content_features(i);
362 f->param_type = CPT_LIGHT;
363 f->light_propagates = true;
364 f->sunlight_propagates = true;
367 f->pointable = false;
369 f->buildable_to = true;
370 f->air_equivalent = true;
373 f = &content_features(i);
374 f->setInventoryTextureCube("water.png", "water.png", "water.png");
375 f->param_type = CPT_LIGHT;
376 f->light_propagates = true;
377 f->solidness = 0; // Drawn separately, makes no faces
378 f->visual_solidness = 1;
380 f->pointable = false;
382 f->buildable_to = true;
383 f->liquid_type = LIQUID_FLOWING;
384 f->liquid_alternative_flowing = CONTENT_WATER;
385 f->liquid_alternative_source = CONTENT_WATERSOURCE;
386 f->liquid_viscosity = WATER_VISC;
387 f->vertex_alpha = WATER_ALPHA;
388 f->post_effect_color = video::SColor(64, 100, 100, 200);
389 if(f->special_material == NULL && g_texturesource)
391 // Flowing water material
392 f->special_material = new video::SMaterial;
393 f->special_material->setFlag(video::EMF_LIGHTING, false);
394 f->special_material->setFlag(video::EMF_BACK_FACE_CULLING, false);
395 f->special_material->setFlag(video::EMF_BILINEAR_FILTER, false);
396 f->special_material->setFlag(video::EMF_FOG_ENABLE, true);
397 f->special_material->MaterialType = video::EMT_TRANSPARENT_VERTEX_ALPHA;
398 AtlasPointer *pa_water1 = new AtlasPointer(g_texturesource->getTexture(
399 g_texturesource->getTextureId("water.png")));
400 f->special_material->setTexture(0, pa_water1->atlas);
401 f->special_atlas = pa_water1;
404 i = CONTENT_WATERSOURCE;
405 f = &content_features(i);
406 //f->setInventoryTexture("water.png");
407 f->setInventoryTextureCube("water.png", "water.png", "water.png");
410 f->solidness = 0; // drawn separately, makes no faces
418 t.texture = g_texturesource->getTexture("water.png");
420 t.alpha = WATER_ALPHA;
421 t.material_type = MATERIAL_ALPHA_VERTEX;
422 t.material_flags &= ~MATERIAL_FLAG_BACKFACE_CULLING;
425 f->param_type = CPT_LIGHT;
426 f->light_propagates = true;
428 f->pointable = false;
430 f->buildable_to = true;
431 f->liquid_type = LIQUID_SOURCE;
432 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
433 f->liquid_alternative_flowing = CONTENT_WATER;
434 f->liquid_alternative_source = CONTENT_WATERSOURCE;
435 f->liquid_viscosity = WATER_VISC;
436 f->vertex_alpha = WATER_ALPHA;
437 f->post_effect_color = video::SColor(64, 100, 100, 200);
438 if(f->special_material == NULL && g_texturesource)
440 // Flowing water material
441 f->special_material = new video::SMaterial;
442 f->special_material->setFlag(video::EMF_LIGHTING, false);
443 f->special_material->setFlag(video::EMF_BACK_FACE_CULLING, false);
444 f->special_material->setFlag(video::EMF_BILINEAR_FILTER, false);
445 f->special_material->setFlag(video::EMF_FOG_ENABLE, true);
446 f->special_material->MaterialType = video::EMT_TRANSPARENT_VERTEX_ALPHA;
447 AtlasPointer *pa_water1 = new AtlasPointer(g_texturesource->getTexture(
448 g_texturesource->getTextureId("water.png")));
449 f->special_material->setTexture(0, pa_water1->atlas);
450 f->special_atlas = pa_water1;
454 f = &content_features(i);
455 f->setInventoryTextureCube("lava.png", "lava.png", "lava.png");
456 f->param_type = CPT_LIGHT;
457 f->light_propagates = false;
458 f->light_source = LIGHT_MAX-1;
459 f->solidness = 0; // Drawn separately, makes no faces
460 f->visual_solidness = 2;
462 f->pointable = false;
464 f->buildable_to = true;
465 f->liquid_type = LIQUID_FLOWING;
466 f->liquid_alternative_flowing = CONTENT_LAVA;
467 f->liquid_alternative_source = CONTENT_LAVASOURCE;
468 f->liquid_viscosity = LAVA_VISC;
469 f->damage_per_second = 4*2;
470 f->post_effect_color = video::SColor(192, 255, 64, 0);
471 if(f->special_material == NULL && g_texturesource)
473 // Flowing lava material
474 f->special_material = new video::SMaterial;
475 f->special_material->setFlag(video::EMF_LIGHTING, false);
476 f->special_material->setFlag(video::EMF_BACK_FACE_CULLING, false);
477 f->special_material->setFlag(video::EMF_BILINEAR_FILTER, false);
478 f->special_material->setFlag(video::EMF_FOG_ENABLE, true);
479 f->special_material->MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF;
480 AtlasPointer *pa_lava1 = new AtlasPointer(
481 g_texturesource->getTexture(
482 g_texturesource->getTextureId("lava.png")));
483 f->special_material->setTexture(0, pa_lava1->atlas);
484 f->special_atlas = pa_lava1;
487 i = CONTENT_LAVASOURCE;
488 f = &content_features(i);
489 f->setInventoryTextureCube("lava.png", "lava.png", "lava.png");
492 f->solidness = 0; // drawn separately, makes no faces
500 t.texture = g_texturesource->getTexture("lava.png");
503 //t.material_type = MATERIAL_ALPHA_VERTEX;
504 //t.material_flags &= ~MATERIAL_FLAG_BACKFACE_CULLING;
507 f->param_type = CPT_LIGHT;
508 f->light_propagates = false;
509 f->light_source = LIGHT_MAX-1;
511 f->pointable = false;
513 f->buildable_to = true;
514 f->liquid_type = LIQUID_SOURCE;
515 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
516 f->liquid_alternative_flowing = CONTENT_LAVA;
517 f->liquid_alternative_source = CONTENT_LAVASOURCE;
518 f->liquid_viscosity = LAVA_VISC;
519 f->damage_per_second = 4*2;
520 f->post_effect_color = video::SColor(192, 255, 64, 0);
521 if(f->special_material == NULL && g_texturesource)
523 // Flowing lava material
524 f->special_material = new video::SMaterial;
525 f->special_material->setFlag(video::EMF_LIGHTING, false);
526 f->special_material->setFlag(video::EMF_BACK_FACE_CULLING, false);
527 f->special_material->setFlag(video::EMF_BILINEAR_FILTER, false);
528 f->special_material->setFlag(video::EMF_FOG_ENABLE, true);
529 f->special_material->MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF;
530 AtlasPointer *pa_lava1 = new AtlasPointer(
531 g_texturesource->getTexture(
532 g_texturesource->getTextureId("lava.png")));
533 f->special_material->setTexture(0, pa_lava1->atlas);
534 f->special_atlas = pa_lava1;
538 f = &content_features(i);
539 f->setInventoryTexture("torch_on_floor.png");
540 f->param_type = CPT_LIGHT;
541 f->light_propagates = true;
542 f->sunlight_propagates = true;
543 f->solidness = 0; // drawn separately, makes no faces
545 f->wall_mounted = true;
546 f->air_equivalent = true;
547 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
548 f->light_source = LIGHT_MAX-1;
549 f->digging_properties.set("", DiggingProperties(true, 0.0, 0));
551 i = CONTENT_SIGN_WALL;
552 f = &content_features(i);
553 f->setInventoryTexture("sign_wall.png");
554 f->param_type = CPT_LIGHT;
555 f->light_propagates = true;
556 f->sunlight_propagates = true;
557 f->solidness = 0; // drawn separately, makes no faces
559 f->wall_mounted = true;
560 f->air_equivalent = true;
561 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
562 if(f->initial_metadata == NULL)
563 f->initial_metadata = new SignNodeMetadata("Some sign");
564 f->digging_properties.set("", DiggingProperties(true, 0.5, 0));
567 f = &content_features(i);
568 f->param_type = CPT_FACEDIR_SIMPLE;
569 f->setAllTextures("chest_side.png");
570 f->setTexture(0, "chest_top.png");
571 f->setTexture(1, "chest_top.png");
572 f->setTexture(5, "chest_front.png"); // Z-
573 f->setInventoryTexture("chest_top.png");
574 //f->setInventoryTextureCube("chest_top.png", "chest_side.png", "chest_side.png");
575 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
576 if(f->initial_metadata == NULL)
577 f->initial_metadata = new ChestNodeMetadata();
578 setWoodLikeDiggingProperties(f->digging_properties, 1.0);
581 f = &content_features(i);
582 f->param_type = CPT_FACEDIR_SIMPLE;
583 f->setAllTextures("furnace_side.png");
584 f->setTexture(5, "furnace_front.png"); // Z-
585 f->setInventoryTexture("furnace_front.png");
586 //f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
587 f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_COBBLE)+" 6";
588 if(f->initial_metadata == NULL)
589 f->initial_metadata = new FurnaceNodeMetadata();
590 setStoneLikeDiggingProperties(f->digging_properties, 3.0);
593 f = &content_features(i);
594 f->setAllTextures("cobble.png");
595 f->setInventoryTextureCube("cobble.png", "cobble.png", "cobble.png");
596 f->param_type = CPT_NONE;
597 f->is_ground_content = true;
598 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
599 setStoneLikeDiggingProperties(f->digging_properties, 0.9);
601 i = CONTENT_MOSSYCOBBLE;
602 f = &content_features(i);
603 f->setAllTextures("mossycobble.png");
604 f->setInventoryTextureCube("mossycobble.png", "mossycobble.png", "mossycobble.png");
605 f->param_type = CPT_NONE;
606 f->is_ground_content = true;
607 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
608 setStoneLikeDiggingProperties(f->digging_properties, 0.8);
611 f = &content_features(i);
612 f->setAllTextures("steel_block.png");
613 f->setInventoryTextureCube("steel_block.png", "steel_block.png",
615 f->param_type = CPT_NONE;
616 f->is_ground_content = true;
617 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
618 setStoneLikeDiggingProperties(f->digging_properties, 5.0);
621 f = &content_features(i);
622 f->param_type = CPT_FACEDIR_SIMPLE;
623 f->setAllTextures("nc_side.png");
624 f->setTexture(5, "nc_front.png"); // Z-
625 f->setTexture(4, "nc_back.png"); // Z+
626 f->setInventoryTexture("nc_front.png");
627 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
628 setStoneLikeDiggingProperties(f->digging_properties, 3.0);
631 f = &content_features(i);
632 f->setAllTextures("nc_rb.png");
633 f->setInventoryTexture("nc_rb.png");
634 f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
635 setStoneLikeDiggingProperties(f->digging_properties, 3.0);
637 // NOTE: Remember to add frequently used stuff to the texture atlas in tile.cpp
641 Add MesePick to everything
643 for(u16 i=0; i<=MAX_CONTENT; i++)
645 content_features(i).digging_properties.set("MesePick",
646 DiggingProperties(true, 0.0, 65535./1337));
651 void setStoneLikeDiggingProperties(DiggingPropertiesList &list, float toughness)
654 DiggingProperties(true, 15.0*toughness, 0));
657 DiggingProperties(true, 1.3*toughness, 65535./30.*toughness));
659 DiggingProperties(true, 0.75*toughness, 65535./100.*toughness));
660 list.set("SteelPick",
661 DiggingProperties(true, 0.50*toughness, 65535./333.*toughness));
663 /*list.set("MesePick",
664 DiggingProperties(true, 0.0*toughness, 65535./20.*toughness));*/
667 void setDirtLikeDiggingProperties(DiggingPropertiesList &list, float toughness)
670 DiggingProperties(true, 0.75*toughness, 0));
673 DiggingProperties(true, 0.4*toughness, 65535./50.*toughness));
675 DiggingProperties(true, 0.2*toughness, 65535./150.*toughness));
676 list.set("SteelShovel",
677 DiggingProperties(true, 0.15*toughness, 65535./400.*toughness));
680 void setWoodLikeDiggingProperties(DiggingPropertiesList &list, float toughness)
683 DiggingProperties(true, 3.0*toughness, 0));
686 DiggingProperties(true, 1.5*toughness, 65535./30.*toughness));
688 DiggingProperties(true, 0.75*toughness, 65535./100.*toughness));
690 DiggingProperties(true, 0.5*toughness, 65535./333.*toughness));