mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2025-02-25 12:33:45 +01:00
bonemeal: use wea.parse.chance
This commit is contained in:
@ -27,7 +27,7 @@ worldedit.register_command("bonemeal", {
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if #parts >= 2 then
|
if #parts >= 2 then
|
||||||
chance = tonumber(parts[2])
|
chance = worldeditadditions.parse.chance(parts[2])
|
||||||
if not chance then
|
if not chance then
|
||||||
return false, "Invalid chance value (must be a positive integer)"
|
return false, "Invalid chance value (must be a positive integer)"
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user