diff --git a/api.lua b/api.lua index 00fc5ef..0f83fc1 100644 --- a/api.lua +++ b/api.lua @@ -18,7 +18,7 @@ end -- Global table mobs = { - mod = "redo", version = "20250318", + mod = "redo", version = "20250320", spawning_mobs = {}, translate = S, node_snow = has(minetest.registered_aliases["mapgen_snow"]) or has("mcl_core:snow") or has("default:snow") or "air", @@ -70,6 +70,7 @@ local mob_smooth_rotate = settings:get_bool("mob_smooth_rotate") ~= false local mob_height_fix = settings:get_bool("mob_height_fix") local mob_log_spawn = settings:get_bool("mob_log_spawn") == true local active_mobs = 0 +local mob_infotext = settings:get_bool("mob_infotext") ~= false -- loop interval for node and main functions timers @@ -622,7 +623,7 @@ function mob_class:update_tag(newname) .. (self.owner == "" and "" or "\nOwner: " .. self.owner) .. text -- set infotext changes - if self.infotext ~= prop.infotext then + if mob_infotext and self.infotext ~= prop.infotext then self.object:set_properties({infotext = self.infotext}) end end diff --git a/api.txt b/api.txt index 8b92a41..9a42483 100644 --- a/api.txt +++ b/api.txt @@ -886,6 +886,7 @@ External Settings for "minetest.conf" custom on_sound function. 'mobs_disable_damage_kb' Knockback is calculated by hit damage or uses knockback value from the weapon used, this setting lets you disable the former. + 'mobs_infotext' True by default, shows mob information when you hover over one. Players can override the spawn chance for each mob registered by adding a line to their minetest.conf file with a new value, the lower the value the more each diff --git a/settingtypes.txt b/settingtypes.txt index c339570..37539e1 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -88,3 +88,6 @@ mob_pathfinding_searchdistance (path search distance) int 16 mob_pathfinding_max_jump (path max jump height) int 4 # max drop height for pathfinding (default 6) mob_pathfinding_max_drop (path max drop height) int 6 + +# Enable mob infotext on hover +mob_infotext (Enable mob infotext on hover) bool true