mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-27 17:43:53 +01:00
removed tests
This commit is contained in:
parent
03093112bb
commit
df209a9f61
@ -49,10 +49,6 @@ worldedit.register_command("sfactor", {
|
||||
return false, "Error: Invalid <target> \""..targ.."\". Expected \"x\" and or \"y\" and or \"z\"."
|
||||
end
|
||||
|
||||
if false then -- Argument test
|
||||
return false, "<mode>: " .. tostring(mode) .. ", <factor>: " .. type(fac) .. ", <target>: " .. tostring(targ)
|
||||
end
|
||||
|
||||
return true, mode, fac, targ
|
||||
end,
|
||||
func = function(name, mode, fac, targ)
|
||||
@ -78,24 +74,10 @@ worldedit.register_command("sfactor", {
|
||||
elseif mode == "shrink" then int = math.floor(abs / fac) * fac
|
||||
else int = math.ceil(abs / fac) * fac end
|
||||
|
||||
if int < fac then int = fac end -- Ensure small selections aren't collapsed to 0
|
||||
if neg then int = int * -1 end -- Ensure correct facing direction
|
||||
if neg then int = int * -1 end
|
||||
return int
|
||||
end
|
||||
|
||||
--- Test:
|
||||
if false then
|
||||
local brk = ""
|
||||
for k,v in pairs(targ) do
|
||||
brk = brk..k..": "..delta[k]..", "
|
||||
delta[k] = eval(delta[k],fac)
|
||||
brk = brk..k..": "..delta[k]..", "
|
||||
end
|
||||
return false, brk
|
||||
end
|
||||
-- //multi //fp set1 589 2 -82 //fp set2 615 2 -53
|
||||
-- //smake even shrink
|
||||
|
||||
for k,v in pairs(targ) do delta[k] = eval(delta[k],fac) end
|
||||
|
||||
worldedit.pos2[name] = vector.add(p1,delta)
|
||||
|
@ -61,9 +61,6 @@ worldedit.register_command("smake", {
|
||||
return false, "Error: Invalid operator \""..oper.."\". Expected \"odd\", \"even\" or \"equal\"."
|
||||
end
|
||||
|
||||
if false then -- Argument test
|
||||
return false, "<operator>: " .. oper .. ", <mode>: " .. tostring(mode) .. ", <target>: " .. tostring(targ) .. ", <base>: " .. tostring(base)
|
||||
end
|
||||
return true, oper, mode, targ, base
|
||||
end,
|
||||
func = function(name, oper, mode, targ, base)
|
||||
@ -121,22 +118,8 @@ worldedit.register_command("smake", {
|
||||
if int < 0 then return _m * -1
|
||||
else return _m end
|
||||
end
|
||||
-- return false, "Case \"equal\" not handled."
|
||||
end
|
||||
|
||||
--- Test:
|
||||
if false then
|
||||
local brk = ""
|
||||
for k,v in pairs(targ) do
|
||||
brk = brk..k..": "..delta[k]..", "
|
||||
delta[k] = eval(delta[k])
|
||||
brk = brk..k..": "..delta[k]..", "
|
||||
end
|
||||
return false, brk
|
||||
end
|
||||
-- //multi //fp set1 589 2 -82 //fp set2 615 2 -53
|
||||
-- //smake even shrink
|
||||
|
||||
for k,v in pairs(targ) do delta[k] = eval(delta[k]) end
|
||||
|
||||
worldedit.pos2[name] = vector.add(p1,delta)
|
||||
|
Loading…
Reference in New Issue
Block a user