Merge pull request 'Disable zombie siege raid until we stop zombies pathing through door' (#3329) from disable_zombie_siege into master

Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/3329
Reviewed-by: PrairieWind <prairie.astronomer1@gmail.com>
This commit is contained in:
PrairieWind 2023-01-18 20:51:04 +00:00
commit c49aef3251
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) local function check_spawn_pos(pos)
return minetest.get_natural_light(pos) < 7 return minetest.get_natural_light(pos) < 7
@ -33,6 +34,13 @@ mcl_events.register_event("zombie_siege",{
--minetest.log("Cond start zs") --minetest.log("Cond start zs")
local r = {} 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 t = minetest.get_timeofday()
local pr = PseudoRandom(minetest.get_day_count()) local pr = PseudoRandom(minetest.get_day_count())
local rnd = pr:next(1,10) 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 for _,p in pairs(minetest.get_connected_players()) do
local village = mcl_raids.find_village(p:get_pos()) local village = mcl_raids.find_village(p:get_pos())
if village then if village then
--minetest.log("Found village") minetest.log("action", "Zombie siege is starting")
table.insert(r,{ player = p:get_player_name(), pos = village}) table.insert(r,{ player = p:get_player_name(), pos = village})
end end
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) # Larger values will have a larger performance impact (default:48)
mcl_mob_active_range (Active mob range) int 48 0 256 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] [Audio]
# Enable flame sound. # Enable flame sound.