From 6940e5a191e14c024a123d91a66855ff298c5b84 Mon Sep 17 00:00:00 2001 From: "updatepo.sh" Date: Fri, 3 Apr 2020 23:17:42 +0200 Subject: Update minetest.conf.example, settings_translation_file.cpp --- minetest.conf.example | 55 ++++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 27 deletions(-) (limited to 'minetest.conf.example') diff --git a/minetest.conf.example b/minetest.conf.example index 5bc41a9a4..1c1796a14 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -1371,7 +1371,7 @@ # ask_reconnect_on_crash = false # From how far clients know about objects, stated in mapblocks (16 nodes). -# +# # Setting this larger than active_block_range will also cause the server # to maintain active objects up to this distance in the direction the # player is looking. (This can avoid mobs suddenly disappearing from view) @@ -1920,7 +1920,7 @@ # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, -# flags = +# flags = # } # Second of two 3D noises that together define tunnels. @@ -1933,7 +1933,7 @@ # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, -# flags = +# flags = # } # 3D noise defining giant caverns. @@ -1946,7 +1946,7 @@ # octaves = 5, # persistence = 0.63, # lacunarity = 2.0, -# flags = +# flags = # } # 3D noise defining terrain. @@ -1972,7 +1972,7 @@ # octaves = 2, # persistence = 0.8, # lacunarity = 2.0, -# flags = +# flags = # } ## Mapgen V6 @@ -2312,7 +2312,7 @@ # octaves = 5, # persistence = 0.63, # lacunarity = 2.0, -# flags = +# flags = # } # 3D noise defining structure of river canyon walls. @@ -2325,7 +2325,7 @@ # octaves = 4, # persistence = 0.75, # lacunarity = 2.0, -# flags = +# flags = # } # 3D noise defining giant caverns. @@ -2338,7 +2338,7 @@ # octaves = 5, # persistence = 0.63, # lacunarity = 2.0, -# flags = +# flags = # } # First of two 3D noises that together define tunnels. @@ -2351,7 +2351,7 @@ # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, -# flags = +# flags = # } # Second of two 3D noises that together define tunnels. @@ -2364,7 +2364,7 @@ # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, -# flags = +# flags = # } # 3D noise that determines number of dungeons per mapchunk. @@ -2377,7 +2377,7 @@ # octaves = 2, # persistence = 0.8, # lacunarity = 2.0, -# flags = +# flags = # } ## Mapgen Carpathian @@ -2620,7 +2620,7 @@ # octaves = 5, # persistence = 0.55, # lacunarity = 2.0, -# flags = +# flags = # } # First of two 3D noises that together define tunnels. @@ -2633,7 +2633,7 @@ # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, -# flags = +# flags = # } # Second of two 3D noises that together define tunnels. @@ -2646,7 +2646,7 @@ # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, -# flags = +# flags = # } # 3D noise defining giant caverns. @@ -2659,7 +2659,7 @@ # octaves = 5, # persistence = 0.63, # lacunarity = 2.0, -# flags = +# flags = # } # 3D noise that determines number of dungeons per mapchunk. @@ -2672,7 +2672,7 @@ # octaves = 2, # persistence = 0.8, # lacunarity = 2.0, -# flags = +# flags = # } ## Mapgen Flat @@ -2782,7 +2782,7 @@ # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, -# flags = +# flags = # } # Second of two 3D noises that together define tunnels. @@ -2795,7 +2795,7 @@ # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, -# flags = +# flags = # } # 3D noise that determines number of dungeons per mapchunk. @@ -2808,7 +2808,7 @@ # octaves = 2, # persistence = 0.8, # lacunarity = 2.0, -# flags = +# flags = # } ## Mapgen Fractal @@ -2982,7 +2982,7 @@ # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, -# flags = +# flags = # } # Second of two 3D noises that together define tunnels. @@ -2995,7 +2995,7 @@ # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, -# flags = +# flags = # } # 3D noise that determines number of dungeons per mapchunk. @@ -3008,7 +3008,7 @@ # octaves = 2, # persistence = 0.8, # lacunarity = 2.0, -# flags = +# flags = # } ## Mapgen Valleys @@ -3098,7 +3098,7 @@ # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, -# flags = +# flags = # } # Second of two 3D noises that together define tunnels. @@ -3111,7 +3111,7 @@ # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, -# flags = +# flags = # } # The depth of dirt or other biome filler node. @@ -3137,7 +3137,7 @@ # octaves = 6, # persistence = 0.63, # lacunarity = 2.0, -# flags = +# flags = # } # Defines large-scale river channel structure. @@ -3189,7 +3189,7 @@ # octaves = 6, # persistence = 0.8, # lacunarity = 2.0, -# flags = +# flags = # } # Amplifies the valleys. @@ -3228,7 +3228,7 @@ # octaves = 2, # persistence = 0.8, # lacunarity = 2.0, -# flags = +# flags = # } ## Advanced @@ -3292,3 +3292,4 @@ # so see a full list at https://content.minetest.net/help/content_flags/ # type: string # contentdb_flag_blacklist = nonfree, desktop_default + -- cgit v1.2.3 From ab06880525eea98011341fbcaec31a0bd7517df5 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sat, 11 Apr 2020 23:38:54 +0200 Subject: Update num_emerge_threads description --- builtin/settingtypes.txt | 3 --- minetest.conf.example | 3 --- 2 files changed, 6 deletions(-) (limited to 'minetest.conf.example') diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index c983fb436..9e4473655 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -2120,9 +2120,6 @@ emergequeue_limit_diskonly (Limit of emerge queues on disk) int 64 emergequeue_limit_generate (Limit of emerge queues to generate) int 64 # Number of emerge threads to use. -# WARNING: Currently there are multiple bugs that may cause crashes when -# 'num_emerge_threads' is larger than 1. Until this warning is removed it is -# strongly recommended this value is set to the default '1'. # Value 0: # - Automatic selection. The number of emerge threads will be # - 'number of processors - 2', with a lower limit of 1. diff --git a/minetest.conf.example b/minetest.conf.example index 1c1796a14..f04822c47 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -3261,9 +3261,6 @@ # emergequeue_limit_generate = 64 # Number of emerge threads to use. -# WARNING: Currently there are multiple bugs that may cause crashes when -# 'num_emerge_threads' is larger than 1. Until this warning is removed it is -# strongly recommended this value is set to the default '1'. # Value 0: # - Automatic selection. The number of emerge threads will be # - 'number of processors - 2', with a lower limit of 1. -- cgit v1.2.3 From a9d6be8b6f769c1b795262f45e81bcb4a2cea4a1 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 11 May 2020 20:19:02 +0200 Subject: Fix documentation of emergequeue_limit settings --- builtin/settingtypes.txt | 10 +++++----- minetest.conf.example | 4 ++-- src/emerge.cpp | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'minetest.conf.example') diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index 28ea58ffd..e18de3382 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -2159,15 +2159,15 @@ chunksize (Chunk size) int 5 enable_mapgen_debug_info (Mapgen debug) bool false # Maximum number of blocks that can be queued for loading. -emergequeue_limit_total (Absolute limit of emerge queues) int 512 +emergequeue_limit_total (Absolute limit of queued blocks to emerge) int 512 # Maximum number of blocks to be queued that are to be loaded from file. -# Set to blank for an appropriate amount to be chosen automatically. -emergequeue_limit_diskonly (Limit of emerge queues on disk) int 64 +# This limit is enforced per player. +emergequeue_limit_diskonly (Per-player limit of queued blocks load from disk) int 64 # Maximum number of blocks to be queued that are to be generated. -# Set to blank for an appropriate amount to be chosen automatically. -emergequeue_limit_generate (Limit of emerge queues to generate) int 64 +# This limit is enforced per player. +emergequeue_limit_generate (Per-player limit of queued blocks to generate) int 64 # Number of emerge threads to use. # Value 0: diff --git a/minetest.conf.example b/minetest.conf.example index f04822c47..17d24a566 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -3251,12 +3251,12 @@ # emergequeue_limit_total = 512 # Maximum number of blocks to be queued that are to be loaded from file. -# Set to blank for an appropriate amount to be chosen automatically. +# This limit is enforced per player. # type: int # emergequeue_limit_diskonly = 64 # Maximum number of blocks to be queued that are to be generated. -# Set to blank for an appropriate amount to be chosen automatically. +# This limit is enforced per player. # type: int # emergequeue_limit_generate = 64 diff --git a/src/emerge.cpp b/src/emerge.cpp index a9fc0a4de..0ac26a682 100644 --- a/src/emerge.cpp +++ b/src/emerge.cpp @@ -159,6 +159,7 @@ EmergeManager::EmergeManager(Server *server) nthreads = 1; m_qlimit_total = g_settings->getU16("emergequeue_limit_total"); + // FIXME: these fallback values are probably not good if (!g_settings->getU16NoEx("emergequeue_limit_diskonly", m_qlimit_diskonly)) m_qlimit_diskonly = nthreads * 5 + 1; if (!g_settings->getU16NoEx("emergequeue_limit_generate", m_qlimit_generate)) -- cgit v1.2.3 From 0ba19a08b80459f037f530cf94e25d1caa18e80b Mon Sep 17 00:00:00 2001 From: "updatepo.sh" Date: Sat, 13 Jun 2020 23:17:04 +0200 Subject: Update minetest.conf.example, settings_translation_file.cpp --- minetest.conf.example | 107 ++++++++++++++++++++++++++++++++++---- src/settings_translation_file.cpp | 44 ++++++++++++---- 2 files changed, 129 insertions(+), 22 deletions(-) (limited to 'minetest.conf.example') diff --git a/minetest.conf.example b/minetest.conf.example index 17d24a566..a5f98ee5e 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -254,7 +254,7 @@ # Key for toggling display of minimap. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key -# keymap_minimap = KEY_F9 +# keymap_minimap = KEY_KEY_V # Key for taking screenshots. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 @@ -469,7 +469,7 @@ # Key for switching between first- and third-person camera. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key -# keymap_camera_mode = KEY_F7 +# keymap_camera_mode = KEY_KEY_C # Key for increasing the viewing range. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 @@ -636,10 +636,6 @@ # type: int min: 0 max: 1 # parallax_occlusion_mode = 1 -# Strength of parallax. -# type: float -# 3d_paralax_strength = 0.025 - # Number of parallax occlusion iterations. # type: int # parallax_occlusion_iterations = 4 @@ -823,6 +819,10 @@ # type: enum values: none, anaglyph, interlaced, topbottom, sidebyside, crossview, pageflip # 3d_mode = none +# Strength of 3D mode parallax. +# type: float +# 3d_paralax_strength = 0.025 + # In-game chat console height, between 0.1 (10%) and 1.0 (100%). # type: float min: 0.1 max: 1 # console_height = 0.6 @@ -1071,9 +1071,15 @@ # type: filepath # fallback_font_path = fonts/DroidSansFallbackFull.ttf -# Path to save screenshots at. +# Font size of the recent chat text and chat prompt in point (pt). +# Value 0 will use the default font size. +# type: int +# chat_font_size = 0 + +# Path to save screenshots at. Can be an absolute or relative path. +# The folder will be created if it doesn't already exist. # type: path -# screenshot_path = +# screenshot_path = screenshots # Format of screenshots. # type: enum values: png, jpg, bmp, pcx, ppm, tga @@ -1136,6 +1142,13 @@ # type: int min: 1 max: 65535 # remote_port = 30000 +# Prometheus listener address. +# If minetest is compiled with ENABLE_PROMETHEUS option enabled, +# enable metrics listener for Prometheus on that address. +# Metrics can be fetch on http://127.0.0.1:30000/metrics +# type: string +# prometheus_listener_address = 127.0.0.1:30000 + # Save the map received by the client on disk. # type: bool # enable_local_map_saving = false @@ -1292,6 +1305,11 @@ # type: int # item_entity_ttl = 900 +# Specifies the default stack size of nodes, items and tools. +# Note that mods or games may explicitly set a stack for certain (or all) items. +# type: int +# default_stack_max = 99 + # Enable players getting damage and dying. # type: bool # enable_damage = false @@ -1382,7 +1400,7 @@ # active block stuff, stated in mapblocks (16 nodes). # In active blocks objects are loaded and ABMs run. # This is also the minimum range in which active objects (mobs) are maintained. -# This should be configured together with active_object_range. +# This should be configured together with active_object_send_range_blocks. # type: int # active_block_range = 3 @@ -1662,7 +1680,7 @@ # Set the language. Leave empty to use the system language. # A restart is required after changing this. -# type: enum values: , ar, ca, cs, da, de, dv, el, eo, es, et, eu, fil, fr, hu, id, it, ja, ja_KS, jbo, kk, kn, lo, lt, ms, my, nb, nl, nn, pl, pt, pt_BR, ro, ru, sl, sr_Cyrl, sv, sw, th, tr, uk, vi +# type: enum values: , ar, ca, cs, da, de, dv, el, en, eo, es, et, eu, fil, fr, hu, id, it, ja, ja_KS, jbo, kk, kn, lo, lt, ms, my, nb, nl, nn, pl, pt, pt_BR, ro, ru, sl, sr_Cyrl, sv, sw, th, tr, uk, vi # language = # Level of logging to be written to debug.txt: @@ -1683,6 +1701,10 @@ # type: int # debug_log_size_max = 50 +# Minimal level of logging to be written to chat. +# type: enum values: , none, error, warning, action, info, verbose +# chat_log_level = error + # Enable IPv6 support (for both client and server). # Required for IPv6 connections to work at all. # type: bool @@ -2149,7 +2171,9 @@ ## Mapgen V7 # Map generation attributes specific to Mapgen v7. -# 'ridges' enables the rivers. +# 'ridges': Rivers. +# 'floatlands': Floating land masses in the atmosphere. +# 'caverns': Giant caves deep underground. # type: flags possible values: mountains, ridges, floatlands, caverns, nomountains, noridges, nofloatlands, nocaverns # mgv7_spflags = mountains,ridges,nofloatlands,caverns @@ -2157,6 +2181,51 @@ # type: int # mgv7_mount_zero_level = 0 +# Lower Y limit of floatlands. +# type: int +# mgv7_floatland_ymin = 1024 + +# Upper Y limit of floatlands. +# type: int +# mgv7_floatland_ymax = 4096 + +# Y-distance over which floatlands taper from full density to nothing. +# Tapering starts at this distance from the Y limit. +# For a solid floatland layer, this controls the height of hills/mountains. +# Must be less than or equal to half the distance between the Y limits. +# type: int +# mgv7_floatland_taper = 256 + +# Exponent of the floatland tapering. Alters the tapering behaviour. +# Value = 1.0 creates a uniform, linear tapering. +# Values > 1.0 create a smooth tapering suitable for the default separated +# floatlands. +# Values < 1.0 (for example 0.25) create a more defined surface level with +# flatter lowlands, suitable for a solid floatland layer. +# type: float +# mgv7_float_taper_exp = 2.0 + +# Adjusts the density of the floatland layer. +# Increase value to increase density. Can be positive or negative. +# Value = 0.0: 50% of volume is floatland. +# Value = 2.0 (can be higher depending on 'mgv7_np_floatland', always test +# to be sure) creates a solid floatland layer. +# type: float +# mgv7_floatland_density = -0.6 + +# Surface level of optional water placed on a solid floatland layer. +# Water is disabled by default and will only be placed if this value is set +# to above 'mgv7_floatland_ymax' - 'mgv7_floatland_taper' (the start of the +# upper tapering). +# ***WARNING, POTENTIAL DANGER TO WORLDS AND SERVER PERFORMANCE***: +# When enabling water placement the floatlands must be configured and tested +# to be a solid layer by setting 'mgv7_floatland_density' to 2.0 (or other +# required value depending on 'mgv7_np_floatland'), to avoid +# server-intensive extreme water flow and to avoid vast flooding of the +# world surface below. +# type: int +# mgv7_floatland_ywater = -31000 + # Controls width of tunnels, a smaller value creates wider tunnels. # Value >= 10.0 completely disables generation of tunnels and avoids the # intensive noise calculations. @@ -2328,6 +2397,22 @@ # flags = # } +# 3D noise defining structure of floatlands. +# If altered from the default, the noise 'scale' (0.7 by default) may need +# to be adjusted, as floatland tapering functions best when this noise has +# a value range of approximately -2.0 to 2.0. +# type: noise_params_3d +# mgv7_np_floatland = { +# offset = 0, +# scale = 0.7, +# spread = (384, 96, 384), +# seed = 1009, +# octaves = 4, +# persistence = 0.75, +# lacunarity = 1.618, +# flags = +# } + # 3D noise defining giant caverns. # type: noise_params_3d # mgv7_np_cavern = { diff --git a/src/settings_translation_file.cpp b/src/settings_translation_file.cpp index 9156580c0..febfbb9d3 100644 --- a/src/settings_translation_file.cpp +++ b/src/settings_translation_file.cpp @@ -254,8 +254,6 @@ fake_function() { gettext("Enables parallax occlusion mapping.\nRequires shaders to be enabled."); gettext("Parallax occlusion mode"); gettext("0 = parallax occlusion with slope information (faster).\n1 = relief mapping (slower, more accurate)."); - gettext("Parallax occlusion strength"); - gettext("Strength of parallax."); gettext("Parallax occlusion iterations"); gettext("Number of parallax occlusion iterations."); gettext("Parallax occlusion scale"); @@ -326,6 +324,8 @@ fake_function() { gettext("Multiplier for fall bobbing.\nFor example: 0 for no view bobbing; 1.0 for normal; 2.0 for double."); gettext("3D mode"); gettext("3D support.\nCurrently supported:\n- none: no 3d output.\n- anaglyph: cyan/magenta color 3d.\n- interlaced: odd/even line based polarisation screen support.\n- topbottom: split screen top/bottom.\n- sidebyside: split screen side by side.\n- crossview: Cross-eyed 3d\n- pageflip: quadbuffer based 3d.\nNote that the interlaced mode requires shaders to be enabled."); + gettext("3D mode parallax strength"); + gettext("Strength of 3D mode parallax."); gettext("Console height"); gettext("In-game chat console height, between 0.1 (10%) and 1.0 (100%)."); gettext("Console color"); @@ -427,8 +427,10 @@ fake_function() { gettext("Opaqueness (alpha) of the shadow behind the fallback font, between 0 and 255."); gettext("Fallback font path"); gettext("Path of the fallback font.\nIf “freetype” setting is enabled: Must be a TrueType font.\nIf “freetype” setting is disabled: Must be a bitmap or XML vectors font.\nThis font will be used for certain languages or if the default font is unavailable."); + gettext("Chat font size"); + gettext("Font size of the recent chat text and chat prompt in point (pt).\nValue 0 will use the default font size."); gettext("Screenshot folder"); - gettext("Path to save screenshots at."); + gettext("Path to save screenshots at. Can be an absolute or relative path.\nThe folder will be created if it doesn't already exist."); gettext("Screenshot format"); gettext("Format of screenshots."); gettext("Screenshot quality"); @@ -451,6 +453,8 @@ fake_function() { gettext("Address to connect to.\nLeave this blank to start a local server.\nNote that the address field in the main menu overrides this setting."); gettext("Remote port"); gettext("Port to connect to (UDP).\nNote that the port field in the main menu overrides this setting."); + gettext("Prometheus listener address"); + gettext("Prometheus listener address.\nIf minetest is compiled with ENABLE_PROMETHEUS option enabled,\nenable metrics listener for Prometheus on that address.\nMetrics can be fetch on http://127.0.0.1:30000/metrics"); gettext("Saving map received from server"); gettext("Save the map received by the client on disk."); gettext("Connect to external media server"); @@ -516,6 +520,8 @@ fake_function() { gettext("World directory (everything in the world is stored here).\nNot needed if starting from the main menu."); gettext("Item entity TTL"); gettext("Time in seconds for item entity (dropped items) to live.\nSetting it to -1 disables the feature."); + gettext("Default stack size"); + gettext("Specifies the default stack size of nodes, items and tools.\nNote that mods or games may explicitly set a stack for certain (or all) items."); gettext("Damage"); gettext("Enable players getting damage and dying."); gettext("Creative"); @@ -555,7 +561,7 @@ fake_function() { gettext("Active object send range"); gettext("From how far clients know about objects, stated in mapblocks (16 nodes).\n\nSetting this larger than active_block_range will also cause the server\nto maintain active objects up to this distance in the direction the\nplayer is looking. (This can avoid mobs suddenly disappearing from view)"); gettext("Active block range"); - gettext("The radius of the volume of blocks around every player that is subject to the\nactive block stuff, stated in mapblocks (16 nodes).\nIn active blocks objects are loaded and ABMs run.\nThis is also the minimum range in which active objects (mobs) are maintained.\nThis should be configured together with active_object_range."); + gettext("The radius of the volume of blocks around every player that is subject to the\nactive block stuff, stated in mapblocks (16 nodes).\nIn active blocks objects are loaded and ABMs run.\nThis is also the minimum range in which active objects (mobs) are maintained.\nThis should be configured together with active_object_send_range_blocks."); gettext("Max block send distance"); gettext("From how far blocks are sent to clients, stated in mapblocks (16 nodes)."); gettext("Maximum forceloaded blocks"); @@ -674,6 +680,8 @@ fake_function() { gettext("Level of logging to be written to debug.txt:\n- (no logging)\n- none (messages with no level)\n- error\n- warning\n- action\n- info\n- verbose"); gettext("Debug log file size threshold"); gettext("If the file size of debug.txt exceeds the number of megabytes specified in\nthis setting when it is opened, the file is moved to debug.txt.1,\ndeleting an older debug.txt.1 if it exists.\ndebug.txt is only moved if this setting is positive."); + gettext("Chat log level"); + gettext("Minimal level of logging to be written to chat."); gettext("IPv6"); gettext("Enable IPv6 support (for both client and server).\nRequired for IPv6 connections to work at all."); gettext("Advanced"); @@ -791,9 +799,21 @@ fake_function() { gettext("Defines areas where trees have apples."); gettext("Mapgen V7"); gettext("Mapgen V7 specific flags"); - gettext("Map generation attributes specific to Mapgen v7.\n'ridges' enables the rivers."); + gettext("Map generation attributes specific to Mapgen v7.\n'ridges': Rivers.\n'floatlands': Floating land masses in the atmosphere.\n'caverns': Giant caves deep underground."); gettext("Mountain zero level"); gettext("Y of mountain density gradient zero level. Used to shift mountains vertically."); + gettext("Floatland minimum Y"); + gettext("Lower Y limit of floatlands."); + gettext("Floatland maximum Y"); + gettext("Upper Y limit of floatlands."); + gettext("Floatland tapering distance"); + gettext("Y-distance over which floatlands taper from full density to nothing.\nTapering starts at this distance from the Y limit.\nFor a solid floatland layer, this controls the height of hills/mountains.\nMust be less than or equal to half the distance between the Y limits."); + gettext("Floatland taper exponent"); + gettext("Exponent of the floatland tapering. Alters the tapering behaviour.\nValue = 1.0 creates a uniform, linear tapering.\nValues > 1.0 create a smooth tapering suitable for the default separated\nfloatlands.\nValues < 1.0 (for example 0.25) create a more defined surface level with\nflatter lowlands, suitable for a solid floatland layer."); + gettext("Floatland density"); + gettext("Adjusts the density of the floatland layer.\nIncrease value to increase density. Can be positive or negative.\nValue = 0.0: 50% of volume is floatland.\nValue = 2.0 (can be higher depending on 'mgv7_np_floatland', always test\nto be sure) creates a solid floatland layer."); + gettext("Floatland water level"); + gettext("Surface level of optional water placed on a solid floatland layer.\nWater is disabled by default and will only be placed if this value is set\nto above 'mgv7_floatland_ymax' - 'mgv7_floatland_taper' (the start of the\nupper tapering).\n***WARNING, POTENTIAL DANGER TO WORLDS AND SERVER PERFORMANCE***:\nWhen enabling water placement the floatlands must be configured and tested\nto be a solid layer by setting 'mgv7_floatland_density' to 2.0 (or other\nrequired value depending on 'mgv7_np_floatland'), to avoid\nserver-intensive extreme water flow and to avoid vast flooding of the\nworld surface below."); gettext("Cave width"); gettext("Controls width of tunnels, a smaller value creates wider tunnels.\nValue >= 10.0 completely disables generation of tunnels and avoids the\nintensive noise calculations."); gettext("Large cave depth"); @@ -837,6 +857,8 @@ fake_function() { gettext("3D noise defining mountain structure and height.\nAlso defines structure of floatland mountain terrain."); gettext("Ridge noise"); gettext("3D noise defining structure of river canyon walls."); + gettext("Floatland noise"); + gettext("3D noise defining structure of floatlands.\nIf altered from the default, the noise 'scale' (0.7 by default) may need\nto be adjusted, as floatland tapering functions best when this noise has\na value range of approximately -2.0 to 2.0."); gettext("Cavern noise"); gettext("3D noise defining giant caverns."); gettext("Cave1 noise"); @@ -1068,14 +1090,14 @@ fake_function() { gettext("Size of mapchunks generated by mapgen, stated in mapblocks (16 nodes).\nWARNING!: There is no benefit, and there are several dangers, in\nincreasing this value above 5.\nReducing this value increases cave and dungeon density.\nAltering this value is for special usage, leaving it unchanged is\nrecommended."); gettext("Mapgen debug"); gettext("Dump the mapgen debug information."); - gettext("Absolute limit of emerge queues"); + gettext("Absolute limit of queued blocks to emerge"); gettext("Maximum number of blocks that can be queued for loading."); - gettext("Limit of emerge queues on disk"); - gettext("Maximum number of blocks to be queued that are to be loaded from file.\nSet to blank for an appropriate amount to be chosen automatically."); - gettext("Limit of emerge queues to generate"); - gettext("Maximum number of blocks to be queued that are to be generated.\nSet to blank for an appropriate amount to be chosen automatically."); + gettext("Per-player limit of queued blocks load from disk"); + gettext("Maximum number of blocks to be queued that are to be loaded from file.\nThis limit is enforced per player."); + gettext("Per-player limit of queued blocks to generate"); + gettext("Maximum number of blocks to be queued that are to be generated.\nThis limit is enforced per player."); gettext("Number of emerge threads"); - gettext("Number of emerge threads to use.\nWARNING: Currently there are multiple bugs that may cause crashes when\n'num_emerge_threads' is larger than 1. Until this warning is removed it is\nstrongly recommended this value is set to the default '1'.\nValue 0:\n- Automatic selection. The number of emerge threads will be\n- 'number of processors - 2', with a lower limit of 1.\nAny other value:\n- Specifies the number of emerge threads, with a lower limit of 1.\nWARNING: Increasing the number of emerge threads increases engine mapgen\nspeed, but this may harm game performance by interfering with other\nprocesses, especially in singleplayer and/or when running Lua code in\n'on_generated'. For many users the optimum setting may be '1'."); + gettext("Number of emerge threads to use.\nValue 0:\n- Automatic selection. The number of emerge threads will be\n- 'number of processors - 2', with a lower limit of 1.\nAny other value:\n- Specifies the number of emerge threads, with a lower limit of 1.\nWARNING: Increasing the number of emerge threads increases engine mapgen\nspeed, but this may harm game performance by interfering with other\nprocesses, especially in singleplayer and/or when running Lua code in\n'on_generated'. For many users the optimum setting may be '1'."); gettext("Online Content Repository"); gettext("ContentDB URL"); gettext("The URL for the content repository"); -- cgit v1.2.3 From 88ffd641243ead70d82623d54822421c72893240 Mon Sep 17 00:00:00 2001 From: LoneWolfHT Date: Tue, 14 Jul 2020 10:12:17 -0700 Subject: Add object crosshair, disable entity selectionboxes by default (#9523) Adds new object crosshair base pack texture --- builtin/settingtypes.txt | 5 ++++- doc/texture_packs.txt | 7 ++++++- minetest.conf.example | 4 ++-- src/client/game.cpp | 3 +++ src/client/hud.cpp | 39 ++++++++++++++++++++++++++++++++++----- src/client/hud.h | 4 ++++ src/client/render/core.cpp | 1 + src/defaultsettings.cpp | 2 +- 8 files changed, 55 insertions(+), 10 deletions(-) (limited to 'minetest.conf.example') diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index c787aea2c..c0620542d 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -741,9 +741,11 @@ selectionbox_color (Selection box color) string (0,0,0) selectionbox_width (Selection box width) int 2 1 5 # Crosshair color (R,G,B). +# Also controls the object crosshair color crosshair_color (Crosshair color) string (255,255,255) # Crosshair alpha (opaqueness, between 0 and 255). +# Also controls the object crosshair color crosshair_alpha (Crosshair alpha) int 255 0 255 # Maximum number of recent chat messages to show @@ -817,7 +819,8 @@ world_aligned_mode (World-aligned textures mode) enum enable disable,enable,forc autoscale_mode (Autoscaling mode) enum disable disable,enable,force # Show entity selection boxes -show_entity_selectionbox (Show entity selection boxes) bool true +# A restart is required after changing this. +show_entity_selectionbox (Show entity selection boxes) bool false [*Menus] diff --git a/doc/texture_packs.txt b/doc/texture_packs.txt index 94151f1a4..e7a7dfd3c 100644 --- a/doc/texture_packs.txt +++ b/doc/texture_packs.txt @@ -72,7 +72,12 @@ by texture packs. All existing fallback textures can be found in the directory * `crosshair.png` * the crosshair texture in the center of the screen. The settings `crosshair_color` and `crosshair_alpha` are used to create a cross - when no texture was found + when no texture is found. + +* `object_crosshair.png` + * the crosshair seen when pointing at an object. The settings + `crosshair_color` and `crosshair_alpha` are used to create a cross + when no texture is found. * `halo.png`: used for the node highlighting mesh diff --git a/minetest.conf.example b/minetest.conf.example index a5f98ee5e..520125713 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -955,8 +955,9 @@ # autoscale_mode = disable # Show entity selection boxes +# A restart is required after changing this. # type: bool -# show_entity_selectionbox = true +# show_entity_selectionbox = false ## Menus @@ -3374,4 +3375,3 @@ # so see a full list at https://content.minetest.net/help/content_flags/ # type: string # contentdb_flag_blacklist = nonfree, desktop_default - diff --git a/src/client/game.cpp b/src/client/game.cpp index 5f3ff5649..42d60b21c 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -3176,11 +3176,14 @@ PointedThing Game::updatePointedThing( const NodeDefManager *nodedef = map.getNodeDefManager(); runData.selected_object = NULL; + hud->pointing_at_object = false; RaycastState s(shootline, look_for_object, liquids_pointable); PointedThing result; env.continueRaycast(&s, &result); if (result.type == POINTEDTHING_OBJECT) { + hud->pointing_at_object = true; + runData.selected_object = client->getEnv().getActiveObject(result.object_id); aabb3f selection_box; if (show_entity_selectionbox && runData.selected_object->doShowSelectionBox() && diff --git a/src/client/hud.cpp b/src/client/hud.cpp index 31e633bc2..2b347c1e0 100644 --- a/src/client/hud.cpp +++ b/src/client/hud.cpp @@ -41,6 +41,9 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "gui/touchscreengui.h" #endif +#define OBJECT_CROSSHAIR_LINE_SIZE 8 +#define CROSSHAIR_LINE_SIZE 10 + Hud::Hud(gui::IGUIEnvironment *guienv, Client *client, LocalPlayer *player, Inventory *inventory) { @@ -76,6 +79,7 @@ Hud::Hud(gui::IGUIEnvironment *guienv, Client *client, LocalPlayer *player, selectionbox_argb = video::SColor(255, sbox_r, sbox_g, sbox_b); use_crosshair_image = tsrc->isKnownSourceImage("crosshair.png"); + use_object_crosshair_image = tsrc->isKnownSourceImage("object_crosshair.png"); m_selection_boxes.clear(); m_halo_boxes.clear(); @@ -601,6 +605,31 @@ void Hud::drawHotbar(u16 playeritem) { void Hud::drawCrosshair() { + if (pointing_at_object) { + if (use_object_crosshair_image) { + video::ITexture *object_crosshair = tsrc->getTexture("object_crosshair.png"); + v2u32 size = object_crosshair->getOriginalSize(); + v2s32 lsize = v2s32(m_displaycenter.X - (size.X / 2), + m_displaycenter.Y - (size.Y / 2)); + driver->draw2DImage(object_crosshair, lsize, + core::rect(0, 0, size.X, size.Y), + nullptr, crosshair_argb, true); + } else { + driver->draw2DLine( + m_displaycenter - v2s32(OBJECT_CROSSHAIR_LINE_SIZE, + OBJECT_CROSSHAIR_LINE_SIZE), + m_displaycenter + v2s32(OBJECT_CROSSHAIR_LINE_SIZE, + OBJECT_CROSSHAIR_LINE_SIZE), crosshair_argb); + driver->draw2DLine( + m_displaycenter + v2s32(OBJECT_CROSSHAIR_LINE_SIZE, + -OBJECT_CROSSHAIR_LINE_SIZE), + m_displaycenter + v2s32(-OBJECT_CROSSHAIR_LINE_SIZE, + OBJECT_CROSSHAIR_LINE_SIZE), crosshair_argb); + } + + return; + } + if (use_crosshair_image) { video::ITexture *crosshair = tsrc->getTexture("crosshair.png"); v2u32 size = crosshair->getOriginalSize(); @@ -608,12 +637,12 @@ void Hud::drawCrosshair() m_displaycenter.Y - (size.Y / 2)); driver->draw2DImage(crosshair, lsize, core::rect(0, 0, size.X, size.Y), - 0, crosshair_argb, true); + nullptr, crosshair_argb, true); } else { - driver->draw2DLine(m_displaycenter - v2s32(10, 0), - m_displaycenter + v2s32(10, 0), crosshair_argb); - driver->draw2DLine(m_displaycenter - v2s32(0, 10), - m_displaycenter + v2s32(0, 10), crosshair_argb); + driver->draw2DLine(m_displaycenter - v2s32(CROSSHAIR_LINE_SIZE, 0), + m_displaycenter + v2s32(CROSSHAIR_LINE_SIZE, 0), crosshair_argb); + driver->draw2DLine(m_displaycenter - v2s32(0, CROSSHAIR_LINE_SIZE), + m_displaycenter + v2s32(0, CROSSHAIR_LINE_SIZE), crosshair_argb); } } diff --git a/src/client/hud.h b/src/client/hud.h index 6f4c54626..ba34d479d 100644 --- a/src/client/hud.h +++ b/src/client/hud.h @@ -45,12 +45,16 @@ public: video::SColor crosshair_argb; video::SColor selectionbox_argb; + bool use_crosshair_image = false; + bool use_object_crosshair_image = false; std::string hotbar_image = ""; bool use_hotbar_image = false; std::string hotbar_selected_image = ""; bool use_hotbar_selected_image = false; + bool pointing_at_object = false; + Hud(gui::IGUIEnvironment *guienv, Client *client, LocalPlayer *player, Inventory *inventory); ~Hud(); diff --git a/src/client/render/core.cpp b/src/client/render/core.cpp index bf5aa6c2c..92a7137ea 100644 --- a/src/client/render/core.cpp +++ b/src/client/render/core.cpp @@ -86,6 +86,7 @@ void RenderingCore::drawHUD() if (show_hud) { if (draw_crosshair) hud->drawCrosshair(); + hud->drawHotbar(client->getEnv().getLocalPlayer()->getWieldIndex()); hud->drawLuaElements(camera->getOffset()); camera->drawNametags(); diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index abb6593b7..07bf0ebb8 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -225,7 +225,7 @@ void set_default_settings(Settings *settings) settings->setDefault("desynchronize_mapblock_texture_animation", "true"); settings->setDefault("hud_hotbar_max_width", "1.0"); settings->setDefault("enable_local_map_saving", "false"); - settings->setDefault("show_entity_selectionbox", "true"); + settings->setDefault("show_entity_selectionbox", "false"); settings->setDefault("texture_clean_transparent", "false"); settings->setDefault("texture_min_size", "64"); settings->setDefault("ambient_occlusion_gamma", "2.2"); -- cgit v1.2.3