1
0
mirror of https://codeberg.org/tenplus1/mobs_redo.git synced 2025-04-20 04:20:19 +02:00

add 'mob_infotext' setting

This commit is contained in:
tenplus1 2025-03-20 08:05:24 +00:00
parent ca7aeec95a
commit badb889cf3
3 changed files with 7 additions and 2 deletions

View File

@ -18,7 +18,7 @@ end
-- Global table -- Global table
mobs = { mobs = {
mod = "redo", version = "20250318", mod = "redo", version = "20250320",
spawning_mobs = {}, translate = S, spawning_mobs = {}, translate = S,
node_snow = has(minetest.registered_aliases["mapgen_snow"]) node_snow = has(minetest.registered_aliases["mapgen_snow"])
or has("mcl_core:snow") or has("default:snow") or "air", 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_height_fix = settings:get_bool("mob_height_fix")
local mob_log_spawn = settings:get_bool("mob_log_spawn") == true local mob_log_spawn = settings:get_bool("mob_log_spawn") == true
local active_mobs = 0 local active_mobs = 0
local mob_infotext = settings:get_bool("mob_infotext") ~= false
-- loop interval for node and main functions timers -- 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 .. (self.owner == "" and "" or "\nOwner: " .. self.owner) .. text
-- set infotext changes -- 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}) self.object:set_properties({infotext = self.infotext})
end end
end end

View File

@ -886,6 +886,7 @@ External Settings for "minetest.conf"
custom on_sound function. custom on_sound function.
'mobs_disable_damage_kb' Knockback is calculated by hit damage or uses knockback value '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. 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 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 to their minetest.conf file with a new value, the lower the value the more each

View File

@ -88,3 +88,6 @@ mob_pathfinding_searchdistance (path search distance) int 16
mob_pathfinding_max_jump (path max jump height) int 4 mob_pathfinding_max_jump (path max jump height) int 4
# max drop height for pathfinding (default 6) # max drop height for pathfinding (default 6)
mob_pathfinding_max_drop (path max drop height) int 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