1
0
Fork 0

Fix indentation

This commit is contained in:
cora 2022-10-13 06:26:51 +02:00
parent ba25e57eac
commit cd862888d1
1 changed files with 23 additions and 20 deletions

View File

@ -620,6 +620,7 @@ if mobs_spawn then
step_chance = step_chance + mob_chance
end
local mob_def = mob_library_worker_table[mob_index]
--minetest.log(mob_def.name.." "..step_chance.. " "..mob_chance)
local spawn_in_group = minetest.registered_entities[mob_def.name].spawn_in_group or 4
local spawn_in_group_min = minetest.registered_entities[mob_def.name].spawn_in_group_min or 1
local mob_type = minetest.registered_entities[mob_def.name].type
@ -627,10 +628,12 @@ if mobs_spawn then
if mob_def.type_of_spawning == "water" then
spawning_position = get_water_spawn(spawning_position)
if not spawning_position then
minetest.log("return")
return
end
end
if minetest.registered_entities[mob_def.name].can_spawn and not minetest.registered_entities[mob_def.name].can_spawn(pos) then
minetest.log("return")
return
end
--everything is correct, spawn mob