void ContentFeatures::reset() { /* Cached stuff */ #ifndef SERVER solidness = 2; visual_solidness = 0; backface_culling = true; #endif has_on_construct = false; has_on_destruct = false; has_after_destruct = false; /* Actual data NOTE: Most of this is always overridden by the default values given in builtin.lua */ name = ""; groups.clear(); // Unknown nodes can be dug groups["dig_immediate"] = 2; drawtype = NDT_NORMAL; visual_scale = 1.0; for(u32 i=0; i<6; i++) tiledef[i] = TileDef(); for(u16 j=0; j<CF_SPECIAL_COUNT; j++) tiledef_special[j] = TileDef(); alpha = 255; post_effect_color = video::SColor(0, 0, 0, 0); param_type = CPT_NONE; param_type_2 = CPT2_NONE; is_ground_content = false; light_propagates = false; sunlight_propagates = false; walkable = true; pointable = true; diggable = true; climbable = false; buildable_to = false; rightclickable = true; liquid_type = LIQUID_NONE; liquid_alternative_flowing = ""; liquid_alternative_source = ""; liquid_viscosity = 0; liquid_renewable = true; drowning = true; light_source = 0; damage_per_second = 0; node_box = NodeBox(); selection_box = NodeBox(); legacy_facedir_simple = false; legacy_wallmounted = false; sound_footstep = SimpleSoundSpec(); sound_dig = SimpleSoundSpec("__group"); sound_dug = SimpleSoundSpec(); }
void ItemDefinition::reset() { type = ITEM_NONE; name = ""; description = ""; inventory_image = ""; wield_image = ""; wield_scale = v3f(1.0, 1.0, 1.0); stack_max = 99; usable = false; liquids_pointable = false; if(tool_capabilities) { delete tool_capabilities; tool_capabilities = NULL; } groups.clear(); sound_place = SimpleSoundSpec(); sound_place_failed = SimpleSoundSpec(); range = -1; node_placement_prediction = ""; }
void ContentFeatures::reset() { /* Cached stuff */ #ifndef SERVER solidness = 2; visual_solidness = 0; backface_culling = true; #endif has_on_construct = false; has_on_destruct = false; has_after_destruct = false; /* Actual data NOTE: Most of this is always overridden by the default values given in builtin.lua */ name = ""; groups.clear(); // Unknown nodes can be dug groups["dig_immediate"] = 2; drawtype = NDT_NORMAL; mesh = ""; #ifndef SERVER for (auto &i : mesh_ptr) i = NULL; minimap_color = video::SColor(0, 0, 0, 0); #endif visual_scale = 1.0; for (auto &i : tiledef) i = TileDef(); for (auto &j : tiledef_special) j = TileDef(); alpha = 255; post_effect_color = video::SColor(0, 0, 0, 0); param_type = CPT_NONE; param_type_2 = CPT2_NONE; is_ground_content = false; light_propagates = false; sunlight_propagates = false; walkable = true; pointable = true; diggable = true; climbable = false; buildable_to = false; floodable = false; rightclickable = true; leveled = 0; liquid_type = LIQUID_NONE; liquid_alternative_flowing = ""; liquid_alternative_source = ""; liquid_viscosity = 0; liquid_renewable = true; liquid_range = LIQUID_LEVEL_MAX+1; drowning = 0; light_source = 0; damage_per_second = 0; node_box = NodeBox(); selection_box = NodeBox(); collision_box = NodeBox(); waving = 0; legacy_facedir_simple = false; legacy_wallmounted = false; sound_footstep = SimpleSoundSpec(); sound_dig = SimpleSoundSpec("__group"); sound_dug = SimpleSoundSpec(); connects_to.clear(); connects_to_ids.clear(); connect_sides = 0; color = video::SColor(0xFFFFFFFF); palette_name = ""; palette = NULL; node_dig_prediction = "air"; }