Merge branch 'master' into mcl_bamboo2_cleanup

This commit is contained in:
Michieal 2023-01-18 18:40:23 -05:00
commit a00ef4500d
2 changed files with 11 additions and 1 deletions

View file

@ -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

View file

@ -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.