Disable zombie siege raid until we stop zombies pathing through door

This commit is contained in:
ancientmarinerdev 2023-01-17 02:12:32 +00:00 committed by Gitea
parent 8adc1d48b2
commit f3ba32d739
2 changed files with 11 additions and 1 deletions

@ -1,3 +1,4 @@
local zombie_siege_enabled = minetest.settings:get_bool("mcl_raids_zombie_siege", false)
local function check_spawn_pos(pos)
return minetest.get_natural_light(pos) < 7
@ -33,6 +34,13 @@ mcl_events.register_event("zombie_siege",{
--minetest.log("Cond start zs")
local r = {}
if not zombie_siege_enabled then
--minetest.log("action", "Zombie siege disabled")
return r
else
--minetest.log("action", "Zombie siege start check")
end
local t = minetest.get_timeofday()
local pr = PseudoRandom(minetest.get_day_count())
local rnd = pr:next(1,10)
@ -42,7 +50,7 @@ mcl_events.register_event("zombie_siege",{
for _,p in pairs(minetest.get_connected_players()) do
local village = mcl_raids.find_village(p:get_pos())
if village then
--minetest.log("Found village")
minetest.log("action", "Zombie siege is starting")
table.insert(r,{ player = p:get_player_name(), pos = village})
end
end

@ -134,6 +134,8 @@ mcl_old_spawn_icons (Old spawn icons instead of eggs) bool false
# Larger values will have a larger performance impact (default:48)
mcl_mob_active_range (Active mob range) int 48 0 256
# Zombie siege raid (default:false)
mcl_raids_zombie_siege (Zombie siege raid) bool false
[Audio]
# Enable flame sound.