mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-22 07:23:00 +00:00
//scale, //subdivide, //spop: use new position api
This commit is contained in:
parent
9be7854297
commit
9b4a777a67
3 changed files with 22 additions and 12 deletions
|
@ -116,9 +116,11 @@ worldeditadditions_core.register_command("subdivide", {
|
||||||
end
|
end
|
||||||
|
|
||||||
worldedit.player_notify_suppress(name)
|
worldedit.player_notify_suppress(name)
|
||||||
worldedit.pos1[name] = cpos1
|
wea_c.pos.set1(name, cpos1)
|
||||||
worldedit.pos2[name] = cpos2
|
wea_c.pos.set2(name, cpos2)
|
||||||
worldedit.marker_update(name)
|
-- worldedit.pos1[name] = cpos1
|
||||||
|
-- worldedit.pos2[name] = cpos2
|
||||||
|
-- worldedit.marker_update(name)
|
||||||
cmd.func(name, wea_c.table.unpack(cmd_args_parsed))
|
cmd.func(name, wea_c.table.unpack(cmd_args_parsed))
|
||||||
if will_trigger_saferegion(name, cmd_name, args) then
|
if will_trigger_saferegion(name, cmd_name, args) then
|
||||||
minetest.chatcommands["/y"].func(name)
|
minetest.chatcommands["/y"].func(name)
|
||||||
|
@ -141,9 +143,12 @@ worldeditadditions_core.register_command("subdivide", {
|
||||||
time_last_msg = wea_c.get_ms_time()
|
time_last_msg = wea_c.get_ms_time()
|
||||||
end
|
end
|
||||||
end, function(_, _, stats)
|
end, function(_, _, stats)
|
||||||
worldedit.pos1[name] = pos1
|
|
||||||
worldedit.pos2[name] = pos2
|
wea_c.pos.set1(name, pos1)
|
||||||
worldedit.marker_update(name)
|
wea_c.pos.set2(name, pos2)
|
||||||
|
-- worldedit.pos1[name] = pos1
|
||||||
|
-- worldedit.pos2[name] = pos2
|
||||||
|
-- worldedit.marker_update(name)
|
||||||
|
|
||||||
-- Called on completion
|
-- Called on completion
|
||||||
minetest.log("action", string.format("%s used //subdivide at %s - %s, with %d chunks and %d total nodes in %s",
|
minetest.log("action", string.format("%s used //subdivide at %s - %s, with %d chunks and %d total nodes in %s",
|
||||||
|
|
|
@ -117,9 +117,11 @@ wea_c.register_command("scale", {
|
||||||
)
|
)
|
||||||
if not success then return success, stats end
|
if not success then return success, stats end
|
||||||
|
|
||||||
worldedit.pos1[name] = stats.pos1
|
wea_c.pos.set1(name, stats.pos1)
|
||||||
worldedit.pos2[name] = stats.pos2
|
wea_c.pos.set2(name, stats.pos2)
|
||||||
worldedit.marker_update(name)
|
-- worldedit.pos1[name] = stats.pos1
|
||||||
|
-- worldedit.pos2[name] = stats.pos2
|
||||||
|
-- worldedit.marker_update(name)
|
||||||
|
|
||||||
local time_taken = wea_c.get_ms_time() - start_time
|
local time_taken = wea_c.get_ms_time() - start_time
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
local wea = worldeditadditions
|
local wea = worldeditadditions
|
||||||
|
local weac = worldeditadditions_core
|
||||||
|
|
||||||
|
|
||||||
-- ███████ ██████ ██████ ██████
|
-- ███████ ██████ ██████ ██████
|
||||||
|
@ -20,9 +21,11 @@ worldeditadditions_core.register_command("spop", {
|
||||||
local success, pos1, pos2 = wea.spop(name)
|
local success, pos1, pos2 = wea.spop(name)
|
||||||
if not success then return success, pos1 end
|
if not success then return success, pos1 end
|
||||||
|
|
||||||
worldedit.pos1[name] = pos1
|
weac.pos.set1(name, pos1)
|
||||||
worldedit.pos2[name] = pos2
|
weac.pos.set2(name, pos2)
|
||||||
worldedit.marker_update(name)
|
-- worldedit.pos1[name] = pos1
|
||||||
|
-- worldedit.pos2[name] = pos2
|
||||||
|
-- worldedit.marker_update(name)
|
||||||
|
|
||||||
local new_count = wea.scount(name)
|
local new_count = wea.scount(name)
|
||||||
local plural = "s are"
|
local plural = "s are"
|
||||||
|
|
Loading…
Reference in a new issue