mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-08-18 21:14:11 +02:00
Convert crash to a warning
This commit is contained in:
parent
067ad7b78b
commit
c7e43e31d4
@ -1832,6 +1832,10 @@ end
|
|||||||
|
|
||||||
function mcl_potions.give_effect_by_level(name, object, level, duration, no_particles)
|
function mcl_potions.give_effect_by_level(name, object, level, duration, no_particles)
|
||||||
if level == 0 then return false end
|
if level == 0 then return false end
|
||||||
|
if not registered_effects[name] then
|
||||||
|
minetest.log("warning", "[mcl_potions] Trying to give unknown effect "..name)
|
||||||
|
return false
|
||||||
|
end
|
||||||
if not registered_effects[name].uses_factor then
|
if not registered_effects[name].uses_factor then
|
||||||
return mcl_potions.give_effect(name, object, 0, duration, no_particles)
|
return mcl_potions.give_effect(name, object, 0, duration, no_particles)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user