1
0
mirror of https://github.com/Uberi/Minetest-WorldEdit.git synced 2025-06-28 14:16:18 +02:00

Warn about invalid //stretch usage

This commit is contained in:
sfan5
2018-11-15 20:48:20 +01:00
parent b37605943b
commit b2b2b9364d
2 changed files with 7 additions and 4 deletions

View File

@ -905,9 +905,12 @@ minetest.register_chatcommand("/stretch", {
stretchx, stretchy, stretchz = tonumber(stretchx), tonumber(stretchy), tonumber(stretchz)
if stretchx == 0 or stretchy == 0 or stretchz == 0 then
worldedit.player_notify(name, "invalid scaling factors: " .. param)
return nil
end
local count = check_region(name, param)
if count then return tonumber(stretchx) * tonumber(stretchy) * tonumber(stretchz) * count end
if count then
return stretchx * stretchy * stretchz * count
end
return nil
end),
})