Add setting to optionally bring back spawn icons

This commit is contained in:
cora 2022-10-04 12:22:24 +02:00
parent 559136622e
commit 57b5d13edf
2 changed files with 8 additions and 2 deletions

View File

@ -71,7 +71,7 @@ local spawn_protected = minetest.settings:get_bool("mobs_spawn_protected") ~= fa
local remove_far = true
local difficulty = tonumber(minetest.settings:get("mob_difficulty")) or 1.0
local show_health = false
local old_spawn_icons = minetest.settings:get_bool("mcl_old_spawn_icons",false)
-- Shows helpful debug info above each mob
local mobs_debug = minetest.settings:get_bool("mobs_debug", false)
local spawn_logging = minetest.settings:get_bool("mcl_logging_mobs_spawn",true)
@ -4442,7 +4442,10 @@ function mcl_mobs:register_egg(mob, desc, background_color, overlay_color, addeg
end
local invimg = "(spawn_egg.png^[multiply:" .. background_color ..")^(spawn_egg_overlay.png^[multiply:" .. overlay_color .. ")"
if old_spawn_icons then
local mobname = mob:gsub("mobs_mc:","")
invimg = "mobs_mc_spawn_icon_"..mobname..".png"
end
if addegg == 1 then
invimg = "mobs_chicken_egg.png^(" .. invimg ..
"^[mask:mobs_chicken_egg_overlay.png)"

View File

@ -108,6 +108,9 @@ mcl_mob_cap_animal (Mob cap animals) int 10 0 1024
#Maximum amount of ambient mobs that will spawn near a player (default:15)
mcl_mob_cap_ambient (Mob cap ambient mobs) int 15 0 1024
#Display mob icons in inventory instead of mc-like spawn eggs
mcl_old_spawn_icons (Old spawn icons instead of eggs) bool false
[Audio]
# Enable flame sound.
flame_sound (Flame sound) bool true