From faa38ffab8f970ecccf7c59eb89c8e6de7e5059c Mon Sep 17 00:00:00 2001 From: cora Date: Fri, 11 Nov 2022 00:30:52 +0100 Subject: [PATCH] Fix some warnings --- mods/ENTITIES/mcl_mobs/api.lua | 5 ----- mods/ENTITIES/mcl_mobs/combat.lua | 1 - mods/ENTITIES/mcl_mobs/movement.lua | 4 ++++ mods/ENTITIES/mcl_mobs/pathfinding.lua | 1 + mods/ENTITIES/mcl_mobs/spawning.lua | 1 + 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index d4563f4f78..614467e405 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -50,11 +50,6 @@ if minetest.settings:get_bool("only_peaceful_mobs", false) then end) end --- default nodes -local node_ice = "mcl_core:ice" -local node_snowblock = "mcl_core:snowblock" -local node_snow = "mcl_core:snow" - minetest.register_chatcommand("clearmobs",{ privs={maphack=true}, params = "||", diff --git a/mods/ENTITIES/mcl_mobs/combat.lua b/mods/ENTITIES/mcl_mobs/combat.lua index 91e7c7ec22..ee46c3e348 100644 --- a/mods/ENTITIES/mcl_mobs/combat.lua +++ b/mods/ENTITIES/mcl_mobs/combat.lua @@ -6,7 +6,6 @@ local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false local show_health = false -- pathfinding settings -local enable_pathfinding = true local stuck_timeout = 3 -- how long before mob gets stuck in place and starts searching local stuck_path_timeout = 10 -- how long will mob follow path before giving up diff --git a/mods/ENTITIES/mcl_mobs/movement.lua b/mods/ENTITIES/mcl_mobs/movement.lua index caf1ccca31..11ec2a444a 100644 --- a/mods/ENTITIES/mcl_mobs/movement.lua +++ b/mods/ENTITIES/mcl_mobs/movement.lua @@ -4,6 +4,10 @@ local DEFAULT_FALL_SPEED = -9.81*1.5 local FLOP_HEIGHT = 6 local FLOP_HOR_SPEED = 1.5 local PATHFINDING = "gowp" +local node_ice = "mcl_core:ice" +local node_snowblock = "mcl_core:snowblock" +local node_snow = "mcl_core:snow" + local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false diff --git a/mods/ENTITIES/mcl_mobs/pathfinding.lua b/mods/ENTITIES/mcl_mobs/pathfinding.lua index 495d23cd40..6cb37434f6 100644 --- a/mods/ENTITIES/mcl_mobs/pathfinding.lua +++ b/mods/ENTITIES/mcl_mobs/pathfinding.lua @@ -3,6 +3,7 @@ local mob_class = mcl_mobs.mob_class local LOGGING_ON = minetest.settings:get_bool("mcl_logging_mobs_villager",false) local PATHFINDING = "gowp" +local enable_pathfinding = true local LOG_MODULE = "[Mobs]" local function mcl_log (message) diff --git a/mods/ENTITIES/mcl_mobs/spawning.lua b/mods/ENTITIES/mcl_mobs/spawning.lua index b8ed3347c1..a3cdbb30d0 100644 --- a/mods/ENTITIES/mcl_mobs/spawning.lua +++ b/mods/ENTITIES/mcl_mobs/spawning.lua @@ -31,6 +31,7 @@ local dbg_spawn_succ = 0 local dbg_spawn_counts = {} -- range for mob count local aoc_range = 136 +local remove_far = true local mob_cap = { monster = tonumber(minetest.settings:get("mcl_mob_cap_monster")) or 70,