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/2705
|
@ -22,6 +22,15 @@ function table.update_nil(t, ...)
|
|||
return t
|
||||
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
|
||||
|
||||
--[[
|
||||
|
|
|
@ -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,13 @@ 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:","")
|
||||
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
|
||||
invimg = "mobs_chicken_egg.png^(" .. invimg ..
|
||||
"^[mask:mobs_chicken_egg_overlay.png)"
|
||||
|
|
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_bat.png
Normal file
After Width: | Height: | Size: 263 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_blaze.png
Normal file
After Width: | Height: | Size: 388 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_cat.png
Normal file
After Width: | Height: | Size: 315 B |
After Width: | Height: | Size: 648 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_chicken.png
Normal file
After Width: | Height: | Size: 367 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_cod.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_cow.png
Normal file
After Width: | Height: | Size: 476 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_creeper.png
Normal file
After Width: | Height: | Size: 342 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_donkey.png
Normal file
After Width: | Height: | Size: 437 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_dragon.png
Normal file
After Width: | Height: | Size: 489 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_enderman.png
Normal file
After Width: | Height: | Size: 439 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_endermite.png
Normal file
After Width: | Height: | Size: 529 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_evoker.png
Normal file
After Width: | Height: | Size: 759 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_ghast.png
Normal file
After Width: | Height: | Size: 750 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_guardian.png
Normal file
After Width: | Height: | Size: 337 B |
After Width: | Height: | Size: 335 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_horse.png
Normal file
After Width: | Height: | Size: 410 B |
After Width: | Height: | Size: 1 KiB |
After Width: | Height: | Size: 1.2 KiB |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_husk.png
Normal file
After Width: | Height: | Size: 409 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_illusioner.png
Normal file
After Width: | Height: | Size: 866 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_iron_golem.png
Normal file
After Width: | Height: | Size: 323 B |
After Width: | Height: | Size: 828 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_llama.png
Normal file
After Width: | Height: | Size: 367 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_magmacube.png
Normal file
After Width: | Height: | Size: 706 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_mooshroom.png
Normal file
After Width: | Height: | Size: 427 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_mule.png
Normal file
After Width: | Height: | Size: 447 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_parrot.png
Normal file
After Width: | Height: | Size: 440 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_pig.png
Normal file
After Width: | Height: | Size: 378 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_polarbear.png
Normal file
After Width: | Height: | Size: 372 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_rabbit.png
Normal file
After Width: | Height: | Size: 385 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_salmon.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_sheep.png
Normal file
After Width: | Height: | Size: 469 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_shulker.png
Normal file
After Width: | Height: | Size: 329 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_silverfish.png
Normal file
After Width: | Height: | Size: 285 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_skeleton.png
Normal file
After Width: | Height: | Size: 855 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_slime.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_snowman.png
Normal file
After Width: | Height: | Size: 322 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_spider.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_squid.png
Normal file
After Width: | Height: | Size: 692 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_stray.png
Normal file
After Width: | Height: | Size: 356 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_vex.png
Normal file
After Width: | Height: | Size: 775 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_villager.png
Normal file
After Width: | Height: | Size: 629 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_vindicator.png
Normal file
After Width: | Height: | Size: 676 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_witch.png
Normal file
After Width: | Height: | Size: 339 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_wither.png
Normal file
After Width: | Height: | Size: 469 B |
After Width: | Height: | Size: 345 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_wolf.png
Normal file
After Width: | Height: | Size: 324 B |
BIN
mods/ENTITIES/mobs_mc/textures/mobs_mc_spawn_icon_zombie.png
Normal file
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)
|
||||
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
|
||||
|
|