mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-04-08 23:40:25 +02:00
add 'mob_infotext' setting
This commit is contained in:
parent
ca7aeec95a
commit
badb889cf3
5
api.lua
5
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
|
||||
|
1
api.txt
1
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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user