1
0
mirror of https://github.com/Uberi/Minetest-WorldEdit.git synced 2025-07-03 16:40:38 +02:00

3 Commits

Author SHA1 Message Date
bf154b12c7 Use new 5.13.0 explicit VoxelManip free 2025-05-30 18:04:55 +02:00
03d4e45e59 Fix CI tests for new name and repo 2025-05-30 15:40:06 +02:00
6e316105e0 fixes #252: Missing placeholder in Russian translation. 2025-04-05 18:40:22 +02:00
5 changed files with 16 additions and 12 deletions

View File

@ -11,13 +11,14 @@ jobs:
cfg: cfg:
- { image: 'registry.gitlab.com/minetest/minetest/server:5.0.1', mtg: false } - { image: 'registry.gitlab.com/minetest/minetest/server:5.0.1', mtg: false }
- { image: 'registry.gitlab.com/minetest/minetest/server:5.5.1', mtg: false } - { image: 'registry.gitlab.com/minetest/minetest/server:5.5.1', mtg: false }
- { image: '', mtg: true } # latest mater - { image: 'ghcr.io/minetest/minetest:5.10.0', mtg: true }
- { image: 'ghcr.io/luanti-org/luanti:master', mtg: true } # latest git
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
repository: 'minetest/minetest_game' repository: 'luanti-org/minetest_game'
path: minetest_game path: minetest_game
if: ${{ matrix.cfg.mtg }} if: ${{ matrix.cfg.mtg }}

View File

@ -11,9 +11,9 @@ if [ "$1" == "--docker" ]; then
command -v docker >/dev/null || { echo "Docker is not installed." >&2; exit 1; } command -v docker >/dev/null || { echo "Docker is not installed." >&2; exit 1; }
[ -d minetest_game ] || echo "A source checkout of minetest_game was not found. This can fail if your docker image does not ship a game." >&2; [ -d minetest_game ] || echo "A source checkout of minetest_game was not found. This can fail if your docker image does not ship a game." >&2;
else else
mtserver=$(command -v minetestserver) mtserver=$(command -v luantiserver)
[[ -z "$mtserver" && -x ../../bin/minetestserver ]] && mtserver=../../bin/minetestserver [[ -z "$mtserver" && -x ../../bin/luantiserver ]] && mtserver=../../bin/luantiserver
[ -z "$mtserver" ] && { echo "To run the test outside of Docker, an installation of minetestserver is required." >&2; exit 1; } [ -z "$mtserver" ] && { echo "To run the test outside of Docker, an installation of luantiserver is required." >&2; exit 1; }
fi fi
mkdir $worldpath mkdir $worldpath
@ -22,7 +22,7 @@ printf '%s\n' worldedit_run_tests=true max_forceloaded_blocks=9999 >$confpath
if [ -z "$mtserver" ]; then if [ -z "$mtserver" ]; then
chmod -R 777 $tempdir chmod -R 777 $tempdir
[ -z "$DOCKER_IMAGE" ] && DOCKER_IMAGE="ghcr.io/minetest/minetest:master" [ -n "$DOCKER_IMAGE" ] || { echo "Missing DOCKER_IMAGE env variable" >&2; exit 1; }
vol=( vol=(
-v "$confpath":/etc/minetest/minetest.conf -v "$confpath":/etc/minetest/minetest.conf
-v "$tempdir":/var/lib/minetest/.minetest -v "$tempdir":/var/lib/minetest/.minetest

View File

@ -133,7 +133,9 @@ function mh.finish(manip, data)
manip:set_data(data) manip:set_data(data)
end end
manip:write_to_map() manip:write_to_map()
manip:update_map() if manip.close ~= nil then
manip:close() -- explicitly free memory
end
end end

View File

@ -56,8 +56,7 @@ function worldedit.set_param2(pos1, pos2, param2)
-- Update map -- Update map
manip:set_param2_data(param2_data) manip:set_param2_data(param2_data)
manip:write_to_map() mh.finish(manip)
manip:update_map()
return worldedit.volume(pos1, pos2) return worldedit.volume(pos1, pos2)
end end
@ -269,8 +268,10 @@ function worldedit.fixlight(pos1, pos2)
local pos1, pos2 = worldedit.sort_pos(pos1, pos2) local pos1, pos2 = worldedit.sort_pos(pos1, pos2)
local vmanip = minetest.get_voxel_manip(pos1, pos2) local vmanip = minetest.get_voxel_manip(pos1, pos2)
vmanip:write_to_map() vmanip:write_to_map() -- this updates the lighting
vmanip:update_map() -- this updates the lighting if vmanip.close ~= nil then
vmanip:close()
end
return worldedit.volume(pos1, pos2) return worldedit.volume(pos1, pos2)
end end

View File

@ -73,7 +73,7 @@ Stack the current WorldEdit region along the given axis <count> times=Размн
@1 nodes stacked=размножено @1 нод(а/ы) @1 nodes stacked=размножено @1 нод(а/ы)
Stack the current WorldEdit region <count> times by offset <x>, <y>, <z>=Размножить текущий WorldEdit-регион <count> раз с шагом <x>, <y>, <z> по соответствующим осям Stack the current WorldEdit region <count> times by offset <x>, <y>, <z>=Размножить текущий WorldEdit-регион <count> раз с шагом <x>, <y>, <z> по соответствующим осям
invalid count: @1=неверное количество: @1 invalid count: @1=неверное количество: @1
invalid increments: @1=неверные приращения(шаг) invalid increments: @1=неверные приращения(шаг): @1
Scale the current WorldEdit positions and region by a factor of <stretchx>, <stretchy>, <stretchz> along the X, Y, and Z axes, repectively, with position 1 as the origin=Масштабировать текущий WorldEdit-регион с коэффициентами <stretchx>, <stretchy>, <stretchz> вдоль осей X, Y и Z, используя WorldEdit-позицию 1 в качестве точки отсчёта Scale the current WorldEdit positions and region by a factor of <stretchx>, <stretchy>, <stretchz> along the X, Y, and Z axes, repectively, with position 1 as the origin=Масштабировать текущий WorldEdit-регион с коэффициентами <stretchx>, <stretchy>, <stretchz> вдоль осей X, Y и Z, используя WorldEdit-позицию 1 в качестве точки отсчёта
invalid scaling factors: @1=неверные коэффициенты масштабирования: @1 invalid scaling factors: @1=неверные коэффициенты масштабирования: @1
@1 nodes stretched=масштабировано @1 нод(а/ы) @1 nodes stretched=масштабировано @1 нод(а/ы)