mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-25 20:11:06 +01:00
Reserve some more keywords in register_effect()
This commit is contained in:
parent
7cd0cfede8
commit
6dab6158b9
1 changed files with 2 additions and 5 deletions
|
@ -121,11 +121,8 @@ function mcl_potions.register_effect(def)
|
||||||
if type(name) ~= "string" then
|
if type(name) ~= "string" then
|
||||||
error("Unable to register effect: name is not a string")
|
error("Unable to register effect: name is not a string")
|
||||||
end
|
end
|
||||||
if name == "list" then
|
if name == "list" or name == "heal" or name == "remove" or name == "clear" then
|
||||||
error("Unable to register effect: list is a reserved word")
|
error("Unable to register effect: " .. name .. " is a reserved word")
|
||||||
end
|
|
||||||
if name == "heal" then
|
|
||||||
error("Unable to register effect: heal is a reserved word")
|
|
||||||
end
|
end
|
||||||
if registered_effects[name] then
|
if registered_effects[name] then
|
||||||
error("Effect named "..name.." already registered!")
|
error("Effect named "..name.." already registered!")
|
||||||
|
|
Loading…
Reference in a new issue