mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-14 15:11:05 +01:00
Fix raid instawin when no spawnable blocks found
This commit is contained in:
parent
057a78ed30
commit
db4f9ec5a3
2 changed files with 6 additions and 1 deletions
|
@ -91,7 +91,10 @@ function check_events(dtime)
|
|||
local p = ae:cond_progress()
|
||||
if p == true then
|
||||
ae.stage = ae.stage + 1
|
||||
ae:on_stage_begin()
|
||||
if ae:on_stage_begin() == true then
|
||||
mcl_log("[mcl_events] Event "..ae.readable_name.." at "..minetest.pos_to_string(vector.round(ae.pos)).." failed at stage_begin of stage "..ae.stage )
|
||||
active_events[idx] = nil
|
||||
end
|
||||
elseif tonumber(p) then
|
||||
ae.stage = tonumber(p) or ae.stage + 1
|
||||
ae:on_stage_begin()
|
||||
|
|
|
@ -187,12 +187,14 @@ function mcl_raids.spawn_raid(event)
|
|||
mcl_raids.promote_to_raidcaptain(event.mobs[1])
|
||||
end
|
||||
minetest.log("action", "[mcl_raids] Raid Spawned. Illager Count: " .. #event.mobs .. ".")
|
||||
return #event.mobs == 0
|
||||
else
|
||||
minetest.log("action", "[mcl_raids] Raid Spawn Postion not chosen.")
|
||||
end
|
||||
elseif not sn then
|
||||
minetest.log("action", "[mcl_raids] Raid Spawn Position error, no appropriate site found.")
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function mcl_raids.find_villager(pos)
|
||||
|
|
Loading…
Reference in a new issue