removed tests

This commit is contained in:
VorTechnix 2021-06-27 15:06:03 -07:00
parent 03093112bb
commit df209a9f61
2 changed files with 1 additions and 36 deletions

@ -49,10 +49,6 @@ worldedit.register_command("sfactor", {
return false, "Error: Invalid <target> \""..targ.."\". Expected \"x\" and or \"y\" and or \"z\"." return false, "Error: Invalid <target> \""..targ.."\". Expected \"x\" and or \"y\" and or \"z\"."
end end
if false then -- Argument test
return false, "<mode>: " .. tostring(mode) .. ", <factor>: " .. type(fac) .. ", <target>: " .. tostring(targ)
end
return true, mode, fac, targ return true, mode, fac, targ
end, end,
func = function(name, mode, fac, targ) func = function(name, mode, fac, targ)
@ -78,24 +74,10 @@ worldedit.register_command("sfactor", {
elseif mode == "shrink" then int = math.floor(abs / fac) * fac elseif mode == "shrink" then int = math.floor(abs / fac) * fac
else int = math.ceil(abs / fac) * fac end 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
if neg then int = int * -1 end -- Ensure correct facing direction
return int return int
end 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 for k,v in pairs(targ) do delta[k] = eval(delta[k],fac) end
worldedit.pos2[name] = vector.add(p1,delta) 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\"." return false, "Error: Invalid operator \""..oper.."\". Expected \"odd\", \"even\" or \"equal\"."
end 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 return true, oper, mode, targ, base
end, end,
func = function(name, oper, mode, targ, base) func = function(name, oper, mode, targ, base)
@ -121,22 +118,8 @@ worldedit.register_command("smake", {
if int < 0 then return _m * -1 if int < 0 then return _m * -1
else return _m end else return _m end
end end
-- return false, "Case \"equal\" not handled."
end 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 for k,v in pairs(targ) do delta[k] = eval(delta[k]) end
worldedit.pos2[name] = vector.add(p1,delta) worldedit.pos2[name] = vector.add(p1,delta)