From 786cea122d09067e396197ec01895efa0e81441a Mon Sep 17 00:00:00 2001 From: cora Date: Tue, 13 Sep 2022 13:15:57 +0200 Subject: [PATCH] Remove some unsused settings from mcl_mobs --- mods/ENTITIES/mcl_mobs/api.lua | 9 --------- mods/ENTITIES/mcl_mobs/spawning.lua | 5 +++-- settingtypes.txt | 4 ---- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index a9c36bfbb..9fa48b718 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -1,4 +1,3 @@ - -- API for Mobs Redo: MineClone 2 Edition (MRM) mcl_mobs = {} @@ -14,12 +13,6 @@ local FLOP_HOR_SPEED = 1.5 local ENTITY_CRAMMING_MAX = 24 local CRAMMING_DAMAGE = 3 -local MOB_CAP = {} -MOB_CAP.hostile = 70 -MOB_CAP.passive = 10 -MOB_CAP.ambient = 15 -MOB_CAP.water = 15 - -- Localize local S = minetest.get_translator("mcl_mobs") @@ -55,8 +48,6 @@ 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 max_per_block = tonumber(minetest.settings:get("max_objects_per_block") or 64) -local mobs_spawn_chance = tonumber(minetest.settings:get("mobs_spawn_chance") or 2.5) -- Shows helpful debug info above each mob local mobs_debug = minetest.settings:get_bool("mobs_debug", false) diff --git a/mods/ENTITIES/mcl_mobs/spawning.lua b/mods/ENTITIES/mcl_mobs/spawning.lua index fda76026a..8a48aebf9 100644 --- a/mods/ENTITIES/mcl_mobs/spawning.lua +++ b/mods/ENTITIES/mcl_mobs/spawning.lua @@ -38,7 +38,7 @@ local mob_cap = { --do mobs spawn? local mobs_spawn = minetest.settings:get_bool("mobs_spawn", true) ~= false - +local spawn_protected = minetest.settings:get_bool("mobs_spawn_protected") ~= false local noise_params = { offset = 0, @@ -456,7 +456,8 @@ local function spawn_check(pos,spawn_def) and (spawn_def.check_position and spawn_def.check_position(pos) or true) and (not is_farm_animal(spawn_def.name) or is_grass) and (spawn_def.type_of_spawning ~= "water" or is_water) - and not is_bedrock then + and not spawn_protected or not minetest.is_protected(s, "") + and not is_bedrock --only need to poll for node light if everything else worked local gotten_light = get_node_light(pos) if gotten_light >= spawn_def.min_light and gotten_light <= spawn_def.max_light then diff --git a/settingtypes.txt b/settingtypes.txt index 75053092f..577e4491d 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -76,10 +76,6 @@ mcl_enable_skin_customization (Enable player skin customization) bool true # This setting is only read at startup. mobs_spawn (Spawn mobs naturally) bool true -# Controls the overall amount of mobs that spawn. The higher the number, -# the less often mobs will spawn. This does not affect mob spawners. -mobs_spawn_chance (Mob spawn chance) float 2.5 0.0 - # If enabled, only peaceful mobs will appear naturally. This does not # affect mob spawners. # This setting is only read at startup.