Merge pull request 'Optionally bring back the old spawn icons' (#2705) from spawn_icons_setting into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2705pvp_knockback
|
@ -22,6 +22,15 @@ function table.update_nil(t, ...)
|
||||||
return t
|
return t
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function mcl_util.file_exists(name)
|
||||||
|
local f = io.open(name)
|
||||||
|
if not f then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
f:close()
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
-- Based on minetest.rotate_and_place
|
-- Based on minetest.rotate_and_place
|
||||||
|
|
||||||
--[[
|
--[[
|
||||||
|
|
|
@ -71,7 +71,7 @@ local spawn_protected = minetest.settings:get_bool("mobs_spawn_protected") ~= fa
|
||||||
local remove_far = true
|
local remove_far = true
|
||||||
local difficulty = tonumber(minetest.settings:get("mob_difficulty")) or 1.0
|
local difficulty = tonumber(minetest.settings:get("mob_difficulty")) or 1.0
|
||||||
local show_health = false
|
local show_health = false
|
||||||
|
local old_spawn_icons = minetest.settings:get_bool("mcl_old_spawn_icons",false)
|
||||||
-- Shows helpful debug info above each mob
|
-- Shows helpful debug info above each mob
|
||||||
local mobs_debug = minetest.settings:get_bool("mobs_debug", false)
|
local mobs_debug = minetest.settings:get_bool("mobs_debug", false)
|
||||||
local spawn_logging = minetest.settings:get_bool("mcl_logging_mobs_spawn",true)
|
local spawn_logging = minetest.settings:get_bool("mcl_logging_mobs_spawn",true)
|
||||||
|
@ -4442,7 +4442,13 @@ function mcl_mobs:register_egg(mob, desc, background_color, overlay_color, addeg
|
||||||
end
|
end
|
||||||
|
|
||||||
local invimg = "(spawn_egg.png^[multiply:" .. background_color ..")^(spawn_egg_overlay.png^[multiply:" .. overlay_color .. ")"
|
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:","")
|
||||||
|
local fn = "mobs_mc_spawn_icon_"..mobname..".png"
|
||||||
|
if mcl_util.file_exists(minetest.get_modpath("mobs_mc").."/textures/"..fn) then
|
||||||
|
invimg = fn
|
||||||
|
end
|
||||||
|
end
|
||||||
if addegg == 1 then
|
if addegg == 1 then
|
||||||
invimg = "mobs_chicken_egg.png^(" .. invimg ..
|
invimg = "mobs_chicken_egg.png^(" .. invimg ..
|
||||||
"^[mask:mobs_chicken_egg_overlay.png)"
|
"^[mask:mobs_chicken_egg_overlay.png)"
|
||||||
|
|
After Width: | Height: | Size: 263 B |
After Width: | Height: | Size: 388 B |
After Width: | Height: | Size: 315 B |
After Width: | Height: | Size: 648 B |
After Width: | Height: | Size: 367 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 476 B |
After Width: | Height: | Size: 342 B |
After Width: | Height: | Size: 437 B |
After Width: | Height: | Size: 489 B |
After Width: | Height: | Size: 439 B |
After Width: | Height: | Size: 529 B |
After Width: | Height: | Size: 759 B |
After Width: | Height: | Size: 750 B |
After Width: | Height: | Size: 337 B |
After Width: | Height: | Size: 335 B |
After Width: | Height: | Size: 410 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 409 B |
After Width: | Height: | Size: 866 B |
After Width: | Height: | Size: 323 B |
After Width: | Height: | Size: 828 B |
After Width: | Height: | Size: 367 B |
After Width: | Height: | Size: 706 B |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 447 B |
After Width: | Height: | Size: 440 B |
After Width: | Height: | Size: 378 B |
After Width: | Height: | Size: 372 B |
After Width: | Height: | Size: 385 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 469 B |
After Width: | Height: | Size: 329 B |
After Width: | Height: | Size: 285 B |
After Width: | Height: | Size: 855 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 322 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 692 B |
After Width: | Height: | Size: 356 B |
After Width: | Height: | Size: 775 B |
After Width: | Height: | Size: 629 B |
After Width: | Height: | Size: 676 B |
After Width: | Height: | Size: 339 B |
After Width: | Height: | Size: 469 B |
After Width: | Height: | Size: 345 B |
After Width: | Height: | Size: 324 B |
After Width: | Height: | Size: 751 B |
After Width: | Height: | Size: 446 B |
After Width: | Height: | Size: 350 B |
|
@ -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)
|
#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
|
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]
|
[Audio]
|
||||||
# Enable flame sound.
|
# Enable flame sound.
|
||||||
flame_sound (Flame sound) bool true
|
flame_sound (Flame sound) bool true
|
||||||
|
|