mobs:add_mob() returns object spawned or false if not

This commit is contained in:
TenPlus1 2020-06-25 09:33:59 +01:00
부모 e63b1b478e
커밋 dfdd55848d
2개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제

파일 보기

@ -6,7 +6,7 @@ local use_cmi = minetest.global_exists("cmi")
mobs = {
mod = "redo",
version = "20200622",
version = "20200625",
intllib = S,
invis = minetest.global_exists("invisibility") and invisibility or {}
}
@ -3707,7 +3707,7 @@ function mobs:add_mob(pos, def)
ent:update_tag()
end
return true
return ent
end

파일 보기

@ -339,6 +339,8 @@ Adding Mobs in World
ignore_count = true -- ignores mob count per map area
})
Returns false if mob could not be added, returns mob object if spawned ok.
Spawning Mobs in World
----------------------