diff --git a/angledwalls/blend/sloped_wall.blend b/angledwalls/blend/sloped_wall.blend new file mode 100644 index 0000000..07dd404 Binary files /dev/null and b/angledwalls/blend/sloped_wall.blend differ diff --git a/angledwalls/init.lua b/angledwalls/init.lua index a88e872..c019298 100755 --- a/angledwalls/init.lua +++ b/angledwalls/init.lua @@ -3,6 +3,7 @@ dofile(minetest.get_modpath("angledwalls").."/angledwalls.lua") dofile(minetest.get_modpath("angledwalls").."/angledglass.lua") dofile(minetest.get_modpath("angledwalls").."/adoors.lua") +dofile(minetest.get_modpath("angledwalls").."/slopedwalls.lua") if minetest.get_modpath("bakedclay") then dofile(minetest.get_modpath("angledwalls").."/bakedclay.lua") diff --git a/angledwalls/models/adoors_Ldoor.obj b/angledwalls/models/adoors_Ldoor.obj index 8126f27..d25d812 100644 --- a/angledwalls/models/adoors_Ldoor.obj +++ b/angledwalls/models/adoors_Ldoor.obj @@ -1,61 +1,67 @@ -# Blender v2.76 (sub 0) OBJ File: 'angled_Rdoor_open.blend' +# Blender v2.79 (sub 0) OBJ File: 'adoors_Ldoor.blend' # www.blender.org -mtllib adoors_Ldoor.mtl +o Cube.002 +v -0.500000 -0.500000 0.375000 +v -0.375000 -0.500000 0.375000 +v -0.375000 -0.500000 0.500000 +v -0.500000 -0.500000 0.500000 +v -0.500000 1.500000 0.375000 +v -0.375000 1.500000 0.375000 +v -0.375000 1.500000 0.500000 +v -0.500000 1.500000 0.500000 +vt 0.026316 1.000000 +vt 0.026316 0.968750 +vt 0.000000 0.968750 +vt 0.000100 0.999900 +vt 0.842105 1.000000 +vt 0.813143 0.999900 +vt 0.815789 0.968750 +vt 0.842105 0.968750 +vt 0.842105 -0.000000 +vt 0.815789 1.000000 +vt 0.815789 0.000000 +vt 0.026316 0.000000 +vt 0.026316 1.000000 +vt 0.000000 1.000000 +vt 0.000000 0.000000 +vt 0.815789 0.000000 +vt 0.842105 0.000000 +vt 0.842105 1.000000 +vt 0.815789 1.000000 +vt 0.000000 1.000000 +vt 0.026316 1.000000 +vt 0.026316 0.000000 +vt 0.000000 0.000000 +vn 0.5773 0.5773 -0.5773 +vn 0.5773 -0.5773 -0.5773 +s 1 +f 1/1/1 4/2/1 3/3/1 2/4/1 +f 5/5/2 6/6/2 7/7/2 8/8/2 +f 1/9/1 5/5/2 6/10/2 2/11/1 +f 2/12/1 6/13/2 7/14/2 3/15/1 +f 3/16/1 4/17/1 8/18/2 7/19/2 +f 5/20/2 8/21/2 4/22/1 1/23/1 o Plane -v 0.397028 1.501070 -0.404606 -v 0.397028 -0.498930 -0.404606 -v -0.409074 1.501070 0.401496 -v -0.409074 -0.498930 0.401496 +v 0.375000 1.500000 -0.375000 +v 0.375000 -0.500000 -0.375000 +v -0.375000 1.500000 0.375000 +v -0.375000 -0.500000 0.375000 vt 0.421053 1.000000 vt -0.000000 1.000000 vt 0.000000 0.000000 vt 0.421053 0.000000 -vn 0.707100 -0.000000 0.707100 -usemtl glass +vn 0.7071 0.0000 0.7071 s off -f 1/1/1 3/2/1 4/3/1 2/4/1 -o Cube.002_Cube.001 -v -0.503075 -0.498926 0.394008 -v -0.399111 -0.498897 0.396733 -v -0.401835 -0.498934 0.500697 -v -0.505799 -0.498963 0.497973 -v -0.503647 1.501074 0.394711 -v -0.399682 1.501103 0.397435 -v -0.402407 1.501066 0.501399 -v -0.506371 1.501037 0.498675 -vt 0.026316 1.000000 -vt 0.026316 0.968750 -vt 0.000000 0.968750 -vt 0.000100 0.999900 -vt 0.842105 1.000000 -vt 0.813143 0.999900 -vt 0.815789 0.968750 -vt 0.842105 0.968750 -vt 0.842105 -0.000000 -vt 0.815789 1.000000 -vt 0.815789 0.000000 -vt 0.026316 0.000000 -vt 0.000000 1.000000 -vt 0.000000 0.000000 -vn 0.592100 0.577700 -0.561800 -vn 0.592400 -0.577000 -0.562200 -usemtl Material -s 1 -f 5/5/2 8/6/2 7/7/2 6/8/2 -f 9/9/3 10/10/3 11/11/3 12/12/3 -f 5/13/2 9/9/3 10/14/3 6/15/2 -f 6/16/2 10/5/3 11/17/3 7/18/2 -f 7/15/2 8/13/2 12/9/3 11/14/3 -f 9/17/3 12/5/3 8/16/2 5/18/2 +f 9/24/3 11/25/3 12/26/3 10/27/3 o Cube.001 -v 0.400306 -0.498923 -0.508187 -v 0.504263 -0.498828 -0.505199 -v 0.501274 -0.498942 -0.401242 -v 0.397317 -0.499038 -0.404231 -v 0.398407 1.501075 -0.506035 -v 0.502365 1.501170 -0.503046 -v 0.499376 1.501056 -0.399089 -v 0.395419 1.500960 -0.402078 +v 0.375000 -0.500000 -0.500000 +v 0.500000 -0.500000 -0.500000 +v 0.500000 -0.500000 -0.375000 +v 0.375000 -0.500000 -0.375000 +v 0.375000 1.500000 -0.500000 +v 0.500000 1.500000 -0.500000 +v 0.500000 1.500000 -0.375000 +v 0.375000 1.500000 -0.375000 vt 0.026316 1.000000 vt 0.026316 0.968750 vt 0.000000 0.968750 @@ -68,15 +74,23 @@ vt 0.842105 -0.000000 vt 0.815789 1.000000 vt 0.815789 0.000000 vt 0.026316 0.000000 +vt 0.026316 1.000000 vt 0.000000 1.000000 vt 0.000000 0.000000 -vn 0.593100 0.578500 -0.559900 -vn 0.594200 -0.576200 -0.561100 -usemtl Material +vt 0.815789 0.000000 +vt 0.842105 0.000000 +vt 0.842105 1.000000 +vt 0.815789 1.000000 +vt 0.000000 1.000000 +vt 0.026316 1.000000 +vt 0.026316 0.000000 +vt 0.000000 0.000000 +vn 0.5773 0.5773 -0.5773 +vn 0.5773 -0.5773 -0.5773 s 1 -f 13/19/4 16/20/4 15/21/4 14/22/4 -f 17/23/5 18/24/5 19/25/5 20/26/5 -f 13/27/4 17/23/5 18/28/5 14/29/4 -f 14/30/4 18/19/5 19/31/5 15/32/4 -f 15/29/4 16/27/4 20/23/5 19/28/5 -f 17/31/5 20/19/5 16/30/4 13/32/4 +f 13/28/4 16/29/4 15/30/4 14/31/4 +f 17/32/5 18/33/5 19/34/5 20/35/5 +f 13/36/4 17/32/5 18/37/5 14/38/4 +f 14/39/4 18/40/5 19/41/5 15/42/4 +f 15/43/4 16/44/4 20/45/5 19/46/5 +f 17/47/5 20/48/5 16/49/4 13/50/4 diff --git a/angledwalls/models/adoors_Ldoor_open.obj b/angledwalls/models/adoors_Ldoor_open.obj index 98757ab..d140678 100644 --- a/angledwalls/models/adoors_Ldoor_open.obj +++ b/angledwalls/models/adoors_Ldoor_open.obj @@ -1,15 +1,14 @@ -# Blender v2.76 (sub 0) OBJ File: 'adoors_Ldoor.blend' +# Blender v2.79 (sub 0) OBJ File: 'adoors_Ldoor_open.blend' # www.blender.org -mtllib adoors_Ldoor_open.mtl -o Cube.003_Cube.000 -v 0.508182 -0.499176 -0.500426 -v 0.505969 -0.499081 -0.396449 -v 0.401992 -0.499195 -0.398663 -v 0.404206 -0.499291 -0.502639 -v 0.506015 1.500822 -0.502307 -v 0.503802 1.500917 -0.398330 -v 0.399825 1.500803 -0.400544 -v 0.402039 1.500707 -0.504520 +o Cube.001 +v 0.500000 -0.500000 -0.500000 +v 0.500000 -0.500000 -0.375000 +v 0.375000 -0.500000 -0.375000 +v 0.375000 -0.500000 -0.500000 +v 0.500000 1.500000 -0.500000 +v 0.500000 1.500000 -0.375000 +v 0.375000 1.500000 -0.375000 +v 0.375000 1.500000 -0.500000 vt 0.026316 1.000000 vt 0.026316 0.968750 vt 0.000000 0.968750 @@ -22,27 +21,35 @@ vt 0.842105 -0.000000 vt 0.815789 1.000000 vt 0.815789 0.000000 vt 0.026316 0.000000 +vt 0.026316 1.000000 vt 0.000000 1.000000 vt 0.000000 0.000000 -vn 0.564300 0.578500 0.588900 -vn 0.565500 -0.576200 0.590000 -usemtl Material +vt 0.815789 0.000000 +vt 0.842105 0.000000 +vt 0.842105 1.000000 +vt 0.815789 1.000000 +vt 0.000000 1.000000 +vt 0.026316 1.000000 +vt 0.026316 0.000000 +vt 0.000000 0.000000 +vn 0.5773 0.5773 0.5773 +vn 0.5773 -0.5773 0.5773 s 1 f 1/1/1 4/2/1 3/3/1 2/4/1 f 5/5/2 6/6/2 7/7/2 8/8/2 f 1/9/1 5/5/2 6/10/2 2/11/1 -f 2/12/1 6/1/2 7/13/2 3/14/1 -f 3/11/1 4/9/1 8/5/2 7/10/2 -f 5/13/2 8/1/2 4/12/1 1/14/1 +f 2/12/1 6/13/2 7/14/2 3/15/1 +f 3/16/1 4/17/1 8/18/2 7/19/2 +f 5/20/2 8/21/2 4/22/1 1/23/1 o Cube.000 -v -0.400726 -0.499178 -1.397053 -v -0.402675 -0.499149 -1.293071 -v -0.506657 -0.499187 -1.295020 -v -0.504708 -0.499215 -1.399002 -v -0.401433 1.500822 -1.397618 -v -0.403382 1.500850 -1.293636 -v -0.507363 1.500813 -1.295585 -v -0.505415 1.500784 -1.399567 +v -0.375000 -0.500000 -1.375000 +v -0.375000 -0.500000 -1.250000 +v -0.500000 -0.500000 -1.250000 +v -0.500000 -0.500000 -1.375000 +v -0.375000 1.500000 -1.375000 +v -0.375000 1.500000 -1.250000 +v -0.500000 1.500000 -1.250000 +v -0.500000 1.500000 -1.375000 vt 0.026316 1.000000 vt 0.026316 0.968750 vt 0.000000 0.968750 @@ -55,28 +62,35 @@ vt 0.842105 -0.000000 vt 0.815789 1.000000 vt 0.815789 0.000000 vt 0.026316 0.000000 +vt 0.026316 1.000000 vt 0.000000 1.000000 vt 0.000000 0.000000 -vn 0.566200 0.577700 0.587900 -vn 0.566600 -0.577000 0.588200 -usemtl Material +vt 0.815789 0.000000 +vt 0.842105 0.000000 +vt 0.842105 1.000000 +vt 0.815789 1.000000 +vt 0.000000 1.000000 +vt 0.026316 1.000000 +vt 0.026316 0.000000 +vt 0.000000 0.000000 +vn 0.5773 0.5773 0.5773 +vn 0.5773 -0.5773 0.5773 s 1 -f 9/15/3 12/16/3 11/17/3 10/18/3 -f 13/19/4 14/20/4 15/21/4 16/22/4 -f 9/23/3 13/19/4 14/24/4 10/25/3 -f 10/26/3 14/15/4 15/27/4 11/28/3 -f 11/25/3 12/23/3 16/19/4 15/24/4 -f 13/27/4 16/15/4 12/26/3 9/28/3 +f 9/24/3 12/25/3 11/26/3 10/27/3 +f 13/28/4 14/29/4 15/30/4 16/31/4 +f 9/32/3 13/28/4 14/33/4 10/34/3 +f 10/35/3 14/36/4 15/37/4 11/38/3 +f 11/39/3 12/40/3 16/41/4 15/42/4 +f 13/43/4 16/44/4 12/45/3 9/46/3 o Plane.001 -v 0.404579 1.500818 -0.502931 -v 0.404580 -0.499182 -0.502931 -v -0.407513 1.500817 -1.302998 -v -0.407512 -0.499183 -1.302998 +v 0.375000 1.500000 -0.500000 +v 0.375000 -0.500000 -0.500000 +v -0.375000 1.500000 -1.250000 +v -0.375000 -0.500000 -1.250000 vt 0.421053 1.000000 vt -0.000000 1.000000 vt 0.000000 0.000000 vt 0.421053 0.000000 -vn -0.701800 -0.000000 0.712400 -usemtl glass +vn -0.7071 -0.0000 0.7071 s off -f 17/29/5 19/30/5 20/31/5 18/32/5 +f 17/47/5 19/48/5 20/49/5 18/50/5 diff --git a/angledwalls/models/adoors_Rdoor.obj b/angledwalls/models/adoors_Rdoor.obj index cc03b81..383c2db 100644 --- a/angledwalls/models/adoors_Rdoor.obj +++ b/angledwalls/models/adoors_Rdoor.obj @@ -1,28 +1,67 @@ -# Blender v2.76 (sub 0) OBJ File: 'angled_Rdoor.blend' +# Blender v2.79 (sub 0) OBJ File: 'adoors_Rdoor.blend' # www.blender.org -mtllib angled_Rdoor.mtl +o Cube.001_Cube.002 +v 0.375000 -0.500000 -0.500000 +v 0.500000 -0.500000 -0.500000 +v 0.500000 -0.500000 -0.375000 +v 0.375000 -0.500000 -0.375000 +v 0.375000 1.500000 -0.500000 +v 0.500000 1.500000 -0.500000 +v 0.500000 1.500000 -0.375000 +v 0.375000 1.500000 -0.375000 +vt 0.026316 1.000000 +vt 0.026316 0.968750 +vt 0.000000 0.968750 +vt 0.000100 0.999900 +vt 0.842105 1.000000 +vt 0.813143 0.999900 +vt 0.815789 0.968750 +vt 0.842105 0.968750 +vt 0.842105 -0.000000 +vt 0.815789 1.000000 +vt 0.815789 0.000000 +vt 0.026316 0.000000 +vt 0.026316 1.000000 +vt 0.000000 1.000000 +vt 0.000000 0.000000 +vt 0.815789 0.000000 +vt 0.842105 0.000000 +vt 0.842105 1.000000 +vt 0.815789 1.000000 +vt 0.000000 1.000000 +vt 0.026316 1.000000 +vt 0.026316 0.000000 +vt 0.000000 0.000000 +vn 0.5773 0.5773 -0.5773 +vn 0.5773 -0.5773 -0.5773 +s 1 +f 1/1/1 4/2/1 3/3/1 2/4/1 +f 5/5/2 6/6/2 7/7/2 8/8/2 +f 1/9/1 5/5/2 6/10/2 2/11/1 +f 2/12/1 6/13/2 7/14/2 3/15/1 +f 3/16/1 4/17/1 8/18/2 7/19/2 +f 5/20/2 8/21/2 4/22/1 1/23/1 o Plane -v -0.409074 1.501070 0.401496 -v -0.409074 -0.498930 0.401496 -v 0.397028 1.501070 -0.404606 -v 0.397028 -0.498930 -0.404606 +v -0.375000 1.500000 0.375000 +v -0.375000 -0.500000 0.375000 +v 0.375000 1.500000 -0.375000 +v 0.375000 -0.500000 -0.375000 vt 0.421053 1.000000 vt -0.000000 1.000000 vt 0.000000 0.000000 vt 0.421053 0.000000 -vn -0.707100 0.000000 -0.707100 -usemtl glass +vn -0.7071 0.0000 -0.7071 s off -f 1/1/1 3/2/1 4/3/1 2/4/1 +f 9/24/3 11/25/3 12/26/3 10/27/3 o Cube.002_Cube.001 -v -0.503075 -0.498926 0.394008 -v -0.399111 -0.498897 0.396733 -v -0.401835 -0.498934 0.500697 -v -0.505799 -0.498963 0.497973 -v -0.503647 1.501074 0.394711 -v -0.399682 1.501103 0.397435 -v -0.402407 1.501066 0.501399 -v -0.506371 1.501037 0.498675 +v -0.500000 -0.500000 0.375000 +v -0.375000 -0.500000 0.375000 +v -0.375000 -0.500000 0.500000 +v -0.500000 -0.500000 0.500000 +v -0.500000 1.500000 0.375000 +v -0.375000 1.500000 0.375000 +v -0.375000 1.500000 0.500000 +v -0.500000 1.500000 0.500000 vt 0.026316 1.000000 vt 0.026316 0.968750 vt 0.000000 0.968750 @@ -35,48 +74,23 @@ vt 0.842105 -0.000000 vt 0.815789 1.000000 vt 0.815789 0.000000 vt 0.026316 0.000000 -vt 0.000000 1.000000 -vt 0.000000 0.000000 -vn 0.592100 0.577700 -0.561800 -vn 0.592400 -0.577000 -0.562200 -usemtl Material -s 1 -f 5/5/2 8/6/2 7/7/2 6/8/2 -f 9/9/3 10/10/3 11/11/3 12/12/3 -f 5/13/2 9/9/3 10/14/3 6/15/2 -f 6/16/2 10/5/3 11/17/3 7/18/2 -f 7/15/2 8/13/2 12/9/3 11/14/3 -f 9/17/3 12/5/3 8/16/2 5/18/2 -o Cube.001 -v 0.400306 -0.498923 -0.508187 -v 0.504263 -0.498828 -0.505199 -v 0.501274 -0.498942 -0.401242 -v 0.397317 -0.499038 -0.404231 -v 0.398407 1.501075 -0.506035 -v 0.502365 1.501170 -0.503046 -v 0.499376 1.501056 -0.399089 -v 0.395419 1.500960 -0.402078 vt 0.026316 1.000000 -vt 0.026316 0.968750 -vt 0.000000 0.968750 -vt 0.000100 0.999900 -vt 0.842105 1.000000 -vt 0.813143 0.999900 -vt 0.815789 0.968750 -vt 0.842105 0.968750 -vt 0.842105 -0.000000 -vt 0.815789 1.000000 -vt 0.815789 0.000000 -vt 0.026316 0.000000 vt 0.000000 1.000000 vt 0.000000 0.000000 -vn 0.593100 0.578500 -0.559900 -vn 0.594200 -0.576200 -0.561100 -usemtl Material +vt 0.815789 0.000000 +vt 0.842105 0.000000 +vt 0.842105 1.000000 +vt 0.815789 1.000000 +vt 0.000000 1.000000 +vt 0.026316 1.000000 +vt 0.026316 0.000000 +vt 0.000000 0.000000 +vn 0.5773 0.5773 -0.5773 +vn 0.5773 -0.5773 -0.5773 s 1 -f 13/19/4 16/20/4 15/21/4 14/22/4 -f 17/23/5 18/24/5 19/25/5 20/26/5 -f 13/27/4 17/23/5 18/28/5 14/29/4 -f 14/30/4 18/19/5 19/31/5 15/32/4 -f 15/29/4 16/27/4 20/23/5 19/28/5 -f 17/31/5 20/19/5 16/30/4 13/32/4 +f 13/28/4 16/29/4 15/30/4 14/31/4 +f 17/32/5 18/33/5 19/34/5 20/35/5 +f 13/36/4 17/32/5 18/37/5 14/38/4 +f 14/39/4 18/40/5 19/41/5 15/42/4 +f 15/43/4 16/44/4 20/45/5 19/46/5 +f 17/47/5 20/48/5 16/49/4 13/50/4 diff --git a/angledwalls/models/adoors_Rdoor_open.obj b/angledwalls/models/adoors_Rdoor_open.obj index 147a728..45c09b2 100644 --- a/angledwalls/models/adoors_Rdoor_open.obj +++ b/angledwalls/models/adoors_Rdoor_open.obj @@ -1,15 +1,14 @@ -# Blender v2.76 (sub 0) OBJ File: 'angled_Rdoor.blend' +# Blender v2.79 (sub 0) OBJ File: 'adoors_Rdoor_open.blend' # www.blender.org -mtllib angled_Rdoor_open.mtl -o Cube.003_Cube.000 -v -1.382111 -0.507440 -0.387847 -v -1.375507 -0.510378 -0.491596 -v -1.271718 -0.510468 -0.484987 -v -1.278321 -0.507529 -0.381238 -v -1.376806 1.491761 -0.444137 -v -1.370202 1.488822 -0.547885 -v -1.266413 1.488733 -0.541276 -v -1.273016 1.491672 -0.437528 +o Cube.002 +v -1.375000 -0.500000 -0.375000 +v -1.375000 -0.500000 -0.500000 +v -1.250000 -0.500000 -0.500000 +v -1.250000 -0.500000 -0.375000 +v -1.375000 1.500000 -0.375000 +v -1.375000 1.500000 -0.500000 +v -1.250000 1.500000 -0.500000 +v -1.250000 1.500000 -0.375000 vt 0.026316 1.000000 vt 0.026316 0.968750 vt 0.000000 0.968750 @@ -22,27 +21,35 @@ vt 0.842105 -0.000000 vt 0.815789 1.000000 vt 0.815789 0.000000 vt 0.026316 0.000000 +vt 0.026316 1.000000 vt 0.000000 1.000000 vt 0.000000 0.000000 -vn -0.538000 0.561300 -0.628900 -vn -0.541000 -0.592900 -0.596400 -usemtl Material +vt 0.815789 0.000000 +vt 0.842105 0.000000 +vt 0.842105 1.000000 +vt 0.815789 1.000000 +vt 0.000000 1.000000 +vt 0.026316 1.000000 +vt 0.026316 0.000000 +vt 0.000000 0.000000 +vn -0.5773 0.5773 -0.5773 +vn -0.5773 -0.5773 -0.5773 s 1 f 1/1/1 4/2/1 3/3/1 2/4/1 f 5/5/2 6/6/2 7/7/2 8/8/2 f 1/9/1 5/5/2 6/10/2 2/11/1 -f 2/12/1 6/1/2 7/13/2 3/14/1 -f 3/11/1 4/9/1 8/5/2 7/10/2 -f 5/13/2 8/1/2 4/12/1 1/14/1 +f 2/12/1 6/13/2 7/14/2 3/15/1 +f 3/16/1 4/17/1 8/18/2 7/19/2 +f 5/20/2 8/21/2 4/22/1 1/23/1 o Cube.000 -v -0.511889 -0.481628 0.546017 -v -0.505550 -0.484634 0.442254 -v -0.401744 -0.484653 0.448596 -v -0.408083 -0.481648 0.552359 -v -0.507987 1.517536 0.488352 -v -0.501648 1.514531 0.384588 -v -0.397842 1.514511 0.390931 -v -0.404181 1.517517 0.494694 +v -0.500000 -0.500000 0.500000 +v -0.500000 -0.500000 0.375000 +v -0.375000 -0.500000 0.375000 +v -0.375000 -0.500000 0.500000 +v -0.500000 1.500000 0.500000 +v -0.500000 1.500000 0.375000 +v -0.375000 1.500000 0.375000 +v -0.375000 1.500000 0.500000 vt 0.026316 1.000000 vt 0.026316 0.968750 vt 0.000000 0.968750 @@ -55,28 +62,35 @@ vt 0.842105 -0.000000 vt 0.815789 1.000000 vt 0.815789 0.000000 vt 0.026316 0.000000 +vt 0.026316 1.000000 vt 0.000000 1.000000 vt 0.000000 0.000000 -vn -0.539900 0.560500 -0.627900 -vn -0.542200 -0.593700 -0.594600 -usemtl Material +vt 0.815789 0.000000 +vt 0.842105 0.000000 +vt 0.842105 1.000000 +vt 0.815789 1.000000 +vt 0.000000 1.000000 +vt 0.026316 1.000000 +vt 0.026316 0.000000 +vt 0.000000 0.000000 +vn -0.5773 0.5773 -0.5773 +vn -0.5773 -0.5773 -0.5773 s 1 -f 9/15/3 12/16/3 11/17/3 10/18/3 -f 13/19/4 14/20/4 15/21/4 16/22/4 -f 9/23/3 13/19/4 14/24/4 10/25/3 -f 10/26/3 14/15/4 15/27/4 11/28/3 -f 11/25/3 12/23/3 16/19/4 15/24/4 -f 13/27/4 16/15/4 12/26/3 9/28/3 +f 9/24/3 12/25/3 11/26/3 10/27/3 +f 13/28/4 14/29/4 15/30/4 16/31/4 +f 9/32/3 13/28/4 14/33/4 10/34/3 +f 10/35/3 14/36/4 15/37/4 11/38/3 +f 11/39/3 12/40/3 16/41/4 15/42/4 +f 13/43/4 16/44/4 12/45/3 9/46/3 o Plane.001 -v -0.497916 1.514770 0.394113 -v -0.501136 -0.484379 0.452374 -v -1.275487 1.491736 -0.439227 -v -1.278707 -0.507413 -0.380966 +v -0.500000 1.500000 0.375000 +v -0.500000 -0.500000 0.375000 +v -1.250000 1.500000 -0.375000 +v -1.250000 -0.500000 -0.375000 vt 0.421053 1.000000 vt -0.000000 1.000000 vt 0.000000 0.000000 vt 0.421053 0.000000 -vn -0.731300 0.021000 0.681800 -usemtl glass +vn -0.7071 -0.0000 0.7071 s off -f 17/29/5 19/30/5 20/31/5 18/32/5 +f 17/47/5 19/48/5 20/49/5 18/50/5 diff --git a/angledwalls/models/angled_wall.obj b/angledwalls/models/angled_wall.obj index 9af31fa..e169a66 100755 --- a/angledwalls/models/angled_wall.obj +++ b/angledwalls/models/angled_wall.obj @@ -1,64 +1,69 @@ -# Blender v2.77 (sub 0) OBJ File: 'angled_wall.blend' +# Blender v2.79 (sub 0) OBJ File: '' # www.blender.org +mtllib angled_wall.mtl o Cube -v 0.500000 -0.500000 -0.500000 -v 0.000000 -0.500000 0.500000 -v -0.500000 -0.500000 0.500000 -v 0.000000 -0.500000 -0.500000 -v 0.500000 0.500000 -0.500000 -v -0.000000 0.500000 0.500000 -v -0.500000 0.500000 0.500000 -v -0.000000 0.500000 -0.500000 -v -0.500000 -0.500000 -0.000000 -v -0.500000 0.500000 -0.000000 -v 0.500000 -0.500000 0.000000 -v 0.500000 0.500000 0.000000 -vt 0.5000 1.0000 -vt 0.5000 0.0000 -vt 1.0000 0.0000 -vt 1.0000 1.0000 -vt 1.0000 0.0000 -vt 1.0000 1.0000 -vt 0.5000 1.0000 -vt 0.5000 0.0000 -vt 1.0000 0.0000 -vt 1.0000 1.0000 -vt 0.5000 1.0000 -vt 0.5000 0.0000 -vt 0.5000 0.0000 -vt 0.5000 1.0000 -vt -0.0000 1.0000 -vt -0.0000 0.0000 -vt 1.0000 0.0000 -vt 1.0000 1.0000 -vt -0.0000 1.0000 -vt 0.0000 0.0000 -vt 0.5000 0.0000 -vt -0.0000 0.5000 -vt -0.0000 0.0000 -vt 1.0000 0.5000 -vt 0.0000 0.5000 -vt 0.5000 1.0000 -vt 0.0000 1.0000 -vt 1.0000 0.5000 -vn -0.7071 -0.0000 -0.7071 -vn -1.0000 -0.0000 0.0000 +v 0.000000 0.499800 -0.499800 +v 0.000000 -0.499800 -0.499800 +v -0.499800 -0.499800 -0.000000 +v -0.499800 0.499800 0.000000 +v -0.499800 -0.499800 0.499800 +v -0.499800 0.499800 0.499800 +v 0.499800 -0.499800 -0.499800 +v 0.499800 0.499800 -0.499800 +v 0.499800 0.499800 0.000000 +v 0.499800 -0.499800 -0.000000 +v 0.000000 -0.499800 0.499800 +v 0.000000 0.499800 0.499800 +vt 0.250000 1.000000 +vt 0.250000 0.000000 +vt 0.750000 0.000000 +vt 0.750000 1.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.750000 1.000000 +vt 0.750000 0.000000 +vt 0.250000 0.000000 +vt 0.250000 1.000000 +vt -0.000000 1.000000 +vt -0.000000 0.000000 +vt -0.000000 1.000000 +vt 0.000000 0.000000 +vt 0.500000 0.000000 +vt -0.000000 0.500000 +vt -0.000000 0.000000 +vt 0.500000 1.000000 +vt 1.000000 0.500000 +vt 0.000000 0.500000 +vt 0.500000 1.000000 +vt 0.000000 1.000000 +vt 1.000000 0.500000 +vt 0.500000 0.000000 +vn -0.7071 0.0000 -0.7071 +vn -0.2971 -0.6303 -0.7173 +vn -0.7173 -0.6303 -0.2971 +vn -0.5774 -0.5774 0.5774 +vn -1.0000 0.0000 0.0000 +vn 0.5774 -0.5774 -0.5774 vn 1.0000 -0.0000 0.0000 -vn -0.0000 -0.0000 1.0000 +vn 0.7173 -0.6303 0.2971 +vn 0.2971 -0.6303 0.7173 +vn 0.0000 -0.0000 1.0000 vn 0.7071 -0.0000 0.7071 vn 0.0000 0.0000 -1.0000 vn 0.0000 1.0000 0.0000 -vn 0.0000 -1.0000 0.0000 -s off -f 8/1/1 4/2/1 9/3/1 10/4/1 -f 3/5/2 7/6/2 10/7/2 9/8/2 -f 1/9/3 5/10/3 12/11/3 11/12/3 -f 2/13/4 6/14/4 7/15/4 3/16/4 -f 6/14/5 2/13/5 11/17/5 12/18/5 -f 5/19/6 1/20/6 4/2/6 8/1/6 -f 8/21/7 12/22/7 5/23/7 -f 7/6/7 6/14/7 10/24/7 -f 8/21/7 10/24/7 6/14/7 12/22/7 -f 11/25/8 4/26/8 1/27/8 -f 3/5/8 9/28/8 2/13/8 -f 4/26/8 11/25/8 2/13/8 9/28/8 +usemtl None.001 +s 1 +f 1/1/1 2/2/2 3/3/3 4/4/1 +f 5/5/4 6/6/5 4/4/5 3/3/3 +f 7/7/6 8/8/7 9/9/7 10/10/8 +f 11/11/9 12/12/10 6/13/10 5/14/4 +f 12/12/11 11/11/9 10/10/8 9/9/11 +f 8/15/12 7/16/6 2/2/2 1/1/12 +f 1/17/13 9/18/13 8/19/13 +f 6/6/13 12/20/13 4/21/13 +f 1/17/13 4/21/13 12/20/13 9/18/13 +f 10/22/8 2/23/2 7/24/6 +f 5/5/4 3/25/3 11/26/9 +f 2/23/2 10/22/8 11/26/9 3/25/3 diff --git a/angledwalls/models/angledwalls_corner.obj b/angledwalls/models/angledwalls_corner.obj index ffaea6f..0e5e459 100644 --- a/angledwalls/models/angledwalls_corner.obj +++ b/angledwalls/models/angledwalls_corner.obj @@ -1,56 +1,62 @@ -# Blender v2.77 (sub 0) OBJ File: 'angledwalls_corner.blend' +# Blender v2.79 (sub 0) OBJ File: '' # www.blender.org +mtllib angledwalls_corner.mtl o Cube -v 0.500000 -0.500000 -0.500000 -v 0.500000 -0.500000 0.500000 -v -0.500000 -0.500000 0.500000 -v -0.500000 0.500000 -0.000000 -v 0.500000 0.500000 -0.500000 -v 0.500000 0.500000 0.500000 -v -0.500000 0.500000 0.500000 -v -0.500000 -0.500000 0.000000 -v 0.000000 -0.500000 -0.500000 -v 0.000000 0.500000 -0.500000 -vt 0.5000 1.0000 -vt 0.5000 0.0000 -vt 1.0000 0.0000 -vt 1.0000 1.0000 -vt 1.0000 0.0000 -vt 1.0000 1.0000 -vt 0.5000 1.0000 -vt 0.5000 0.0000 -vt 1.0000 0.0000 -vt 1.0000 1.0000 -vt 0.0000 1.0000 -vt 0.0000 0.0000 -vt 1.0000 0.0000 -vt 1.0000 1.0000 -vt 0.0000 1.0000 -vt 0.0000 0.0000 -vt 0.0000 1.0000 -vt 0.0000 0.0000 -vt 0.0000 0.0000 -vt 0.5000 0.0000 -vt 1.0000 0.5000 -vt 1.0000 0.5000 -vt 0.5000 1.0000 -vt 0.0000 1.0000 +v 0.000000 0.499800 -0.499800 +v 0.000000 -0.499800 -0.499800 +v -0.499800 -0.499800 -0.000000 +v -0.499800 0.499800 0.000000 +v -0.499800 -0.499800 0.499800 +v -0.499800 0.499800 0.499800 +v 0.499800 -0.499800 -0.499800 +v 0.499800 0.499800 -0.499800 +v 0.499800 0.499800 0.499800 +v 0.499800 -0.499800 0.499800 +vt 0.250000 1.000000 +vt 0.250000 0.000000 +vt 0.750000 0.000000 +vt 0.750000 1.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vt 0.000000 0.000000 +vt 0.000000 1.000000 +vt 0.000000 0.000000 +vt 0.312500 0.000000 +vt 0.312500 1.000000 +vt 0.000000 0.000000 +vt 0.500000 0.000000 +vt 1.000000 0.500000 +vt 1.000000 0.500000 +vt 0.500000 1.000000 +vt 0.000000 1.000000 vn -0.7071 0.0000 -0.7071 -vn -1.0000 -0.0000 0.0000 -vn 1.0000 0.0000 0.0000 -vn -0.0000 -0.0000 1.0000 +vn -0.2971 -0.6303 -0.7173 +vn -0.7173 -0.6303 -0.2971 +vn -0.5774 -0.5774 0.5774 +vn -1.0000 0.0000 0.0000 +vn 0.5774 -0.5774 -0.5774 +vn 1.0000 -0.0000 0.0000 +vn 0.5774 -0.5774 0.5774 +vn 0.0000 -0.0000 1.0000 vn 0.0000 0.0000 -1.0000 vn 0.0000 1.0000 0.0000 -vn 0.0000 -1.0000 0.0000 -s off -f 10/1/1 9/2/1 8/3/1 4/4/1 -f 3/5/2 7/6/2 4/7/2 8/8/2 -f 1/9/3 5/10/3 6/11/3 2/12/3 -f 2/13/4 6/14/4 7/15/4 3/16/4 -f 5/17/5 1/18/5 9/2/5 10/1/5 -f 5/19/6 10/20/6 6/11/6 -f 7/6/6 6/11/6 4/21/6 -f 10/20/6 4/21/6 6/11/6 -f 3/5/7 8/22/7 2/12/7 -f 2/12/7 9/23/7 1/24/7 -f 9/23/7 2/12/7 8/22/7 +usemtl None.000 +s 1 +f 1/1/1 2/2/2 3/3/3 4/4/1 +f 5/5/4 6/6/5 4/4/5 3/3/3 +f 7/7/6 8/8/7 9/9/7 10/10/8 +f 10/11/8 9/12/9 6/13/9 5/14/4 +f 8/15/10 7/16/6 2/17/2 1/18/10 +f 8/19/11 1/20/11 9/9/11 +f 6/6/11 9/9/11 4/21/11 +f 1/20/11 4/21/11 9/9/11 +f 5/5/4 3/22/3 10/10/8 +f 10/10/8 2/23/2 7/24/6 +f 2/23/2 10/10/8 3/22/3 diff --git a/angledwalls/models/blend source files/adoors_Ldoor.blend b/angledwalls/models/blend source files/adoors_Ldoor.blend index 7d52ae4..c44fee6 100644 Binary files a/angledwalls/models/blend source files/adoors_Ldoor.blend and b/angledwalls/models/blend source files/adoors_Ldoor.blend differ diff --git a/angledwalls/models/blend source files/adoors_Ldoor_open.blend b/angledwalls/models/blend source files/adoors_Ldoor_open.blend index 76a316f..1cdd46a 100644 Binary files a/angledwalls/models/blend source files/adoors_Ldoor_open.blend and b/angledwalls/models/blend source files/adoors_Ldoor_open.blend differ diff --git a/angledwalls/models/blend source files/adoors_Rdoor.blend b/angledwalls/models/blend source files/adoors_Rdoor.blend index ae16b56..9b67273 100644 Binary files a/angledwalls/models/blend source files/adoors_Rdoor.blend and b/angledwalls/models/blend source files/adoors_Rdoor.blend differ diff --git a/angledwalls/models/blend source files/adoors_Rdoor_open.blend b/angledwalls/models/blend source files/adoors_Rdoor_open.blend index fb49414..ae87879 100644 Binary files a/angledwalls/models/blend source files/adoors_Rdoor_open.blend and b/angledwalls/models/blend source files/adoors_Rdoor_open.blend differ diff --git a/angledwalls/models/blend source files/sloped_wall.blend b/angledwalls/models/blend source files/sloped_wall.blend new file mode 100644 index 0000000..56f5ceb Binary files /dev/null and b/angledwalls/models/blend source files/sloped_wall.blend differ diff --git a/angledwalls/models/low_angled_wall.obj b/angledwalls/models/low_angled_wall.obj index a73eefb..02fa650 100755 --- a/angledwalls/models/low_angled_wall.obj +++ b/angledwalls/models/low_angled_wall.obj @@ -1,65 +1,73 @@ -# Blender v2.77 (sub 0) OBJ File: 'low_angled_wall.blend' +# Blender v2.79 (sub 0) OBJ File: '' # www.blender.org +mtllib low_angled_wall.mtl o Cube -v 0.500000 -0.500000 -0.500000 -v 0.000000 -0.500000 0.500000 -v -0.500000 -0.500000 0.500000 -v 0.000000 -0.500000 -0.500000 -v 0.500000 0.000000 -0.500000 -v -0.000000 0.000000 0.500000 -v -0.500000 0.000000 0.500000 -v -0.000000 0.000000 -0.500000 -v -0.500000 -0.500000 -0.000000 -v -0.500000 0.000000 -0.000000 -v 0.500000 -0.500000 0.000000 -v 0.500000 0.000000 0.000000 -vt 0.5000 0.5000 -vt 0.5000 0.0000 -vt 1.0000 0.0000 -vt 1.0000 0.5000 -vt 1.0000 0.0000 -vt 1.0000 0.5000 -vt 0.5000 0.5000 -vt 0.5000 0.0000 -vt 1.0000 0.0000 -vt 1.0000 0.5000 -vt 0.5000 0.5000 -vt 0.5000 0.0000 -vt 0.5000 0.0000 -vt 0.5000 0.5000 -vt -0.0000 0.5000 -vt -0.0000 0.0000 -vt 1.0000 0.0000 -vt 1.0000 0.5000 -vt -0.0000 0.5000 -vt 0.0000 0.0000 -vt 0.5000 0.0000 -vt -0.0000 0.5000 -vt -0.0000 0.0000 -vt 1.0000 1.0000 -vt 0.5000 1.0000 -vt 0.0000 0.5000 -vt 0.5000 1.0000 -vt 0.0000 1.0000 -vt 1.0000 0.5000 -vn -0.7071 -0.0000 -0.7071 -vn -1.0000 -0.0000 0.0000 +v 0.000000 -0.000200 -0.499800 +v 0.000000 -0.499800 -0.499800 +v -0.499800 -0.499800 -0.000000 +v -0.499800 -0.000200 -0.000000 +v -0.499800 -0.499800 0.499800 +v -0.499800 -0.000200 0.499800 +v 0.499800 -0.499800 -0.499800 +v 0.499800 -0.000200 -0.499800 +v 0.499800 0.000000 0.000000 +v 0.499800 -0.499800 -0.000000 +v 0.000000 -0.499800 0.499800 +v 0.000000 -0.000000 0.499800 +vt 0.250000 0.500000 +vt 0.250000 0.000000 +vt 0.750000 0.000000 +vt 0.750000 0.500000 +vt 1.000000 0.000000 +vt 1.000000 0.500000 +vt 1.000000 0.000000 +vt 1.000000 0.500000 +vt 0.750000 0.500000 +vt 0.750000 0.000000 +vt 0.250000 -0.000000 +vt 0.250000 0.500000 +vt -0.000000 0.500000 +vt -0.000000 0.000000 +vt -0.000000 0.500000 +vt 0.000000 0.000000 +vt 0.500000 0.000000 +vt -0.000000 0.500000 +vt -0.000000 0.000000 +vt 1.000000 1.000000 +vt 0.500000 1.000000 +vt 1.000000 0.500000 +vt 0.000000 0.500000 +vt 0.500000 1.000000 +vt 0.000000 1.000000 +vt 1.000000 0.500000 +vt 0.500000 0.000000 +vn -0.7071 0.0000 -0.7071 +vn -0.2971 -0.6303 -0.7173 +vn -0.7173 -0.6303 -0.2971 +vn -0.5774 -0.5774 0.5774 +vn -1.0000 0.0000 0.0000 +vn 0.5774 -0.5774 -0.5774 vn 1.0000 -0.0000 0.0000 +vn 0.7173 -0.6303 0.2971 +vn 0.2971 -0.6303 0.7173 vn -0.0000 -0.0000 1.0000 vn 0.7071 -0.0000 0.7071 vn 0.0000 0.0000 -1.0000 -vn 0.0000 1.0000 0.0000 -vn 0.0000 -1.0000 0.0000 -s off -f 8/1/1 4/2/1 9/3/1 10/4/1 -f 3/5/2 7/6/2 10/7/2 9/8/2 -f 1/9/3 5/10/3 12/11/3 11/12/3 -f 2/13/4 6/14/4 7/15/4 3/16/4 -f 6/14/5 2/13/5 11/17/5 12/18/5 -f 5/19/6 1/20/6 4/2/6 8/1/6 -f 8/21/7 12/22/7 5/23/7 -f 7/24/7 6/25/7 10/4/7 -f 8/21/7 10/4/7 6/25/7 12/22/7 -f 11/26/8 4/27/8 1/28/8 -f 3/5/8 9/29/8 2/13/8 -f 4/27/8 11/26/8 2/13/8 9/29/8 +vn -0.0001 1.0000 -0.0003 +vn 0.0000 1.0000 -0.0004 +vn -0.0004 1.0000 0.0000 +vn -0.0003 1.0000 -0.0001 +usemtl None +s 1 +f 1/1/1 2/2/2 3/3/3 4/4/1 +f 5/5/4 6/6/5 4/4/5 3/3/3 +f 7/7/6 8/8/7 9/9/7 10/10/8 +f 11/11/9 12/12/10 6/13/10 5/14/4 +f 12/12/11 11/11/9 10/10/8 9/9/11 +f 8/15/12 7/16/6 2/2/2 1/1/12 +f 1/17/13 9/18/13 8/19/14 +f 6/20/15 12/21/16 4/22/16 +f 1/17/13 4/22/16 12/21/16 9/18/13 +f 10/23/8 2/24/2 7/25/6 +f 5/5/4 3/26/3 11/27/9 +f 2/24/2 10/23/8 11/27/9 3/26/3 diff --git a/angledwalls/models/media license.txt b/angledwalls/models/media license.txt index cdc94c6..095526c 100644 --- a/angledwalls/models/media license.txt +++ b/angledwalls/models/media license.txt @@ -41,6 +41,11 @@ Copyright (C) 2016-2018 TumeniNodes CC BY SA 4.0 International *angled_glass.obj / .blend +*adoors_Ldoor.obj / .blend +*adoors_Ldoor_open.obj / .blend +*adoors_Rdoor.obj / .blend +*adoors_Rdoor_open.obj / .blend +*sloped_wall.obj / .blend ----------------------- diff --git a/angledwalls/models/sloped_wall.obj b/angledwalls/models/sloped_wall.obj new file mode 100644 index 0000000..11bd1cd --- /dev/null +++ b/angledwalls/models/sloped_wall.obj @@ -0,0 +1,32 @@ +# Blender v2.76 (sub 0) OBJ File: '' +# www.blender.org +mtllib sloped_wall.mtl +o Cube_Cube.005 +v 0.499867 0.500000 -0.500000 +v 0.500000 0.500000 -0.500000 +v 0.500000 -0.500000 -0.500000 +v 0.499867 -0.500000 -0.500000 +v -0.500000 0.500000 0.499865 +v -0.500000 0.500000 0.500000 +v 0.500000 0.500000 0.500000 +v 0.500000 -0.500000 0.500000 +v -0.500000 -0.500000 0.500000 +v -0.500000 -0.500000 0.499865 +vt 0.000000 -0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt -0.000000 1.000000 +vt 0.000084 0.000084 +vt 0.999916 0.000084 +vn 0.000000 1.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 0.000000 -1.000000 0.000000 +vn -0.000000 0.000000 1.000000 +vn -0.707100 0.000000 -0.707100 +usemtl None +s off +f 5/1/1 6/1/1 7/2/1 2/3/1 1/4/1 +f 2/3/2 7/4/2 8/1/2 3/2/2 +f 4/2/3 3/2/3 8/3/3 9/4/3 10/1/3 +f 7/3/4 6/4/4 9/1/4 8/2/4 +f 1/4/5 4/5/5 10/6/5 5/3/5 diff --git a/angledwalls/slopedwalls.lua b/angledwalls/slopedwalls.lua new file mode 100644 index 0000000..1e2f4dc --- /dev/null +++ b/angledwalls/slopedwalls.lua @@ -0,0 +1,254 @@ +-- [MOD] Sloped Walls [slopedwalls] [1.0] by TumeniNodes 6-09-2019 + +slopedwalls = {} + +-- Register slopedwalls. +-- Node will be called slopedwalls:sloped_wall_ + +function slopedwalls.register_sloped_wall(subname, recipeitem, groups, images, description, sounds) +groups.sloped = 1 +minetest.register_node(":slopedwalls:sloped_wall" .. subname, { + description = description, + drawtype = "mesh", + mesh = "sloped_wall.obj", + tiles = images, + paramtype = "light", + paramtype2 = "facedir", + groups = groups, + sounds = sounds, + collision_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.3125, -0.25, 0.5, 0.5}, + {-0.5, -0.5, 0.3125, 0.375, 0.5, 0.5}, + {-0.5, -0.5, -0.375, -0.3125, 0.5, 0.5}, + {-0.5, -0.5, 0.375, 0.4375, 0.5, 0.5}, + {-0.5, -0.5, -0.4375, -0.375, 0.5, 0.5}, + {-0.5, -0.5, 0.4375, 0.5, 0.5, 0.5}, + {-0.5, -0.5, -0.5, -0.4375, 0.5, 0.5}, + {-0.5, -0.5, 0.25, 0.3125, 0.5, 0.5}, + {-0.5, -0.5, -0.25, -0.1875, 0.5, 0.5}, + {-0.5, -0.5, 0.1875, 0.25, 0.5, 0.5}, + {-0.5, -0.5, -0.1875, -0.125, 0.5, 0.5}, + {-0.5, -0.5, 0.125, 0.1875, 0.5, 0.5}, + {-0.5, -0.5, -0.125, -0.0625, 0.5, 0.5}, + {-0.5, -0.5, 0.0625, 0.125, 0.5, 0.5}, + {-0.5, -0.5, -0.0625, 0, 0.5, 0.5}, + {-0.5, -0.5, 0, 0.0625, 0.5, 0.5}, + } + } +}) +end + + +-- Register sloped walls + +slopedwalls.register_sloped_wall("_acacia_wood", "default:acacia_wood", + {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, + {"default_acacia_wood.png"}, + "Acacia Sloped Wall", + default.node_sound_wood_defaults()) + +slopedwalls.register_sloped_wall("_aspen_wood", "default:aspen_wood", + {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, + {"default_aspen_wood.png"}, + "Aspen Sloped Wall", + default.node_sound_wood_defaults()) + +slopedwalls.register_sloped_wall("_junglewood", "default:junglewood", + {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, + {"default_junglewood.png"}, + "Junglewood Sloped Wall", + default.node_sound_wood_defaults()) + +slopedwalls.register_sloped_wall("_pine_wood", "default:pine_wood", + {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, + {"default_pine_wood.png"}, + "Pine Sloped Wall", + default.node_sound_wood_defaults()) + +slopedwalls.register_sloped_wall("_wood", "default:wood", + {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, + {"default_wood.png"}, + "Wooden Sloped Wall", + default.node_sound_wood_defaults()) + +slopedwalls.register_sloped_wall("_brick", "default:brick", + {cracky = 3}, + {"default_brick.png"}, + "Brick Sloped Wall", + default.node_sound_stone_defaults()) + +slopedwalls.register_sloped_wall("_clay", "default:clay", + {cracky = 3}, + {"default_clay.png"}, + "Clay Sloped Wall", + default.node_sound_stone_defaults()) + +slopedwalls.register_sloped_wall("_cobble", "default:cobble", + {cracky = 3}, + {"default_cobble.png"}, + "Cobblestone Sloped Wall", + default.node_sound_stone_defaults()) + +slopedwalls.register_sloped_wall("_mossycobble", "default:mossycobble", + {cracky = 3}, + {"default_mossycobble.png"}, + "Mossy Cobblestone Sloped Wall", + default.node_sound_stone_defaults()) + +slopedwalls.register_sloped_wall("_desert_cobble", "default:desert_cobble", + {cracky = 3}, + {"default_desert_cobble.png"}, + "Desert Cobble Sloped Wall", + default.node_sound_stone_defaults()) + +slopedwalls.register_sloped_wall("_desert_stone", "default:desert_stone", + {cracky = 3}, + {"default_desert_stone.png"}, + "Desert Stone Sloped Wall", + default.node_sound_stone_defaults()) + +slopedwalls.register_sloped_wall("_desert_stone_block", "default:desert_stone_block", + {cracky = 3}, + {"default_desert_stone_block.png"}, + "Desert Stone Block Sloped Wall", + default.node_sound_stone_defaults()) + +slopedwalls.register_sloped_wall("_desert_stonebrick", "default:desert_stonebrick", + {cracky = 3}, + {"default_desert_stone_brick.png"}, + "Desert Stone Brick Sloped Wall", + default.node_sound_stone_defaults()) + +slopedwalls.register_sloped_wall("_desert_sandstone", "default:desert_sandstone", + {cracky = 3}, + {"default_desert_sandstone.png"}, + "Desert Sandstone Sloped Wall", + default.node_sound_stone_defaults()) + +slopedwalls.register_sloped_wall("_desert_sandstone_block", "default:desert_sandstone_block", + {cracky = 3}, + {"default_desert_sandstone_block.png"}, + "Desert Sandstone Block Sloped Wall", + default.node_sound_stone_defaults()) + +slopedwalls.register_sloped_wall("_desert_sandstone_brick", "default:desert_sandstone_brick", + {cracky = 3}, + {"default_desert_sandstone_brick.png"}, + "Desert Sandstone Brick Sloped Wall", + default.node_sound_stone_defaults()) + +slopedwalls.register_sloped_wall("_sandstone", "default:sandstone", + {crumbly = 1, cracky = 3}, + {"default_sandstone.png"}, + "Sandstone Sloped Wall", + default.node_sound_stone_defaults()) + +slopedwalls.register_sloped_wall("_sandstone_block", "default:sandstone_block", + {cracky = 2}, + {"default_sandstone_block.png"}, + "Sandstone Block Sloped Wall", + default.node_sound_stone_defaults()) + +slopedwalls.register_sloped_wall("_sandstonebrick", "default:sandstonebrick", + {cracky = 2}, + {"default_sandstone_brick.png"}, + "Sandstone Brick Sloped Wall", + default.node_sound_stone_defaults()) + +slopedwalls.register_sloped_wall("_silver_sandstone", "default:silver_sandstone", + {crumbly = 1, cracky = 3}, + {"default_silver_sandstone.png"}, + "Silver Sandstone Sloped Wall", + default.node_sound_stone_defaults()) + +slopedwalls.register_sloped_wall("_silver_sandstone_block", "default:silver_sandstone_block", + {crumbly = 1, cracky = 3}, + {"default_silver_sandstone_block.png"}, + "Silver Sandstone Block Sloped Wall", + default.node_sound_stone_defaults()) + +slopedwalls.register_sloped_wall("_silver_sandstone_brick", "default:silver_sandstone_brick", + {crumbly = 1, cracky = 3}, + {"default_silver_sandstone_brick.png"}, + "Silver Sandstone Brick Sloped Wall", + default.node_sound_stone_defaults()) + +slopedwalls.register_sloped_wall("_stone", "default:stone", + {cracky = 3}, + {"default_stone.png"}, + "Stone Sloped Wall", + default.node_sound_stone_defaults()) + +slopedwalls.register_sloped_wall("_stone_block", "default:stone_block", + {cracky = 3}, + {"default_stone_block.png"}, + "Stone Block Sloped Wall", + default.node_sound_stone_defaults()) + +slopedwalls.register_sloped_wall("_stonebrick", "default:stonebrick", + {cracky = 3}, + {"default_stone_brick.png"}, + "Stone Brick Sloped Wall", + default.node_sound_stone_defaults()) + +slopedwalls.register_sloped_wall("_obsidian", "default:obsidian", + {cracky = 1, level = 2}, + {"default_obsidian.png"}, + "Obsidian Sloped Wall", + default.node_sound_stone_defaults()) + +slopedwalls.register_sloped_wall("_obsidian_block", "default:obsidian_block", + {cracky = 1, level = 2}, + {"default_obsidian_block.png"}, + "Obsidian Block Sloped Wall", + default.node_sound_stone_defaults()) + +slopedwalls.register_sloped_wall("_obsidianbrick", "default:obsidianbrick", + {cracky = 1, level = 2}, + {"default_obsidian_brick.png"}, + "Obsidian Brick Sloped Wall", + default.node_sound_stone_defaults()) + +slopedwalls.register_sloped_wall("_bronzeblock", "default:bronzeblock", + {cracky = 1, level = 2}, + {"default_bronze_block.png"}, + "Bronze Block Sloped Wall", + default.node_sound_metal_defaults()) + +slopedwalls.register_sloped_wall("_copperblock", "default:copperblock", + {cracky = 1, level = 2}, + {"default_copper_block.png"}, + "Copper Block Sloped Wall", + default.node_sound_metal_defaults()) + +slopedwalls.register_sloped_wall("_diamondblock", "default:diamondblock", + {cracky = 1}, + {"default_diamond_block.png"}, + "Diamond Block Sloped Wall", + default.node_sound_stone_defaults()) + +slopedwalls.register_sloped_wall("_goldblock", "default:goldblock", + {cracky = 1}, + {"default_gold_block.png"}, + "Gold Block Sloped Wall", + default.node_sound_stone_defaults()) + +slopedwalls.register_sloped_wall("_meseblock", "default:meseblock", + {cracky = 1, level = 2}, + {"default_mese_block.png"}, + "Mese Block Sloped Wall", + default.node_sound_metal_defaults()) + +slopedwalls.register_sloped_wall("_steelblock", "default:steelblock", + {cracky = 1, level = 2}, + {"default_steel_block.png"}, + "Steel Block Sloped Wall", + default.node_sound_metal_defaults()) + +slopedwalls.register_sloped_wall("_tinblock", "default:tinblock", + {cracky = 1, level = 2}, + {"default_tin_block.png"}, + "Tin Block Sloped Wall", + default.node_sound_metal_defaults()) diff --git a/boost_cart/README.md b/boost_cart/README.md new file mode 100644 index 0000000..765d505 --- /dev/null +++ b/boost_cart/README.md @@ -0,0 +1,50 @@ +# Boost Cart +Based on (and fully compatible with) the mod "carts" by PilzAdam +and the one contained in the subgame "minetest_game". +Target: Run smoothly as possible, even on laggy servers. + +## Features +- A fast cart for your railway or roller coaster +- Easily configurable cart speed using the Advanced Settings +- Boost and brake rails +- By mesecons controlled Start-Stop rails +- Detector rails that send a mesecons signal when the cart drives over them +- Rail junction switching with the 'right/left' walking keys +- Handbrake with the 'back' key +- Support for non-minetest_game subgames +- Descend from cart using the `sneak` key + +## Settings +This mod can be adjusted to fit the preference of a player or server. Use the `Settings -> All Settings` dialog in the main menu or tune your +minetest.conf file manually: + +#### `boost_cart.speed_max = 10` +* Maximal speed of the cart in m/s +* Possible values: 1 ... 100 + +#### `boost_cart.punch_speed_max = 7` +* Maximal speed to which the driving player can accelerate the cart by punching from inside the cart. +* Possible values: -1 ... 100 +* Value `-1` will disable this feature. + +## License for everything +CC-0, if not specified otherwise below + + + Authors +--------- +Various authors +- carts_rail_*.png + +kddekadenz +- cart_bottom.png +- cart_side.png +- cart_top.png + +klankbeeld (CC-BY 3.0) +- http://freesound.org/people/klankbeeld/sounds/174042/ +- cart_rail.*.ogg + +Zeg9 +- cart.x +- cart.png \ No newline at end of file diff --git a/boost_cart/README.txt b/boost_cart/README.txt deleted file mode 100644 index 994a6ef..0000000 --- a/boost_cart/README.txt +++ /dev/null @@ -1,57 +0,0 @@ - Minetest mod: boost_cart -========================== -Based on (and fully compatible with) the mod "carts" by PilzAdam -and the one contained in the subgame "minetest_game". -Target: Run smoothly as possible, even on laggy servers. - - - Features ----------- -- A fast cart for your railway or roller coaster -- Easily configurable cart speed using the Advanced Settings -- Boost and brake rails -- By mesecons controlled Start-Stop rails -- Detector rails that send a mesecons signal when the cart drives over them -- Rail junction switching with the 'right/left' walking keys -- Handbrake with the 'back' key -- Support for non-minetest_game subgames - - - Settings ----------- -This mod can be adjusted to fit the conditions of a player or server. -Use the Advanced Settings dialog in the main menu or tune your -minetest.conf file manually: - -boost_cart.speed_max = 10 - ^ Possible values: 1 ... 100 - ^ Maximal speed of the cart in m/s - -boost_cart.punch_speed_max = 7 - ^ Possible values: -1 ... 100 - ^ Maximal speed to which the driving player can accelerate the cart - by punching from inside the cart. -1 will disable this feature. - - - License for everything ------------------------- -CC-0, if not specified otherwise below - - - Authors ---------- -Various authors - carts_rail_*.png - -kddekadenz - cart_bottom.png - cart_side.png - cart_top.png - -klankbeeld (CC-BY 3.0) - http://freesound.org/people/klankbeeld/sounds/174042/ - cart_rail.*.ogg - -Zeg9 - cart.x - cart.png \ No newline at end of file diff --git a/boost_cart/cart_entity.lua b/boost_cart/cart_entity.lua index f25e6c3..5368b5e 100644 --- a/boost_cart/cart_entity.lua +++ b/boost_cart/cart_entity.lua @@ -1,6 +1,4 @@ -local HAVE_MESECONS_ENABLED = minetest.global_exists("mesecon") - function boost_cart:on_rail_step(entity, pos, distance) -- Play rail sound if entity.sound_counter <= 0 then @@ -13,7 +11,7 @@ function boost_cart:on_rail_step(entity, pos, distance) end entity.sound_counter = entity.sound_counter - distance - if HAVE_MESECONS_ENABLED then + if boost_cart.MESECONS then boost_cart:signal_detector_rail(pos) end end @@ -40,7 +38,7 @@ local cart_entity = { } -- Model and textures -if boost_cart.mtg_compat then +if boost_cart.MTG_CARTS then cart_entity.initial_properties.mesh = "carts_cart.b3d" cart_entity.initial_properties.textures = {"carts_cart.png"} end @@ -97,6 +95,7 @@ end function cart_entity:on_detach_child(child) if child and child:get_player_name() == self.driver then self.driver = nil + boost_cart:manage_attachment(child, nil) end end @@ -157,7 +156,8 @@ function cart_entity:on_punch(puncher, time_from_last_punch, tool_capabilities, end local punch_interval = 1 - if tool_capabilities and tool_capabilities.full_punch_interval then + -- Faulty tool registrations may cause the interval to be set to 0 ! + if tool_capabilities and (tool_capabilities.full_punch_interval or 0) > 0 then punch_interval = tool_capabilities.full_punch_interval end time_from_last_punch = math.min(time_from_last_punch or punch_interval, punch_interval) @@ -289,7 +289,7 @@ function cart_entity:on_step(dtime) acc = speed_mod * 10 end end - if acc == nil and boost_cart.mtg_compat then + if acc == nil and boost_cart.MTG_CARTS then -- MTG Cart API adaption local rail_node = minetest.get_node(vector.round(pos)) local railparam = carts.railparams[rail_node.name] @@ -305,6 +305,12 @@ function cart_entity:on_step(dtime) acc = -0.4 end end + if ctrl and ctrl.sneak then + -- Descend when sneak is pressed + boost_cart:manage_attachment(player, nil) + player = nil + ctrl = nil + end if acc then -- Slow down or speed up, depending on Y direction @@ -341,10 +347,13 @@ function cart_entity:on_step(dtime) if self.punched then -- Collect dropped items for _, obj_ in pairs(minetest.get_objects_inside_radius(pos, 1)) do - if not obj_:is_player() and - obj_:get_luaentity() and - not obj_:get_luaentity().physical_state and - obj_:get_luaentity().name == "__builtin:item" then + local ent = obj_:get_luaentity() + -- Careful here: physical_state and disable_physics are item-internal APIs + if ent and ent.name == "__builtin:item" and ent.physical_state then + -- Check API to support 5.2.0 and older + if ent.disable_physics then + ent:disable_physics() + end obj_:set_attach(self.object, "", {x=0, y=0, z=0}, {x=0, y=0, z=0}) self.attached_items[#self.attached_items + 1] = obj_ @@ -380,18 +389,14 @@ function cart_entity:on_step(dtime) -- Change player model rotation, depending on the Y direction if player and dir.y ~= old_y_dir then - local feet = {x=0, y=0, z=0} + local feet = {x=0, y=-4, z=0} local eye = {x=0, y=-4, z=0} - feet.y = boost_cart.old_player_model and 6 or -4 + if dir.y ~= 0 then -- TODO: Find a better way to calculate this - if boost_cart.old_player_model then - feet.y = feet.y + 2 - feet.z = -dir.y * 6 - else - feet.y = feet.y + 4 - feet.z = -dir.y * 2 - end + feet.y = feet.y + 4 + feet.z = -dir.y * 2 + eye.z = -dir.y * 8 end player:set_attach(self.object, "", feet, @@ -414,7 +419,7 @@ end minetest.register_entity(":carts:cart", cart_entity) -- Register item to place the entity -if not boost_cart.mtg_compat then +if not boost_cart.MTG_CARTS then minetest.register_craftitem(":carts:cart", { description = "Cart (Sneak+Click to pick up)", inventory_image = minetest.inventorycube( diff --git a/boost_cart/depends.txt b/boost_cart/depends.txt deleted file mode 100644 index 705a8eb..0000000 --- a/boost_cart/depends.txt +++ /dev/null @@ -1,4 +0,0 @@ -default -mesecons? -moreores? -carts? \ No newline at end of file diff --git a/boost_cart/description.txt b/boost_cart/description.txt deleted file mode 100644 index bbb244c..0000000 --- a/boost_cart/description.txt +++ /dev/null @@ -1 +0,0 @@ -This mod offers improved minecarts and a few more rail types. \ No newline at end of file diff --git a/boost_cart/functions.lua b/boost_cart/functions.lua index b77deea..77d2dde 100644 --- a/boost_cart/functions.lua +++ b/boost_cart/functions.lua @@ -10,19 +10,18 @@ function boost_cart:manage_attachment(player, obj) if not player then return end - local status = obj ~= nil - local player_name = player:get_player_name() - if default.player_attached[player_name] == status then + local wants_attach = obj ~= nil + local attached = player:get_attach() ~= nil + + if attached == wants_attach then return end - default.player_attached[player_name] = status - if status then - local y_pos = self.old_player_model and 6 or -4 - if player:get_properties().visual == "upright_sprite" then - y_pos = -4 - end - player:set_attach(obj, "", {x=0, y=y_pos, z=0}, {x=0, y=0, z=0}) + local player_name = player:get_player_name() + boost_cart.player_attached[player_name] = wants_attach + + if wants_attach then + player:set_attach(obj, "", {x=0, y=-4, z=0}, {x=0, y=0, z=0}) player:set_eye_offset({x=0, y=-4, z=0},{x=0, y=-4, z=0}) else player:set_detach() diff --git a/boost_cart/init.lua b/boost_cart/init.lua index 4261b9a..874b9a2 100644 --- a/boost_cart/init.lua +++ b/boost_cart/init.lua @@ -1,12 +1,15 @@ +if not minetest.features.object_use_texture_alpha then + error("[boost_cart] Your Minetest version is no longer supported." + .. " (Version < 5.0.0)") +end + boost_cart = {} boost_cart.modpath = minetest.get_modpath("boost_cart") - - -if not minetest.settings then - error("[boost_cart] Your Minetest version is no longer supported." - .. " (Version <= 0.4.15)") -end +boost_cart.MESECONS = minetest.global_exists("mesecon") +boost_cart.MTG_CARTS = minetest.global_exists("carts") and carts.pathfinder +boost_cart.PLAYER_API = minetest.global_exists("player_api") +boost_cart.player_attached = {} local function getNum(setting) return tonumber(minetest.settings:get(setting)) @@ -20,27 +23,22 @@ boost_cart.punch_speed_max = getNum("boost_cart.punch_speed_max") or 7 boost_cart.path_distance_max = 3 --- Support for non-default games -if not default.player_attached then - default.player_attached = {} +if boost_cart.PLAYER_API then + -- This is a table reference! + boost_cart.player_attached = player_api.player_attached end -minetest.after(0, function() - boost_cart.old_player_model = not minetest.global_exists("player_api") -end) - dofile(boost_cart.modpath.."/functions.lua") dofile(boost_cart.modpath.."/rails.lua") -if minetest.global_exists("mesecon") then +if boost_cart.MESECONS then dofile(boost_cart.modpath.."/detector.lua") --else -- minetest.register_alias("carts:powerrail", "boost_cart:detectorrail") -- minetest.register_alias("carts:powerrail", "boost_cart:detectorrail_on") end -boost_cart.mtg_compat = minetest.global_exists("carts") and carts.pathfinder -if boost_cart.mtg_compat then +if boost_cart.MTG_CARTS then minetest.log("action", "[boost_cart] Overwriting definitions of similar carts mod") end dofile(boost_cart.modpath.."/cart_entity.lua") diff --git a/boost_cart/mod.conf b/boost_cart/mod.conf index 7da19df..6ddf5ed 100644 --- a/boost_cart/mod.conf +++ b/boost_cart/mod.conf @@ -1 +1,7 @@ -name = boost_cart \ No newline at end of file +name = boost_cart +description = """ +Boost Cart +The mod that add a cart and new kinds of rails to your world. +""" +depends = default +optional_depends = mesecons, moreores, carts, player_api diff --git a/boost_cart/rails.lua b/boost_cart/rails.lua index 66604f5..0fb1a33 100644 --- a/boost_cart/rails.lua +++ b/boost_cart/rails.lua @@ -16,18 +16,21 @@ boost_cart:register_rail(":"..regular_rail_itemname, { }) -- Moreores' copper rail +local copperrail_registered = false if minetest.get_modpath("moreores") then minetest.register_alias("carts:copperrail", "moreores:copper_rail") - if minetest.raillike_group then + local raildef = minetest.registered_nodes["moreores:copper_rail"] + if raildef and minetest.raillike_group then -- Ensure that this rail uses the same connect_to_raillike - local new_groups = minetest.registered_nodes["moreores:copper_rail"].groups - new_groups.connect_to_raillike = minetest.raillike_group("rail") + raildef.groups.connect_to_raillike = minetest.raillike_group("rail") minetest.override_item("moreores:copper_rail", { - groups = new_groups + groups = raildef.groups }) + copperrail_registered = true end -else +end +if not copperrail_registered then boost_cart:register_rail(":carts:copperrail", { description = "Copper rail", tiles = { diff --git a/boost_cart/textures/crossing_rails.png b/boost_cart/textures/crossing_rails.png deleted file mode 100644 index a32a264..0000000 Binary files a/boost_cart/textures/crossing_rails.png and /dev/null differ diff --git a/boost_cart/textures/curved_rails.png b/boost_cart/textures/curved_rails.png deleted file mode 100644 index 87b2923..0000000 Binary files a/boost_cart/textures/curved_rails.png and /dev/null differ diff --git a/boost_cart/textures/rail_curved_upgrade.png b/boost_cart/textures/rail_curved_upgrade.png deleted file mode 100644 index 78d9251..0000000 Binary files a/boost_cart/textures/rail_curved_upgrade.png and /dev/null differ diff --git a/boost_cart/textures/rail_network.png b/boost_cart/textures/rail_network.png deleted file mode 100644 index 071cee2..0000000 Binary files a/boost_cart/textures/rail_network.png and /dev/null differ diff --git a/boost_cart/textures/rail_sleepers.png b/boost_cart/textures/rail_sleepers.png deleted file mode 100644 index 5157195..0000000 Binary files a/boost_cart/textures/rail_sleepers.png and /dev/null differ diff --git a/boost_cart/textures/rail_sleepers_curved.png b/boost_cart/textures/rail_sleepers_curved.png deleted file mode 100644 index 36f7639..0000000 Binary files a/boost_cart/textures/rail_sleepers_curved.png and /dev/null differ diff --git a/boost_cart/textures/rail_straight_upgrade.png b/boost_cart/textures/rail_straight_upgrade.png deleted file mode 100644 index af823fc..0000000 Binary files a/boost_cart/textures/rail_straight_upgrade.png and /dev/null differ diff --git a/boost_cart/textures/straight_rails.png b/boost_cart/textures/straight_rails.png deleted file mode 100644 index 99e7bf9..0000000 Binary files a/boost_cart/textures/straight_rails.png and /dev/null differ diff --git a/coloredwood/.gitignore b/coloredwood/.gitignore new file mode 100644 index 0000000..b25c15b --- /dev/null +++ b/coloredwood/.gitignore @@ -0,0 +1 @@ +*~ diff --git a/coloredwood/depends.txt b/coloredwood/depends.txt index f727feb..3ab55ba 100644 --- a/coloredwood/depends.txt +++ b/coloredwood/depends.txt @@ -1,3 +1,4 @@ default unifieddyes moreblocks? +signs_lib? diff --git a/coloredwood/init.lua b/coloredwood/init.lua index da0e859..54aa708 100644 --- a/coloredwood/init.lua +++ b/coloredwood/init.lua @@ -51,6 +51,10 @@ end -- the actual nodes! +local groups = table.copy(minetest.registered_items["default:wood"].groups) +groups.ud_param2_colorable = 1 +groups.not_in_creative_inventory=1 + minetest.register_node("coloredwood:wood_block", { description = "Colored wooden planks", tiles = { "coloredwood_base.png" }, @@ -59,7 +63,7 @@ minetest.register_node("coloredwood:wood_block", { palette = "unifieddyes_palette_extended.png", walkable = true, sunlight_propagates = false, - groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=2, not_in_creative_inventory=1, ud_param2_colorable = 1}, + groups = groups, sounds = default.node_sound_wood_defaults(), }) @@ -84,6 +88,7 @@ for _, color in ipairs(unifieddyes.HUES_WITH_GREY) do after_place_node = function(pos, placer, itemstack, pointed_thing) minetest.rotate_node(itemstack, placer, pointed_thing) end, + on_dig = unifieddyes.on_dig, groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=2, not_in_creative_inventory=1, ud_param2_colorable = 1}, } ) @@ -97,6 +102,11 @@ local coloredwood_cuts = {} if coloredwood.enable_stairsplus then + local groups2 = table.copy(minetest.registered_items["default:wood"].groups) + groups2.wood = nil + groups2.ud_param2_colorable = 1 + groups2.not_in_creative_inventory=1 + for _, i in pairs(minetest.registered_nodes) do local chk = string.sub(i.name, 1, 20) @@ -119,7 +129,7 @@ if coloredwood.enable_stairsplus then end minetest.override_item(i.name, { - groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, not_in_creative_inventory=1, ud_param2_colorable = 1}, + groups = groups2, paramtype2 = "colorfacedir", palette = "unifieddyes_palette_greys.png", airbrush_replacement_node = "coloredwood:"..class.."_wood_grey_"..shape @@ -147,10 +157,13 @@ for _, mname in ipairs(coloredwood_cuts) do }) end +groups = table.copy(minetest.registered_items["default:wood"].groups) +groups.ud_param2_colorable = 1 + minetest.override_item("default:wood", { palette = "unifieddyes_palette_extended.png", airbrush_replacement_node = "coloredwood:wood_block", - groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, ud_param2_colorable = 1}, + groups = groups, }) default.register_fence("coloredwood:fence", { @@ -158,14 +171,19 @@ default.register_fence("coloredwood:fence", { texture = "coloredwood_fence_base.png", paramtype2 = "color", palette = "unifieddyes_palette_extended.png", - groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, ud_param2_colorable = 1}, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, ud_param2_colorable = 1, not_in_creative_inventory=1}, sounds = default.node_sound_wood_defaults(), - material = "coloredwood:wood_block" + material = "coloredwood:wood_block", + on_dig = unifieddyes.on_dig, }) +groups = table.copy(minetest.registered_items["default:fence_wood"].groups) +groups.ud_param2_colorable = 1 + minetest.override_item("default:fence_wood", { palette = "unifieddyes_palette_extended.png", - groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, ud_param2_colorable = 1} + airbrush_replacement_node = "coloredwood:fence", + groups = groups }) -- Crafts @@ -203,4 +221,10 @@ unifieddyes.register_color_craft({ } }) +if minetest.get_modpath("signs_lib") then + minetest.override_item("coloredwood:fence", { + check_for_pole = true + }) +end + print("[Colored Wood] Loaded!") diff --git a/coloredwood/mod.conf b/coloredwood/mod.conf index dc263d8..f8b9671 100644 --- a/coloredwood/mod.conf +++ b/coloredwood/mod.conf @@ -1 +1,2 @@ name = coloredwood +min_minetest_version = 5.2.0 diff --git a/mydoors/my_door_wood/depends.txt b/mydoors/my_door_wood/depends.txt deleted file mode 100644 index 567219e..0000000 --- a/mydoors/my_door_wood/depends.txt +++ /dev/null @@ -1,3 +0,0 @@ -default -stairs? -moreblocks? \ No newline at end of file diff --git a/mydoors/my_door_wood/init.lua b/mydoors/my_door_wood/init.lua index f3babaa..6aaf536 100644 --- a/mydoors/my_door_wood/init.lua +++ b/mydoors/my_door_wood/init.lua @@ -7,45 +7,18 @@ local door_wood = { -- color, desc, image {"yellow", "Clear Stained", "yellow"}, {"black", "Black", "black"}, } -local function my_door_wood_block_stairs(nodename, def) - local mod = string.match (nodename,"(.+):") - local name = string.match (nodename,":(.+)") - minetest.register_node(nodename,def) - if minetest.get_modpath("moreblocks") then - stairsplus:register_all( - mod, - name, - nodename, - { - description = def.description, - tiles = def.tiles, - groups = def.groups, - sounds = def.sounds, - } - ) - elseif minetest.get_modpath("stairs") then - stairs.register_stair_and_slab(name,nodename, - def.groups, - def.tiles, - ("%s Stair"):format(def.description), - ("%s Slab"):format(def.description), - def.sounds - ) - end -end for i in ipairs(door_wood) do local color = door_wood[i][1] local desc = door_wood[i][2] local img = door_wood[i][3] -my_door_wood_block_stairs("my_door_wood:wood_"..color, { +minetest.register_node("my_door_wood:wood_"..color, { description = desc.." Wood", drawtype = "normal", paramtype = "light", tiles = {"mydoors_"..img.."_wood.png"}, paramtype = "light", groups = {cracky = 2, choppy = 2}, - sounds = default.node_sound_wood_defaults(), }) diff --git a/mymillwork/README.md b/mymillwork/README.md index fff3649..4fe6298 100644 --- a/mymillwork/README.md +++ b/mymillwork/README.md @@ -5,42 +5,19 @@ Crown Mold, Baseboards, Columns and more To minetest Licence - DWYWPL -If you want to add or remove a texture simply edit the table at the top of millwork.lua file. +If you want to add or remove a texture simply edit the materials.lua file. -Right now I have these textures: White, Sandstone, Desert Sand and Clay. The others are commented out. - -Each texture has 28 nodes so careful that you don't add too many textures. +Each texture has 24 nodes so careful that you don't add too many textures. -local material = {--{Name for description}, {image without .png}, {item name}, {mod name} - { "White", "crownmold_white","white","wool"}, - --- { "Cobble", "default_cobble","cobble","default"}, - - { "Sandstone", "default_sandstone","sandstone","default"}, - --- { "Desert Stone", "default_desert_stone","desert_stone","default"}, - --- { "Stone", "default_stone","stone","default"}, - --- { "Tree", "default_tree","tree","default"}, - - { "Desert Sand", "default_desert_sand","desert_sand","default"}, - - { "Clay", "default_clay","clay","default"}, - --- { "Dirt", "default_dirt","dirt","default"}, -} - -Newish API example: +API example: ```lua -mymillwork.register_all( - "default_stone", - "Stone", - "default_stone.png", - {cracky = 3,not_in_creative_inventory=1}, - "default:stone" +mymillwork.register("default:stone", + "default_stone", + "Stone", + "default_stone.png", + {cracky=3, stone=1, not_in_creative_inventory=1}, ) ``` diff --git a/mymillwork/description.txt b/mymillwork/description.txt index d9415f2..a05af2b 100644 --- a/mymillwork/description.txt +++ b/mymillwork/description.txt @@ -2,11 +2,9 @@ Crown molding, columns and baseboards of different styles. -If you want to add or remove a texture simply edit the table at the top of millwork.lua file. +If you want to add or remove a texture simply edit the materials.lua file. -Right now I have these textures: White, Sandstone, Desert Sand and Clay. The others are commented out. - -Each texture has 28 nodes so careful that you don't add too many textures. +Each texture has 24 nodes so careful that you don't add too many textures. diff --git a/mymillwork/init.lua b/mymillwork/init.lua index 5e592fd..6bf57de 100644 --- a/mymillwork/init.lua +++ b/mymillwork/init.lua @@ -1,4 +1,4 @@ mymillwork = {} -dofile(minetest.get_modpath("mymillwork").."/millwork.lua") dofile(minetest.get_modpath("mymillwork").."/machines.lua") -dofile(minetest.get_modpath("mymillwork").."/register.lua") +dofile(minetest.get_modpath("mymillwork").."/nodes.lua") +dofile(minetest.get_modpath("mymillwork").."/materials.lua") diff --git a/mymillwork/materials.lua b/mymillwork/materials.lua new file mode 100644 index 0000000..924b602 --- /dev/null +++ b/mymillwork/materials.lua @@ -0,0 +1,363 @@ +local nici = 1 +-- Default Materials + +--default:stone +mymillwork.register("default:stone", + "default_stone", + "Stone", + "default_stone.png", + {cracky = 3, stone = 1, not_in_creative_inventory = nici} +) + +--default:cobble +mymillwork.register("default:cobble", + "default_cobble", + "Cobblestone", + "default_cobble.png", + {cracky = 3, stone = 2, not_in_creative_inventory = nici} +) + +--default:stonebrick +mymillwork.register("default:stonebrick", + "default_stone_brick", + "Stone Brick", + "default_stone_brick.png", + {cracky = 2, stone = 1, not_in_creative_inventory = nici} +) + +--default:stone_block +mymillwork.register("default:stone_block", + "default_stone_block", + "Stone Block", + "default_stone_block.png", + {cracky = 2, stone = 1, not_in_creative_inventory = nici} +) + +--default:mossycobble +mymillwork.register("default:mossycobble", + "default_mossy_cobble", + "Mossy Cobble", + "default_mossycobble.png", + {cracky = 3, stone = 1, not_in_creative_inventory = nici} +) + +--default:desert_stone +mymillwork.register("default:desert_stone", + "default_desert_stone", + "Desert Stone", + "default_desert_stone.png", + {cracky = 3, stone = 1, not_in_creative_inventory = nici} +) + +--default:desert_cobble +mymillwork.register("default:desert_cobble", + "default_desert_cobble", + "Desert Cobblestone", + "default_desert_cobble.png", + {cracky = 3, stone = 2, not_in_creative_inventory = nici} +) + +--default:desert_stonebrick +mymillwork.register("default:desert_stonebrick", + "default_desert_stone_brick", + "Desert Stone Brick", + "default_desert_stone_brick.png", + {cracky = 2, stone = 1, not_in_creative_inventory = nici} +) +--default:desert_stone_block +mymillwork.register("default:desert_stone_block", + "default_desert_stone_block", + "Desert Stone Block", + "default_desert_stone_block.png", + {cracky = 2, stone = 1, not_in_creative_inventory = nici} +) + +--default:sandstone +mymillwork.register("default:sandstone", + "default_sandstone", + "Sandstone", + "default_sandstone.png", + {crumbly = 1, cracky = 3, not_in_creative_inventory = nici} +) + +--default:sandstonebrick +mymillwork.register("default:sandstonebrick", + "default_sandstone_brick", + "Sandstone Brick", + "default_sandstone_brick.png", + {cracky = 3, not_in_creative_inventory = nici} +) + +--default:sandstone_block +mymillwork.register("default:sandstone_block", + "default_sandstone_block", + "Sandstone Block", + "default_sandstone_block.png", + {cracky = 2, not_in_creative_inventory = nici} +) + +--default:desert_sandstone +mymillwork.register("default:desert_sandstone", + "default_desert_sandstone", + "Desert Sandstone", + "default_desert_sandstone.png", + {crumbly = 1, cracky = 3, not_in_creative_inventory = nici} +) + +--default:desert_sandstone_brick +mymillwork.register("default:desert_sandstone_brick", + "default_desert_sandstone_brick", + "Desert Sandstone Brick", + "default_desert_sandstone_brick.png", + {cracky = 2, not_in_creative_inventory = nici} +) + +--default:desert_sandstone_block +mymillwork.register("default:desert_sandstone_block", + "default_desert_sandstone_block", + "Desert Sandstone Block", + "default_desert_sandstone_block.png", + {cracky = 2, not_in_creative_inventory = nici} +) + +--default:silver_sandstone +mymillwork.register("default:silver_sandstone", + "default_silver_sandstone", + "Silver Sandstone", + "default_silver_sandstone.png", + {crumbly = 1, cracky = 3, not_in_creative_inventory = nici} +) + +--default:silver_sandstone_brick +mymillwork.register("default:silver_sandstone_brick", + "default_silver_sandstone_brick", + "Silver Sandstone Brick", + "default_silver_sandstone_brick.png", + {cracky = 2, not_in_creative_inventory = nici} +) + +--default:silver_sandstone_block +mymillwork.register("default:silver_sandstone_block", + "default_silver_sandstone_block", + "Silver Sandstone Blocl", + "default_silver_sandstone_block.png", + {cracky = 2, not_in_creative_inventory = nici} +) + +--default:obsidian +mymillwork.register("default:obsidian", + "default_obsidian", + "Obsidian", + "default_obsidian.png", + {cracky = 1, level = 2, not_in_creative_inventory = nici} +) + +--default:obsidianbrick +mymillwork.register("default:obsidianbrick", + "default_obsidian_brick", + "Obsidian Brick", + "default_obsidian_brick.png", + {cracky = 1, level = 2, not_in_creative_inventory = nici} +) + +--default:obsidian_block +mymillwork.register("default:obsidian_block", + "default_obsidian_block", + "Obsidian Block", + "default_obsidian_block.png", + {cracky = 1, level = 2, not_in_creative_inventory = nici} +) + +--default:clay +mymillwork.register("default:clay", + "default_clay", + "Clay", + "default_clay.png", + {crumbly = 3, not_in_creative_inventory = nici} +) + +--default:snow + +--default:snowblock +mymillwork.register("default:snowblock", + "default_snowblock", + "Snow Block", + "default_snow.png", + {crumbly = 3, not_in_creative_inventory = nici} +) + +--default:ice +mymillwork.register("default:ice", + "default_ice", + "Ice", + "default_ice.png", + {crumbly = 3, not_in_creative_inventory = nici} +) + +--default:tree +mymillwork.register("default:tree", + "default_tree", + "Tree", + "default_tree.png", + {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, not_in_creative_inventory = nici} +) + +--default:wood +mymillwork.register("default:wood", + "default_wood", + "Wood", + "default_wood.png", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, not_in_creative_inventory = nici} +) + +--default:jungletree +mymillwork.register("default:jungletree", + "default_jungletree", + "Jungle Tree", + "default_jungletree.png", + {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, not_in_creative_inventory = nici} +) + +--default:junglewood +mymillwork.register("default:junglewood", + "default_junglewood", + "Jungle Wood", + "default_junglewood.png", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, not_in_creative_inventory = nici} +) + +--default:pine_tree +mymillwork.register("default:pine_tree", + "default_pine_tree", + "Pine Tree", + "default_pine_tree.png", + {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3, not_in_creative_inventory = nici} +) + +--default:pine_wood +mymillwork.register("default:pine_wood", + "default_pine_wood", + "Pine Wood", + "default_pine_wood.png", + {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1, not_in_creative_inventory = nici} +) + +--default:acacia_tree +mymillwork.register("default:acacia_tree", + "default_acacia_tree", + "Acacia Tree", + "default_acacia_tree.png", + {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, not_in_creative_inventory = nici} +) + +--default:acacia_wood +mymillwork.register("default:acacia_wood", + "default_acacia_wood", + "Acacia Wood", + "default_acacia_wood.png", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, not_in_creative_inventory = nici} +) + +--default:aspen_tree +mymillwork.register("default:aspen_tree", + "default_aspen_tree", + "Aspen Tree", + "default_aspen_tree.png", + {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3, not_in_creative_inventory = nici} +) + +--default:aspen_wood +mymillwork.register("default:aspen_wood", + "default_aspen_wood", + "Aspen Wood", + "default_aspen_wood.png", + {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1, not_in_creative_inventory = nici} +) + +--default:coalblock +mymillwork.register("default:coalblock", + "default_coal_block", + "Coal Block", + "default_coal_block.png", + {cracky = 3, not_in_creative_inventory = nici} +) + +--default:steelblock +mymillwork.register("default:steelblock", + "default_steel_block", + "Steel Block", + "default_steel_block.png", + {cracky = 1, level = 2, not_in_creative_inventory = nici} +) + +--default:copperblock +mymillwork.register("default:copperblock", + "default_copper_block", + "Copper Block", + "default_copper_block.png", + {cracky = 1, level = 2, not_in_creative_inventory = nici} +) + +--default:tinblock +mymillwork.register("default:tinblock", + "default_tin_block", + "Tin Block", + "default_tin_block.png", + {cracky = 1, level = 2, not_in_creative_inventory = nici} +) + +--default:bronzeblock +mymillwork.register("default:bronzeblock", + "default_bronze_block", + "Bronze Block", + "default_bronze_block.png", + {cracky = 1, level = 2, not_in_creative_inventory = nici} +) + +--default:goldblock +mymillwork.register("default:goldblock", + "default_gold_block", + "Gold Block", + "default_gold_block.png", + {cracky = 1, level = 2, not_in_creative_inventory = nici} +) + +--default:mese +mymillwork.register("default:mese", + "default_mese_block", + "Mese Block", + "default_mese_block.png", + {cracky = 1, level = 2, not_in_creative_inventory = nici} +) + +--default:diamondblock +mymillwork.register("default:diamondblock", + "default_diamond_block", + "Diamond Block", + "default_diamond_block.png", + {cracky = 1, level = 3, not_in_creative_inventory = nici} +) + +--default:glass +mymillwork.register("default:glass", + "default_glass", + "Glass", + "default_glass.png", + {cracky = 3, oddly_breakable_by_hand = 3, not_in_creative_inventory = nici} +) + +--default:obsidian_glass +mymillwork.register("default:obsidian_glass", + "default_obsidian_glass", + "Obsidian Glass", + "default_obsidian_glass.png", + {cracky = 3, oddly_breakable_by_hand = 3, not_in_creative_inventory = nici} +) + +--default:brick +mymillwork.register("default:brick", + "default_brick", + "Brick", + "default_brick.png", + {cracky = 3, not_in_creative_inventory = nici} +) diff --git a/mymillwork/millwork.lua b/mymillwork/millwork.lua deleted file mode 100644 index a3e8891..0000000 --- a/mymillwork/millwork.lua +++ /dev/null @@ -1,779 +0,0 @@ -mymillwork.registered = {} - -function mymillwork.register_all(mat, desc, image, group, itm) - -minetest.register_node(":mymillwork:crownmould_"..mat, { - description = desc.." Crown Mould", - drawtype = "nodebox", - tiles = {image}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - groups = group, - node_box = { - type = "fixed", - fixed = { - {-0.5, 0.5, 0.4375, 0.5, -0.5, 0.5}, - {-0.5, 0.4375, 0.375, 0.5, 0.25, 0.5}, - {-0.5, 0.125, 0.375, 0.5, -0.5, 0.5}, - {-0.5, -0.0625, 0.3125, 0.5, -0.5, 0.5}, - {-0.5, -0.1875, 0.25, 0.5, -0.5, 0.5}, - {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, - {-0.5, -0.375, -0.4375, 0.5, -0.5, -0.25}, - {-0.5, -0.375, -0.125, 0.5, -0.5, 0.5}, - {-0.5, -0.3125, 0.0625, 0.5, -0.5, 0.5}, - {-0.5, -0.25, 0.1875, 0.5, -0.5, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5,-0.5,-0.5,0.5,0.5,0.5}, - }, - }, - sounds = default.node_sound_wood_defaults(), - on_place = minetest.rotate_node, -}) - -minetest.register_node(":mymillwork:crownmould_ic_"..mat, { - description = desc.." Crown Mould IC", - drawtype = "nodebox", - tiles = {image}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - groups = group, - node_box = { - type = "fixed", - fixed = { - {-0.5, 0.5, 0.4375, 0.5, -0.5, 0.5}, - {-0.5, 0.4375, 0.375, 0.5, 0.25, 0.5}, - {-0.5, 0.125, 0.375, 0.5, -0.5, 0.5}, - {-0.5, -0.0625, 0.3125, 0.5, -0.5, 0.5}, - {-0.5, -0.1875, 0.25, 0.5, -0.5, 0.5}, - {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, - {-0.5, -0.375, -0.4375, 0.5, -0.5, -0.25}, - {-0.5, -0.375, -0.125, 0.5, -0.5, 0.5}, - {-0.5, -0.3125, 0.0625, 0.5, -0.5, 0.5}, - {-0.5, -0.25, 0.1875, 0.5, -0.5, 0.5}, - {0.4375, 0.5, -0.5, 0.5, -0.5, 0.5}, - {0.375, 0.4375, -0.5, 0.5, 0.25, 0.5}, - {0.375, 0.125, -0.5, 0.5, -0.5, 0.5}, - {0.3125, -0.0625, -0.5, 0.5, -0.5, 0.5}, - {0.25, -0.1875, -0.5, 0.5, -0.5, 0.5}, - {-0.4375, -0.375, -0.5, -0.25, -0.5, 0.5}, - {-0.125, -0.375, -0.5, 0.5, -0.5, 0.5}, - {0.0625, -0.3125, -0.5, 0.5, -0.5, 0.5}, - {0.1875, -0.25, -0.5, 0.5, -0.5, 0.5}, - {-0.25, -0.375, -0.25, 0.5, -0.5, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5,-0.5,-0.5,0.5,0.5,0.5}, - }, - }, - sounds = default.node_sound_wood_defaults(), - on_place = minetest.rotate_node, -}) - -minetest.register_node(":mymillwork:crownmould_oc_"..mat, { - description = desc.." Crown Mould OC", - drawtype = "nodebox", - tiles = {image}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - groups = group, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, - {-0.5, 0.5, 0.4375, -0.4375, -0.5, 0.5}, - {-0.5, 0.4375, 0.375, -0.375, 0.25, 0.5}, - {-0.5, 0.125, 0.375, -0.375, -0.5, 0.5}, - {-0.5, -0.0625, 0.3125, -0.3125, -0.5, 0.5}, - {-0.5, -0.1875, 0.25, -0.25, -0.5, 0.5}, - {-0.5, -0.25, 0.1875, -0.1875, -0.5, 0.5}, - {-0.5, -0.3125, 0.0625, -0.0625, -0.5, 0.5}, - {-0.5, -0.375, -0.125, 0.125, -0.5, 0.5}, - {-0.5, -0.375, -0.4375, 0.4375, -0.5, -0.25}, - {0.25, -0.375, -0.4375, 0.4375, -0.5, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5,-0.5,-0.5,0.5,0.5,0.5}, - } - }, - sounds = default.node_sound_wood_defaults(), - on_place = minetest.rotate_node, -}) - -minetest.register_node(":mymillwork:crownmould_beam_"..mat, { - description = desc.." Crown Mould with Beam", - drawtype = "nodebox", - tiles = {image}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - groups = group, - node_box = { - type = "fixed", - fixed = { - {-0.5, 0.5, 0.4375, 0.5, -0.5, 0.5}, - {-0.5, 0.4375, 0.375, 0.5, 0.25, 0.5}, - {-0.5, 0.125, 0.375, 0.5, -0.5, 0.5}, - {-0.5, -0.0625, 0.3125, 0.5, -0.5, 0.5}, - {-0.5, -0.1875, 0.25, 0.5, -0.5, 0.5}, - {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, - {-0.5, -0.375, -0.4375, 0.5, -0.5, -0.25}, - {-0.5, -0.375, -0.125, 0.5, -0.5, 0.5}, - {-0.5, -0.3125, 0.0625, 0.5, -0.5, 0.5}, - {-0.5, -0.25, 0.1875, 0.5, -0.5, 0.5}, - {-0.25, -0.25, -0.5, 0.25, -0.5, 0.5}, - {-0.25, -0.1875, -0.5, -0.1875, -0.5, 0.5}, - {0.1875, -0.1875, -0.5, 0.25, -0.5, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, - } - }, - sounds = default.node_sound_wood_defaults(), - on_place = minetest.rotate_node, -}) - -minetest.register_node(":mymillwork:column_" ..mat, { - description = desc.." Column", - drawtype = "nodebox", - tiles = {image}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - groups = group, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.1875, 0.5, 0.5, 0.1875}, - {-0.4375, -0.5, -0.3125, 0.4375, 0.5, 0.3125}, - {-0.375, -0.5, -0.375, 0.375, 0.5, 0.375}, - {-0.3125, -0.5, -0.4375, 0.3125, 0.5, 0.4375}, - {-0.1875, -0.5, -0.5, 0.1875, 0.5, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5,-0.5,-0.5,0.5,0.5,0.5}, - } - }, - sounds = default.node_sound_wood_defaults(), - on_place = minetest.rotate_node, -}) - -minetest.register_node(":mymillwork:column_base_"..mat, { - description = desc.." Column Base", - drawtype = "nodebox", - tiles = {image}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - groups = group, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.1875, 0.5, 0.5, 0.1875}, - {-0.4375, -0.5, -0.3125, 0.4375, 0.5, 0.3125}, - {-0.375, -0.5, -0.375, 0.375, 0.5, 0.375}, - {-0.3125, -0.5, -0.4375, 0.3125, 0.5, 0.4375}, - {-0.1875, -0.5, -0.5, 0.1875, 0.5, 0.5}, - {-0.5, -0.5, -0.5, 0.5, -0.1875, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5,-0.5,-0.5,0.5,0.5,0.5}, - } - }, - sounds = default.node_sound_wood_defaults(), - on_place = minetest.rotate_node, -}) - -minetest.register_node(":mymillwork:column_half_"..mat, { - description = desc.." Half Column", - drawtype = "nodebox", - tiles = {image}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - groups = group, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 0.3125, 0.5, 0.5, 0.5}, - {-0.4375, -0.5, 0.1875, 0.4375, 0.5, 0.5}, - {-0.375, -0.5, 0.125, 0.375, 0.5, 0.5}, - {-0.3125, -0.5, 0.0625, 0.3125, 0.5, 0.4375}, - {-0.1875, -0.5, 0, 0.1875, 0.5, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5,-0.5,0,0.5,0.5,0.5}, - } - }, - sounds = default.node_sound_wood_defaults(), - on_place = minetest.rotate_node, -}) - -minetest.register_node(":mymillwork:column_half_base_"..mat, { - description = desc.." Half Column Base", - drawtype = "nodebox", - tiles = {image}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - groups = group, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 0.3125, 0.5, 0.5, 0.5}, - {-0.1875, -0.5, 0, 0.1875, 0.5, 0.5}, - {-0.4375, -0.5, 0.1875, 0.4375, 0.5, 0.5}, - {-0.3125, -0.5, 0.0625, 0.3125, 0.5, 0.5}, - {-0.375, -0.5, 0.125, 0.375, 0.5, 0.5}, - {-0.5, -0.5, -0.0625, 0.5, -0.1875, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5,-0.5,-0.0625,0.5,0.5,0.5}, - } - }, - sounds = default.node_sound_wood_defaults(), - on_place = minetest.rotate_node, -}) - -minetest.register_node(":mymillwork:column_half_wbeam_"..mat, { - description = desc.." Half Column Base With Beam", - drawtype = "nodebox", - tiles = {image}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - groups = group, - node_box = { - type = "fixed", - fixed = { - {-0.5, 0.5, 0.3125, 0.5, -0.5, 0.5}, - {-0.4375, 0.5, 0.1875, 0.4375, -0.5, 0.5}, - {-0.375, 0.5, 0.125, 0.375, -0.5, 0.5}, - {-0.3125, 0.5, 0.0625, 0.3125, -0.5, 0.4375}, - {-0.1875, 0.5, 0, 0.1875, -0.5, 0.5}, - {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, - {-0.25, -0.25, -0.5, 0.25, -0.5, 0.5}, - {-0.25, -0.1875, -0.5, -0.1875, -0.5, 0.5}, - {0.1875, -0.1875, -0.5, 0.25, -0.5, 0.5}, - {-0.5, -0.375, -0.4375, 0.5, -0.5, -0.25}, - {-0.5, -0.375, -0.125, 0.5, -0.5, 0.5}, - {-0.5, -0.3125, 0.0625, 0.5, -0.5, 0.5}, - {-0.5, -0.25, 0.1875, 0.5, -0.5, 0.5}, - {-0.5, -0.1875, 0.25, 0.5, -0.5, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5,-0.5,-0.5,0.5,0.5,0.5}, - } - }, - sounds = default.node_sound_wood_defaults(), - on_place = minetest.rotate_node, -}) - -minetest.register_node(":mymillwork:column_quarter_"..mat, { - description = desc.." Quarter Column", - drawtype = "nodebox", - tiles = {image}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - groups = group, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 0.3125, 0, 0.5, 0.5}, - {-0.5, -0.5, 0, -0.3125, 0.5, 0.5}, - {-0.5, -0.5, 0.1875, -0.0625, 0.5, 0.5}, - {-0.5, -0.5, 0.0625, -0.1875, 0.5, 0.5}, - {-0.5, -0.5, 0.125, -0.125, 0.5, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5,-0.5,0,0,0.5,0.5}, - } - }, - sounds = default.node_sound_wood_defaults(), - on_place = minetest.rotate_node, -}) - -minetest.register_node(":mymillwork:column_quarter_base_"..mat, { - description = desc.." Quarter Column Base", - drawtype = "nodebox", - tiles = {image}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - groups = group, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 0.3125, 0, 0.5, 0.5}, - {-0.5, -0.5, 0, -0.3125, 0.5, 0.5}, - {-0.5, -0.5, 0.1875, -0.0625, 0.5, 0.5}, - {-0.5, -0.5, 0.0625, -0.1875, 0.5, 0.5}, - {-0.5, -0.5, 0.125, -0.125, 0.5, 0.5}, - {-0.5, -0.5, -0.0625, 0.0625, -0.1875, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5,-0.5,-0.5,0.5,0.5,0.5}, - } - }, - sounds = default.node_sound_wood_defaults(), - on_place = minetest.rotate_node, -}) - -minetest.register_node(":mymillwork:column_quarter_wbase_"..mat, { - description = desc.." Quarter Column Base Baseboard", - drawtype = "nodebox", - tiles = {image}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - groups = group, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 0.3125, 0, 0.5, 0.5}, - {-0.5, -0.5, 0, -0.3125, 0.5, 0.5}, - {-0.5, -0.5, 0.1875, -0.0625, 0.5, 0.5}, - {-0.5, -0.5, 0.0625, -0.1875, 0.5, 0.5}, - {-0.5, -0.5, 0.125, -0.125, 0.5, 0.5}, - {-0.5, -0.5, -0.0625, 0.0625, -0.1875, 0.5}, - {-0.5, -0.5, 0.4375, 0.5, -0.1875, 0.5}, - {-0.4375, -0.5, -0.5, -0.5, -0.1875, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5,-0.5,-0.5,0.5,0.5,0.5}, - } - }, - sounds = default.node_sound_wood_defaults(), - on_place = minetest.rotate_node, -}) - -minetest.register_node(":mymillwork:column_quarter_fancybase_"..mat, { - description = desc.." Quarter Column Base Fancy Baseboard", - drawtype = "nodebox", - tiles = {image}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - groups = group, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 0.3125, 0, 0.5, 0.5}, - {-0.5, -0.5, 0, -0.3125, 0.5, 0.5}, - {-0.5, -0.5, 0.1875, -0.0625, 0.5, 0.5}, - {-0.5, -0.5, 0.0625, -0.1875, 0.5, 0.5}, - {-0.5, -0.5, 0.125, -0.125, 0.5, 0.5}, - {-0.5, -0.5, 0.3125, 0.5, -0.1875, 0.5}, - {-0.5, -0.5, 0.4375, 0.5, 0.1875, 0.5}, - {-0.5, -0.5, 0.375, 0.5, -0.0625, 0.5}, - {-0.5, 0, 0.375, 0.5, 0.125, 0.5}, - {-0.5, -0.5, -0.5, -0.4375, 0.1875, 0.5}, - {-0.5, -0.5, -0.5, -0.3125, -0.1875, 0.5}, - {-0.5, -0.5, -0.5, -0.375, -0.0625, 0.5}, - {-0.5, 0, -0.5, -0.375, 0.125, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5,-0.5,-0.5,0.5,0.5,0.5}, - } - }, - sounds = default.node_sound_wood_defaults(), - on_place = minetest.rotate_node, -}) - -minetest.register_node(":mymillwork:ceiling_" ..mat, { - description = desc.." Ceiling", - drawtype = "nodebox", - tiles = {image}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - groups = group, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, - } - }, - sounds = default.node_sound_wood_defaults(), - on_place = minetest.rotate_node, -}) - -minetest.register_node(":mymillwork:ceiling_post_"..mat, { - description = desc.." Ceiling with Post", - drawtype = "nodebox", - tiles = {image}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - groups = group, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, - {-0.125, 0.5, -0.0625, 0.125, -0.5, 0.0625}, - {-0.0625, 0.5, -0.125, 0.0625, -0.5, 0.125}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, - {-0.125, 0.5, -0.0625, 0.125, -0.5, 0.0625}, - {-0.0625, 0.5, -0.125, 0.0625, -0.5, 0.125}, - } - }, - sounds = default.node_sound_wood_defaults(), - on_place = minetest.rotate_node, -}) - -minetest.register_node(":mymillwork:beam_ceiling_"..mat, { - description = desc.." Ceiling with Beam", - drawtype = "nodebox", - tiles = {image}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - groups = group, - node_box = { - type = "fixed", - fixed = { - {-0.25, -0.1875, -0.5, -0.1875, -0.5, 0.5}, - {-0.1875, -0.25, -0.5, 0.25, -0.5, 0.5}, - {0.1875, -0.1875, -0.5, 0.25, -0.5, 0.5}, - {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.1875, -0.5, 0.5, -0.5, 0.5}, - } - }, - sounds = default.node_sound_wood_defaults(), - on_place = minetest.rotate_node, -}) - -minetest.register_node(":mymillwork:beam_ceiling_t_"..mat, { - description = desc.." Ceiling with Beam T", - drawtype = "nodebox", - tiles = {image}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - groups = group, - node_box = { - type = "fixed", - fixed = { - {-0.25, -0.1875, -0.5, -0.1875, -0.5, 0.5}, - {-0.1875, -0.25, -0.5, 0.25, -0.5, 0.5}, - {0.1875, -0.1875, -0.5, 0.25, -0.5, 0.5}, - {-0.5, -0.25, -0.25, 0.5, -0.5, 0.25}, - {-0.5, -0.1875, -0.25, 0.5, -0.5, -0.1875}, - {-0.5, -0.1875, 0.1875, 0.5, -0.5, 0.25}, - {-0.25, -0.1875, -0.25, 0.25, -0.5, 0.1875}, - {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.1875, -0.5, 0.5, -0.5, 0.5}, - } - }, - sounds = default.node_sound_wood_defaults(), - on_place = minetest.rotate_node, -}) - -minetest.register_node(":mymillwork:beam_" ..mat, { - description = desc.." Beam", - drawtype = "nodebox", - tiles = {image}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - groups = group, - node_box = { - type = "fixed", - fixed = { - {-0.25, -0.1875, -0.5, -0.1875, -0.5, 0.5}, - {-0.1875, -0.25, -0.5, 0.25, -0.5, 0.5}, - {0.1875, -0.1875, -0.5, 0.25, -0.5, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.25, -0.1875, -0.5, 0.25, -0.5, 0.5}, - } - }, - sounds = default.node_sound_wood_defaults(), - on_place = minetest.rotate_node, -}) - -minetest.register_node(":mymillwork:beam_t_"..mat, { - description = desc.." Beam T", - drawtype = "nodebox", - tiles = {image}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - groups = group, - node_box = { - type = "fixed", - fixed = { - {-0.25, -0.1875, -0.5, -0.1875, -0.5, 0.5}, - {-0.1875, -0.25, -0.5, 0.25, -0.5, 0.5}, - {0.1875, -0.1875, -0.5, 0.25, -0.5, 0.5}, - {-0.5, -0.25, -0.25, 0.5, -0.5, 0.25}, - {-0.5, -0.1875, -0.25, 0.5, -0.5, -0.1875}, - {-0.5, -0.1875, 0.1875, 0.5, -0.5, 0.25}, - {-0.25, -0.1875, -0.25, 0.25, -0.5, 0.1875}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.1875, -0.5, 0.5, -0.5, 0.5}, - } - }, - sounds = default.node_sound_wood_defaults(), - on_place = minetest.rotate_node, -}) - -minetest.register_node(":mymillwork:base_" ..mat, { - description = desc.." Baseboard", - drawtype = "nodebox", - tiles = {image}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - groups = group, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 0.4375, 0.5, -0.1875, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 0.3375, 0.5, -0.0875, 0.5}, - } - }, - sounds = default.node_sound_wood_defaults(), - on_place = minetest.rotate_node, -}) - -minetest.register_node(":mymillwork:base_ic_"..mat, { - description = desc.." Baseboard IC", - drawtype = "nodebox", - tiles = {image}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - groups = group, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 0.4375, 0.5, -0.1875, 0.5}, - {-0.4375, -0.5, -0.5, -0.5, -0.1875, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 0.3375, 0.5, -0.0875, 0.5}, - {-0.3375, -0.5, -0.5, -0.5, -0.0875, 0.5}, - } - }, - sounds = default.node_sound_wood_defaults(), - on_place = minetest.rotate_node, -}) - -minetest.register_node(":mymillwork:base_oc_"..mat, { - description = desc.." Baseboard OC", - drawtype = "nodebox", - tiles = {image}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - groups = group, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 0.4375, -0.4375, -0.1875, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 0.3, -0.3, -0.1875, 0.5}, - } - }, - sounds = default.node_sound_wood_defaults(), - on_place = minetest.rotate_node, -}) - -minetest.register_node(":mymillwork:base_fancy_"..mat, { - description = desc.." Fancy Baseboard", - drawtype = "nodebox", - tiles = {image}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - groups = group, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 0.3125, 0.5, -0.1875, 0.5}, - {-0.5, -0.5, 0.4375, 0.5, 0.1875, 0.5}, - {-0.5, -0.5, 0.375, 0.5, -0.0625, 0.5}, - {-0.5, 0, 0.375, 0.5, 0.125, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 0.25, 0.5, 0.25, 0.5}, - } - }, - sounds = default.node_sound_wood_defaults(), - on_place = minetest.rotate_node, -}) - -minetest.register_node(":mymillwork:base_fancy_ic_"..mat, { - description = desc.." Fancy Baseboard IC", - drawtype = "nodebox", - tiles = {image}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - groups = group, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 0.3125, 0.5, -0.1875, 0.5}, - {-0.5, -0.5, 0.4375, 0.5, 0.1875, 0.5}, - {-0.5, -0.5, 0.375, 0.5, -0.0625, 0.5}, - {-0.5, 0, 0.375, 0.5, 0.125, 0.5}, - {-0.5, -0.5, -0.5, -0.4375, 0.1875, 0.5}, - {-0.5, -0.5, -0.5, -0.3125, -0.1875, 0.5}, - {-0.5, -0.5, -0.5, -0.375, -0.0625, 0.5}, - {-0.5, 0, -0.5, -0.375, 0.125, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 0.25, 0.5, 0.25, 0.5}, - {-0.5, -0.5, -0.5, -0.25, 0.25, 0.5}, - } - }, - sounds = default.node_sound_wood_defaults(), - on_place = minetest.rotate_node, -}) - -minetest.register_node(":mymillwork:base_fancy_oc_"..mat, { - description = desc.." Fancy Baseboard OC", - drawtype = "nodebox", - tiles = {image}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - groups = group, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 0.3125, -0.3125, -0.1875, 0.5}, - {-0.5, -0.5, 0.4375, -0.4375, 0.1875, 0.5}, - {-0.5, -0.5, 0.375, -0.375, -0.0625, 0.5}, - {-0.5, 0, 0.375, -0.375, 0.125, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 0.5, -0.25, 0.25, 0.25}, - } - }, - sounds = default.node_sound_wood_defaults(), - on_place = minetest.rotate_node, -}) - -table.insert(mymillwork.registered, {itm, mat}) - -end diff --git a/mymillwork/models/mymillwork_mach1.obj b/mymillwork/models/mymillwork_mach1.obj new file mode 100644 index 0000000..6b077a2 --- /dev/null +++ b/mymillwork/models/mymillwork_mach1.obj @@ -0,0 +1,399 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +g node0_Body +v -0.500000 -0.125000 0.375000 +v -0.500000 -0.062500 0.375000 +v 0.500000 -0.125000 0.375000 +v 0.500000 -0.062500 0.375000 +v -0.500000 -0.062500 0.437500 +v 0.500000 -0.062500 0.437500 +v -0.500000 0.000000 0.437500 +v 0.500000 0.000000 0.437500 +v 0.500000 0.000000 0.375000 +v -0.500000 0.000000 0.375000 +v 0.500000 0.125000 0.375000 +v -0.500000 0.125000 0.375000 +v -0.500000 0.125000 0.437500 +v 0.500000 0.125000 0.437500 +v 0.500000 0.250000 0.437500 +v -0.500000 0.250000 0.437500 +v 0.500000 0.250000 0.375000 +v -0.500000 0.250000 0.375000 +v 0.500000 0.437500 0.375000 +v -0.500000 0.437500 0.375000 +v -0.500000 0.437500 0.437500 +v 0.500000 0.437500 0.437500 +v -0.500000 0.500000 0.437500 +v 0.500000 0.500000 0.437500 +v -0.500000 0.500000 0.500000 +v 0.500000 0.500000 0.500000 +v -0.500000 -0.500000 0.500000 +v 0.500000 -0.500000 0.500000 +v 0.500000 -0.500000 -0.500000 +v -0.500000 -0.500000 -0.500000 +v -0.500000 -0.437500 -0.500000 +v 0.500000 -0.437500 -0.500000 +v -0.500000 -0.437500 -0.437500 +v 0.500000 -0.437500 -0.437500 +v -0.500000 -0.375000 -0.437500 +v 0.500000 -0.375000 -0.437500 +v -0.500000 -0.375000 -0.250000 +v 0.500000 -0.375000 -0.250000 +v -0.500000 -0.437500 -0.250000 +v 0.500000 -0.437500 -0.250000 +v -0.500000 -0.437500 -0.125000 +v 0.500000 -0.437500 -0.125000 +v -0.500000 -0.375000 -0.125000 +v 0.500000 -0.375000 -0.125000 +v -0.500000 -0.375000 -0.000000 +v 0.500000 -0.375000 0.000000 +v -0.500000 -0.437500 -0.000000 +v 0.500000 -0.437500 0.000000 +v -0.500000 -0.437500 0.062500 +v 0.500000 -0.437500 0.062500 +v -0.500000 -0.375000 0.062500 +v 0.500000 -0.375000 0.062500 +v -0.500000 -0.375000 0.125000 +v 0.500000 -0.375000 0.125000 +v 0.500000 -0.172197 0.339286 +v -0.500000 -0.172197 0.339286 +v -0.500000 -0.217358 0.301029 +v 0.500000 -0.217358 0.301029 +v -0.500000 -0.260345 0.260345 +v 0.500000 -0.260345 0.260345 +v -0.500000 -0.301029 0.217358 +v 0.500000 -0.301029 0.217358 +v -0.500000 -0.339286 0.172197 +v 0.500000 -0.339286 0.172197 +v -0.500000 -0.375000 -0.000000 +v -0.500000 -0.125000 0.375000 +v -0.500000 -0.062500 0.437500 +v -0.500000 -0.062500 0.375000 +v -0.500000 0.000000 0.437500 +v -0.500000 0.125000 0.375000 +v -0.500000 0.000000 0.375000 +v -0.500000 0.125000 0.437500 +v -0.500000 0.250000 0.437500 +v -0.500000 0.250000 0.375000 +v 0.500000 -0.437500 -0.250000 +v 0.500000 -0.375000 -0.437500 +v 0.500000 -0.437500 0.000000 +v 0.500000 -0.375000 -0.125000 +v 0.500000 -0.375000 0.000000 +v 0.500000 -0.437500 0.062500 +v 0.500000 -0.125000 0.375000 +v 0.500000 -0.062500 0.437500 +v 0.500000 -0.062500 0.375000 +v 0.500000 0.125000 0.375000 +v 0.500000 0.000000 0.437500 +v 0.500000 0.000000 0.375000 +v 0.500000 0.125000 0.437500 +vt 0.000000 0.375000 +vt 0.000000 0.437500 +vt 1.000000 0.375000 +vt 1.000000 0.437500 +vt 0.000000 0.125000 +vt 0.000000 0.062500 +vt 1.000000 0.125000 +vt 1.000000 0.062500 +vt 0.000000 0.437500 +vt 0.000000 0.500000 +vt 1.000000 0.437500 +vt 1.000000 0.500000 +vt 1.000000 0.062500 +vt 0.000000 0.062500 +vt 1.000000 0.125000 +vt 0.000000 0.125000 +vt 1.000000 0.500000 +vt 0.000000 0.500000 +vt 1.000000 0.625000 +vt 0.000000 0.625000 +vt 0.000000 0.125000 +vt 0.000000 0.062500 +vt 1.000000 0.125000 +vt 1.000000 0.062500 +vt 1.000000 0.625000 +vt 0.000000 0.625000 +vt 1.000000 0.750000 +vt 0.000000 0.750000 +vt 1.000000 0.062500 +vt 0.000000 0.062500 +vt 1.000000 0.125000 +vt 0.000000 0.125000 +vt 1.000000 0.750000 +vt 0.000000 0.750000 +vt 1.000000 0.937500 +vt 0.000000 0.937500 +vt 0.000000 0.125000 +vt 0.000000 0.062500 +vt 1.000000 0.125000 +vt 1.000000 0.062500 +vt 0.000000 0.937500 +vt 0.000000 1.000000 +vt 1.000000 0.937500 +vt 1.000000 1.000000 +vt 0.000000 0.062500 +vt 0.000000 0.000000 +vt 1.000000 0.062500 +vt 1.000000 0.000000 +vt 0.000000 1.000000 +vt 0.000000 0.000000 +vt 1.000000 1.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vt 0.000000 0.000000 +vt 0.000000 0.062500 +vt 1.000000 0.000000 +vt 1.000000 0.062500 +vt 0.000000 1.000000 +vt 0.000000 0.937500 +vt 1.000000 1.000000 +vt 1.000000 0.937500 +vt 0.000000 0.062500 +vt 0.000000 0.125000 +vt 1.000000 0.062500 +vt 1.000000 0.125000 +vt 0.000000 0.937500 +vt 0.000000 0.750000 +vt 1.000000 0.937500 +vt 1.000000 0.750000 +vt 0.000000 0.125000 +vt 0.000000 0.062500 +vt 1.000000 0.125000 +vt 1.000000 0.062500 +vt 0.000000 0.750000 +vt 0.000000 0.625000 +vt 1.000000 0.750000 +vt 1.000000 0.625000 +vt 0.000000 0.062500 +vt 0.000000 0.125000 +vt 1.000000 0.062500 +vt 1.000000 0.125000 +vt 0.000000 0.625000 +vt 0.000000 0.500000 +vt 1.000000 0.625000 +vt 1.000000 0.500000 +vt 0.000000 0.125000 +vt 0.000000 0.062500 +vt 1.000000 0.125000 +vt 1.000000 0.062500 +vt 0.000000 0.500000 +vt 0.000000 0.437500 +vt 1.000000 0.500000 +vt 1.000000 0.437500 +vt 0.000000 0.062500 +vt 0.000000 0.125000 +vt 1.000000 0.062500 +vt 1.000000 0.125000 +vt 0.000000 0.437500 +vt 0.000000 0.375000 +vt 1.000000 0.437500 +vt 1.000000 0.375000 +vt 1.000000 0.327803 +vt 0.000000 0.327803 +vt 0.000000 0.282642 +vt 1.000000 0.282642 +vt 0.000000 0.239655 +vt 1.000000 0.239655 +vt 0.000000 0.282642 +vt 1.000000 0.282642 +vt 0.000000 0.327803 +vt 1.000000 0.327803 +vt 1.000000 0.000000 +vt 0.937500 0.062500 +vt 1.000000 0.062500 +vt 0.750000 0.062500 +vt 0.750000 0.125000 +vt 0.937500 0.125000 +vt 0.625000 0.062500 +vt 0.500000 0.062500 +vt 0.500000 0.125000 +vt 0.625000 0.125000 +vt 0.437500 0.062500 +vt 0.375000 0.125000 +vt 0.437500 0.125000 +vt 0.282642 0.198971 +vt 0.239655 0.239655 +vt 0.327803 0.160714 +vt 0.198971 0.282642 +vt 0.160714 0.327803 +vt 0.125000 0.375000 +vt 0.062500 0.437500 +vt 0.125000 0.437500 +vt 0.062500 0.500000 +vt 0.125000 0.625000 +vt 0.125000 0.500000 +vt 0.062500 0.625000 +vt 0.062500 0.750000 +vt 0.125000 0.937500 +vt 0.125000 0.750000 +vt 0.062500 0.937500 +vt 0.062500 1.000000 +vt 0.937500 0.062500 +vt 0.750000 0.062500 +vt 0.750000 0.125000 +vt 0.937500 0.125000 +vt 0.625000 0.062500 +vt 0.500000 0.062500 +vt 0.625000 0.125000 +vt 0.500000 0.125000 +vt 0.375000 0.125000 +vt 0.437500 0.062500 +vt 0.437500 0.125000 +vt 0.000000 0.000000 +vt 0.282642 0.198971 +vt 0.239655 0.239655 +vt 0.327803 0.160714 +vt 0.198971 0.282642 +vt 0.160714 0.327803 +vt 0.125000 0.375000 +vt 0.062500 0.437500 +vt 0.125000 0.437500 +vt 0.125000 0.625000 +vt 0.062500 0.500000 +vt 0.125000 0.500000 +vt 0.062500 0.625000 +vt 0.125000 0.937500 +vt 0.062500 0.750000 +vt 0.125000 0.750000 +vt 0.062500 0.937500 +vt 0.000000 1.000000 +vt 0.062500 1.000000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 1.0000 0.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn 0.0000 0.6034 -0.7974 +vn 0.0000 0.6464 -0.7630 +vn 0.0000 0.6874 -0.7263 +vn 0.0000 0.7263 -0.6874 +vn 0.0000 0.7630 -0.6464 +vn 0.0000 0.7974 -0.6034 +vn -1.0000 0.0000 0.0000 +vn 1.0000 0.0000 0.0000 +s off +f 1/1/1 2/2/1 3/3/1 +f 3/3/1 2/2/1 4/4/1 +f 2/5/2 5/6/2 4/7/2 +f 4/7/2 5/6/2 6/8/2 +f 5/9/1 7/10/1 6/11/1 +f 6/11/1 7/10/1 8/12/1 +f 8/13/3 7/14/3 9/15/3 +f 7/14/3 10/16/3 9/15/3 +f 9/17/1 10/18/1 11/19/1 +f 10/18/1 12/20/1 11/19/1 +f 12/21/2 13/22/2 11/23/2 +f 11/23/2 13/22/2 14/24/2 +f 14/25/1 13/26/1 15/27/1 +f 13/26/1 16/28/1 15/27/1 +f 15/29/3 16/30/3 17/31/3 +f 16/30/3 18/32/3 17/31/3 +f 17/33/1 18/34/1 19/35/1 +f 18/34/1 20/36/1 19/35/1 +f 20/37/2 21/38/2 19/39/2 +f 19/39/2 21/38/2 22/40/2 +f 21/41/1 23/42/1 22/43/1 +f 22/43/1 23/42/1 24/44/1 +f 23/45/2 25/46/2 24/47/2 +f 24/47/2 25/46/2 26/48/2 +f 25/49/4 27/50/4 26/51/4 +f 26/51/4 27/50/4 28/52/4 +f 28/52/3 27/50/3 29/53/3 +f 27/50/3 30/54/3 29/53/3 +f 30/55/1 31/56/1 29/57/1 +f 29/57/1 31/56/1 32/58/1 +f 31/59/2 33/60/2 32/61/2 +f 32/61/2 33/60/2 34/62/2 +f 33/63/1 35/64/1 34/65/1 +f 34/65/1 35/64/1 36/66/1 +f 35/67/2 37/68/2 36/69/2 +f 36/69/2 37/68/2 38/70/2 +f 37/71/4 39/72/4 38/73/4 +f 38/73/4 39/72/4 40/74/4 +f 39/75/2 41/76/2 40/77/2 +f 40/77/2 41/76/2 42/78/2 +f 41/79/1 43/80/1 42/81/1 +f 42/81/1 43/80/1 44/82/1 +f 43/83/2 45/84/2 44/85/2 +f 44/85/2 45/84/2 46/86/2 +f 45/87/4 47/88/4 46/89/4 +f 46/89/4 47/88/4 48/90/4 +f 47/91/2 49/92/2 48/93/2 +f 48/93/2 49/92/2 50/94/2 +f 49/95/1 51/96/1 50/97/1 +f 50/97/1 51/96/1 52/98/1 +f 51/99/2 53/100/2 52/101/2 +f 52/101/2 53/100/2 54/102/2 +f 1/1/5 3/3/5 55/103/5 +f 56/104/5 1/1/5 55/103/5 +f 57/105/6 55/103/6 58/106/6 +f 57/105/6 56/104/6 55/103/6 +f 59/107/7 58/106/7 60/108/7 +f 59/107/7 57/105/7 58/106/7 +f 61/109/8 60/108/8 62/110/8 +f 61/109/8 59/107/8 60/108/8 +f 63/111/9 62/110/9 64/112/9 +f 63/111/9 61/109/9 62/110/9 +f 53/100/10 64/112/10 54/102/10 +f 53/100/10 63/111/10 64/112/10 +f 30/113/11 33/114/11 31/115/11 +f 30/113/11 39/116/11 33/114/11 +f 33/114/11 37/117/11 35/118/11 +f 39/116/11 37/117/11 33/114/11 +f 30/113/11 41/119/11 39/116/11 +f 30/113/11 47/120/11 41/119/11 +f 41/119/11 65/121/11 43/122/11 +f 47/120/11 65/121/11 41/119/11 +f 49/123/11 53/124/11 51/125/11 +f 61/126/11 27/50/11 59/127/11 +f 63/128/11 27/50/11 61/126/11 +f 53/124/11 27/50/11 63/128/11 +f 49/123/11 27/50/11 53/124/11 +f 27/50/11 57/129/11 59/127/11 +f 27/50/11 56/130/11 57/129/11 +f 27/50/11 66/131/11 56/130/11 +f 66/131/11 67/132/11 68/133/11 +f 27/50/11 67/132/11 66/131/11 +f 69/134/11 70/135/11 71/136/11 +f 69/134/11 72/137/11 70/135/11 +f 73/138/11 20/139/11 74/140/11 +f 73/138/11 21/141/11 20/139/11 +f 21/141/11 25/49/11 23/142/11 +f 73/138/11 25/49/11 21/141/11 +f 27/50/11 25/49/11 72/137/11 +f 27/50/11 72/137/11 69/134/11 +f 27/50/11 69/134/11 67/132/11 +f 72/137/11 25/49/11 73/138/11 +f 30/113/11 27/50/11 49/123/11 +f 30/113/11 49/123/11 47/120/11 +f 34/143/12 29/57/12 32/58/12 +f 75/144/12 29/57/12 34/143/12 +f 38/145/12 34/143/12 76/146/12 +f 38/145/12 75/144/12 34/143/12 +f 42/147/12 29/57/12 75/144/12 +f 77/148/12 42/147/12 78/149/12 +f 77/148/12 29/57/12 42/147/12 +f 79/150/12 77/148/12 78/149/12 +f 54/151/12 80/152/12 52/153/12 +f 28/154/12 62/155/12 60/156/12 +f 28/154/12 64/157/12 62/155/12 +f 28/154/12 54/151/12 64/157/12 +f 28/154/12 80/152/12 54/151/12 +f 58/158/12 28/154/12 60/156/12 +f 55/159/12 28/154/12 58/158/12 +f 81/160/12 28/154/12 55/159/12 +f 82/161/12 81/160/12 83/162/12 +f 82/161/12 28/154/12 81/160/12 +f 84/163/12 85/164/12 86/165/12 +f 87/166/12 85/164/12 84/163/12 +f 19/167/12 15/168/12 17/169/12 +f 22/170/12 15/168/12 19/167/12 +f 26/171/12 22/170/12 24/172/12 +f 26/171/12 15/168/12 22/170/12 +f 26/171/12 28/154/12 87/166/12 +f 87/166/12 28/154/12 85/164/12 +f 85/164/12 28/154/12 82/161/12 +f 26/171/12 87/166/12 15/168/12 +f 28/154/12 29/57/12 80/152/12 +f 80/152/12 29/57/12 77/148/12 diff --git a/mymillwork/models/mymillwork_mach10.obj b/mymillwork/models/mymillwork_mach10.obj new file mode 100644 index 0000000..ce175d5 --- /dev/null +++ b/mymillwork/models/mymillwork_mach10.obj @@ -0,0 +1,85 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +g node0_Body +v 0.400544 -0.500000 -0.000000 +v 0.216773 -0.500000 0.076120 +v 0.400544 0.500000 -0.000000 +v 0.216773 0.500000 0.076120 +v 0.500000 0.500000 0.000000 +v 0.500000 -0.500000 0.000000 +v 0.076120 -0.500000 0.216773 +v 0.076120 0.500000 0.216773 +v 0.000000 -0.500000 0.400544 +v 0.500000 -0.500000 0.500000 +v 0.000000 -0.500000 0.500000 +v 0.500000 0.500000 0.500000 +v 0.000000 0.500000 0.400544 +v 0.000000 0.500000 0.500000 +vt 0.900544 0.000000 +vt 0.716773 0.000000 +vt 0.900544 1.000000 +vt 0.716773 1.000000 +vt 1.000000 1.000000 +vt 1.000000 0.000000 +vt 0.576120 0.000000 +vt 0.576120 1.000000 +vt 0.500000 0.099456 +vt 1.000000 0.000000 +vt 0.500000 0.000000 +vt 0.576120 0.283227 +vt 0.716773 0.423880 +vt 0.900544 0.500000 +vt 1.000000 0.500000 +vt 1.000000 0.000000 +vt 0.500000 0.099456 +vt 0.500000 0.000000 +vt 0.576120 0.283227 +vt 0.716773 0.423880 +vt 0.900544 0.500000 +vt 1.000000 0.500000 +vt 0.500000 1.000000 +vt 0.000000 1.000000 +vt 0.000000 0.000000 +vt 0.500000 0.000000 +vt 0.283227 1.000000 +vt 0.283227 0.000000 +vt 0.099456 1.000000 +vt 0.099456 0.000000 +vt 1.000000 1.000000 +vt 0.500000 1.000000 +vt 0.000000 0.000000 +vt 0.000000 1.000000 +vn -0.3827 0.0000 -0.9239 +vn 0.0000 0.0000 -1.0000 +vn -0.7071 0.0000 -0.7071 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn -0.9239 0.0000 -0.3827 +vn 0.0000 0.0000 1.0000 +vn -1.0000 0.0000 0.0000 +s off +f 1/1/1 2/2/1 3/3/1 +f 3/3/1 2/2/1 4/4/1 +f 5/5/2 1/1/2 3/3/2 +f 6/6/2 1/1/2 5/5/2 +f 2/2/3 7/7/3 4/4/3 +f 4/4/3 7/7/3 8/8/3 +f 9/9/4 10/10/4 11/11/4 +f 7/12/4 10/10/4 9/9/4 +f 7/12/4 2/13/4 10/10/4 +f 2/13/4 1/14/4 10/10/4 +f 1/14/4 6/15/4 10/10/4 +f 12/16/5 13/17/5 14/18/5 +f 12/16/5 8/19/5 13/17/5 +f 4/20/5 8/19/5 12/16/5 +f 3/21/5 4/20/5 12/16/5 +f 5/22/5 3/21/5 12/16/5 +f 5/23/6 12/24/6 10/25/6 +f 5/23/6 10/25/6 6/26/6 +f 8/27/7 7/28/7 13/29/7 +f 7/28/7 9/30/7 13/29/7 +f 12/31/8 14/32/8 11/11/8 +f 12/31/8 11/11/8 10/10/8 +f 13/29/9 11/33/9 14/34/9 +f 9/30/9 11/33/9 13/29/9 diff --git a/mymillwork/models/mymillwork_mach11.obj b/mymillwork/models/mymillwork_mach11.obj new file mode 100644 index 0000000..cd0392a --- /dev/null +++ b/mymillwork/models/mymillwork_mach11.obj @@ -0,0 +1,105 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +g node0_Body +v 0.000000 -0.500000 0.000000 +v 0.500000 -0.500000 0.500000 +v 0.000000 -0.500000 0.500000 +v 0.500000 -0.500000 0.000000 +v 0.000000 -0.187500 0.500000 +v 0.000000 -0.187500 0.400544 +v 0.000000 -0.187500 0.000000 +v 0.500000 0.500000 0.500000 +v 0.000000 0.500000 0.500000 +v 0.500000 -0.187500 0.000000 +v 0.500000 0.500000 0.000000 +v 0.400544 -0.187500 0.000000 +v 0.076120 -0.187500 0.216773 +v 0.216773 -0.187500 0.076120 +v 0.000000 0.500000 0.400544 +v 0.076120 0.500000 0.216773 +v 0.216773 0.500000 0.076120 +v 0.400544 0.500000 0.000000 +vt 0.500000 0.500000 +vt 1.000000 0.000000 +vt 0.500000 0.000000 +vt 1.000000 0.500000 +vt 0.000000 0.000000 +vt 0.000000 0.312500 +vt 0.099456 0.312500 +vt 0.500000 0.000000 +vt 0.500000 0.312500 +vt 0.500000 0.312500 +vt 1.000000 1.000000 +vt 0.500000 1.000000 +vt 0.500000 0.312500 +vt 0.000000 0.000000 +vt 0.500000 0.000000 +vt 0.000000 1.000000 +vt 0.500000 1.000000 +vt 0.900544 0.312500 +vt 1.000000 0.000000 +vt 1.000000 0.312500 +vt 0.576120 0.283227 +vt 0.500000 0.500000 +vt 0.500000 0.099456 +vt 0.716773 0.423880 +vt 0.900544 0.500000 +vt 0.099456 1.000000 +vt 0.000000 1.000000 +vt 1.000000 0.000000 +vt 0.500000 0.099456 +vt 0.500000 0.000000 +vt 0.576120 0.283227 +vt 0.716773 0.423880 +vt 0.900544 0.500000 +vt 1.000000 0.500000 +vt 1.000000 1.000000 +vt 0.900544 1.000000 +vt 0.283227 0.312500 +vt 0.283227 1.000000 +vt 0.716773 1.000000 +vt 0.716773 0.312500 +vt 0.576120 1.000000 +vt 0.576120 0.312500 +vn 0.0000 -1.0000 0.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 1.0000 0.0000 +vn -0.9239 0.0000 -0.3827 +vn -0.7071 0.0000 -0.7071 +vn -0.3827 0.0000 -0.9239 +s off +f 1/1/1 2/2/1 3/3/1 +f 1/1/1 4/4/1 2/2/1 +f 3/5/2 5/6/2 6/7/2 +f 1/8/2 6/7/2 7/9/2 +f 1/8/2 3/5/2 6/7/2 +f 2/2/3 5/10/3 3/3/3 +f 8/11/3 9/12/3 5/10/3 +f 8/11/3 5/10/3 2/2/3 +f 10/13/4 2/14/4 4/15/4 +f 8/16/4 2/14/4 10/13/4 +f 11/17/4 8/16/4 10/13/4 +f 12/18/5 1/8/5 7/9/5 +f 4/19/5 12/18/5 10/20/5 +f 4/19/5 1/8/5 12/18/5 +f 13/21/6 7/22/6 6/23/6 +f 14/24/6 7/22/6 13/21/6 +f 12/25/6 7/22/6 14/24/6 +f 15/26/2 6/7/2 9/27/2 +f 6/7/2 5/6/2 9/27/2 +f 8/28/6 15/29/6 9/30/6 +f 8/28/6 16/31/6 15/29/6 +f 17/32/6 16/31/6 8/28/6 +f 18/33/6 17/32/6 8/28/6 +f 11/34/6 18/33/6 8/28/6 +f 11/35/5 12/18/5 18/36/5 +f 10/20/5 12/18/5 11/35/5 +f 13/37/7 6/7/7 16/38/7 +f 16/38/7 6/7/7 15/26/7 +f 17/39/8 14/40/8 16/41/8 +f 14/40/8 13/42/8 16/41/8 +f 18/36/9 12/18/9 17/39/9 +f 12/18/9 14/40/9 17/39/9 diff --git a/mymillwork/models/mymillwork_mach12.obj b/mymillwork/models/mymillwork_mach12.obj new file mode 100644 index 0000000..7f879a9 --- /dev/null +++ b/mymillwork/models/mymillwork_mach12.obj @@ -0,0 +1,172 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +g node0_Body +v 0.500000 -0.187500 0.000000 +v 0.500000 -0.500000 0.500000 +v 0.500000 -0.500000 0.000000 +v 0.500000 0.500000 0.500000 +v 0.500000 0.500000 0.000000 +v 0.000000 -0.187500 0.500000 +v 0.000000 -0.500000 0.500000 +v 0.000000 0.500000 0.500000 +v 0.000000 0.500000 0.400544 +v 0.076120 0.500000 0.216773 +v 0.216773 0.500000 0.076120 +v 0.400544 0.500000 0.000000 +v 0.000000 -0.500000 0.437500 +v 0.437500 -0.500000 0.000000 +v 0.000000 -0.500000 0.000000 +v 0.437500 -0.187500 -0.000000 +v 0.400544 -0.187500 0.000000 +v 0.500000 -0.187500 -0.500000 +v 0.500000 -0.500000 -0.500000 +v 0.000000 -0.187500 0.437500 +v 0.000000 -0.187500 0.400544 +v -0.500000 -0.187500 0.500000 +v -0.500000 -0.500000 0.500000 +v 0.076120 -0.187500 0.216773 +v 0.216773 -0.187500 0.076120 +v -0.500000 -0.500000 0.437500 +v 0.000000 -0.187500 0.000000 +v 0.437500 -0.500000 -0.500000 +v 0.437500 -0.187500 -0.500000 +v -0.500000 -0.187500 0.437500 +vt 0.500000 0.312500 +vt 0.000000 0.000000 +vt 0.500000 0.000000 +vt 0.000000 1.000000 +vt 0.500000 1.000000 +vt 1.000000 0.000000 +vt 0.500000 0.312500 +vt 0.500000 0.000000 +vt 1.000000 1.000000 +vt 0.500000 1.000000 +vt 1.000000 0.000000 +vt 0.500000 0.099456 +vt 0.500000 0.000000 +vt 0.576120 0.283227 +vt 0.716773 0.423880 +vt 0.900544 0.500000 +vt 1.000000 0.500000 +vt 0.500000 0.062500 +vt 0.937500 0.500000 +vt 1.000000 0.500000 +vt 0.500000 0.500000 +vt 1.000000 1.000000 +vt 0.937500 0.312500 +vt 0.900544 1.000000 +vt 1.000000 0.312500 +vt 0.900544 0.312500 +vt 1.000000 0.312500 +vt 1.000000 0.000000 +vt 0.099456 1.000000 +vt 0.062500 0.312500 +vt 0.000000 1.000000 +vt 0.099456 0.312500 +vt 0.000000 0.312500 +vt 0.000000 0.312500 +vt 0.000000 0.000000 +vt 0.283227 0.312500 +vt 0.283227 1.000000 +vt 0.716773 1.000000 +vt 0.716773 0.312500 +vt 0.576120 1.000000 +vt 0.576120 0.312500 +vt 0.000000 0.062500 +vt 0.062500 0.000000 +vt 0.500000 0.000000 +vt 0.500000 0.312500 +vt 0.937500 0.000000 +vt 1.000000 1.000000 +vt 0.937500 1.000000 +vt 0.937500 1.000000 +vt 0.937500 0.500000 +vt 1.000000 1.000000 +vt 1.000000 0.500000 +vt 0.937500 0.000000 +vt 0.937500 0.312500 +vt 0.500000 0.000000 +vt 0.500000 0.062500 +vt 0.000000 0.062500 +vt 0.000000 0.000000 +vt 0.062500 0.000000 +vt 0.062500 0.312500 +vt 0.576120 0.283227 +vt 0.500000 0.500000 +vt 0.500000 0.099456 +vt 0.716773 0.423880 +vt 0.900544 0.500000 +vt 0.500000 0.312500 +vt 0.500000 0.000000 +vt 0.000000 0.000000 +vt 0.000000 0.312500 +vt 0.500000 0.000000 +vt 0.500000 0.312500 +vt 1.000000 0.000000 +vt 1.000000 0.312500 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn 0.0000 1.0000 0.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn -1.0000 0.0000 0.0000 +vn -0.9239 0.0000 -0.3827 +vn -0.7071 0.0000 -0.7071 +vn -0.3827 0.0000 -0.9239 +s off +f 1/1/1 2/2/1 3/3/1 +f 4/4/1 2/2/1 1/1/1 +f 5/5/1 4/4/1 1/1/1 +f 2/6/2 6/7/2 7/8/2 +f 4/9/2 8/10/2 6/7/2 +f 4/9/2 6/7/2 2/6/2 +f 4/11/3 9/12/3 8/13/3 +f 4/11/3 10/14/3 9/12/3 +f 11/15/3 10/14/3 4/11/3 +f 12/16/3 11/15/3 4/11/3 +f 5/17/3 12/16/3 4/11/3 +f 13/18/4 2/6/4 7/8/4 +f 14/19/4 3/20/4 2/6/4 +f 14/19/4 2/6/4 13/18/4 +f 15/21/4 14/19/4 13/18/4 +f 5/22/5 16/23/5 12/24/5 +f 1/25/5 16/23/5 5/22/5 +f 16/23/5 17/26/5 12/24/5 +f 1/1/1 3/3/1 18/27/1 +f 18/27/1 3/3/1 19/28/1 +f 9/29/6 20/30/6 8/31/6 +f 21/32/6 20/30/6 9/29/6 +f 20/30/6 6/33/6 8/31/6 +f 7/8/2 6/7/2 22/34/2 +f 7/8/2 22/34/2 23/35/2 +f 24/36/7 21/32/7 10/37/7 +f 10/37/7 21/32/7 9/29/7 +f 11/38/8 25/39/8 10/40/8 +f 25/39/8 24/41/8 10/40/8 +f 12/24/9 17/26/9 11/38/9 +f 17/26/9 25/39/9 11/38/9 +f 13/18/4 7/8/4 23/35/4 +f 13/18/4 23/35/4 26/42/4 +f 13/43/6 20/30/6 21/32/6 +f 15/44/6 21/32/6 27/45/6 +f 15/44/6 13/43/6 21/32/6 +f 17/26/5 15/44/5 27/45/5 +f 14/46/5 17/26/5 16/23/5 +f 14/46/5 15/44/5 17/26/5 +f 3/20/4 14/19/4 19/47/4 +f 19/47/4 14/19/4 28/48/4 +f 29/49/3 16/50/3 18/51/3 +f 16/50/3 1/52/3 18/51/3 +f 18/27/5 19/28/5 28/53/5 +f 18/27/5 28/53/5 29/54/5 +f 6/55/3 20/56/3 30/57/3 +f 6/55/3 30/57/3 22/58/3 +f 23/35/6 22/34/6 26/59/6 +f 26/59/6 22/34/6 30/60/6 +f 24/61/3 27/62/3 21/63/3 +f 25/64/3 27/62/3 24/61/3 +f 17/65/3 27/62/3 25/64/3 +f 20/66/5 13/67/5 26/68/5 +f 20/66/5 26/68/5 30/69/5 +f 14/70/6 16/71/6 28/72/6 +f 28/72/6 16/71/6 29/73/6 diff --git a/mymillwork/models/mymillwork_mach13.obj b/mymillwork/models/mymillwork_mach13.obj new file mode 100644 index 0000000..2397d88 --- /dev/null +++ b/mymillwork/models/mymillwork_mach13.obj @@ -0,0 +1,443 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +g node0_Body001 +v -0.500000 -0.500000 0.500000 +v -0.500000 -0.187500 0.375000 +v -0.500000 -0.500000 0.312500 +v -0.500000 -0.187500 0.312500 +v -0.500000 -0.062500 0.437500 +v -0.500000 -0.062500 0.375000 +v -0.500000 -0.000000 0.437500 +v -0.500000 0.125000 0.375000 +v -0.500000 -0.000000 0.375000 +v -0.500000 0.125000 0.437500 +v -0.500000 0.187500 0.500000 +v -0.500000 0.187500 0.437500 +v -0.000000 -0.500000 0.500000 +v -0.500000 -0.500000 0.500000 +v -0.000000 -0.500000 0.400544 +v -0.500000 -0.500000 0.312500 +v 0.036469 -0.500000 0.312500 +v 0.036469 -0.500000 0.312500 +v -0.500000 -0.187500 0.312500 +v 0.036469 -0.187500 0.312500 +v 0.010581 -0.187500 0.375000 +v -0.500000 -0.187500 0.375000 +v -0.500000 -0.062500 0.375000 +v 0.010581 -0.062500 0.375000 +v -0.000000 -0.062500 0.400544 +v -0.500000 -0.062500 0.437500 +v -0.000000 -0.062500 0.437500 +v -0.500000 -0.000000 0.437500 +v -0.000000 0.000000 0.437500 +v -0.000000 0.000000 0.400544 +v -0.500000 -0.000000 0.375000 +v 0.010581 0.000000 0.375000 +v -0.500000 0.125000 0.375000 +v 0.010581 0.125000 0.375000 +v -0.000000 0.125000 0.400544 +v -0.500000 0.125000 0.437500 +v -0.000000 0.125000 0.437500 +v -0.500000 0.187500 0.437500 +v -0.000000 0.187500 0.437500 +v -0.500000 0.187500 0.500000 +v -0.000000 0.187500 0.500000 +v -0.500000 0.187500 0.500000 +v -0.000000 0.187500 0.500000 +v 0.312500 -0.500000 0.500000 +v 0.312500 -0.500000 0.312500 +v 0.076120 0.500000 0.216773 +v -0.000000 0.500000 0.400544 +v 0.076120 -0.500000 0.216773 +v -0.000000 0.500000 0.400544 +v -0.000000 0.187500 0.437500 +v -0.000000 0.500000 0.500000 +v -0.000000 0.125000 0.400544 +v -0.000000 0.125000 0.437500 +v 0.500000 0.500000 0.500000 +v 0.500000 -0.500000 0.500000 +v 0.216773 -0.500000 0.076120 +v 0.312500 -0.500000 0.036469 +v 0.500000 -0.500000 0.312500 +v 0.076120 0.500000 0.216773 +v 0.216773 0.500000 0.076120 +v 0.400544 0.500000 -0.000000 +v 0.500000 0.500000 -0.000000 +v 0.216773 0.500000 0.076120 +v 0.500000 -0.500000 0.000000 +v 0.500000 0.187500 -0.000000 +v 0.400544 0.500000 -0.000000 +v 0.375000 0.125000 0.010581 +v 0.400544 0.125000 -0.000000 +v 0.400544 0.000000 -0.000000 +v 0.375000 -0.062500 0.010581 +v 0.375000 0.000000 0.010581 +v 0.400544 -0.062500 -0.000000 +v 0.375000 -0.187500 0.010581 +v 0.312500 -0.187500 0.036469 +v 0.312500 -0.500000 0.036469 +v 0.400544 -0.500000 0.000000 +v 0.437500 0.187500 -0.000000 +v 0.437500 0.125000 -0.000000 +v 0.400544 0.125000 -0.000000 +v 0.500000 -0.500000 -0.500000 +v 0.500000 0.187500 -0.500000 +v 0.437500 -0.062500 -0.500000 +v 0.375000 -0.062500 -0.500000 +v 0.437500 -0.062500 -0.000000 +v 0.375000 -0.187500 -0.500000 +v 0.312500 -0.187500 -0.500000 +v 0.312500 -0.500000 -0.500000 +v 0.437500 0.125000 -0.500000 +v 0.375000 0.125000 -0.500000 +v 0.437500 0.125000 -0.000000 +v 0.375000 0.000000 -0.500000 +v 0.437500 0.000000 -0.500000 +v 0.437500 0.000000 -0.000000 +v 0.500000 0.187500 -0.000000 +v 0.500000 0.187500 -0.500000 +v 0.437500 0.187500 -0.500000 +v 0.437500 0.187500 -0.000000 +v 0.500000 0.187500 -0.500000 +v 0.437500 0.125000 -0.500000 +v 0.437500 0.187500 -0.500000 +v 0.437500 0.000000 -0.500000 +v 0.375000 0.125000 -0.500000 +v 0.375000 0.000000 -0.500000 +v 0.437500 -0.062500 -0.500000 +v 0.375000 -0.187500 -0.500000 +v 0.375000 -0.062500 -0.500000 +v 0.500000 -0.500000 -0.500000 +v 0.312500 -0.500000 -0.500000 +v 0.312500 -0.187500 -0.500000 +vt 0.000000 0.000000 +vt 0.125000 0.312500 +vt 0.187500 0.000000 +vt 0.187500 0.312500 +vt 0.062500 0.437500 +vt 0.125000 0.437500 +vt 0.062500 0.500000 +vt 0.125000 0.625000 +vt 0.125000 0.500000 +vt 0.062500 0.625000 +vt 0.000000 0.687500 +vt 0.062500 0.687500 +vt 0.500000 0.000000 +vt 0.000000 0.000000 +vt 0.500000 0.099456 +vt 0.000000 0.187500 +vt 0.536469 0.187500 +vt 0.536469 0.000000 +vt 0.000000 0.312500 +vt 0.536469 0.312500 +vt 0.000000 0.000000 +vt 0.536469 0.187500 +vt 0.000000 0.187500 +vt 0.510581 0.125000 +vt 0.000000 0.125000 +vt 0.510581 0.312500 +vt 0.000000 0.437500 +vt 0.510581 0.437500 +vt 0.000000 0.312500 +vt 0.510581 0.125000 +vt 0.000000 0.125000 +vt 0.500000 0.099456 +vt 0.000000 0.062500 +vt 0.500000 0.062500 +vt 0.500000 0.437500 +vt 0.000000 0.500000 +vt 0.500000 0.500000 +vt 0.000000 0.437500 +vt 0.500000 0.062500 +vt 0.000000 0.062500 +vt 0.500000 0.099456 +vt 0.000000 0.125000 +vt 0.510581 0.125000 +vt 0.510581 0.500000 +vt 0.000000 0.625000 +vt 0.510581 0.625000 +vt 0.000000 0.500000 +vt 0.510581 0.125000 +vt 0.000000 0.125000 +vt 0.500000 0.099456 +vt 0.000000 0.062500 +vt 0.500000 0.062500 +vt 0.500000 0.625000 +vt 0.000000 0.687500 +vt 0.500000 0.687500 +vt 0.000000 0.625000 +vt 0.500000 0.062500 +vt 0.000000 0.000000 +vt 0.500000 0.000000 +vt 0.000000 0.062500 +vt 0.000000 0.687500 +vt 0.500000 0.687500 +vt 0.812500 0.000000 +vt 0.812500 0.187500 +vt 0.283227 1.000000 +vt 0.125000 0.625000 +vt 0.099456 1.000000 +vt 0.099456 0.625000 +vt 0.125000 0.500000 +vt 0.125000 0.437500 +vt 0.099456 0.500000 +vt 0.099456 0.437500 +vt 0.187500 0.312500 +vt 0.125000 0.312500 +vt 0.283227 0.000000 +vt 0.187500 0.000000 +vt 0.062500 0.437500 +vt 0.062500 0.500000 +vt 0.099456 1.000000 +vt 0.062500 0.687500 +vt 0.000000 1.000000 +vt 0.099456 0.625000 +vt 0.000000 0.687500 +vt 0.062500 0.625000 +vt 1.000000 1.000000 +vt 1.000000 0.000000 +vt 0.500000 1.000000 +vt 0.576120 0.283227 +vt 0.536469 0.187500 +vt 0.716773 0.423880 +vt 0.812500 0.463531 +vt 1.000000 0.187500 +vt 1.000000 0.000000 +vt 0.500000 0.099456 +vt 0.500000 0.000000 +vt 0.576120 0.283227 +vt 0.716773 0.423880 +vt 0.900544 0.500000 +vt 1.000000 0.500000 +vt 0.716773 1.000000 +vt 0.716773 0.000000 +vt 0.576120 1.000000 +vt 0.576120 0.000000 +vt 0.500000 0.000000 +vt 0.500000 0.687500 +vt 0.187500 0.000000 +vt 0.000000 0.000000 +vt 0.500000 1.000000 +vt 0.000000 1.000000 +vt 0.900544 1.000000 +vt 0.875000 0.625000 +vt 0.900544 0.625000 +vt 0.900544 0.500000 +vt 0.875000 0.437500 +vt 0.875000 0.500000 +vt 0.900544 0.437500 +vt 0.875000 0.312500 +vt 0.812500 0.312500 +vt 0.812500 0.000000 +vt 0.812500 0.463531 +vt 0.900544 0.500000 +vt 1.000000 0.500000 +vt 1.000000 1.000000 +vt 0.937500 0.687500 +vt 0.900544 1.000000 +vt 1.000000 0.687500 +vt 0.937500 0.625000 +vt 0.900544 0.625000 +vt 1.000000 0.000000 +vt 1.000000 0.687500 +vt 0.900544 0.500000 +vt 0.937500 1.000000 +vt 0.875000 1.000000 +vt 0.937500 0.500000 +vt 0.875000 0.489419 +vt 0.489419 0.437500 +vt 1.000000 0.437500 +vt 1.000000 0.312500 +vt 0.489419 0.312500 +vt 0.875000 0.489419 +vt 0.875000 1.000000 +vt 0.812500 1.000000 +vt 0.812500 0.463531 +vt 0.463531 0.312500 +vt 1.000000 0.312500 +vt 1.000000 0.000000 +vt 0.463531 0.000000 +vt 0.900544 0.500000 +vt 0.937500 1.000000 +vt 0.875000 1.000000 +vt 0.937500 0.500000 +vt 0.875000 0.489419 +vt 0.489419 0.625000 +vt 1.000000 0.625000 +vt 1.000000 0.500000 +vt 0.489419 0.500000 +vt 0.875000 1.000000 +vt 0.937500 1.000000 +vt 0.875000 0.489419 +vt 0.937500 0.500000 +vt 0.937500 0.437500 +vt 0.812500 1.000000 +vt 1.000000 1.000000 +vt 1.000000 0.500000 +vt 1.000000 1.000000 +vt 0.937500 1.000000 +vt 0.937500 0.500000 +vt 0.500000 0.687500 +vt 1.000000 0.687500 +vt 1.000000 0.625000 +vt 0.500000 0.625000 +vt 1.000000 0.687500 +vt 0.937500 0.625000 +vt 0.937500 0.687500 +vt 0.937500 0.500000 +vt 0.875000 0.625000 +vt 0.875000 0.500000 +vt 0.937500 0.437500 +vt 0.875000 0.312500 +vt 0.875000 0.437500 +vt 1.000000 0.000000 +vt 0.812500 0.000000 +vt 0.812500 0.312500 +vt 0.500000 0.500000 +vt 1.000000 0.500000 +vt 1.000000 0.437500 +vt 0.500000 0.437500 +vn -1.0000 0.0000 0.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 1.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn -0.9239 -0.0000 -0.3827 +vn -0.7071 0.0000 -0.7071 +vn 1.0000 0.0000 0.0000 +vn -0.3827 -0.0000 -0.9239 +s off +f 1/1/1 2/2/1 3/3/1 +f 3/3/1 2/2/1 4/4/1 +f 2/2/1 5/5/1 6/6/1 +f 1/1/1 5/5/1 2/2/1 +f 7/7/1 8/8/1 9/9/1 +f 7/7/1 10/10/1 8/8/1 +f 10/10/1 11/11/1 12/12/1 +f 7/7/1 11/11/1 10/10/1 +f 1/1/1 11/11/1 7/7/1 +f 1/1/1 7/7/1 5/5/1 +f 13/13/2 14/14/2 15/15/2 +f 15/15/2 16/16/2 17/17/2 +f 14/14/2 16/16/2 15/15/2 +f 18/18/3 19/19/3 20/20/3 +f 16/21/3 19/19/3 18/18/3 +f 20/22/4 19/23/4 21/24/4 +f 19/23/4 22/25/4 21/24/4 +f 21/26/3 23/27/3 24/28/3 +f 22/29/3 23/27/3 21/26/3 +f 24/30/4 23/31/4 25/32/4 +f 25/32/4 26/33/4 27/34/4 +f 23/31/4 26/33/4 25/32/4 +f 27/35/3 28/36/3 29/37/3 +f 26/38/3 28/36/3 27/35/3 +f 29/39/2 28/40/2 30/41/2 +f 30/41/2 31/42/2 32/43/2 +f 28/40/2 31/42/2 30/41/2 +f 32/44/3 33/45/3 34/46/3 +f 31/47/3 33/45/3 32/44/3 +f 34/48/4 33/49/4 35/50/4 +f 35/50/4 36/51/4 37/52/4 +f 33/49/4 36/51/4 35/50/4 +f 37/53/3 38/54/3 39/55/3 +f 36/56/3 38/54/3 37/53/3 +f 39/57/4 40/58/4 41/59/4 +f 38/60/4 40/58/4 39/57/4 +f 42/61/5 13/13/5 43/62/5 +f 42/61/5 14/14/5 13/13/5 +f 13/13/2 15/15/2 44/63/2 +f 44/63/2 17/17/2 45/64/2 +f 15/15/2 17/17/2 44/63/2 +f 46/65/6 34/66/6 47/67/6 +f 34/66/6 35/68/6 47/67/6 +f 32/69/6 24/70/6 30/71/6 +f 24/70/6 25/72/6 30/71/6 +f 34/66/6 20/73/6 32/69/6 +f 46/65/6 20/73/6 34/66/6 +f 32/69/6 20/73/6 24/70/6 +f 20/73/6 21/74/6 24/70/6 +f 48/75/6 18/76/6 20/73/6 +f 46/65/6 48/75/6 20/73/6 +f 30/71/1 27/77/1 29/78/1 +f 25/72/1 27/77/1 30/71/1 +f 49/79/1 50/80/1 51/81/1 +f 49/79/1 52/82/1 50/80/1 +f 50/80/1 43/83/1 51/81/1 +f 52/82/1 53/84/1 50/80/1 +f 54/85/5 43/62/5 55/86/5 +f 55/86/5 43/62/5 44/63/5 +f 44/63/5 43/62/5 13/13/5 +f 54/85/5 51/87/5 43/62/5 +f 48/88/2 45/64/2 18/89/2 +f 48/88/2 56/90/2 45/64/2 +f 56/90/2 57/91/2 45/64/2 +f 44/63/2 45/64/2 55/86/2 +f 45/64/2 58/92/2 55/86/2 +f 54/93/4 49/94/4 51/95/4 +f 54/93/4 59/96/4 49/94/4 +f 60/97/4 59/96/4 54/93/4 +f 61/98/4 60/97/4 54/93/4 +f 62/99/4 61/98/4 54/93/4 +f 63/100/7 56/101/7 46/102/7 +f 56/101/7 48/103/7 46/102/7 +f 64/104/8 65/105/8 58/106/8 +f 58/106/8 65/105/8 55/107/8 +f 62/108/8 54/109/8 65/105/8 +f 65/105/8 54/109/8 55/107/8 +f 66/110/9 67/111/9 63/100/9 +f 68/112/9 67/111/9 66/110/9 +f 69/113/9 70/114/9 71/115/9 +f 72/116/9 70/114/9 69/113/9 +f 73/117/9 74/118/9 70/114/9 +f 71/115/9 74/118/9 67/111/9 +f 67/111/9 74/118/9 63/100/9 +f 70/114/9 74/118/9 71/115/9 +f 57/119/9 56/101/9 74/118/9 +f 56/101/9 63/100/9 74/118/9 +f 45/64/2 75/120/2 58/92/2 +f 75/120/2 76/121/2 58/92/2 +f 76/121/2 64/122/2 58/92/2 +f 62/123/3 77/124/3 61/125/3 +f 65/126/3 77/124/3 62/123/3 +f 78/127/3 79/128/3 77/124/3 +f 77/124/3 79/128/3 61/125/3 +f 65/105/8 64/104/8 80/129/8 +f 65/105/8 80/129/8 81/130/8 +f 72/131/4 82/132/4 83/133/4 +f 72/131/4 84/134/4 82/132/4 +f 70/135/4 72/131/4 83/133/4 +f 70/136/1 83/137/1 85/138/1 +f 73/139/1 70/136/1 85/138/1 +f 73/140/4 85/141/4 86/142/4 +f 74/143/4 73/140/4 86/142/4 +f 74/144/1 86/145/1 87/146/1 +f 57/147/1 74/144/1 87/146/1 +f 68/148/4 88/149/4 89/150/4 +f 68/148/4 90/151/4 88/149/4 +f 67/152/4 68/148/4 89/150/4 +f 67/153/1 89/154/1 91/155/1 +f 71/156/1 67/153/1 91/155/1 +f 69/113/2 91/157/2 92/158/2 +f 69/113/2 71/159/2 91/157/2 +f 93/160/2 69/113/2 92/158/2 +f 93/160/3 84/161/3 69/113/3 +f 84/161/3 72/116/3 69/113/3 +f 76/121/2 75/120/2 87/162/2 +f 76/121/2 87/162/2 80/163/2 +f 64/122/2 76/121/2 80/163/2 +f 94/164/4 95/165/4 96/166/4 +f 97/167/4 94/164/4 96/166/4 +f 97/168/1 96/169/1 88/170/1 +f 90/171/1 97/168/1 88/170/1 +f 98/172/3 99/173/3 100/174/3 +f 99/173/3 101/175/3 102/176/3 +f 98/172/3 101/175/3 99/173/3 +f 101/175/3 103/177/3 102/176/3 +f 98/172/3 104/178/3 101/175/3 +f 104/178/3 105/179/3 106/180/3 +f 104/178/3 107/181/3 105/179/3 +f 105/179/3 108/182/3 109/183/3 +f 107/181/3 108/182/3 105/179/3 +f 98/172/3 107/181/3 104/178/3 +f 93/184/1 92/185/1 82/186/1 +f 84/187/1 93/184/1 82/186/1 diff --git a/mymillwork/models/mymillwork_mach14.obj b/mymillwork/models/mymillwork_mach14.obj new file mode 100644 index 0000000..59c7e7f --- /dev/null +++ b/mymillwork/models/mymillwork_mach14.obj @@ -0,0 +1,48 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +g node0_Body +v 0.500000 -0.500000 -0.500000 +v -0.500000 -0.500000 -0.500000 +v -0.500000 -0.437500 -0.500000 +v 0.500000 -0.437500 -0.500000 +v 0.500000 -0.500000 0.500000 +v 0.500000 -0.437500 0.500000 +v -0.500000 -0.500000 0.500000 +v -0.500000 -0.437500 0.500000 +vt 1.000000 0.000000 +vt 0.000000 0.000000 +vt 0.000000 0.062500 +vt 1.000000 0.062500 +vt 0.000000 0.000000 +vt 0.000000 0.062500 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 0.062500 +vt 0.000000 0.062500 +vt 1.000000 0.000000 +vt 1.000000 0.062500 +vt 0.000000 1.000000 +vt 1.000000 1.000000 +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vt 1.000000 0.000000 +vt 0.000000 0.000000 +vn 0.0000 0.0000 -1.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +s off +f 1/1/1 2/2/1 3/3/1 +f 1/1/1 3/3/1 4/4/1 +f 5/5/2 1/1/2 4/4/2 +f 5/5/2 4/4/2 6/6/2 +f 7/7/3 5/8/3 6/9/3 +f 7/7/3 6/9/3 8/10/3 +f 2/11/4 7/7/4 8/10/4 +f 2/11/4 8/10/4 3/12/4 +f 2/13/5 1/14/5 5/8/5 +f 2/13/5 5/8/5 7/7/5 +f 4/15/6 3/16/6 6/17/6 +f 6/17/6 3/16/6 8/18/6 diff --git a/mymillwork/models/mymillwork_mach15.obj b/mymillwork/models/mymillwork_mach15.obj new file mode 100644 index 0000000..c4330b9 --- /dev/null +++ b/mymillwork/models/mymillwork_mach15.obj @@ -0,0 +1,452 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +g node0_Body +v 0.500000 -0.500000 -0.500000 +v -0.500000 -0.500000 -0.500000 +v -0.500000 -0.437500 -0.500000 +v 0.500000 -0.437500 -0.500000 +v -0.500000 -0.500000 0.500000 +v -0.500000 -0.437500 0.500000 +v 0.500000 -0.500000 0.500000 +v 0.500000 -0.437500 0.500000 +v 0.095756 -0.437500 0.080348 +v 0.080348 -0.437500 0.095756 +v 0.108253 -0.437500 0.062500 +v 0.062500 -0.437500 0.108253 +v 0.000000 -0.437500 -0.125000 +v -0.125000 -0.437500 -0.000000 +v -0.021706 -0.437500 -0.123101 +v -0.042753 -0.437500 -0.117462 +v 0.117462 -0.437500 0.042753 +v -0.062500 -0.437500 -0.108253 +v -0.080348 -0.437500 -0.095756 +v -0.095756 -0.437500 -0.080348 +v -0.108253 -0.437500 -0.062500 +v -0.117462 -0.437500 -0.042753 +v -0.123101 -0.437500 -0.021706 +v 0.042753 -0.437500 0.117462 +v 0.123101 -0.437500 0.021706 +v 0.021706 -0.437500 0.123101 +v 0.125000 -0.437500 0.000000 +v -0.000000 -0.437500 0.125000 +v 0.123101 -0.437500 -0.021706 +v 0.117462 -0.437500 -0.042753 +v 0.108253 -0.437500 -0.062500 +v 0.095756 -0.437500 -0.080348 +v -0.080348 -0.437500 0.095756 +v -0.062500 -0.437500 0.108253 +v -0.042753 -0.437500 0.117462 +v -0.021706 -0.437500 0.123101 +v 0.080348 -0.437500 -0.095756 +v -0.095756 -0.437500 0.080348 +v 0.062500 -0.437500 -0.108253 +v -0.108253 -0.437500 0.062500 +v 0.042753 -0.437500 -0.117462 +v -0.117462 -0.437500 0.042753 +v -0.123101 -0.437500 0.021706 +v 0.021706 -0.437500 -0.123101 +v -0.125000 0.500000 -0.000000 +v -0.123101 0.500000 0.021706 +v -0.117462 0.500000 0.042753 +v -0.108253 0.500000 0.062500 +v 0.125000 0.500000 0.000000 +v 0.123101 0.500000 -0.021706 +v -0.095756 0.500000 0.080348 +v 0.117462 0.500000 -0.042753 +v -0.080348 0.500000 0.095756 +v 0.108253 0.500000 -0.062500 +v -0.062500 0.500000 0.108253 +v 0.095756 0.500000 -0.080348 +v -0.042753 0.500000 0.117462 +v 0.080348 0.500000 -0.095756 +v -0.021706 0.500000 0.123101 +v 0.062500 0.500000 -0.108253 +v -0.000000 0.500000 0.125000 +v 0.042753 0.500000 -0.117462 +v 0.021706 0.500000 0.123101 +v 0.021706 0.500000 -0.123101 +v 0.042753 0.500000 0.117462 +v 0.000000 0.500000 -0.125000 +v 0.062500 0.500000 0.108253 +v -0.021706 0.500000 -0.123101 +v 0.080348 0.500000 0.095756 +v -0.042753 0.500000 -0.117462 +v 0.095756 0.500000 0.080348 +v -0.062500 0.500000 -0.108253 +v 0.108253 0.500000 0.062500 +v -0.080348 0.500000 -0.095756 +v 0.117462 0.500000 0.042753 +v -0.095756 0.500000 -0.080348 +v 0.123101 0.500000 0.021706 +v -0.108253 0.500000 -0.062500 +v -0.117462 0.500000 -0.042753 +v -0.123101 0.500000 -0.021706 +vt 1.000000 0.000000 +vt 0.000000 0.000000 +vt 0.000000 0.062500 +vt 1.000000 0.062500 +vt 1.000000 0.000000 +vt 0.000000 0.000000 +vt 0.000000 0.062500 +vt 1.000000 0.062500 +vt 0.000000 0.000000 +vt 0.000000 0.062500 +vt 0.000000 1.000000 +vt 1.000000 1.000000 +vt 1.000000 0.000000 +vt 0.595756 0.419652 +vt 0.580348 0.404244 +vt 1.000000 0.000000 +vt 0.608253 0.437500 +vt 0.562500 0.391747 +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vt 0.500000 0.625000 +vt 0.375000 0.500000 +vt 0.000000 0.000000 +vt 0.478294 0.623101 +vt 0.457247 0.617462 +vt 0.617462 0.457247 +vt 0.437500 0.608253 +vt 0.419652 0.595756 +vt 0.404244 0.580348 +vt 0.391747 0.562500 +vt 0.382538 0.542753 +vt 0.376899 0.521706 +vt 0.542753 0.382538 +vt 0.623101 0.478294 +vt 0.521706 0.376899 +vt 0.625000 0.500000 +vt 0.500000 0.375000 +vt 0.623101 0.521706 +vt 0.617462 0.542753 +vt 0.608253 0.562500 +vt 0.595756 0.580348 +vt 0.419652 0.404244 +vt 0.437500 0.391747 +vt 0.457247 0.382538 +vt 0.478294 0.376899 +vt 0.580348 0.595756 +vt 0.404244 0.419652 +vt 0.562500 0.608253 +vt 0.391747 0.437500 +vt 0.542753 0.617462 +vt 0.382538 0.457247 +vt 0.376899 0.478294 +vt 0.521706 0.623101 +vt 1.000000 0.062500 +vt 0.500000 1.000000 +vt 0.478294 0.062500 +vt 0.478294 1.000000 +vt 0.457247 0.062500 +vt 0.457247 1.000000 +vt 0.437500 0.062500 +vt 0.437500 1.000000 +vt 0.500000 1.000000 +vt 0.521706 0.062500 +vt 0.521706 1.000000 +vt 0.500000 0.062500 +vt 0.419652 0.062500 +vt 0.419652 1.000000 +vt 0.542753 0.062500 +vt 0.542753 1.000000 +vt 0.404244 1.000000 +vt 0.419652 0.062500 +vt 0.419652 1.000000 +vt 0.404244 0.062500 +vt 0.562500 0.062500 +vt 0.562500 1.000000 +vt 0.437500 0.062500 +vt 0.437500 1.000000 +vt 0.580348 0.062500 +vt 0.580348 1.000000 +vt 0.457247 0.062500 +vt 0.457247 1.000000 +vt 0.595756 1.000000 +vt 0.580348 0.062500 +vt 0.580348 1.000000 +vt 0.595756 0.062500 +vt 0.478294 0.062500 +vt 0.478294 1.000000 +vt 0.562500 0.062500 +vt 0.562500 1.000000 +vt 0.500000 0.062500 +vt 0.500000 1.000000 +vt 0.542753 0.062500 +vt 0.542753 1.000000 +vt 0.521706 0.062500 +vt 0.521706 1.000000 +vt 0.521706 0.062500 +vt 0.521706 1.000000 +vt 0.542753 0.062500 +vt 0.542753 1.000000 +vt 0.500000 0.062500 +vt 0.500000 1.000000 +vt 0.562500 0.062500 +vt 0.562500 1.000000 +vt 0.478294 0.062500 +vt 0.478294 1.000000 +vt 0.580348 0.062500 +vt 0.580348 1.000000 +vt 0.457247 0.062500 +vt 0.457247 1.000000 +vt 0.595756 0.062500 +vt 0.595756 1.000000 +vt 0.437500 0.062500 +vt 0.437500 1.000000 +vt 0.419652 0.062500 +vt 0.437500 0.062500 +vt 0.419652 1.000000 +vt 0.437500 1.000000 +vt 0.419652 0.062500 +vt 0.419652 1.000000 +vt 0.457247 0.062500 +vt 0.457247 1.000000 +vt 0.404244 0.062500 +vt 0.404244 1.000000 +vt 0.478294 0.062500 +vt 0.478294 1.000000 +vt 0.580348 0.062500 +vt 0.562500 0.062500 +vt 0.580348 1.000000 +vt 0.562500 1.000000 +vt 0.542753 0.062500 +vt 0.542753 1.000000 +vt 0.521706 0.062500 +vt 0.521706 1.000000 +vt 0.500000 0.062500 +vt 0.521706 0.376899 +vt 0.542753 0.382538 +vt 0.562500 0.391747 +vt 0.580348 0.404244 +vt 0.595756 0.419652 +vt 0.623101 0.521706 +vt 0.500000 0.375000 +vt 0.608253 0.437500 +vt 0.617462 0.457247 +vt 0.623101 0.478294 +vt 0.625000 0.500000 +vt 0.478294 0.376899 +vt 0.437500 0.391747 +vt 0.457247 0.382538 +vt 0.595756 0.580348 +vt 0.617462 0.542753 +vt 0.608253 0.562500 +vt 0.404244 0.419652 +vt 0.419652 0.404244 +vt 0.382538 0.457247 +vt 0.391747 0.437500 +vt 0.521706 0.623101 +vt 0.580348 0.595756 +vt 0.562500 0.608253 +vt 0.542753 0.617462 +vt 0.376899 0.478294 +vt 0.376899 0.521706 +vt 0.500000 0.625000 +vt 0.478294 0.623101 +vt 0.375000 0.500000 +vt 0.382538 0.542753 +vt 0.457247 0.617462 +vt 0.404244 0.580348 +vt 0.437500 0.608253 +vt 0.419652 0.595756 +vt 0.391747 0.562500 +vn 0.0000 0.0000 -1.0000 +vn -1.0000 0.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn -0.9962 0.0000 0.0872 +vn -0.9659 0.0000 0.2588 +vn -0.9063 0.0000 0.4226 +vn 0.9962 0.0000 -0.0872 +vn -0.8192 0.0000 0.5736 +vn 0.9659 0.0000 -0.2588 +vn -0.7071 0.0000 0.7071 +vn 0.9063 0.0000 -0.4226 +vn -0.5736 0.0000 0.8192 +vn 0.8192 0.0000 -0.5736 +vn -0.4226 0.0000 0.9063 +vn 0.7071 0.0000 -0.7071 +vn -0.2588 0.0000 0.9659 +vn 0.5736 0.0000 -0.8192 +vn -0.0872 0.0000 0.9962 +vn 0.4226 0.0000 -0.9063 +vn 0.0872 0.0000 0.9962 +vn 0.2588 0.0000 -0.9659 +vn 0.2588 0.0000 0.9659 +vn 0.0872 0.0000 -0.9962 +vn 0.4226 0.0000 0.9063 +vn -0.0872 0.0000 -0.9962 +vn 0.5736 0.0000 0.8192 +vn -0.2588 0.0000 -0.9659 +vn 0.7071 0.0000 0.7071 +vn -0.4226 0.0000 -0.9063 +vn 0.8192 0.0000 0.5736 +vn -0.5736 0.0000 -0.8192 +vn 0.9063 0.0000 0.4226 +vn -0.7071 0.0000 -0.7071 +vn 0.9659 0.0000 0.2588 +vn -0.8192 0.0000 -0.5736 +vn 0.9962 0.0000 0.0872 +vn -0.9063 0.0000 -0.4226 +vn -0.9659 0.0000 -0.2588 +vn -0.9962 0.0000 -0.0872 +s off +f 1/1/1 2/2/1 3/3/1 +f 1/1/1 3/3/1 4/4/1 +f 2/5/2 5/6/2 6/7/2 +f 2/5/2 6/7/2 3/8/2 +f 7/9/3 1/1/3 4/4/3 +f 7/9/3 4/4/3 8/10/3 +f 2/11/4 1/12/4 7/13/4 +f 2/11/4 7/13/4 5/6/4 +f 9/14/5 10/15/5 8/16/5 +f 8/16/5 11/17/5 9/14/5 +f 10/15/5 12/18/5 8/16/5 +f 4/19/5 3/20/5 13/21/5 +f 14/22/5 3/20/5 6/23/5 +f 13/21/5 3/20/5 15/24/5 +f 15/24/5 3/20/5 16/25/5 +f 8/16/5 17/26/5 11/17/5 +f 16/25/5 3/20/5 18/27/5 +f 18/27/5 3/20/5 19/28/5 +f 19/28/5 3/20/5 20/29/5 +f 20/29/5 3/20/5 21/30/5 +f 21/30/5 3/20/5 22/31/5 +f 22/31/5 3/20/5 23/32/5 +f 23/32/5 3/20/5 14/22/5 +f 12/18/5 24/33/5 8/16/5 +f 8/16/5 25/34/5 17/26/5 +f 24/33/5 26/35/5 8/16/5 +f 8/16/5 27/36/5 25/34/5 +f 26/35/5 28/37/5 8/16/5 +f 27/36/5 4/19/5 29/38/5 +f 29/38/5 4/19/5 30/39/5 +f 30/39/5 4/19/5 31/40/5 +f 31/40/5 4/19/5 32/41/5 +f 8/16/5 4/19/5 27/36/5 +f 33/42/5 6/23/5 34/43/5 +f 34/43/5 6/23/5 35/44/5 +f 35/44/5 6/23/5 36/45/5 +f 36/45/5 6/23/5 28/37/5 +f 28/37/5 6/23/5 8/16/5 +f 4/19/5 37/46/5 32/41/5 +f 33/42/5 38/47/5 6/23/5 +f 4/19/5 39/48/5 37/46/5 +f 38/47/5 40/49/5 6/23/5 +f 4/19/5 41/50/5 39/48/5 +f 40/49/5 42/51/5 6/23/5 +f 42/51/5 43/52/5 6/23/5 +f 4/19/5 44/53/5 41/50/5 +f 4/19/5 13/21/5 44/53/5 +f 43/52/5 14/22/5 6/23/5 +f 5/6/6 7/13/6 8/54/6 +f 5/6/6 8/54/6 6/7/6 +f 45/55/7 43/56/7 46/57/7 +f 43/56/8 42/58/8 46/57/8 +f 46/57/8 42/58/8 47/59/8 +f 47/59/9 40/60/9 48/61/9 +f 42/58/9 40/60/9 47/59/9 +f 49/62/10 29/63/10 50/64/10 +f 27/65/10 29/63/10 49/62/10 +f 48/61/11 38/66/11 51/67/11 +f 40/60/11 38/66/11 48/61/11 +f 50/64/12 30/68/12 52/69/12 +f 29/63/12 30/68/12 50/64/12 +f 51/70/13 33/71/13 53/72/13 +f 38/73/13 33/71/13 51/70/13 +f 52/69/14 31/74/14 54/75/14 +f 30/68/14 31/74/14 52/69/14 +f 53/72/15 34/76/15 55/77/15 +f 33/71/15 34/76/15 53/72/15 +f 54/75/16 32/78/16 56/79/16 +f 31/74/16 32/78/16 54/75/16 +f 55/77/17 35/80/17 57/81/17 +f 34/76/17 35/80/17 55/77/17 +f 56/82/18 37/83/18 58/84/18 +f 32/85/18 37/83/18 56/82/18 +f 57/81/19 36/86/19 59/87/19 +f 37/83/20 39/88/20 58/84/20 +f 35/80/19 36/86/19 57/81/19 +f 58/84/20 39/88/20 60/89/20 +f 59/87/21 28/90/21 61/91/21 +f 36/86/21 28/90/21 59/87/21 +f 39/88/22 41/92/22 60/89/22 +f 60/89/22 41/92/22 62/93/22 +f 61/91/23 26/94/23 63/95/23 +f 28/90/23 26/94/23 61/91/23 +f 41/92/24 44/96/24 62/93/24 +f 62/93/24 44/96/24 64/97/24 +f 63/95/25 24/98/25 65/99/25 +f 26/94/25 24/98/25 63/95/25 +f 44/96/26 13/100/26 64/97/26 +f 64/97/26 13/100/26 66/101/26 +f 65/99/27 12/102/27 67/103/27 +f 24/98/27 12/102/27 65/99/27 +f 13/100/28 15/104/28 66/101/28 +f 66/101/28 15/104/28 68/105/28 +f 67/103/29 10/106/29 69/107/29 +f 15/104/30 16/108/30 68/105/30 +f 12/102/29 10/106/29 67/103/29 +f 68/105/30 16/108/30 70/109/30 +f 10/106/31 9/110/31 69/107/31 +f 69/107/31 9/110/31 71/111/31 +f 16/108/32 18/112/32 70/109/32 +f 70/109/32 18/112/32 72/113/32 +f 9/114/33 11/115/33 71/116/33 +f 71/116/33 11/115/33 73/117/33 +f 18/112/34 19/118/34 72/113/34 +f 72/113/34 19/118/34 74/119/34 +f 11/115/35 17/120/35 73/117/35 +f 73/117/35 17/120/35 75/121/35 +f 19/118/36 20/122/36 74/119/36 +f 74/119/36 20/122/36 76/123/36 +f 17/120/37 25/124/37 75/121/37 +f 75/121/37 25/124/37 77/125/37 +f 20/126/38 21/127/38 76/128/38 +f 25/124/39 27/65/39 77/125/39 +f 76/128/38 21/127/38 78/129/38 +f 77/125/39 27/65/39 49/62/39 +f 21/127/40 22/130/40 78/129/40 +f 78/129/40 22/130/40 79/131/40 +f 22/130/41 23/132/41 79/131/41 +f 79/131/41 23/132/41 80/133/41 +f 23/132/42 14/134/42 80/133/42 +f 80/133/42 14/134/42 45/55/42 +f 14/134/7 43/56/7 45/55/7 +f 63/135/5 65/136/5 67/137/5 +f 63/135/5 67/137/5 69/138/5 +f 63/135/5 69/138/5 71/139/5 +f 50/140/5 61/141/5 63/135/5 +f 50/140/5 71/139/5 73/142/5 +f 50/140/5 73/142/5 75/143/5 +f 50/140/5 75/143/5 77/144/5 +f 50/140/5 77/144/5 49/145/5 +f 50/140/5 63/135/5 71/139/5 +f 59/146/5 61/141/5 50/140/5 +f 55/147/5 57/148/5 59/146/5 +f 56/149/5 50/140/5 52/150/5 +f 56/149/5 52/150/5 54/151/5 +f 56/149/5 59/146/5 50/140/5 +f 56/149/5 55/147/5 59/146/5 +f 51/152/5 53/153/5 55/147/5 +f 47/154/5 48/155/5 51/152/5 +f 64/156/5 56/149/5 58/157/5 +f 64/156/5 58/157/5 60/158/5 +f 64/156/5 60/158/5 62/159/5 +f 64/156/5 55/147/5 56/149/5 +f 64/156/5 51/152/5 55/147/5 +f 64/156/5 47/154/5 51/152/5 +f 46/160/5 47/154/5 64/156/5 +f 80/161/5 64/156/5 66/162/5 +f 80/161/5 66/162/5 68/163/5 +f 80/161/5 45/164/5 46/160/5 +f 80/161/5 46/160/5 64/156/5 +f 79/165/5 68/163/5 70/166/5 +f 79/165/5 80/161/5 68/163/5 +f 76/167/5 79/165/5 70/166/5 +f 76/167/5 70/166/5 72/168/5 +f 76/167/5 72/168/5 74/169/5 +f 76/167/5 78/170/5 79/165/5 diff --git a/mymillwork/models/mymillwork_mach16.obj b/mymillwork/models/mymillwork_mach16.obj new file mode 100644 index 0000000..f3f5dbd --- /dev/null +++ b/mymillwork/models/mymillwork_mach16.obj @@ -0,0 +1,108 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +g node0_Body +v -0.187500 -0.187500 -0.500000 +v -0.250000 -0.187500 -0.500000 +v -0.250000 -0.187500 0.500000 +v -0.187500 -0.187500 0.500000 +v -0.187500 -0.250000 -0.500000 +v -0.187500 -0.250000 0.500000 +v 0.187500 -0.250000 -0.500000 +v 0.187500 -0.250000 0.500000 +v 0.187500 -0.187500 -0.500000 +v 0.187500 -0.187500 0.500000 +v 0.250000 -0.187500 -0.500000 +v 0.250000 -0.187500 0.500000 +v 0.250000 -0.500000 0.500000 +v 0.250000 -0.500000 -0.500000 +v -0.250000 -0.500000 -0.500000 +v -0.250000 -0.500000 0.500000 +v -0.250000 -0.187500 -0.500000 +v -0.187500 -0.187500 -0.500000 +v 0.250000 -0.187500 -0.500000 +v 0.187500 -0.187500 -0.500000 +v -0.250000 -0.187500 0.500000 +v -0.187500 -0.187500 0.500000 +v 0.250000 -0.187500 0.500000 +v 0.187500 -0.187500 0.500000 +vt 0.312500 1.000000 +vt 0.250000 1.000000 +vt 0.250000 0.000000 +vt 0.312500 0.000000 +vt 1.000000 0.250000 +vt 1.000000 0.312500 +vt 0.000000 0.312500 +vt 0.000000 0.250000 +vt 0.687500 1.000000 +vt 0.312500 1.000000 +vt 0.312500 0.000000 +vt 0.687500 0.000000 +vt 1.000000 0.312500 +vt 1.000000 0.250000 +vt 0.000000 0.250000 +vt 0.000000 0.312500 +vt 0.750000 1.000000 +vt 0.687500 1.000000 +vt 0.687500 0.000000 +vt 0.750000 0.000000 +vt 1.000000 0.312500 +vt 0.000000 0.312500 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 0.250000 1.000000 +vt 0.750000 1.000000 +vt 0.750000 0.000000 +vt 0.250000 0.000000 +vt 1.000000 0.000000 +vt 0.000000 0.000000 +vt 0.000000 0.312500 +vt 1.000000 0.312500 +vt 0.312500 0.250000 +vt 0.250000 0.000000 +vt 0.250000 0.312500 +vt 0.312500 0.312500 +vt 0.687500 0.250000 +vt 0.750000 0.000000 +vt 0.750000 0.312500 +vt 0.687500 0.312500 +vt 0.312500 0.250000 +vt 0.250000 0.312500 +vt 0.312500 0.312500 +vt 0.687500 0.250000 +vt 0.750000 0.312500 +vt 0.687500 0.312500 +vn 0.0000 1.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 0.0000 1.0000 +s off +f 1/1/1 2/2/1 3/3/1 +f 1/1/1 3/3/1 4/4/1 +f 5/5/2 1/6/2 4/7/2 +f 5/5/2 4/7/2 6/8/2 +f 7/9/1 5/10/1 6/11/1 +f 7/9/1 6/11/1 8/12/1 +f 9/13/3 7/14/3 8/15/3 +f 9/13/3 8/15/3 10/16/3 +f 11/17/1 9/18/1 10/19/1 +f 11/17/1 10/19/1 12/20/1 +f 11/21/2 12/22/2 13/23/2 +f 14/24/2 11/21/2 13/23/2 +f 15/25/4 14/26/4 13/27/4 +f 15/25/4 13/27/4 16/28/4 +f 15/29/3 16/30/3 3/31/3 +f 2/32/3 15/29/3 3/31/3 +f 5/33/5 15/34/5 17/35/5 +f 18/36/5 5/33/5 17/35/5 +f 7/37/5 14/38/5 15/34/5 +f 7/37/5 15/34/5 5/33/5 +f 19/39/5 7/37/5 20/40/5 +f 19/39/5 14/38/5 7/37/5 +f 16/28/6 6/41/6 21/42/6 +f 6/41/6 22/43/6 21/42/6 +f 16/28/6 13/27/6 6/41/6 +f 13/27/6 8/44/6 6/41/6 +f 8/44/6 23/45/6 24/46/6 +f 13/27/6 23/45/6 8/44/6 diff --git a/mymillwork/models/mymillwork_mach17.obj b/mymillwork/models/mymillwork_mach17.obj new file mode 100644 index 0000000..0947ba3 --- /dev/null +++ b/mymillwork/models/mymillwork_mach17.obj @@ -0,0 +1,330 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +g node0_Body +v -0.250000 -0.500000 -0.500000 +v -0.250000 -0.500000 -0.250000 +v -0.250000 -0.187500 -0.500000 +v -0.250000 -0.187500 -0.250000 +v 0.250000 -0.187500 -0.500000 +v 0.187500 -0.250000 -0.500000 +v 0.187500 -0.187500 -0.500000 +v 0.250000 -0.500000 -0.500000 +v -0.187500 -0.187500 -0.500000 +v -0.187500 -0.250000 -0.500000 +v -0.500000 -0.500000 -0.250000 +v -0.500000 -0.187500 -0.250000 +v -0.250000 -0.500000 0.250000 +v 0.250000 -0.500000 0.250000 +v -0.250000 -0.500000 0.500000 +v 0.250000 -0.500000 0.500000 +v -0.500000 -0.500000 0.250000 +v 0.250000 -0.500000 -0.250000 +v 0.500000 -0.500000 -0.250000 +v 0.500000 -0.500000 0.250000 +v -0.250000 -0.187500 0.187500 +v -0.500000 -0.187500 0.250000 +v -0.250000 -0.187500 0.250000 +v -0.500000 -0.187500 0.187500 +v -0.187500 -0.187500 0.250000 +v -0.250000 -0.187500 0.500000 +v -0.187500 -0.187500 0.500000 +v -0.250000 -0.187500 -0.187500 +v -0.500000 -0.187500 -0.187500 +v 0.250000 -0.187500 0.250000 +v 0.187500 -0.187500 0.500000 +v 0.250000 -0.187500 0.500000 +v 0.187500 -0.187500 0.250000 +v -0.187500 -0.187500 -0.250000 +v 0.250000 -0.187500 0.187500 +v 0.500000 -0.187500 0.250000 +v 0.500000 -0.187500 0.187500 +v 0.187500 -0.187500 -0.250000 +v 0.250000 -0.187500 -0.187500 +v 0.250000 -0.187500 -0.250000 +v 0.500000 -0.187500 -0.250000 +v 0.500000 -0.187500 -0.187500 +v -0.187500 -0.250000 -0.250000 +v 0.187500 -0.250000 -0.250000 +v -0.500000 -0.250000 -0.187500 +v -0.500000 -0.250000 0.187500 +v -0.187500 -0.250000 0.500000 +v 0.187500 -0.250000 0.500000 +v 0.500000 -0.250000 0.187500 +v 0.500000 -0.250000 -0.187500 +v 0.250000 -0.250000 -0.187500 +v 0.250000 -0.250000 0.187500 +v 0.187500 -0.250000 0.250000 +v -0.187500 -0.250000 0.250000 +v -0.250000 -0.250000 0.187500 +v -0.250000 -0.250000 -0.187500 +vt 1.000000 0.000000 +vt 0.750000 0.000000 +vt 1.000000 0.312500 +vt 0.750000 0.312500 +vt 0.750000 0.312500 +vt 0.687500 0.250000 +vt 0.687500 0.312500 +vt 0.750000 0.000000 +vt 0.312500 0.312500 +vt 0.312500 0.250000 +vt 0.250000 0.312500 +vt 0.250000 0.000000 +vt 0.250000 0.000000 +vt 0.000000 0.000000 +vt 0.250000 0.312500 +vt 0.000000 0.312500 +vt 0.250000 0.250000 +vt 0.750000 0.250000 +vt 0.250000 0.000000 +vt 0.750000 0.000000 +vt 0.000000 0.750000 +vt 0.250000 0.750000 +vt 0.000000 0.250000 +vt 0.750000 0.750000 +vt 1.000000 0.750000 +vt 1.000000 0.250000 +vt 0.250000 1.000000 +vt 0.750000 1.000000 +vt 0.250000 0.312500 +vt 0.000000 0.250000 +vt 0.250000 0.250000 +vt 0.000000 0.312500 +vt 0.312500 0.250000 +vt 0.250000 0.000000 +vt 0.312500 0.000000 +vt 0.250000 0.687500 +vt 0.000000 0.750000 +vt 0.000000 0.687500 +vt 0.250000 0.750000 +vt 0.750000 0.250000 +vt 0.687500 0.000000 +vt 0.750000 0.000000 +vt 0.687500 0.250000 +vt 0.312500 0.750000 +vt 0.750000 0.312500 +vt 0.250000 1.000000 +vt 1.000000 0.250000 +vt 0.312500 1.000000 +vt 1.000000 0.312500 +vt 0.687500 0.750000 +vt 0.750000 0.687500 +vt 0.750000 0.750000 +vt 1.000000 0.750000 +vt 1.000000 0.687500 +vt 0.750000 1.000000 +vt 0.687500 1.000000 +vt 1.000000 0.312500 +vt 0.750000 0.312500 +vt 1.000000 0.250000 +vt 0.750000 0.250000 +vt 0.312500 0.750000 +vt 0.687500 1.000000 +vt 0.312500 1.000000 +vt 0.687500 0.750000 +vt 0.750000 0.312500 +vt 1.000000 0.312500 +vt 0.750000 0.250000 +vt 1.000000 0.250000 +vt 0.750000 0.000000 +vt 1.000000 0.000000 +vt 0.750000 0.312500 +vt 1.000000 0.312500 +vt 0.750000 0.312500 +vt 0.687500 0.250000 +vt 0.687500 0.312500 +vt 0.750000 0.000000 +vt 0.312500 0.312500 +vt 0.312500 0.250000 +vt 0.250000 0.312500 +vt 0.250000 0.000000 +vt 0.000000 0.000000 +vt 0.250000 0.000000 +vt 0.000000 0.312500 +vt 0.250000 0.312500 +vt 0.000000 0.000000 +vt 0.000000 0.312500 +vt 0.250000 0.312500 +vt 0.312500 0.250000 +vt 0.312500 0.312500 +vt 0.687500 0.250000 +vt 0.750000 0.312500 +vt 0.687500 0.312500 +vt 0.000000 0.000000 +vt 0.250000 0.000000 +vt 0.000000 0.312500 +vt 0.250000 0.312500 +vt 0.750000 0.000000 +vt 1.000000 0.000000 +vt 0.750000 0.312500 +vt 1.000000 0.312500 +vt 0.250000 0.312500 +vt 0.312500 0.250000 +vt 0.312500 0.312500 +vt 0.250000 0.000000 +vt 0.687500 0.312500 +vt 0.687500 0.250000 +vt 0.750000 0.312500 +vt 0.750000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 0.312500 +vt 1.000000 0.312500 +vt 0.750000 0.312500 +vt 1.000000 0.250000 +vt 0.750000 0.250000 +vt 0.687500 0.312500 +vt 0.312500 0.312500 +vt 0.687500 0.250000 +vt 0.312500 0.250000 +vt 0.750000 0.250000 +vt 1.000000 0.250000 +vt 0.000000 0.312500 +vt 0.250000 0.312500 +vt 0.000000 0.250000 +vt 0.250000 0.250000 +vt 0.687500 0.312500 +vt 0.312500 0.312500 +vt 0.687500 0.250000 +vt 0.312500 0.250000 +vt 0.250000 0.312500 +vt 0.000000 0.312500 +vt 0.250000 0.250000 +vt 0.000000 0.250000 +vt 0.000000 0.250000 +vt 0.250000 0.250000 +vt 0.312500 0.312500 +vt 0.687500 0.312500 +vt 0.312500 0.250000 +vt 0.687500 0.250000 +vt 0.250000 0.312500 +vt 0.000000 0.312500 +vt 0.250000 0.250000 +vt 0.000000 0.250000 +vt 0.312500 0.312500 +vt 0.687500 0.312500 +vt 0.312500 0.250000 +vt 0.687500 0.250000 +vt 0.250000 0.312500 +vt 0.000000 0.687500 +vt 0.000000 0.312500 +vt 0.250000 0.687500 +vt 0.312500 0.000000 +vt 0.687500 0.000000 +vt 0.750000 0.687500 +vt 1.000000 0.312500 +vt 1.000000 0.687500 +vt 0.750000 0.312500 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +s off +f 1/1/1 2/2/1 3/3/1 +f 3/3/1 2/2/1 4/4/1 +f 5/5/2 6/6/2 7/7/2 +f 5/5/2 8/8/2 6/6/2 +f 9/9/2 10/10/2 3/11/2 +f 8/8/2 10/10/2 6/6/2 +f 10/10/2 1/12/2 3/11/2 +f 8/8/2 1/12/2 10/10/2 +f 2/13/2 11/14/2 4/15/2 +f 4/15/2 11/14/2 12/16/2 +f 13/17/3 14/18/3 15/19/3 +f 15/19/3 14/18/3 16/20/3 +f 11/21/3 2/22/3 17/23/3 +f 17/23/3 2/22/3 13/17/3 +f 2/22/3 18/24/3 13/17/3 +f 13/17/3 18/24/3 14/18/3 +f 14/18/3 19/25/3 20/26/3 +f 18/24/3 19/25/3 14/18/3 +f 1/27/3 8/28/3 2/22/3 +f 2/22/3 8/28/3 18/24/3 +f 21/29/4 22/30/4 23/31/4 +f 21/29/4 24/32/4 22/30/4 +f 25/33/4 26/34/4 27/35/4 +f 25/33/4 23/31/4 26/34/4 +f 25/33/4 21/29/4 23/31/4 +f 28/36/4 12/37/4 29/38/4 +f 28/36/4 21/29/4 25/33/4 +f 4/39/4 12/37/4 28/36/4 +f 30/40/4 31/41/4 32/42/4 +f 30/40/4 33/43/4 31/41/4 +f 34/44/4 4/39/4 28/36/4 +f 35/45/4 25/33/4 33/43/4 +f 35/45/4 33/43/4 30/40/4 +f 3/46/4 4/39/4 34/44/4 +f 36/47/4 35/45/4 30/40/4 +f 9/48/4 3/46/4 34/44/4 +f 37/49/4 35/45/4 36/47/4 +f 38/50/4 28/36/4 25/33/4 +f 38/50/4 25/33/4 35/45/4 +f 38/50/4 34/44/4 28/36/4 +f 39/51/4 38/50/4 35/45/4 +f 40/52/4 38/50/4 39/51/4 +f 41/53/4 39/51/4 42/54/4 +f 41/53/4 40/52/4 39/51/4 +f 5/55/4 7/56/4 38/50/4 +f 5/55/4 38/50/4 40/52/4 +f 9/57/5 34/58/5 10/59/5 +f 10/59/5 34/58/5 43/60/5 +f 43/61/4 6/62/4 10/63/4 +f 43/61/4 44/64/4 6/62/4 +f 38/65/1 7/66/1 44/67/1 +f 44/67/1 7/66/1 6/68/1 +f 18/69/5 8/70/5 40/71/5 +f 40/71/5 8/70/5 5/72/5 +f 12/73/1 45/74/1 29/75/1 +f 12/73/1 11/76/1 45/74/1 +f 24/77/1 46/78/1 22/79/1 +f 11/76/1 46/78/1 45/74/1 +f 46/78/1 17/80/1 22/79/1 +f 11/76/1 17/80/1 46/78/1 +f 17/81/6 13/82/6 22/83/6 +f 22/83/6 13/82/6 23/84/6 +f 13/82/1 15/85/1 23/84/1 +f 23/84/1 15/85/1 26/86/1 +f 26/87/6 47/88/6 27/89/6 +f 26/87/6 15/19/6 47/88/6 +f 15/19/6 48/90/6 47/88/6 +f 48/90/6 32/91/6 31/92/6 +f 48/90/6 16/20/6 32/91/6 +f 15/19/6 16/20/6 48/90/6 +f 16/93/5 14/94/5 32/95/5 +f 32/95/5 14/94/5 30/96/5 +f 14/97/6 20/98/6 30/99/6 +f 30/99/6 20/98/6 36/100/6 +f 36/101/5 49/102/5 37/103/5 +f 36/101/5 20/104/5 49/102/5 +f 42/105/5 50/106/5 41/107/5 +f 20/104/5 50/106/5 49/102/5 +f 50/106/5 19/108/5 41/107/5 +f 20/104/5 19/108/5 50/106/5 +f 19/109/2 18/69/2 41/110/2 +f 41/110/2 18/69/2 40/71/2 +f 42/111/6 39/112/6 50/113/6 +f 50/113/6 39/112/6 51/114/6 +f 39/115/5 35/116/5 51/117/5 +f 51/117/5 35/116/5 52/118/5 +f 35/45/2 37/49/2 52/119/2 +f 52/119/2 37/49/2 49/120/2 +f 31/121/1 33/122/1 48/123/1 +f 48/123/1 33/122/1 53/124/1 +f 33/125/6 25/126/6 53/127/6 +f 53/127/6 25/126/6 54/128/6 +f 25/129/5 27/130/5 54/131/5 +f 54/131/5 27/130/5 47/132/5 +f 24/32/2 21/29/2 46/133/2 +f 46/133/2 21/29/2 55/134/2 +f 21/135/1 28/136/1 55/137/1 +f 55/137/1 28/136/1 56/138/1 +f 28/139/6 29/140/6 56/141/6 +f 56/141/6 29/140/6 45/142/6 +f 34/143/2 38/144/2 43/145/2 +f 43/145/2 38/144/2 44/146/2 +f 55/147/4 45/148/4 46/149/4 +f 55/147/4 56/150/4 45/148/4 +f 53/127/4 47/151/4 48/152/4 +f 53/127/4 54/128/4 47/151/4 +f 51/153/4 49/154/4 50/155/4 +f 51/153/4 52/156/4 49/154/4 diff --git a/mymillwork/models/mymillwork_mach18.obj b/mymillwork/models/mymillwork_mach18.obj new file mode 100644 index 0000000..6648233 --- /dev/null +++ b/mymillwork/models/mymillwork_mach18.obj @@ -0,0 +1,428 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +g node0_Body +v -0.250000 -0.187500 0.187500 +v -0.500000 -0.187500 0.250000 +v -0.250000 -0.187500 0.250000 +v -0.500000 -0.187500 0.187500 +v -0.187500 -0.187500 0.250000 +v -0.250000 -0.187500 0.500000 +v -0.187500 -0.187500 0.500000 +v -0.250000 -0.187500 -0.187500 +v -0.500000 -0.187500 -0.250000 +v -0.500000 -0.187500 -0.187500 +v -0.250000 -0.187500 -0.250000 +v 0.250000 -0.187500 0.250000 +v 0.187500 -0.187500 0.500000 +v 0.250000 -0.187500 0.500000 +v 0.187500 -0.187500 0.250000 +v -0.187500 -0.187500 -0.250000 +v 0.250000 -0.187500 0.187500 +v -0.250000 -0.187500 -0.500000 +v 0.500000 -0.187500 0.250000 +v -0.187500 -0.187500 -0.500000 +v 0.500000 -0.187500 0.187500 +v 0.187500 -0.187500 -0.250000 +v 0.250000 -0.187500 -0.187500 +v 0.250000 -0.187500 -0.250000 +v 0.500000 -0.187500 -0.250000 +v 0.500000 -0.187500 -0.187500 +v 0.250000 -0.187500 -0.500000 +v 0.187500 -0.187500 -0.500000 +v 0.500000 -0.250000 0.187500 +v 0.500000 -0.437500 0.250000 +v 0.500000 -0.250000 -0.187500 +v 0.500000 -0.437500 -0.250000 +v 0.250000 -0.250000 -0.187500 +v 0.250000 -0.250000 0.187500 +v 0.250000 -0.437500 0.250000 +v 0.250000 -0.437500 0.500000 +v -0.187500 -0.250000 0.500000 +v -0.250000 -0.437500 0.500000 +v 0.187500 -0.250000 0.500000 +v 0.187500 -0.250000 0.250000 +v -0.187500 -0.250000 0.250000 +v -0.250000 -0.437500 0.250000 +v -0.500000 -0.437500 0.250000 +v -0.500000 -0.250000 -0.187500 +v -0.500000 -0.437500 -0.250000 +v -0.500000 -0.250000 0.187500 +v -0.250000 -0.250000 0.187500 +v -0.250000 -0.250000 -0.187500 +v -0.250000 -0.437500 -0.250000 +v -0.250000 -0.437500 -0.500000 +v 0.187500 -0.250000 -0.500000 +v 0.250000 -0.437500 -0.500000 +v -0.187500 -0.250000 -0.500000 +v -0.187500 -0.250000 -0.250000 +v 0.187500 -0.250000 -0.250000 +v 0.250000 -0.437500 -0.250000 +v 0.500000 -0.500000 -0.250000 +v 0.500000 -0.500000 0.250000 +v 0.500000 -0.437500 0.500000 +v 0.250000 -0.500000 0.500000 +v -0.250000 -0.500000 0.500000 +v -0.500000 -0.437500 0.500000 +v -0.500000 -0.500000 0.250000 +v -0.500000 -0.500000 -0.250000 +v -0.500000 -0.437500 -0.500000 +v -0.250000 -0.500000 -0.500000 +v 0.250000 -0.500000 -0.500000 +v 0.500000 -0.437500 -0.500000 +v -0.250000 -0.500000 -0.250000 +v -0.250000 -0.500000 0.250000 +v 0.250000 -0.500000 0.250000 +v 0.250000 -0.500000 -0.250000 +v 0.500000 -0.500000 -0.500000 +v 0.500000 -0.500000 0.500000 +v -0.500000 -0.500000 0.500000 +v -0.500000 -0.500000 -0.500000 +vt 0.250000 0.312500 +vt 0.000000 0.250000 +vt 0.250000 0.250000 +vt 0.000000 0.312500 +vt 0.312500 0.250000 +vt 0.250000 0.000000 +vt 0.312500 0.000000 +vt 0.250000 0.687500 +vt 0.000000 0.750000 +vt 0.000000 0.687500 +vt 0.250000 0.750000 +vt 0.750000 0.250000 +vt 0.687500 0.000000 +vt 0.750000 0.000000 +vt 0.687500 0.250000 +vt 0.312500 0.750000 +vt 0.750000 0.312500 +vt 0.250000 1.000000 +vt 1.000000 0.250000 +vt 0.312500 1.000000 +vt 1.000000 0.312500 +vt 0.687500 0.750000 +vt 0.750000 0.687500 +vt 0.750000 0.750000 +vt 1.000000 0.750000 +vt 1.000000 0.687500 +vt 0.750000 1.000000 +vt 0.687500 1.000000 +vt 0.250000 0.312500 +vt 0.312500 0.250000 +vt 0.312500 0.312500 +vt 0.250000 0.062500 +vt 0.687500 0.312500 +vt 0.687500 0.250000 +vt 0.750000 0.312500 +vt 0.750000 0.062500 +vt 1.000000 0.312500 +vt 0.750000 0.312500 +vt 1.000000 0.250000 +vt 0.750000 0.250000 +vt 0.687500 0.312500 +vt 0.312500 0.312500 +vt 0.687500 0.250000 +vt 0.312500 0.250000 +vt 0.750000 0.250000 +vt 1.000000 0.250000 +vt 0.750000 0.312500 +vt 1.000000 0.062500 +vt 1.000000 0.312500 +vt 0.750000 0.062500 +vt 0.000000 0.312500 +vt 0.250000 0.062500 +vt 0.250000 0.312500 +vt 0.000000 0.062500 +vt 0.250000 0.312500 +vt 0.312500 0.250000 +vt 0.312500 0.312500 +vt 0.250000 0.062500 +vt 0.687500 0.250000 +vt 0.750000 0.312500 +vt 0.687500 0.312500 +vt 0.750000 0.062500 +vt 0.000000 0.312500 +vt 0.250000 0.312500 +vt 0.000000 0.250000 +vt 0.250000 0.250000 +vt 0.687500 0.312500 +vt 0.312500 0.312500 +vt 0.687500 0.250000 +vt 0.312500 0.250000 +vt 0.250000 0.312500 +vt 0.000000 0.312500 +vt 0.250000 0.250000 +vt 0.000000 0.250000 +vt 0.250000 0.312500 +vt 0.000000 0.062500 +vt 0.000000 0.312500 +vt 0.250000 0.062500 +vt 0.000000 0.312500 +vt 0.000000 0.062500 +vt 0.750000 0.312500 +vt 0.687500 0.250000 +vt 0.687500 0.312500 +vt 0.750000 0.062500 +vt 0.312500 0.312500 +vt 0.312500 0.250000 +vt 0.250000 0.312500 +vt 0.250000 0.062500 +vt 0.000000 0.250000 +vt 0.250000 0.250000 +vt 0.312500 0.312500 +vt 0.687500 0.312500 +vt 0.312500 0.250000 +vt 0.687500 0.250000 +vt 0.250000 0.312500 +vt 0.000000 0.312500 +vt 0.250000 0.250000 +vt 0.000000 0.250000 +vt 0.250000 0.312500 +vt 0.000000 0.062500 +vt 0.000000 0.312500 +vt 0.250000 0.062500 +vt 1.000000 0.312500 +vt 0.750000 0.062500 +vt 0.750000 0.312500 +vt 1.000000 0.062500 +vt 0.750000 0.312500 +vt 0.687500 0.250000 +vt 0.687500 0.312500 +vt 0.750000 0.062500 +vt 0.312500 0.312500 +vt 0.312500 0.250000 +vt 0.250000 0.312500 +vt 0.250000 0.062500 +vt 1.000000 0.312500 +vt 0.750000 0.312500 +vt 1.000000 0.250000 +vt 0.750000 0.250000 +vt 0.312500 0.312500 +vt 0.687500 0.312500 +vt 0.312500 0.250000 +vt 0.687500 0.250000 +vt 0.750000 0.312500 +vt 1.000000 0.312500 +vt 0.750000 0.250000 +vt 1.000000 0.250000 +vt 0.750000 0.312500 +vt 1.000000 0.062500 +vt 1.000000 0.312500 +vt 0.750000 0.062500 +vt 1.000000 0.312500 +vt 1.000000 0.062500 +vt 0.750000 0.000000 +vt 0.250000 0.000000 +vt 0.750000 0.687500 +vt 1.000000 0.312500 +vt 1.000000 0.687500 +vt 0.750000 0.312500 +vt 1.000000 0.250000 +vt 0.750000 0.250000 +vt 0.750000 0.000000 +vt 1.000000 0.000000 +vt 0.750000 0.000000 +vt 0.250000 0.000000 +vt 0.312500 0.000000 +vt 0.687500 0.000000 +vt 0.250000 0.250000 +vt 0.000000 0.250000 +vt 0.000000 0.000000 +vt 0.250000 0.000000 +vt 0.250000 0.000000 +vt 0.750000 0.000000 +vt 0.250000 0.312500 +vt 0.000000 0.687500 +vt 0.000000 0.312500 +vt 0.250000 0.687500 +vt 0.250000 1.000000 +vt 0.000000 1.000000 +vt 0.000000 0.750000 +vt 0.250000 0.750000 +vt 0.250000 0.000000 +vt 0.750000 0.000000 +vt 0.312500 0.750000 +vt 0.687500 1.000000 +vt 0.312500 1.000000 +vt 0.687500 0.750000 +vt 1.000000 1.000000 +vt 0.750000 0.750000 +vt 1.000000 0.750000 +vt 0.750000 1.000000 +vt 0.000000 0.250000 +vt 0.250000 0.750000 +vt 0.250000 0.250000 +vt 0.000000 0.750000 +vt 0.750000 0.250000 +vt 0.750000 0.750000 +vt 1.000000 0.750000 +vt 1.000000 0.250000 +vt 0.250000 1.000000 +vt 0.750000 1.000000 +vt 1.000000 0.000000 +vt 1.000000 0.062500 +vt 0.000000 0.062500 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 0.062500 +vt 0.000000 0.062500 +vt 0.000000 0.000000 +vt 1.000000 0.062500 +vt 1.000000 0.000000 +vt 0.000000 0.000000 +vt 0.000000 0.062500 +vt 0.000000 1.000000 +vt 1.000000 1.000000 +vn 0.0000 1.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn 0.0000 0.0000 -1.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 -1.0000 0.0000 +s off +f 1/1/1 2/2/1 3/3/1 +f 1/1/1 4/4/1 2/2/1 +f 5/5/1 6/6/1 7/7/1 +f 5/5/1 3/3/1 6/6/1 +f 5/5/1 1/1/1 3/3/1 +f 8/8/1 9/9/1 10/10/1 +f 8/8/1 1/1/1 5/5/1 +f 11/11/1 9/9/1 8/8/1 +f 12/12/1 13/13/1 14/14/1 +f 12/12/1 15/15/1 13/13/1 +f 16/16/1 11/11/1 8/8/1 +f 17/17/1 5/5/1 15/15/1 +f 17/17/1 15/15/1 12/12/1 +f 18/18/1 11/11/1 16/16/1 +f 19/19/1 17/17/1 12/12/1 +f 20/20/1 18/18/1 16/16/1 +f 21/21/1 17/17/1 19/19/1 +f 22/22/1 8/8/1 5/5/1 +f 22/22/1 5/5/1 17/17/1 +f 22/22/1 16/16/1 8/8/1 +f 23/23/1 22/22/1 17/17/1 +f 24/24/1 22/22/1 23/23/1 +f 25/25/1 23/23/1 26/26/1 +f 25/25/1 24/24/1 23/23/1 +f 27/27/1 28/28/1 22/22/1 +f 27/27/1 22/22/1 24/24/1 +f 19/29/2 29/30/2 21/31/2 +f 19/29/2 30/32/2 29/30/2 +f 26/33/2 31/34/2 25/35/2 +f 30/32/2 31/34/2 29/30/2 +f 31/34/2 32/36/2 25/35/2 +f 30/32/2 32/36/2 31/34/2 +f 26/37/3 23/38/3 31/39/3 +f 31/39/3 23/38/3 33/40/3 +f 23/41/2 17/42/2 33/43/2 +f 33/43/2 17/42/2 34/44/2 +f 17/17/4 21/21/4 34/45/4 +f 34/45/4 21/21/4 29/46/4 +f 12/47/3 30/48/3 19/49/3 +f 35/50/3 30/48/3 12/47/3 +f 14/51/2 35/52/2 12/53/2 +f 36/54/2 35/52/2 14/51/2 +f 6/55/3 37/56/3 7/57/3 +f 6/55/3 38/58/3 37/56/3 +f 39/59/3 14/60/3 13/61/3 +f 37/56/3 36/62/3 39/59/3 +f 38/58/3 36/62/3 37/56/3 +f 39/59/3 36/62/3 14/60/3 +f 13/63/5 15/64/5 39/65/5 +f 39/65/5 15/64/5 40/66/5 +f 15/67/3 5/68/3 40/69/3 +f 40/69/3 5/68/3 41/70/3 +f 5/71/2 7/72/2 41/73/2 +f 41/73/2 7/72/2 37/74/2 +f 3/75/5 38/76/5 6/77/5 +f 42/78/5 38/76/5 3/75/5 +f 2/79/3 42/78/3 3/75/3 +f 43/80/3 42/78/3 2/79/3 +f 9/81/5 44/82/5 10/83/5 +f 9/81/5 45/84/5 44/82/5 +f 4/85/5 46/86/5 2/87/5 +f 45/84/5 46/86/5 44/82/5 +f 46/86/5 43/88/5 2/87/5 +f 45/84/5 43/88/5 46/86/5 +f 4/4/4 1/1/4 46/89/4 +f 46/89/4 1/1/4 47/90/4 +f 1/91/5 8/92/5 47/93/5 +f 47/93/5 8/92/5 48/94/5 +f 8/95/3 10/96/3 48/97/3 +f 48/97/3 10/96/3 44/98/3 +f 11/99/4 45/100/4 9/101/4 +f 49/102/4 45/100/4 11/99/4 +f 18/103/5 49/104/5 11/105/5 +f 50/106/5 49/104/5 18/103/5 +f 27/107/4 51/108/4 28/109/4 +f 27/107/4 52/110/4 51/108/4 +f 20/111/4 53/112/4 18/113/4 +f 52/110/4 53/112/4 51/108/4 +f 53/112/4 50/114/4 18/113/4 +f 52/110/4 50/114/4 53/112/4 +f 20/115/2 16/116/2 53/117/2 +f 53/117/2 16/116/2 54/118/2 +f 16/119/4 22/120/4 54/121/4 +f 54/121/4 22/120/4 55/122/4 +f 22/123/5 28/124/5 55/125/5 +f 55/125/5 28/124/5 51/126/5 +f 24/127/2 52/128/2 27/129/2 +f 56/130/2 52/128/2 24/127/2 +f 25/131/4 56/130/4 24/127/4 +f 32/132/4 56/130/4 25/131/4 +f 30/32/2 57/133/2 32/36/2 +f 58/134/2 57/133/2 30/32/2 +f 33/135/1 29/136/1 31/137/1 +f 33/135/1 34/138/1 29/136/1 +f 30/139/1 35/140/1 36/141/1 +f 30/139/1 36/141/1 59/142/1 +f 38/58/3 60/143/3 36/62/3 +f 61/144/3 60/143/3 38/58/3 +f 40/69/1 37/145/1 39/146/1 +f 40/69/1 41/70/1 37/145/1 +f 42/147/1 43/148/1 62/149/1 +f 42/147/1 62/149/1 38/150/1 +f 45/84/5 63/151/5 43/88/5 +f 64/152/5 63/151/5 45/84/5 +f 47/153/1 44/154/1 46/155/1 +f 47/153/1 48/156/1 44/154/1 +f 50/157/1 65/158/1 45/159/1 +f 50/157/1 45/159/1 49/160/1 +f 52/110/4 66/161/4 50/114/4 +f 67/162/4 66/161/4 52/110/4 +f 54/163/1 51/164/1 53/165/1 +f 54/163/1 55/166/1 51/164/1 +f 68/167/1 56/168/1 32/169/1 +f 68/167/1 52/170/1 56/168/1 +f 63/171/6 69/172/6 70/173/6 +f 64/174/6 69/172/6 63/171/6 +f 70/173/6 71/175/6 61/144/6 +f 61/144/6 71/175/6 60/143/6 +f 69/172/6 72/176/6 70/173/6 +f 70/173/6 72/176/6 71/175/6 +f 71/175/6 57/177/6 58/178/6 +f 72/176/6 57/177/6 71/175/6 +f 66/179/6 67/180/6 69/172/6 +f 69/172/6 67/180/6 72/176/6 +f 32/36/2 73/181/2 68/182/2 +f 57/133/2 73/181/2 32/36/2 +f 59/183/2 58/134/2 30/32/2 +f 74/184/2 58/134/2 59/183/2 +f 36/62/3 74/185/3 59/186/3 +f 60/143/3 74/185/3 36/62/3 +f 62/187/3 61/144/3 38/58/3 +f 75/188/3 61/144/3 62/187/3 +f 43/88/5 75/188/5 62/187/5 +f 63/151/5 75/188/5 43/88/5 +f 65/189/5 64/152/5 45/84/5 +f 76/190/5 64/152/5 65/189/5 +f 50/114/4 76/191/4 65/192/4 +f 66/161/4 76/191/4 50/114/4 +f 68/182/4 67/162/4 52/110/4 +f 73/181/4 67/162/4 68/182/4 +f 63/171/6 70/173/6 75/188/6 +f 75/188/6 70/173/6 61/144/6 +f 76/193/6 66/179/6 64/174/6 +f 64/174/6 66/179/6 69/172/6 +f 72/176/6 73/194/6 57/177/6 +f 67/180/6 73/194/6 72/176/6 +f 71/175/6 58/178/6 60/143/6 +f 60/143/6 58/178/6 74/185/6 diff --git a/mymillwork/models/mymillwork_mach19.obj b/mymillwork/models/mymillwork_mach19.obj new file mode 100644 index 0000000..4d90257 --- /dev/null +++ b/mymillwork/models/mymillwork_mach19.obj @@ -0,0 +1,50 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +g node0_Body +v 0.500000 -0.187500 0.437500 +v -0.500000 -0.500000 0.437500 +v -0.500000 -0.187500 0.437500 +v 0.500000 -0.500000 0.437500 +v 0.500000 -0.500000 0.500000 +v 0.500000 -0.187500 0.500000 +v -0.500000 -0.187500 0.500000 +v -0.500000 -0.500000 0.500000 +vt 0.999750 0.312594 +vt 0.000250 0.000250 +vt 0.000250 0.312594 +vt 0.999750 0.000250 +vt 0.000250 0.000250 +vt 0.062719 0.000250 +vt 0.062719 0.312594 +vt 0.000250 0.312594 +vt 0.000250 0.312594 +vt 0.999750 0.000250 +vt 0.999750 0.312594 +vt 0.000250 0.000250 +vt 0.062719 0.000250 +vt 0.062719 0.312594 +vt 0.000250 0.062719 +vt 0.999750 0.062719 +vt 0.999750 0.062719 +vt 0.000250 0.062719 +vt 0.999750 0.000250 +vt 0.000250 0.000250 +vn 0.0000 0.0000 -1.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +s off +f 1/1/1 2/2/1 3/3/1 +f 4/4/1 2/2/1 1/1/1 +f 5/5/2 4/6/2 1/7/2 +f 5/5/2 1/7/2 6/8/2 +f 7/9/3 5/10/3 6/11/3 +f 8/12/3 5/10/3 7/9/3 +f 2/13/4 8/12/4 7/9/4 +f 2/13/4 7/9/4 3/14/4 +f 2/15/5 4/16/5 5/10/5 +f 2/15/5 5/10/5 8/12/5 +f 1/17/6 3/18/6 6/19/6 +f 6/19/6 3/18/6 7/20/6 diff --git a/mymillwork/models/mymillwork_mach2.obj b/mymillwork/models/mymillwork_mach2.obj new file mode 100644 index 0000000..b5876fa --- /dev/null +++ b/mymillwork/models/mymillwork_mach2.obj @@ -0,0 +1,1101 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +g node0_Body001 +v -0.375000 -0.125000 0.375000 +v -0.375000 -0.125000 -0.500000 +v -0.375000 -0.062500 0.375000 +v -0.375000 -0.062500 -0.500000 +v -0.437500 0.500000 -0.500000 +v -0.437500 0.437500 -0.500000 +v -0.500000 0.500000 -0.500000 +v -0.437500 0.250000 -0.500000 +v -0.375000 0.437500 -0.500000 +v -0.375000 0.250000 -0.500000 +v -0.437500 0.125000 -0.500000 +v -0.437500 -0.000000 -0.500000 +v -0.375000 0.125000 -0.500000 +v -0.375000 -0.000000 -0.500000 +v -0.437500 -0.062500 -0.500000 +v -0.339286 -0.172197 -0.500000 +v -0.500000 -0.437500 -0.500000 +v -0.301029 -0.217358 -0.500000 +v -0.260345 -0.260345 -0.500000 +v -0.217358 -0.301029 -0.500000 +v -0.172197 -0.339286 -0.500000 +v -0.125000 -0.375000 -0.500000 +v -0.062500 -0.375000 -0.500000 +v -0.062500 -0.437500 -0.500000 +v -0.437500 -0.062500 0.375000 +v 0.500000 -0.125000 0.375000 +v 0.500000 -0.062500 0.375000 +v -0.351934 -0.156094 0.351934 +v -0.327763 -0.186337 0.327763 +v -0.291904 -0.227419 0.291904 +v -0.253671 -0.266961 0.253671 +v -0.213121 -0.304804 0.213121 +v -0.125000 -0.375000 0.062500 +v -0.169980 -0.341057 0.169980 +v -0.125000 -0.375000 0.125000 +v -0.125000 -0.375000 0.000000 +v -0.125000 -0.375000 -0.125000 +v -0.125000 -0.375000 -0.250000 +v -0.125000 -0.375000 -0.437500 +v -0.062500 -0.375000 -0.437500 +v -0.062500 -0.437500 -0.437500 +v 0.500000 -0.500000 -0.500000 +v 0.437500 -0.437500 -0.500000 +v 0.500000 -0.437500 -0.500000 +v 0.250000 -0.437500 -0.500000 +v -0.500000 -0.500000 -0.500000 +v 0.000000 -0.437500 -0.500000 +v 0.125000 -0.437500 -0.500000 +v -0.500000 0.500000 0.437500 +v -0.500000 0.437500 0.375000 +v -0.500000 0.437500 0.437500 +v -0.500000 0.250000 0.375000 +v -0.500000 0.125000 0.437500 +v -0.500000 0.250000 0.437500 +v -0.500000 0.125000 0.375000 +v -0.500000 0.000000 0.375000 +v -0.500000 -0.062500 0.437500 +v -0.500000 0.000000 0.437500 +v -0.500000 -0.062500 0.375000 +v -0.500000 -0.172197 0.339286 +v -0.500000 -0.125000 0.375000 +v -0.500000 -0.217358 0.301029 +v -0.500000 -0.260345 0.260345 +v -0.500000 -0.301029 0.217358 +v -0.500000 -0.375000 0.062500 +v -0.500000 -0.339286 0.172197 +v -0.500000 -0.375000 0.125000 +v -0.500000 -0.375000 -0.000000 +v -0.500000 -0.437500 -0.000000 +v -0.500000 -0.437500 0.062500 +v -0.500000 -0.375000 -0.125000 +v -0.500000 -0.375000 -0.250000 +v -0.500000 -0.437500 -0.250000 +v -0.500000 -0.437500 -0.125000 +v -0.500000 -0.375000 -0.437500 +v -0.500000 -0.437500 -0.437500 +v -0.437500 0.500000 0.437500 +v -0.437500 0.437500 0.437500 +v -0.437500 0.437500 0.375000 +v -0.375000 0.437500 0.375000 +v -0.375000 0.250000 0.375000 +v -0.437500 0.250000 0.375000 +v -0.437500 0.125000 0.375000 +v -0.437500 0.250000 0.437500 +v -0.437500 0.125000 0.437500 +v -0.375000 0.125000 0.375000 +v -0.375000 0.000000 0.375000 +v -0.437500 0.000000 0.375000 +v -0.437500 0.000000 0.437500 +v -0.437500 -0.062500 0.437500 +v -0.375000 -0.062500 0.437500 +v 0.500000 -0.062500 0.437500 +v 0.500000 -0.375000 0.125000 +v 0.500000 -0.437500 0.062500 +v 0.500000 -0.375000 0.062500 +v 0.500000 -0.437500 0.500000 +v 0.500000 -0.301029 0.217358 +v 0.500000 -0.260345 0.260345 +v 0.500000 -0.339286 0.172197 +v 0.500000 -0.217358 0.301029 +v 0.500000 -0.172197 0.339286 +v 0.500000 0.125000 0.375000 +v 0.500000 0.000000 0.437500 +v 0.500000 0.000000 0.375000 +v 0.500000 0.125000 0.437500 +v 0.500000 0.437500 0.375000 +v 0.500000 0.250000 0.437500 +v 0.500000 0.250000 0.375000 +v 0.500000 0.437500 0.437500 +v 0.500000 0.500000 0.500000 +v 0.500000 0.500000 0.437500 +v 0.437500 -0.375000 0.125000 +v 0.250000 -0.375000 0.125000 +v 0.125000 -0.375000 0.125000 +v 0.000000 -0.375000 0.125000 +v -0.062500 -0.375000 0.125000 +v -0.062500 -0.375000 -0.250000 +v -0.062500 -0.375000 -0.125000 +v -0.062500 -0.375000 0.000000 +v -0.062500 -0.375000 0.062500 +v 0.000000 -0.375000 -0.437500 +v 0.000000 -0.437500 -0.437500 +v -0.500000 -0.500000 0.500000 +v 0.500000 -0.500000 0.500000 +v -0.500000 0.500000 0.500000 +v 0.500000 -0.437500 -0.437500 +v 0.500000 -0.437500 -0.250000 +v 0.500000 -0.437500 -0.125000 +v 0.500000 -0.437500 0.000000 +v 0.437500 -0.437500 -0.437500 +v 0.250000 -0.375000 -0.500000 +v 0.437500 -0.375000 -0.500000 +v 0.000000 -0.375000 -0.500000 +v 0.125000 -0.375000 -0.500000 +v 0.125000 -0.437500 -0.437500 +v 0.250000 -0.437500 -0.437500 +v -0.437500 0.500000 0.500000 +v -0.375000 0.437500 0.437500 +v -0.375000 0.250000 0.437500 +v -0.375000 0.125000 0.437500 +v -0.375000 0.000000 0.437500 +v 0.437500 -0.375000 0.062500 +v 0.437500 -0.437500 0.062500 +v -0.375000 0.437500 0.500000 +v 0.437500 -0.375000 0.500000 +v -0.437500 0.437500 0.500000 +v 0.437500 -0.437500 0.500000 +v -0.375000 0.250000 0.500000 +v 0.250000 -0.375000 0.500000 +v -0.375000 0.125000 0.500000 +v 0.125000 -0.375000 0.500000 +v 0.250000 -0.437500 0.500000 +v -0.437500 0.250000 0.500000 +v -0.437500 0.125000 0.500000 +v 0.125000 -0.437500 0.500000 +v -0.375000 0.000000 0.500000 +v 0.000000 -0.375000 0.500000 +v -0.437500 0.000000 0.500000 +v -0.437500 -0.062500 0.500000 +v -0.375000 -0.062500 0.500000 +v -0.062500 -0.437500 0.500000 +v 0.000000 -0.437500 0.500000 +v -0.062500 -0.375000 0.500000 +v -0.375000 -0.125000 0.500000 +v -0.339286 -0.172197 0.500000 +v -0.172197 -0.339286 0.500000 +v -0.125000 -0.375000 0.500000 +v -0.217358 -0.301029 0.500000 +v -0.301029 -0.217358 0.500000 +v -0.260345 -0.260345 0.500000 +v 0.000000 -0.375000 0.062500 +v 0.125000 -0.375000 0.062500 +v 0.250000 -0.375000 0.062500 +v 0.000000 -0.375000 -0.250000 +v -0.062500 -0.437500 -0.125000 +v -0.062500 -0.437500 -0.250000 +v 0.000000 -0.375000 -0.125000 +v 0.000000 -0.375000 0.000000 +v -0.062500 -0.437500 0.062500 +v -0.062500 -0.437500 0.000000 +v 0.437500 -0.437500 0.000000 +v 0.500000 -0.375000 -0.125000 +v 0.500000 -0.375000 0.000000 +v 0.437500 -0.437500 -0.125000 +v 0.437500 -0.437500 -0.250000 +v 0.500000 -0.375000 -0.437500 +v 0.500000 -0.375000 -0.250000 +v 0.437500 -0.375000 -0.437500 +v 0.250000 -0.375000 -0.437500 +v 0.125000 -0.375000 -0.437500 +v 0.437500 -0.375000 0.000000 +v 0.000000 -0.437500 0.062500 +v 0.125000 -0.375000 0.000000 +v 0.250000 -0.437500 0.062500 +v 0.125000 -0.437500 0.062500 +v 0.250000 -0.375000 0.000000 +v 0.000000 -0.437500 -0.250000 +v 0.125000 -0.375000 -0.250000 +v 0.000000 -0.437500 -0.125000 +v 0.000000 -0.437500 0.000000 +v 0.125000 -0.375000 -0.125000 +v 0.437500 -0.375000 -0.125000 +v 0.437500 -0.375000 -0.250000 +v 0.250000 -0.375000 -0.250000 +v 0.125000 -0.437500 0.000000 +v 0.250000 -0.437500 0.000000 +v 0.250000 -0.375000 -0.125000 +v 0.125000 -0.437500 -0.250000 +v 0.250000 -0.437500 -0.250000 +v 0.125000 -0.437500 -0.125000 +v 0.250000 -0.437500 -0.125000 +vt 0.125000 0.375000 +vt 1.000000 0.375000 +vt 0.125000 0.437500 +vt 1.000000 0.437500 +vt 0.062500 1.000000 +vt 0.062500 0.937500 +vt 0.000000 1.000000 +vt 0.062500 0.750000 +vt 0.125000 0.937500 +vt 0.125000 0.750000 +vt 0.062500 0.625000 +vt 0.062500 0.500000 +vt 0.125000 0.625000 +vt 0.125000 0.500000 +vt 0.125000 0.437500 +vt 0.125000 0.375000 +vt 0.062500 0.437500 +vt 0.160714 0.327803 +vt 0.000000 0.062500 +vt 0.198971 0.282642 +vt 0.239655 0.239655 +vt 0.282642 0.198971 +vt 0.327803 0.160714 +vt 0.375000 0.125000 +vt 0.437500 0.125000 +vt 0.437500 0.062500 +vt 0.125000 0.125000 +vt 0.125000 1.000000 +vt 0.062500 0.125000 +vt 0.062500 1.000000 +vt 1.000000 0.375000 +vt 1.000000 0.437500 +vt 0.148066 0.343906 +vt 1.000000 0.327803 +vt 0.172237 0.313663 +vt 1.000000 0.282642 +vt 0.208096 0.272581 +vt 1.000000 0.239655 +vt 0.246329 0.233039 +vt 0.282642 1.000000 +vt 0.246329 0.246329 +vt 0.286879 0.286879 +vt 0.239655 1.000000 +vt 0.375000 0.437500 +vt 0.330020 0.330020 +vt 0.375000 0.375000 +vt 0.327803 1.000000 +vt 0.375000 0.500000 +vt 0.375000 0.625000 +vt 0.375000 0.750000 +vt 0.375000 0.937500 +vt 0.375000 1.000000 +vt 0.437500 0.937500 +vt 0.437500 1.000000 +vt 1.000000 0.062500 +vt 0.937500 0.125000 +vt 0.937500 0.062500 +vt 1.000000 0.125000 +vt 1.000000 0.000000 +vt 0.937500 0.062500 +vt 1.000000 0.062500 +vt 0.750000 0.062500 +vt 0.000000 0.000000 +vt 0.500000 0.062500 +vt 0.625000 0.062500 +vt 0.062500 1.000000 +vt 0.125000 0.937500 +vt 0.062500 0.937500 +vt 0.125000 0.750000 +vt 0.062500 0.625000 +vt 0.062500 0.750000 +vt 0.125000 0.625000 +vt 0.125000 0.500000 +vt 0.062500 0.437500 +vt 0.062500 0.500000 +vt 0.125000 0.437500 +vt 0.160714 0.327803 +vt 0.125000 0.375000 +vt 0.198971 0.282642 +vt 1.000000 1.000000 +vt 0.239655 0.239655 +vt 0.282642 0.198971 +vt 0.437500 0.125000 +vt 0.327803 0.160714 +vt 0.375000 0.125000 +vt 0.500000 0.125000 +vt 0.500000 0.062500 +vt 0.437500 0.062500 +vt 0.625000 0.125000 +vt 0.750000 0.125000 +vt 0.750000 0.062500 +vt 0.625000 0.062500 +vt 0.937500 0.125000 +vt 1.000000 0.062500 +vt 0.937500 0.062500 +vt 0.062500 0.062500 +vt 0.000000 0.062500 +vt 0.062500 0.937500 +vt 0.125000 0.937500 +vt 0.062500 1.000000 +vt 1.000000 0.937500 +vt 1.000000 1.000000 +vt 0.125000 0.125000 +vt 0.125000 1.000000 +vt 0.062500 0.125000 +vt 0.062500 1.000000 +vt 0.125000 0.750000 +vt 1.000000 0.750000 +vt 0.125000 0.937500 +vt 1.000000 0.937500 +vt 0.062500 0.125000 +vt 0.062500 1.000000 +vt 0.125000 0.125000 +vt 0.125000 1.000000 +vt 0.125000 0.625000 +vt 0.062500 0.750000 +vt 0.062500 0.625000 +vt 0.125000 0.750000 +vt 1.000000 0.625000 +vt 1.000000 0.750000 +vt 0.125000 0.125000 +vt 0.125000 1.000000 +vt 0.062500 0.125000 +vt 0.062500 1.000000 +vt 0.125000 0.500000 +vt 1.000000 0.500000 +vt 0.125000 0.625000 +vt 1.000000 0.625000 +vt 0.062500 0.125000 +vt 0.062500 1.000000 +vt 0.125000 0.125000 +vt 0.125000 1.000000 +vt 0.125000 0.437500 +vt 0.062500 0.500000 +vt 0.062500 0.437500 +vt 0.125000 0.500000 +vt 1.000000 0.437500 +vt 1.000000 0.500000 +vt 0.062500 0.062500 +vt 0.125000 0.062500 +vt 1.000000 0.125000 +vt 1.000000 0.062500 +vt 0.375000 0.125000 +vt 0.437500 0.062500 +vt 0.437500 0.125000 +vt 0.000000 0.062500 +vt 0.282642 0.198971 +vt 0.239655 0.239655 +vt 0.327803 0.160714 +vt 0.198971 0.282642 +vt 0.160714 0.327803 +vt 0.125000 0.375000 +vt 0.062500 0.437500 +vt 0.125000 0.437500 +vt 0.125000 0.625000 +vt 0.062500 0.500000 +vt 0.125000 0.500000 +vt 0.062500 0.625000 +vt 0.125000 0.937500 +vt 0.062500 0.750000 +vt 0.125000 0.750000 +vt 0.062500 0.937500 +vt 0.000000 1.000000 +vt 0.062500 1.000000 +vt 1.000000 0.327803 +vt 1.000000 0.282642 +vt 1.000000 0.239655 +vt 1.000000 0.282642 +vt 1.000000 0.327803 +vt 0.937500 0.375000 +vt 1.000000 0.375000 +vt 0.750000 0.375000 +vt 0.625000 0.375000 +vt 0.500000 0.375000 +vt 0.437500 0.375000 +vt 0.437500 0.750000 +vt 0.437500 0.625000 +vt 0.437500 0.500000 +vt 0.437500 0.437500 +vt 0.437500 0.062500 +vt 0.500000 0.125000 +vt 0.500000 0.062500 +vt 0.437500 0.125000 +vt 0.500000 1.000000 +vt 0.437500 0.937500 +vt 0.500000 0.937500 +vt 0.437500 1.000000 +vt 0.000000 0.000000 +vt 1.000000 1.000000 +vt 1.000000 0.000000 +vt 0.000000 1.000000 +vt 1.000000 0.000000 +vt 0.000000 1.000000 +vt 0.937500 0.062500 +vt 0.750000 0.062500 +vt 0.000000 0.000000 +vt 0.625000 0.062500 +vt 0.500000 0.062500 +vt 1.000000 1.000000 +vt 0.937500 0.937500 +vt 1.000000 0.937500 +vt 0.937500 1.000000 +vt 0.750000 0.125000 +vt 0.937500 0.125000 +vt 0.500000 0.125000 +vt 0.625000 0.125000 +vt 0.750000 1.000000 +vt 0.625000 0.937500 +vt 0.750000 0.937500 +vt 0.625000 1.000000 +vt 0.062500 0.000000 +vt 0.000000 0.000000 +vt 1.000000 0.937500 +vt 0.125000 0.937500 +vt 1.000000 1.000000 +vt 0.062500 0.062500 +vt 0.125000 0.062500 +vt 1.000000 0.750000 +vt 1.000000 0.937500 +vt 0.062500 0.062500 +vt 0.125000 0.062500 +vt 1.000000 0.625000 +vt 0.125000 0.625000 +vt 1.000000 0.750000 +vt 0.125000 0.750000 +vt 0.062500 0.062500 +vt 0.125000 0.062500 +vt 1.000000 0.500000 +vt 1.000000 0.625000 +vt 0.062500 0.062500 +vt 0.125000 0.062500 +vt 1.000000 0.437500 +vt 0.125000 0.437500 +vt 1.000000 0.500000 +vt 0.125000 0.500000 +vt 0.937500 0.437500 +vt 1.000000 0.437500 +vt 0.937500 0.062500 +vt 1.000000 0.125000 +vt 1.000000 0.062500 +vt 0.937500 0.125000 +vt 0.062500 1.000000 +vt 0.125000 0.937500 +vt 1.000000 1.000000 +vt 0.937500 0.125000 +vt 1.000000 0.062500 +vt 0.062500 0.937500 +vt 0.937500 0.062500 +vt 0.125000 0.750000 +vt 0.750000 0.125000 +vt 0.125000 0.625000 +vt 0.625000 0.125000 +vt 0.750000 0.062500 +vt 0.062500 0.750000 +vt 0.062500 0.625000 +vt 0.625000 0.062500 +vt 0.125000 0.500000 +vt 0.500000 0.125000 +vt 0.062500 0.500000 +vt 0.062500 0.437500 +vt 0.125000 0.437500 +vt 0.437500 0.062500 +vt 0.500000 0.062500 +vt 0.437500 0.125000 +vt 0.125000 0.375000 +vt 0.160714 0.327803 +vt 0.327803 0.160714 +vt 0.375000 0.125000 +vt 0.282642 0.198971 +vt 0.198971 0.282642 +vt 0.239655 0.239655 +vt 1.000000 0.062500 +vt 1.000000 0.000000 +vt 1.000000 0.125000 +vt 1.000000 0.062500 +vt 1.000000 0.062500 +vt 1.000000 0.125000 +vt 1.000000 0.125000 +vt 1.000000 0.062500 +vt 1.000000 0.062500 +vt 1.000000 0.125000 +vt 0.500000 0.437500 +vt 0.625000 0.437500 +vt 0.750000 0.437500 +vt 0.500000 0.937500 +vt 0.500000 0.750000 +vt 0.625000 0.062500 +vt 0.750000 0.125000 +vt 0.625000 0.125000 +vt 0.750000 0.062500 +vt 0.500000 0.625000 +vt 0.500000 0.500000 +vt 0.437500 0.062500 +vt 0.500000 0.125000 +vt 0.437500 0.125000 +vt 0.500000 0.062500 +vt 0.937500 0.125000 +vt 1.000000 0.062500 +vt 0.937500 0.062500 +vt 1.000000 0.125000 +vt 1.000000 0.500000 +vt 0.937500 0.437500 +vt 1.000000 0.437500 +vt 0.937500 0.500000 +vt 0.625000 0.125000 +vt 0.500000 0.125000 +vt 1.000000 0.750000 +vt 0.937500 0.625000 +vt 1.000000 0.625000 +vt 0.937500 0.750000 +vt 0.937500 0.125000 +vt 0.750000 0.125000 +vt 0.937500 0.062500 +vt 1.000000 0.125000 +vt 0.937500 0.125000 +vt 1.000000 0.062500 +vt 1.000000 0.125000 +vt 1.000000 0.062500 +vt 0.937500 0.125000 +vt 1.000000 0.062500 +vt 0.937500 0.062500 +vt 1.000000 0.125000 +vt 0.937500 0.937500 +vt 0.750000 1.000000 +vt 0.750000 0.937500 +vt 0.937500 1.000000 +vt 0.625000 0.937500 +vt 0.500000 1.000000 +vt 0.625000 1.000000 +vt 0.937500 0.062500 +vt 1.000000 0.125000 +vt 0.937500 0.125000 +vt 1.000000 0.062500 +vt 0.750000 0.062500 +vt 0.625000 0.062500 +vt 0.750000 0.125000 +vt 0.625000 0.125000 +vt 0.500000 0.062500 +vt 0.437500 0.125000 +vt 0.437500 0.062500 +vt 0.500000 0.125000 +vt 0.500000 0.062500 +vt 0.500000 0.125000 +vt 0.625000 0.500000 +vt 0.750000 0.062500 +vt 0.625000 0.062500 +vt 0.750000 0.125000 +vt 0.625000 0.125000 +vt 0.937500 0.500000 +vt 0.750000 0.500000 +vt 0.500000 0.125000 +vt 0.437500 0.062500 +vt 0.500000 0.062500 +vt 0.437500 0.125000 +vt 0.625000 0.750000 +vt 0.437500 0.062500 +vt 0.500000 0.125000 +vt 0.500000 0.062500 +vt 0.437500 0.125000 +vt 0.437500 0.750000 +vt 0.500000 0.625000 +vt 0.500000 0.750000 +vt 0.437500 0.625000 +vt 0.500000 0.125000 +vt 0.437500 0.062500 +vt 0.500000 0.062500 +vt 0.437500 0.125000 +vt 0.625000 0.625000 +vt 0.500000 0.500000 +vt 0.437500 0.437500 +vt 0.500000 0.437500 +vt 0.437500 0.500000 +vt 1.000000 0.125000 +vt 0.937500 0.062500 +vt 1.000000 0.062500 +vt 0.937500 0.125000 +vt 0.937500 0.625000 +vt 1.000000 0.500000 +vt 1.000000 0.625000 +vt 0.937500 0.062500 +vt 1.000000 0.125000 +vt 1.000000 0.062500 +vt 0.937500 0.125000 +vt 0.625000 0.062500 +vt 0.750000 0.062500 +vt 0.625000 0.125000 +vt 0.750000 0.125000 +vt 1.000000 0.125000 +vt 0.937500 0.062500 +vt 1.000000 0.062500 +vt 0.937500 0.125000 +vt 1.000000 0.750000 +vt 1.000000 0.937500 +vt 0.937500 0.750000 +vt 0.750000 0.750000 +vt 0.437500 0.062500 +vt 0.437500 0.125000 +vt 0.500000 0.062500 +vt 0.437500 0.125000 +vt 0.437500 0.062500 +vt 0.500000 0.125000 +vt 0.500000 0.125000 +vt 0.437500 0.062500 +vt 0.437500 0.125000 +vt 0.500000 0.062500 +vt 0.750000 0.500000 +vt 0.625000 0.437500 +vt 0.750000 0.437500 +vt 0.625000 0.500000 +vt 0.750000 0.625000 +vt 0.625000 0.125000 +vt 0.750000 0.125000 +vt 0.625000 0.062500 +vt 0.750000 0.062500 +vt 0.750000 0.125000 +vt 0.625000 0.062500 +vt 0.750000 0.062500 +vt 0.625000 0.125000 +vt 0.750000 0.125000 +vt 0.625000 0.062500 +vt 0.750000 0.062500 +vt 0.625000 0.125000 +vt 0.625000 0.062500 +vt 0.750000 0.125000 +vt 0.625000 0.125000 +vt 0.750000 0.062500 +vt 0.750000 0.062500 +vt 0.750000 0.125000 +vt 0.625000 0.125000 +vt 0.625000 0.062500 +vt 0.750000 0.750000 +vt 0.625000 0.625000 +vt 0.750000 0.625000 +vt 0.625000 0.750000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 1.0000 0.0000 +vn 0.8031 0.5958 0.0000 +vn 0.7811 0.6244 -0.0002 +vn 0.7974 0.6034 0.0004 +vn 0.7532 0.6578 -0.0003 +vn 0.7630 0.6464 0.0004 +vn 0.7188 0.6952 -0.0003 +vn 0.7263 0.6874 0.0004 +vn 0.6822 0.7312 -0.0002 +vn 0.6874 0.7263 0.0003 +vn 0.6024 0.7982 0.0000 +vn 0.6433 0.7656 -0.0001 +vn 0.6464 0.7630 0.0002 +vn 0.6028 0.7979 0.0001 +vn 0.6034 0.7974 0.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 -1.0000 0.0000 +vn -0.0004 0.6034 -0.7974 +vn 0.0000 0.5958 -0.8031 +vn -0.0004 0.6464 -0.7630 +vn 0.0002 0.6244 -0.7811 +vn -0.0004 0.6874 -0.7263 +vn 0.0003 0.6578 -0.7532 +vn -0.0003 0.7263 -0.6874 +vn 0.0003 0.6952 -0.7188 +vn -0.0002 0.7630 -0.6464 +vn 0.0002 0.7312 -0.6822 +vn 0.0000 0.7974 -0.6034 +vn 0.0001 0.7656 -0.6433 +vn -0.0001 0.7979 -0.6028 +vn 0.0000 0.7982 -0.6024 +vn 0.0000 0.0000 1.0000 +s off +f 1/1/1 2/2/1 3/3/1 +f 2/2/1 4/4/1 3/3/1 +f 5/5/2 6/6/2 7/7/2 +f 6/6/2 8/8/2 7/7/2 +f 9/9/2 10/10/2 6/6/2 +f 6/6/2 10/10/2 8/8/2 +f 8/8/2 11/11/2 7/7/2 +f 11/11/2 12/12/2 7/7/2 +f 13/13/2 14/14/2 11/11/2 +f 11/11/2 14/14/2 12/12/2 +f 4/15/2 2/16/2 15/17/2 +f 16/18/2 17/19/2 2/16/2 +f 18/20/2 17/19/2 16/18/2 +f 15/17/2 17/19/2 12/12/2 +f 12/12/2 17/19/2 7/7/2 +f 2/16/2 17/19/2 15/17/2 +f 18/20/2 19/21/2 17/19/2 +f 19/21/2 20/22/2 17/19/2 +f 20/22/2 21/23/2 17/19/2 +f 21/23/2 22/24/2 17/19/2 +f 23/25/2 24/26/2 22/24/2 +f 22/24/2 24/26/2 17/19/2 +f 3/27/3 4/28/3 25/29/3 +f 4/28/3 15/30/3 25/29/3 +f 26/31/2 1/1/2 27/32/2 +f 1/1/2 3/3/2 27/32/2 +f 2/2/4 1/1/4 28/33/4 +f 16/34/5 28/33/5 29/35/5 +f 16/34/6 2/2/6 28/33/6 +f 18/36/7 29/35/7 30/37/7 +f 18/36/8 16/34/8 29/35/8 +f 19/38/9 30/37/9 31/39/9 +f 19/38/10 18/36/10 30/37/10 +f 20/40/11 31/41/11 32/42/11 +f 20/40/12 19/43/12 31/41/12 +f 33/44/13 34/45/13 35/46/13 +f 21/47/14 32/42/14 34/45/14 +f 21/47/15 20/40/15 32/42/15 +f 36/48/13 34/45/13 33/44/13 +f 37/49/16 21/47/16 34/45/16 +f 37/49/13 34/45/13 36/48/13 +f 38/50/17 21/47/17 37/49/17 +f 39/51/17 21/47/17 38/50/17 +f 22/52/17 21/47/17 39/51/17 +f 40/53/3 22/52/3 39/51/3 +f 23/54/3 22/52/3 40/53/3 +f 24/55/1 40/56/1 41/57/1 +f 24/55/1 23/58/1 40/56/1 +f 42/59/2 43/60/2 44/61/2 +f 42/59/2 45/62/2 43/60/2 +f 46/63/2 17/19/2 24/26/2 +f 42/59/2 46/63/2 24/26/2 +f 42/59/2 24/26/2 47/64/2 +f 42/59/2 47/64/2 48/65/2 +f 42/59/2 48/65/2 45/62/2 +f 49/66/18 50/67/18 51/68/18 +f 52/69/18 53/70/18 54/71/18 +f 52/69/18 55/72/18 53/70/18 +f 56/73/18 57/74/18 58/75/18 +f 56/73/18 59/76/18 57/74/18 +f 59/76/18 60/77/18 61/78/18 +f 56/73/18 62/79/18 59/76/18 +f 59/76/18 62/79/18 60/77/18 +f 50/67/18 7/80/18 52/69/18 +f 49/66/18 7/80/18 50/67/18 +f 52/69/18 7/80/18 55/72/18 +f 56/73/18 63/81/18 62/79/18 +f 64/82/18 65/83/18 66/84/18 +f 66/84/18 65/83/18 67/85/18 +f 63/81/18 68/86/18 64/82/18 +f 56/73/18 68/86/18 63/81/18 +f 64/82/18 68/86/18 65/83/18 +f 65/83/18 69/87/18 70/88/18 +f 68/86/18 69/87/18 65/83/18 +f 55/72/18 71/89/18 56/73/18 +f 7/80/18 71/89/18 55/72/18 +f 56/73/18 71/89/18 68/86/18 +f 7/80/18 72/90/18 71/89/18 +f 71/89/18 73/91/18 74/92/18 +f 72/90/18 73/91/18 71/89/18 +f 7/80/18 75/93/18 72/90/18 +f 75/93/18 17/94/18 76/95/18 +f 7/80/18 17/94/18 75/93/18 +f 77/96/3 5/5/3 49/97/3 +f 5/5/3 7/7/3 49/97/3 +f 78/98/1 79/99/1 77/100/1 +f 6/101/1 5/102/1 79/99/1 +f 79/99/1 5/102/1 77/100/1 +f 80/103/3 9/104/3 79/105/3 +f 9/104/3 6/106/3 79/105/3 +f 81/107/1 10/108/1 80/109/1 +f 10/108/1 9/110/1 80/109/1 +f 82/111/19 8/112/19 81/113/19 +f 8/112/19 10/114/19 81/113/19 +f 83/115/1 84/116/1 85/117/1 +f 83/115/1 82/118/1 84/116/1 +f 11/119/1 8/120/1 83/115/1 +f 83/115/1 8/120/1 82/118/1 +f 86/121/3 13/122/3 83/123/3 +f 13/122/3 11/124/3 83/123/3 +f 87/125/1 14/126/1 86/127/1 +f 14/126/1 13/128/1 86/127/1 +f 88/129/19 12/130/19 87/131/19 +f 12/130/19 14/132/19 87/131/19 +f 25/133/1 89/134/1 90/135/1 +f 25/133/1 88/136/1 89/134/1 +f 15/137/1 12/138/1 25/133/1 +f 25/133/1 12/138/1 88/136/1 +f 3/27/3 90/139/3 91/140/3 +f 25/29/3 90/139/3 3/27/3 +f 27/141/3 3/27/3 92/142/3 +f 3/27/3 91/140/3 92/142/3 +f 93/143/1 94/144/1 95/145/1 +f 96/146/1 97/147/1 98/148/1 +f 96/146/1 99/149/1 97/147/1 +f 96/146/1 93/143/1 99/149/1 +f 96/146/1 94/144/1 93/143/1 +f 100/150/1 96/146/1 98/148/1 +f 101/151/1 96/146/1 100/150/1 +f 26/152/1 96/146/1 101/151/1 +f 92/153/1 26/152/1 27/154/1 +f 92/153/1 96/146/1 26/152/1 +f 102/155/1 103/156/1 104/157/1 +f 105/158/1 103/156/1 102/155/1 +f 106/159/1 107/160/1 108/161/1 +f 109/162/1 107/160/1 106/159/1 +f 110/163/1 109/162/1 111/164/1 +f 110/163/1 107/160/1 109/162/1 +f 110/163/1 96/146/1 92/153/1 +f 110/163/1 92/153/1 103/156/1 +f 110/163/1 103/156/1 105/158/1 +f 110/163/1 105/158/1 107/160/1 +f 28/33/20 26/31/20 101/165/20 +f 28/33/21 1/1/21 26/31/21 +f 29/35/22 101/165/22 100/166/22 +f 29/35/23 28/33/23 101/165/23 +f 30/37/24 100/166/24 98/167/24 +f 30/37/25 29/35/25 100/166/25 +f 31/41/26 98/167/26 97/168/26 +f 31/39/27 30/37/27 98/167/27 +f 32/42/28 97/168/28 99/169/28 +f 32/42/29 31/41/29 97/168/29 +f 112/170/30 99/169/30 93/171/30 +f 34/45/31 32/42/31 99/169/31 +f 113/172/30 99/169/30 112/170/30 +f 114/173/32 34/45/32 99/169/32 +f 114/173/30 99/169/30 113/172/30 +f 115/174/33 34/45/33 114/173/33 +f 116/175/33 34/45/33 115/174/33 +f 35/46/33 34/45/33 116/175/33 +f 40/53/3 38/50/3 117/176/3 +f 39/51/3 38/50/3 40/53/3 +f 118/177/3 117/176/3 37/49/3 +f 117/176/3 38/50/3 37/49/3 +f 37/49/3 119/178/3 118/177/3 +f 37/49/3 36/48/3 119/178/3 +f 120/179/3 119/178/3 33/44/3 +f 119/178/3 36/48/3 33/44/3 +f 120/179/3 35/46/3 116/175/3 +f 33/44/3 35/46/3 120/179/3 +f 41/180/2 121/181/2 122/182/2 +f 41/180/2 40/183/2 121/181/2 +f 47/184/3 41/185/3 122/186/3 +f 24/187/3 41/185/3 47/184/3 +f 123/188/19 42/189/19 124/190/19 +f 123/188/19 46/191/19 42/189/19 +f 46/192/18 76/95/18 17/94/18 +f 76/95/18 73/91/18 75/93/18 +f 46/192/18 73/91/18 76/95/18 +f 73/91/18 72/90/18 75/93/18 +f 46/192/18 74/92/18 73/91/18 +f 74/92/18 69/87/18 71/89/18 +f 46/192/18 69/87/18 74/92/18 +f 69/87/18 68/86/18 71/89/18 +f 70/88/18 67/85/18 65/83/18 +f 66/84/18 123/188/18 64/82/18 +f 67/85/18 123/188/18 66/84/18 +f 70/88/18 123/188/18 67/85/18 +f 123/188/18 63/81/18 64/82/18 +f 123/188/18 62/79/18 63/81/18 +f 123/188/18 60/77/18 62/79/18 +f 123/188/18 61/78/18 60/77/18 +f 61/78/18 57/74/18 59/76/18 +f 123/188/18 57/74/18 61/78/18 +f 58/75/18 55/72/18 56/73/18 +f 58/75/18 53/70/18 55/72/18 +f 54/71/18 50/67/18 52/69/18 +f 54/71/18 51/68/18 50/67/18 +f 51/68/18 125/193/18 49/66/18 +f 54/71/18 125/193/18 51/68/18 +f 123/188/18 125/193/18 54/71/18 +f 123/188/18 54/71/18 53/70/18 +f 123/188/18 53/70/18 58/75/18 +f 123/188/18 58/75/18 57/74/18 +f 46/192/18 123/188/18 70/88/18 +f 46/192/18 70/88/18 69/87/18 +f 126/194/1 42/59/1 44/61/1 +f 127/195/1 42/59/1 126/194/1 +f 96/146/1 124/196/1 94/144/1 +f 124/196/1 42/59/1 128/197/1 +f 128/197/1 42/59/1 127/195/1 +f 124/196/1 128/197/1 129/198/1 +f 124/196/1 129/198/1 94/144/1 +f 44/199/3 130/200/3 126/201/3 +f 43/202/3 130/200/3 44/199/3 +f 131/203/2 43/60/2 45/62/2 +f 132/204/2 43/60/2 131/203/2 +f 133/205/2 48/65/2 47/64/2 +f 134/206/2 48/65/2 133/205/2 +f 45/207/3 135/208/3 136/209/3 +f 48/210/3 135/208/3 45/207/3 +f 77/96/3 49/97/3 137/211/3 +f 49/97/3 125/212/3 137/211/3 +f 109/213/2 138/214/2 111/215/2 +f 78/98/2 77/100/2 138/214/2 +f 138/214/2 77/100/2 111/215/2 +f 80/103/3 78/216/3 138/217/3 +f 79/105/3 78/216/3 80/103/3 +f 108/218/2 81/107/2 106/219/2 +f 81/107/2 80/109/2 106/219/2 +f 84/220/19 81/113/19 139/221/19 +f 84/220/19 82/111/19 81/113/19 +f 105/222/2 140/223/2 107/224/2 +f 140/223/2 139/225/2 107/224/2 +f 85/117/2 84/116/2 140/223/2 +f 140/223/2 84/116/2 139/225/2 +f 86/121/3 85/226/3 140/227/3 +f 83/123/3 85/226/3 86/121/3 +f 104/228/2 87/125/2 102/229/2 +f 87/125/2 86/127/2 102/229/2 +f 89/230/19 87/131/19 141/231/19 +f 89/230/19 88/129/19 87/131/19 +f 92/232/2 91/233/2 103/234/2 +f 91/233/2 141/235/2 103/234/2 +f 90/135/2 89/134/2 91/233/2 +f 91/233/2 89/134/2 141/235/2 +f 142/236/3 93/171/3 95/237/3 +f 142/236/3 112/170/3 93/171/3 +f 143/238/2 95/239/2 94/240/2 +f 143/238/2 142/241/2 95/239/2 +f 137/242/34 144/243/34 110/244/34 +f 145/245/34 96/246/34 110/244/34 +f 137/242/34 146/247/34 144/243/34 +f 145/245/34 147/248/34 96/246/34 +f 144/243/34 148/249/34 110/244/34 +f 110/244/34 149/250/34 145/245/34 +f 148/249/34 150/251/34 110/244/34 +f 149/250/34 151/252/34 152/253/34 +f 110/244/34 151/252/34 149/250/34 +f 150/251/34 151/252/34 110/244/34 +f 153/254/34 154/255/34 148/249/34 +f 148/249/34 154/255/34 150/251/34 +f 151/252/34 155/256/34 152/253/34 +f 156/257/34 157/258/34 150/251/34 +f 150/251/34 157/258/34 151/252/34 +f 158/259/34 159/260/34 156/257/34 +f 156/257/34 159/260/34 160/261/34 +f 157/258/34 161/262/34 162/263/34 +f 163/264/34 161/262/34 157/258/34 +f 164/265/34 165/266/34 160/261/34 +f 163/264/34 166/267/34 167/268/34 +f 157/258/34 168/269/34 163/264/34 +f 163/264/34 168/269/34 166/267/34 +f 160/261/34 169/270/34 156/257/34 +f 165/266/34 169/270/34 160/261/34 +f 156/257/34 170/271/34 157/258/34 +f 157/258/34 170/271/34 168/269/34 +f 169/270/34 170/271/34 156/257/34 +f 111/272/3 77/96/3 110/273/3 +f 77/96/3 137/211/3 110/273/3 +f 106/274/3 80/103/3 109/275/3 +f 80/103/3 138/217/3 109/275/3 +f 107/276/19 139/221/19 108/277/19 +f 139/221/19 81/113/19 108/277/19 +f 102/278/3 86/121/3 105/279/3 +f 86/121/3 140/227/3 105/279/3 +f 103/280/19 141/231/19 104/281/19 +f 141/231/19 87/131/19 104/281/19 +f 171/282/3 116/175/3 115/174/3 +f 120/179/3 116/175/3 171/282/3 +f 172/283/3 115/174/3 114/173/3 +f 171/282/3 115/174/3 172/283/3 +f 173/284/3 114/173/3 113/172/3 +f 172/283/3 114/173/3 173/284/3 +f 142/236/3 173/284/3 112/170/3 +f 173/284/3 113/172/3 112/170/3 +f 121/285/3 117/176/3 174/286/3 +f 40/53/3 117/176/3 121/285/3 +f 175/287/1 117/288/1 118/289/1 +f 176/290/1 117/288/1 175/287/1 +f 177/291/3 119/178/3 178/292/3 +f 118/177/3 119/178/3 177/291/3 +f 179/293/1 119/294/1 120/295/1 +f 180/296/1 119/294/1 179/293/1 +f 121/297/18 47/298/18 122/299/18 +f 133/300/18 47/298/18 121/297/18 +f 125/193/34 146/247/34 137/242/34 +f 96/246/34 147/248/34 124/190/34 +f 146/247/34 148/249/34 144/243/34 +f 145/245/34 149/250/34 147/248/34 +f 146/247/34 153/254/34 148/249/34 +f 125/193/34 153/254/34 146/247/34 +f 149/250/34 152/253/34 147/248/34 +f 147/248/34 152/253/34 124/190/34 +f 152/253/34 155/256/34 124/190/34 +f 150/251/34 158/259/34 156/257/34 +f 154/255/34 158/259/34 150/251/34 +f 151/252/34 162/263/34 155/256/34 +f 157/258/34 162/263/34 151/252/34 +f 155/256/34 162/263/34 124/190/34 +f 160/261/34 159/260/34 164/265/34 +f 167/268/34 161/262/34 163/264/34 +f 164/265/34 123/188/34 165/266/34 +f 165/266/34 123/188/34 169/270/34 +f 169/270/34 123/188/34 170/271/34 +f 170/271/34 123/188/34 168/269/34 +f 168/269/34 123/188/34 166/267/34 +f 166/267/34 123/188/34 167/268/34 +f 167/268/34 123/188/34 161/262/34 +f 159/260/34 123/188/34 164/265/34 +f 125/193/34 123/188/34 153/254/34 +f 153/254/34 123/188/34 154/255/34 +f 154/255/34 123/188/34 158/259/34 +f 158/259/34 123/188/34 159/260/34 +f 123/188/34 124/190/34 161/262/34 +f 161/262/34 124/190/34 162/263/34 +f 129/301/3 143/302/3 94/303/3 +f 181/304/3 143/302/3 129/301/3 +f 129/198/1 128/197/1 182/305/1 +f 183/306/1 129/198/1 182/305/1 +f 127/307/3 184/308/3 128/309/3 +f 185/310/3 184/308/3 127/307/3 +f 127/195/1 126/194/1 186/311/1 +f 187/312/1 127/195/1 186/311/1 +f 130/313/1 132/314/1 188/315/1 +f 43/316/1 132/314/1 130/313/1 +f 130/313/2 186/317/2 126/318/2 +f 130/313/2 188/315/2 186/317/2 +f 189/319/18 45/320/18 136/321/18 +f 131/322/18 45/320/18 189/319/18 +f 188/323/3 131/324/3 189/325/3 +f 132/326/3 131/324/3 188/323/3 +f 190/327/3 133/328/3 121/285/3 +f 134/329/3 133/328/3 190/327/3 +f 135/330/1 134/331/1 190/332/1 +f 48/333/1 134/331/1 135/330/1 +f 136/334/2 135/335/2 189/336/2 +f 135/335/2 190/337/2 189/336/2 +f 181/338/1 142/339/1 143/340/1 +f 181/338/1 191/341/1 142/339/1 +f 192/342/2 179/293/2 171/343/2 +f 179/293/2 120/295/2 171/343/2 +f 193/344/3 171/282/3 172/283/3 +f 193/344/3 178/292/3 171/282/3 +f 194/345/2 195/346/2 173/347/2 +f 195/346/2 172/348/2 173/347/2 +f 191/349/3 173/284/3 142/236/3 +f 191/349/3 196/350/3 173/284/3 +f 174/351/34 176/352/34 197/353/34 +f 117/354/34 176/352/34 174/351/34 +f 190/327/3 174/286/3 198/355/3 +f 121/285/3 174/286/3 190/327/3 +f 175/356/2 177/357/2 199/358/2 +f 175/356/2 118/359/2 177/357/2 +f 176/360/3 199/361/3 197/362/3 +f 176/360/3 175/363/3 199/361/3 +f 178/364/34 180/365/34 200/366/34 +f 119/367/34 180/365/34 178/364/34 +f 201/368/3 178/292/3 193/344/3 +f 177/291/3 178/292/3 201/368/3 +f 200/369/3 179/370/3 192/371/3 +f 180/372/3 179/370/3 200/369/3 +f 183/373/34 181/374/34 129/375/34 +f 191/376/34 181/374/34 183/373/34 +f 202/377/3 183/378/3 182/379/3 +f 202/377/3 191/349/3 183/378/3 +f 184/380/2 182/381/2 128/382/2 +f 184/380/2 202/383/2 182/381/2 +f 184/384/1 185/385/1 202/386/1 +f 185/385/1 203/387/1 202/386/1 +f 187/388/34 185/389/34 127/390/34 +f 203/391/34 185/389/34 187/388/34 +f 188/323/3 187/392/3 186/393/3 +f 188/323/3 203/394/3 187/392/3 +f 188/323/3 204/395/3 203/394/3 +f 189/325/3 204/395/3 188/323/3 +f 189/325/3 198/355/3 204/395/3 +f 190/327/3 198/355/3 189/325/3 +f 178/364/18 192/396/18 171/397/18 +f 178/364/18 200/366/18 192/396/18 +f 205/398/1 172/399/1 195/400/1 +f 205/398/1 193/401/1 172/399/1 +f 196/402/18 194/403/18 173/404/18 +f 196/402/18 206/405/18 194/403/18 +f 206/406/3 195/407/3 194/408/3 +f 205/409/3 195/407/3 206/406/3 +f 202/377/3 196/350/3 191/349/3 +f 207/410/3 196/350/3 202/377/3 +f 177/411/18 174/412/18 199/413/18 +f 174/412/18 197/414/18 199/413/18 +f 198/355/3 177/291/3 201/368/3 +f 198/355/3 174/286/3 177/291/3 +f 201/368/3 196/350/3 207/410/3 +f 201/368/3 193/344/3 196/350/3 +f 203/394/3 207/410/3 202/377/3 +f 203/394/3 204/395/3 207/410/3 +f 204/415/34 208/416/34 209/417/34 +f 198/418/34 208/416/34 204/415/34 +f 196/419/34 205/420/34 206/421/34 +f 193/422/34 205/420/34 196/419/34 +f 210/423/1 198/424/1 201/425/1 +f 208/426/1 198/424/1 210/423/1 +f 211/427/2 210/423/2 207/428/2 +f 210/423/2 201/425/2 207/428/2 +f 207/429/18 209/417/18 211/430/18 +f 204/415/18 209/417/18 207/429/18 +f 209/431/3 210/432/3 211/433/3 +f 208/434/3 210/432/3 209/431/3 diff --git a/mymillwork/models/mymillwork_mach20.obj b/mymillwork/models/mymillwork_mach20.obj new file mode 100644 index 0000000..87cfa34 --- /dev/null +++ b/mymillwork/models/mymillwork_mach20.obj @@ -0,0 +1,72 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +g node0_Body +v 0.500000 -0.500000 -0.500000 +v 0.437500 -0.500000 -0.500000 +v 0.500000 -0.187500 -0.500000 +v 0.437500 -0.187500 -0.500000 +v 0.437500 -0.187500 0.437500 +v 0.437500 -0.500000 0.437500 +v -0.500000 -0.187500 0.437500 +v -0.500000 -0.500000 0.437500 +v -0.500000 -0.500000 0.500000 +v -0.500000 -0.187500 0.500000 +v 0.500000 -0.187500 0.500000 +v 0.500000 -0.500000 0.500000 +vt 1.000000 0.000000 +vt 0.937500 0.000000 +vt 1.000000 0.312500 +vt 0.937500 0.312500 +vt 1.000000 0.000000 +vt 0.062500 0.312500 +vt 1.000000 0.312500 +vt 0.062500 0.000000 +vt 0.937500 0.000000 +vt 0.000000 0.312500 +vt 0.937500 0.312500 +vt 0.000000 0.000000 +vt 0.062500 0.000000 +vt 0.000000 0.000000 +vt 0.062500 0.312500 +vt 0.000000 0.312500 +vt 1.000000 0.312500 +vt 1.000000 0.000000 +vt 0.000000 0.000000 +vt 0.000000 0.312500 +vt 0.000000 0.062500 +vt 0.937500 0.062500 +vt 0.937500 1.000000 +vt 1.000000 1.000000 +vt 0.937500 0.062500 +vt 0.000000 0.062500 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.937500 1.000000 +vn 0.0000 0.0000 -1.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +s off +f 1/1/1 2/2/1 3/3/1 +f 3/3/1 2/2/1 4/4/1 +f 2/5/2 5/6/2 4/7/2 +f 2/5/2 6/8/2 5/6/2 +f 6/9/1 7/10/1 5/11/1 +f 6/9/1 8/12/1 7/10/1 +f 8/13/2 9/14/2 7/15/2 +f 7/15/2 9/14/2 10/16/2 +f 9/14/3 11/17/3 10/16/3 +f 9/14/3 12/18/3 11/17/3 +f 12/19/4 3/3/4 11/20/4 +f 12/19/4 1/1/4 3/3/4 +f 8/21/5 6/22/5 9/14/5 +f 6/22/5 12/18/5 9/14/5 +f 2/23/5 1/24/5 6/22/5 +f 6/22/5 1/24/5 12/18/5 +f 5/25/6 7/26/6 10/27/6 +f 11/28/6 5/25/6 10/27/6 +f 3/29/6 4/30/6 5/25/6 +f 3/29/6 5/25/6 11/28/6 diff --git a/mymillwork/models/mymillwork_mach21.obj b/mymillwork/models/mymillwork_mach21.obj new file mode 100644 index 0000000..194992a --- /dev/null +++ b/mymillwork/models/mymillwork_mach21.obj @@ -0,0 +1,48 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +g node0_Body +v -0.437500 -0.500000 0.437500 +v -0.500000 -0.500000 0.437500 +v -0.500000 -0.187500 0.437500 +v -0.437500 -0.187500 0.437500 +v -0.437500 -0.500000 0.500000 +v -0.437500 -0.187500 0.500000 +v -0.500000 -0.500000 0.500000 +v -0.500000 -0.187500 0.500000 +vt 1.000000 0.000000 +vt 0.000000 0.000000 +vt 0.000000 1.000000 +vt 1.000000 1.000000 +vt 0.000000 0.000000 +vt 0.000000 1.000000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.000000 0.200000 +vt 1.000000 0.200000 +vt 1.000000 0.200000 +vt 0.000000 0.200000 +vt 1.000000 0.000000 +vt 0.000000 0.000000 +vn 0.0000 0.0000 -1.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +s off +f 1/1/1 2/2/1 3/3/1 +f 1/1/1 3/3/1 4/4/1 +f 5/5/2 1/1/2 4/4/2 +f 5/5/2 4/4/2 6/6/2 +f 7/7/3 5/8/3 6/9/3 +f 7/7/3 6/9/3 8/10/3 +f 2/11/4 7/7/4 8/10/4 +f 2/11/4 8/10/4 3/12/4 +f 2/13/5 1/14/5 5/8/5 +f 2/13/5 5/8/5 7/7/5 +f 4/15/6 3/16/6 6/17/6 +f 6/17/6 3/16/6 8/18/6 diff --git a/mymillwork/models/mymillwork_mach22.obj b/mymillwork/models/mymillwork_mach22.obj new file mode 100644 index 0000000..32641da --- /dev/null +++ b/mymillwork/models/mymillwork_mach22.obj @@ -0,0 +1,163 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +g node0_Body +v 0.500000 -0.500000 0.500000 +v -0.500000 -0.500000 0.500000 +v 0.500000 -0.500000 0.312500 +v -0.500000 -0.500000 0.312500 +v 0.500000 -0.187500 0.312500 +v -0.500000 -0.187500 0.312500 +v -0.500000 -0.187500 0.375000 +v 0.500000 -0.187500 0.375000 +v 0.500000 -0.062500 0.375000 +v -0.500000 -0.062500 0.375000 +v -0.500000 -0.062500 0.437500 +v 0.500000 -0.062500 0.437500 +v -0.500000 0.000000 0.437500 +v 0.500000 0.000000 0.437500 +v 0.500000 0.000000 0.375000 +v -0.500000 0.000000 0.375000 +v 0.500000 0.125000 0.375000 +v -0.500000 0.125000 0.375000 +v -0.500000 0.125000 0.437500 +v 0.500000 0.125000 0.437500 +v -0.500000 0.187500 0.437500 +v 0.500000 0.187500 0.437500 +v -0.500000 0.187500 0.500000 +v 0.500000 0.187500 0.500000 +v -0.500000 -0.062500 0.437500 +v -0.500000 -0.062500 0.375000 +v -0.500000 0.000000 0.437500 +v -0.500000 0.125000 0.375000 +v -0.500000 0.000000 0.375000 +v -0.500000 0.125000 0.437500 +v -0.500000 0.187500 0.500000 +v -0.500000 0.187500 0.437500 +v 0.500000 -0.187500 0.375000 +v 0.500000 -0.062500 0.375000 +v 0.500000 0.125000 0.375000 +v 0.500000 0.000000 0.437500 +v 0.500000 0.000000 0.375000 +v 0.500000 0.125000 0.437500 +v 0.500000 0.187500 0.500000 +v 0.500000 0.187500 0.437500 +vt 1.000000 0.000000 +vt 0.000000 0.000000 +vt 1.000000 0.272727 +vt 0.000000 0.272727 +vt 1.000000 0.000000 +vt 0.000000 0.000000 +vt 1.000000 0.454545 +vt 0.000000 0.454545 +vt 0.000000 0.272727 +vt 0.000000 0.181818 +vt 1.000000 0.272727 +vt 1.000000 0.181818 +vt 1.000000 0.454545 +vt 0.000000 0.454545 +vt 1.000000 0.636364 +vt 0.000000 0.636364 +vt 0.000000 0.181818 +vt 0.000000 0.090909 +vt 1.000000 0.181818 +vt 1.000000 0.090909 +vt 0.000000 0.636364 +vt 0.000000 0.727273 +vt 1.000000 0.636364 +vt 1.000000 0.727273 +vt 1.000000 0.090909 +vt 0.000000 0.090909 +vt 1.000000 0.181818 +vt 0.000000 0.181818 +vt 1.000000 0.727273 +vt 0.000000 0.727273 +vt 1.000000 0.909091 +vt 0.000000 0.909091 +vt 0.000000 0.181818 +vt 0.000000 0.090909 +vt 1.000000 0.181818 +vt 1.000000 0.090909 +vt 0.000000 0.909091 +vt 0.000000 1.000000 +vt 1.000000 0.909091 +vt 1.000000 1.000000 +vt 0.000000 0.090909 +vt 0.000000 0.000000 +vt 1.000000 0.090909 +vt 1.000000 0.000000 +vt 0.000000 1.000000 +vt 1.000000 1.000000 +vt 0.125000 0.454545 +vt 0.187500 0.000000 +vt 0.187500 0.454545 +vt 0.062500 0.636364 +vt 0.125000 0.636364 +vt 0.062500 0.727273 +vt 0.125000 0.909091 +vt 0.125000 0.727273 +vt 0.062500 0.909091 +vt 0.000000 1.000000 +vt 0.062500 1.000000 +vt 0.125000 0.454545 +vt 0.000000 0.000000 +vt 0.187500 0.000000 +vt 0.187500 0.454545 +vt 0.062500 0.636364 +vt 0.125000 0.636364 +vt 0.125000 0.909091 +vt 0.062500 0.727273 +vt 0.125000 0.727273 +vt 0.062500 0.909091 +vt 0.000000 1.000000 +vt 0.062500 1.000000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 1.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn -1.0000 0.0000 0.0000 +vn 1.0000 0.0000 0.0000 +s off +f 1/1/1 2/2/1 3/3/1 +f 2/2/1 4/4/1 3/3/1 +f 3/5/2 4/6/2 5/7/2 +f 4/6/2 6/8/2 5/7/2 +f 6/9/3 7/10/3 5/11/3 +f 5/11/3 7/10/3 8/12/3 +f 8/13/2 7/14/2 9/15/2 +f 7/14/2 10/16/2 9/15/2 +f 10/17/3 11/18/3 9/19/3 +f 9/19/3 11/18/3 12/20/3 +f 11/21/2 13/22/2 12/23/2 +f 12/23/2 13/22/2 14/24/2 +f 14/25/1 13/26/1 15/27/1 +f 13/26/1 16/28/1 15/27/1 +f 15/29/2 16/30/2 17/31/2 +f 16/30/2 18/32/2 17/31/2 +f 18/33/3 19/34/3 17/35/3 +f 17/35/3 19/34/3 20/36/3 +f 19/37/2 21/38/2 20/39/2 +f 20/39/2 21/38/2 22/40/2 +f 21/41/3 23/42/3 22/43/3 +f 22/43/3 23/42/3 24/44/3 +f 23/45/4 2/2/4 24/46/4 +f 24/46/4 2/2/4 1/1/4 +f 2/2/5 7/47/5 4/48/5 +f 4/48/5 7/47/5 6/49/5 +f 7/47/5 25/50/5 26/51/5 +f 2/2/5 25/50/5 7/47/5 +f 27/52/5 28/53/5 29/54/5 +f 27/52/5 30/55/5 28/53/5 +f 30/55/5 31/56/5 32/57/5 +f 27/52/5 31/56/5 30/55/5 +f 2/2/5 31/56/5 25/50/5 +f 25/50/5 31/56/5 27/52/5 +f 33/58/6 1/59/6 3/60/6 +f 33/58/6 3/60/6 5/61/6 +f 12/62/6 33/58/6 34/63/6 +f 12/62/6 1/59/6 33/58/6 +f 35/64/6 36/65/6 37/66/6 +f 38/67/6 36/65/6 35/64/6 +f 39/68/6 38/67/6 40/69/6 +f 39/68/6 36/65/6 38/67/6 +f 39/68/6 1/59/6 12/62/6 +f 39/68/6 12/62/6 36/65/6 diff --git a/mymillwork/models/mymillwork_mach23.obj b/mymillwork/models/mymillwork_mach23.obj new file mode 100644 index 0000000..ef5dd8c --- /dev/null +++ b/mymillwork/models/mymillwork_mach23.obj @@ -0,0 +1,353 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +g node0_Body +v -0.500000 -0.500000 0.500000 +v -0.500000 -0.187500 0.375000 +v -0.500000 -0.500000 0.312500 +v -0.500000 -0.187500 0.312500 +v -0.500000 -0.062500 0.437500 +v -0.500000 -0.062500 0.375000 +v -0.500000 0.000000 0.437500 +v -0.500000 0.125000 0.375000 +v -0.500000 0.000000 0.375000 +v -0.500000 0.125000 0.437500 +v -0.500000 0.187500 0.500000 +v -0.500000 0.187500 0.437500 +v 0.312500 -0.500000 0.500000 +v 0.312500 -0.500000 0.312500 +v 0.312500 -0.187500 0.312500 +v -0.500000 -0.187500 0.312500 +v -0.500000 -0.187500 0.375000 +v 0.312500 -0.187500 0.375000 +v 0.375000 -0.062500 0.375000 +v 0.375000 -0.187500 0.375000 +v -0.500000 -0.062500 0.375000 +v 0.375000 -0.062500 0.437500 +v -0.500000 -0.062500 0.437500 +v 0.437500 -0.062500 0.437500 +v 0.437500 0.000000 0.437500 +v 0.375000 0.000000 0.437500 +v -0.500000 0.000000 0.437500 +v 0.375000 0.000000 0.375000 +v -0.500000 0.000000 0.375000 +v 0.375000 0.125000 0.375000 +v -0.500000 0.125000 0.375000 +v 0.375000 0.125000 0.437500 +v 0.437500 0.187500 0.437500 +v 0.437500 0.125000 0.437500 +v 0.437500 0.187500 0.500000 +v -0.500000 0.187500 0.500000 +v 0.375000 0.125000 0.500000 +v 0.437500 0.125000 0.500000 +v 0.437500 0.000000 0.500000 +v 0.375000 -0.062500 0.500000 +v 0.437500 -0.062500 0.500000 +v 0.375000 0.000000 0.500000 +v 0.312500 -0.187500 0.500000 +v 0.375000 -0.187500 0.500000 +v 0.500000 -0.500000 0.312500 +v 0.500000 -0.500000 0.500000 +v 0.312500 -0.187500 -0.500000 +v 0.312500 -0.500000 -0.500000 +v 0.375000 -0.187500 0.312500 +v 0.375000 -0.062500 -0.500000 +v 0.375000 -0.187500 -0.500000 +v 0.437500 -0.062500 0.375000 +v 0.437500 0.000000 0.375000 +v 0.437500 0.000000 -0.500000 +v 0.437500 -0.062500 -0.500000 +v 0.375000 0.125000 -0.500000 +v 0.375000 0.000000 -0.500000 +v 0.437500 0.125000 0.375000 +v 0.437500 0.187500 -0.500000 +v 0.437500 0.125000 -0.500000 +v 0.500000 0.187500 0.500000 +v 0.500000 0.187500 0.437500 +v 0.500000 -0.500000 -0.500000 +v 0.500000 -0.187500 0.375000 +v 0.500000 -0.187500 0.312500 +v 0.500000 -0.062500 0.437500 +v 0.500000 -0.062500 0.375000 +v 0.500000 0.125000 0.375000 +v 0.500000 0.000000 0.437500 +v 0.500000 0.000000 0.375000 +v 0.500000 0.125000 0.437500 +v 0.500000 0.187500 -0.500000 +v 0.437500 0.125000 -0.500000 +v 0.437500 0.187500 -0.500000 +v 0.375000 0.000000 -0.500000 +v 0.375000 -0.062500 -0.500000 +v 0.312500 -0.500000 -0.500000 +vt 0.000000 0.000000 +vt 0.125000 0.312500 +vt 0.187500 0.000000 +vt 0.187500 0.312500 +vt 0.062500 0.437500 +vt 0.125000 0.437500 +vt 0.062500 0.500000 +vt 0.125000 0.625000 +vt 0.125000 0.500000 +vt 0.062500 0.625000 +vt 0.000000 0.687500 +vt 0.062500 0.687500 +vt 0.812500 0.000000 +vt 0.812500 0.187500 +vt 0.000000 0.187500 +vt 0.812500 0.000000 +vt 0.000000 0.000000 +vt 0.812500 0.312500 +vt 0.000000 0.312500 +vt 0.812500 0.187500 +vt 0.000000 0.125000 +vt 0.812500 0.125000 +vt 0.000000 0.187500 +vt 0.812500 0.312500 +vt 0.875000 0.437500 +vt 0.875000 0.312500 +vt 0.000000 0.312500 +vt 0.000000 0.437500 +vt 0.875000 0.125000 +vt 0.000000 0.125000 +vt 0.875000 0.062500 +vt 0.000000 0.062500 +vt 0.937500 0.437500 +vt 0.875000 0.437500 +vt 0.937500 0.500000 +vt 0.875000 0.500000 +vt 0.000000 0.437500 +vt 0.000000 0.500000 +vt 0.875000 0.062500 +vt 0.000000 0.062500 +vt 0.875000 0.125000 +vt 0.000000 0.125000 +vt 0.875000 0.500000 +vt 0.000000 0.500000 +vt 0.875000 0.625000 +vt 0.000000 0.625000 +vt 0.875000 0.125000 +vt 0.000000 0.125000 +vt 0.875000 0.062500 +vt 0.000000 0.062500 +vt 0.875000 0.625000 +vt 0.937500 0.687500 +vt 0.937500 0.625000 +vt 0.000000 0.625000 +vt 0.000000 0.687500 +vt 0.937500 0.062500 +vt 0.000000 0.062500 +vt 0.937500 0.000000 +vt 0.000000 0.000000 +vt 0.937500 0.687500 +vt 0.875000 0.625000 +vt 0.937500 0.625000 +vt 0.937500 0.500000 +vt 0.875000 0.437500 +vt 0.937500 0.437500 +vt 0.875000 0.500000 +vt 0.812500 0.312500 +vt 0.875000 0.312500 +vt 0.000000 0.687500 +vt 1.000000 0.187500 +vt 1.000000 0.000000 +vt 0.187500 0.000000 +vt 1.000000 0.312500 +vt 1.000000 0.000000 +vt 0.187500 0.312500 +vt 0.875000 0.187500 +vt 0.875000 0.125000 +vt 0.187500 0.312500 +vt 1.000000 0.437500 +vt 1.000000 0.312500 +vt 0.125000 0.437500 +vt 0.125000 0.312500 +vt 0.937500 0.125000 +vt 0.937500 0.062500 +vt 0.937500 0.062500 +vt 0.937500 0.125000 +vt 0.125000 0.500000 +vt 1.000000 0.500000 +vt 1.000000 0.437500 +vt 0.125000 0.437500 +vt 0.062500 0.500000 +vt 0.062500 0.437500 +vt 0.125000 0.625000 +vt 1.000000 0.625000 +vt 1.000000 0.500000 +vt 0.125000 0.500000 +vt 0.937500 0.125000 +vt 0.937500 0.062500 +vt 0.125000 0.625000 +vt 1.000000 0.687500 +vt 1.000000 0.625000 +vt 0.062500 0.687500 +vt 0.062500 0.625000 +vt 1.000000 0.000000 +vt 1.000000 0.062500 +vt 1.000000 0.687500 +vt 0.812500 1.000000 +vt 1.000000 1.000000 +vt 0.125000 0.312500 +vt 0.187500 0.000000 +vt 0.187500 0.312500 +vt 0.000000 0.000000 +vt 0.062500 0.437500 +vt 0.125000 0.437500 +vt 0.125000 0.625000 +vt 0.062500 0.500000 +vt 0.125000 0.500000 +vt 0.062500 0.625000 +vt 0.000000 0.687500 +vt 0.062500 0.687500 +vt 1.000000 0.687500 +vt 0.937500 0.625000 +vt 0.937500 0.687500 +vt 0.937500 0.500000 +vt 0.937500 0.437500 +vt 0.875000 0.500000 +vt 0.875000 0.625000 +vt 0.875000 0.312500 +vt 0.875000 0.437500 +vt 1.000000 0.000000 +vt 0.812500 0.000000 +vt 0.812500 0.312500 +vt 0.875000 1.000000 +vt 0.812500 1.000000 +vt 0.937500 1.000000 +vt 0.875000 1.000000 +vt 0.875000 1.000000 +vt 0.937500 1.000000 +vt 0.937500 1.000000 +vt 0.875000 1.000000 +vt 1.000000 1.000000 +vt 0.937500 1.000000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 1.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn 1.0000 0.0000 0.0000 +s off +f 1/1/1 2/2/1 3/3/1 +f 3/3/1 2/2/1 4/4/1 +f 2/2/1 5/5/1 6/6/1 +f 1/1/1 5/5/1 2/2/1 +f 7/7/1 8/8/1 9/9/1 +f 7/7/1 10/10/1 8/8/1 +f 10/10/1 11/11/1 12/12/1 +f 7/7/1 11/11/1 10/10/1 +f 1/1/1 11/11/1 7/7/1 +f 1/1/1 7/7/1 5/5/1 +f 13/13/2 1/1/2 14/14/2 +f 1/1/2 3/15/2 14/14/2 +f 14/16/3 3/17/3 15/18/3 +f 3/17/3 16/19/3 15/18/3 +f 15/20/4 17/21/4 18/22/4 +f 16/23/4 17/21/4 15/20/4 +f 18/24/3 19/25/3 20/26/3 +f 17/27/3 21/28/3 18/24/3 +f 18/24/3 21/28/3 19/25/3 +f 19/29/4 21/30/4 22/31/4 +f 21/30/4 23/32/4 22/31/4 +f 24/33/3 22/34/3 25/35/3 +f 22/34/3 26/36/3 25/35/3 +f 22/34/3 23/37/3 26/36/3 +f 23/37/3 27/38/3 26/36/3 +f 26/39/2 27/40/2 28/41/2 +f 27/40/2 29/42/2 28/41/2 +f 28/43/3 29/44/3 30/45/3 +f 29/44/3 31/46/3 30/45/3 +f 30/47/4 31/48/4 32/49/4 +f 31/48/4 10/50/4 32/49/4 +f 32/51/3 33/52/3 34/53/3 +f 10/54/3 12/55/3 32/51/3 +f 32/51/3 12/55/3 33/52/3 +f 33/56/4 12/57/4 35/58/4 +f 12/57/4 36/59/4 35/58/4 +f 35/60/5 37/61/5 38/62/5 +f 39/63/5 40/64/5 41/65/5 +f 42/66/5 40/64/5 39/63/5 +f 40/64/5 43/67/5 44/68/5 +f 42/66/5 43/67/5 40/64/5 +f 37/61/5 36/69/5 42/66/5 +f 35/60/5 36/69/5 37/61/5 +f 42/66/5 36/69/5 43/67/5 +f 43/67/5 1/1/5 13/13/5 +f 36/69/5 1/1/5 43/67/5 +f 13/13/2 45/70/2 46/71/2 +f 13/13/2 14/14/2 45/70/2 +f 14/72/1 47/73/1 48/74/1 +f 14/72/1 15/75/1 47/73/1 +f 18/22/4 49/76/4 15/20/4 +f 18/22/4 20/77/4 49/76/4 +f 49/78/1 50/79/1 51/80/1 +f 49/78/1 19/81/1 50/79/1 +f 20/82/1 19/81/1 49/78/1 +f 22/31/4 52/83/4 19/29/4 +f 22/31/4 24/84/4 52/83/4 +f 25/85/2 28/41/2 53/86/2 +f 25/85/2 26/39/2 28/41/2 +f 53/87/1 54/88/1 55/89/1 +f 52/90/1 25/91/1 53/87/1 +f 52/90/1 53/87/1 55/89/1 +f 24/92/1 25/91/1 52/90/1 +f 30/93/1 56/94/1 57/95/1 +f 28/96/1 30/93/1 57/95/1 +f 32/49/4 58/97/4 30/47/4 +f 32/49/4 34/98/4 58/97/4 +f 58/99/1 59/100/1 60/101/1 +f 58/99/1 33/102/1 59/100/1 +f 34/103/1 33/102/1 58/99/1 +f 35/58/4 61/104/4 62/105/4 +f 35/58/4 62/105/4 33/56/4 +f 38/62/5 61/106/5 35/60/5 +f 39/63/5 61/106/5 38/62/5 +f 42/66/5 38/62/5 37/61/5 +f 42/66/5 39/63/5 38/62/5 +f 41/65/5 61/106/5 39/63/5 +f 44/68/5 41/65/5 40/64/5 +f 46/71/5 41/65/5 44/68/5 +f 13/13/5 44/68/5 43/67/5 +f 13/13/5 46/71/5 44/68/5 +f 46/71/5 61/106/5 41/65/5 +f 14/14/2 48/107/2 63/108/2 +f 45/70/2 14/14/2 63/108/2 +f 64/109/6 45/110/6 65/111/6 +f 64/109/6 46/112/6 45/110/6 +f 66/113/6 64/109/6 67/114/6 +f 66/113/6 46/112/6 64/109/6 +f 68/115/6 69/116/6 70/117/6 +f 71/118/6 69/116/6 68/115/6 +f 61/119/6 71/118/6 62/120/6 +f 61/119/6 69/116/6 71/118/6 +f 61/119/6 46/112/6 69/116/6 +f 69/116/6 46/112/6 66/113/6 +f 72/121/3 73/122/3 74/123/3 +f 72/121/3 54/124/3 73/122/3 +f 72/121/3 55/125/3 54/124/3 +f 73/122/3 75/126/3 56/127/3 +f 54/124/3 75/126/3 73/122/3 +f 55/125/3 51/128/3 76/129/3 +f 55/125/3 63/130/3 51/128/3 +f 51/128/3 77/131/3 47/132/3 +f 63/130/3 77/131/3 51/128/3 +f 72/121/3 63/130/3 55/125/3 +f 49/76/4 51/133/4 47/134/4 +f 15/20/4 49/76/4 47/134/4 +f 52/83/4 55/135/4 50/136/4 +f 19/29/4 52/83/4 50/136/4 +f 28/41/2 57/137/2 54/138/2 +f 53/86/2 28/41/2 54/138/2 +f 58/97/4 60/139/4 56/140/4 +f 30/47/4 58/97/4 56/140/4 +f 62/105/4 72/141/4 59/142/4 +f 33/56/4 62/105/4 59/142/4 +f 65/111/6 63/130/6 72/121/6 +f 65/111/6 45/110/6 63/130/6 +f 67/114/6 64/109/6 65/111/6 +f 70/117/6 66/113/6 67/114/6 +f 70/117/6 65/111/6 72/121/6 +f 70/117/6 67/114/6 65/111/6 +f 69/116/6 66/113/6 70/117/6 +f 68/115/6 70/117/6 72/121/6 +f 62/120/6 71/118/6 68/115/6 +f 62/120/6 68/115/6 72/121/6 diff --git a/mymillwork/models/mymillwork_mach24.obj b/mymillwork/models/mymillwork_mach24.obj new file mode 100644 index 0000000..ead79ef --- /dev/null +++ b/mymillwork/models/mymillwork_mach24.obj @@ -0,0 +1,224 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +g node0_Body +v -0.500000 0.187500 0.500000 +v -0.437500 0.125000 0.500000 +v -0.437500 0.187500 0.500000 +v -0.437500 0.000000 0.500000 +v -0.375000 0.000000 0.500000 +v -0.375000 0.125000 0.500000 +v -0.437500 -0.062500 0.500000 +v -0.375000 -0.187500 0.500000 +v -0.375000 -0.062500 0.500000 +v -0.500000 -0.500000 0.500000 +v -0.312500 -0.500000 0.500000 +v -0.312500 -0.187500 0.500000 +v -0.500000 -0.500000 0.312500 +v -0.312500 -0.500000 0.312500 +v -0.312500 -0.187500 0.375000 +v -0.312500 -0.187500 0.312500 +v -0.375000 -0.187500 0.375000 +v -0.375000 -0.062500 0.437500 +v -0.375000 -0.062500 0.375000 +v -0.437500 -0.062500 0.437500 +v -0.437500 0.000000 0.437500 +v -0.375000 0.000000 0.437500 +v -0.375000 0.125000 0.375000 +v -0.375000 0.000000 0.375000 +v -0.375000 0.125000 0.437500 +v -0.437500 0.125000 0.437500 +v -0.437500 0.187500 0.437500 +v -0.500000 0.187500 0.437500 +v -0.500000 0.125000 0.437500 +v -0.500000 0.125000 0.375000 +v -0.500000 0.000000 0.437500 +v -0.500000 0.000000 0.375000 +v -0.500000 -0.062500 0.437500 +v -0.500000 -0.062500 0.375000 +v -0.500000 -0.187500 0.375000 +v -0.500000 -0.187500 0.312500 +v -0.375000 -0.187500 0.312500 +v -0.437500 -0.062500 0.375000 +v -0.437500 0.000000 0.375000 +v -0.437500 0.125000 0.375000 +vt 0.000000 1.000000 +vt 0.333333 0.909091 +vt 0.333333 1.000000 +vt 0.333333 0.727273 +vt 0.666667 0.727273 +vt 0.666667 0.909091 +vt 0.333333 0.636364 +vt 0.666667 0.454545 +vt 0.666667 0.636364 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 0.454545 +vt 0.000000 0.272727 +vt 1.000000 0.272727 +vt 0.000000 0.454545 +vt 0.000000 0.000000 +vt 0.666667 0.454545 +vt 1.000000 0.000000 +vt 1.000000 0.454545 +vt 0.666667 0.181818 +vt 1.000000 0.000000 +vt 1.000000 0.181818 +vt 0.666667 0.000000 +vt 0.333333 0.636364 +vt 0.666667 0.454545 +vt 0.666667 0.636364 +vt 0.000000 0.636364 +vt 0.000000 0.454545 +vt 0.333333 0.090909 +vt 0.666667 0.000000 +vt 0.666667 0.090909 +vt 0.333333 0.000000 +vt 0.000000 0.727273 +vt 0.333333 0.636364 +vt 0.333333 0.727273 +vt 0.000000 0.636364 +vt 0.666667 0.090909 +vt 0.333333 0.000000 +vt 0.333333 0.090909 +vt 0.666667 0.000000 +vt 0.666667 0.909091 +vt 0.333333 0.727273 +vt 0.666667 0.727273 +vt 0.333333 0.909091 +vt 0.000000 0.909091 +vt 0.000000 0.727273 +vt 0.333333 0.090909 +vt 0.666667 0.000000 +vt 0.666667 0.090909 +vt 0.333333 0.000000 +vt 0.000000 1.000000 +vt 0.333333 0.909091 +vt 0.333333 1.000000 +vt 0.000000 0.909091 +vt 0.333333 0.000000 +vt 0.000000 0.090909 +vt 0.000000 0.000000 +vt 0.333333 0.090909 +vt 0.333333 0.909091 +vt 0.333333 1.000000 +vt 0.666667 0.909091 +vt 0.333333 0.727273 +vt 0.666667 0.727273 +vt 0.333333 0.636364 +vt 0.666667 0.636364 +vt 0.666667 0.454545 +vt 1.000000 0.454545 +vt 1.000000 0.000000 +vt 0.666667 0.454545 +vt 0.000000 0.000000 +vt 0.000000 0.454545 +vt 1.000000 0.272727 +vt 0.666667 0.272727 +vt 0.333333 0.636364 +vt 0.000000 0.454545 +vt 0.000000 0.636364 +vt 0.333333 0.181818 +vt 0.666667 0.181818 +vt 0.000000 0.636364 +vt 0.000000 0.727273 +vt 0.666667 0.181818 +vt 0.333333 0.181818 +vt 0.333333 0.727273 +vt 0.333333 0.909091 +vt 0.000000 0.727273 +vt 0.000000 0.909091 +vt 0.333333 0.181818 +vt 0.666667 0.181818 +vt 0.000000 0.909091 +vt 0.000000 1.000000 +vt 0.000000 0.181818 +vt 0.000000 0.090909 +vt 0.000000 0.090909 +vt 0.000000 0.181818 +vt 0.000000 0.181818 +vt 0.000000 0.090909 +vt 0.000000 0.272727 +vt 0.000000 0.181818 +vn 0.0000 0.0000 1.0000 +vn 0.0000 -1.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +s off +f 1/1/1 2/2/1 3/3/1 +f 1/1/1 4/4/1 2/2/1 +f 2/2/1 5/5/1 6/6/1 +f 4/4/1 5/5/1 2/2/1 +f 1/1/1 7/7/1 4/4/1 +f 7/7/1 8/8/1 9/9/1 +f 7/7/1 10/10/1 8/8/1 +f 8/8/1 11/11/1 12/12/1 +f 10/10/1 11/11/1 8/8/1 +f 1/1/1 10/10/1 7/7/1 +f 10/10/2 13/13/2 11/11/2 +f 13/13/2 14/14/2 11/11/2 +f 12/15/3 11/16/3 15/17/3 +f 15/17/3 14/18/3 16/19/3 +f 11/16/3 14/18/3 15/17/3 +f 17/20/4 12/21/4 15/22/4 +f 8/23/4 12/21/4 17/20/4 +f 18/24/3 17/25/3 19/26/3 +f 9/27/3 8/28/3 18/24/3 +f 18/24/3 8/28/3 17/25/3 +f 20/29/4 9/30/4 18/31/4 +f 7/32/4 9/30/4 20/29/4 +f 4/33/3 20/34/3 21/35/3 +f 4/33/3 7/36/3 20/34/3 +f 22/37/2 4/38/2 21/39/2 +f 5/40/2 4/38/2 22/37/2 +f 23/41/3 22/42/3 24/43/3 +f 25/44/3 22/42/3 23/41/3 +f 6/45/3 5/46/3 25/44/3 +f 25/44/3 5/46/3 22/42/3 +f 26/47/4 6/48/4 25/49/4 +f 2/50/4 6/48/4 26/47/4 +f 3/51/3 26/52/3 27/53/3 +f 3/51/3 2/54/3 26/52/3 +f 3/55/4 28/56/4 1/57/4 +f 27/58/4 28/56/4 3/55/4 +f 29/59/5 1/1/5 28/60/5 +f 30/61/5 31/62/5 29/59/5 +f 32/63/5 31/62/5 30/61/5 +f 29/59/5 31/62/5 1/1/5 +f 31/62/5 33/64/5 1/1/5 +f 34/65/5 35/66/5 33/64/5 +f 36/67/5 13/68/5 35/66/5 +f 35/66/5 10/10/5 33/64/5 +f 13/68/5 10/10/5 35/66/5 +f 10/10/5 1/1/5 33/64/5 +f 16/19/6 14/18/6 37/69/6 +f 37/69/6 13/70/6 36/71/6 +f 14/18/6 13/70/6 37/69/6 +f 16/72/4 17/20/4 15/22/4 +f 37/73/4 17/20/4 16/72/4 +f 17/25/6 38/74/6 19/26/6 +f 35/75/6 34/76/6 38/74/6 +f 35/75/6 38/74/6 17/25/6 +f 38/77/4 18/31/4 19/78/4 +f 38/77/4 20/29/4 18/31/4 +f 33/79/6 21/35/6 20/34/6 +f 33/79/6 31/80/6 21/35/6 +f 21/39/2 24/81/2 22/37/2 +f 21/39/2 39/82/2 24/81/2 +f 39/83/6 23/41/6 24/43/6 +f 39/83/6 40/84/6 23/41/6 +f 32/85/6 30/86/6 40/84/6 +f 32/85/6 40/84/6 39/83/6 +f 40/87/4 25/49/4 23/88/4 +f 40/87/4 26/47/4 25/49/4 +f 29/89/6 27/53/6 26/52/6 +f 29/89/6 28/90/6 27/53/6 +f 30/91/4 26/47/4 40/87/4 +f 30/91/4 29/92/4 26/47/4 +f 31/93/2 39/82/2 21/39/2 +f 31/93/2 32/94/2 39/82/2 +f 34/95/4 20/29/4 38/77/4 +f 34/95/4 33/96/4 20/29/4 +f 36/97/4 17/20/4 37/73/4 +f 36/97/4 35/98/4 17/20/4 diff --git a/mymillwork/models/mymillwork_mach3.obj b/mymillwork/models/mymillwork_mach3.obj new file mode 100644 index 0000000..93e009e --- /dev/null +++ b/mymillwork/models/mymillwork_mach3.obj @@ -0,0 +1,961 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +g node0_Body +v 0.500000 -0.125000 0.375000 +v 0.437500 -0.062500 0.375000 +v 0.500000 -0.062500 0.375000 +v 0.375000 -0.125000 0.375000 +v 0.375000 -0.062500 0.375000 +v 0.375000 -0.062500 0.437500 +v 0.375000 -0.125000 0.500000 +v 0.375000 -0.062500 0.500000 +v 0.437500 -0.062500 0.437500 +v 0.500000 -0.062500 0.437500 +v 0.500000 -0.437500 -0.437500 +v 0.500000 -0.500000 -0.500000 +v 0.500000 -0.437500 -0.500000 +v 0.500000 -0.437500 -0.250000 +v 0.500000 -0.375000 -0.250000 +v 0.500000 -0.375000 -0.437500 +v 0.500000 -0.437500 -0.125000 +v 0.500000 -0.437500 0.000000 +v 0.500000 -0.375000 0.000000 +v 0.500000 -0.375000 -0.125000 +v 0.500000 -0.375000 0.125000 +v 0.500000 -0.437500 0.062500 +v 0.500000 -0.375000 0.062500 +v 0.500000 -0.500000 0.500000 +v 0.500000 -0.301029 0.217358 +v 0.500000 -0.260345 0.260345 +v 0.500000 -0.339286 0.172197 +v 0.500000 -0.217358 0.301029 +v 0.500000 -0.172197 0.339286 +v 0.500000 -0.125000 0.375000 +v 0.500000 -0.062500 0.375000 +v 0.500000 0.125000 0.437500 +v 0.500000 0.000000 0.437500 +v 0.500000 0.000000 0.375000 +v 0.500000 0.125000 0.375000 +v 0.500000 0.437500 0.437500 +v 0.500000 0.250000 0.437500 +v 0.500000 0.250000 0.375000 +v 0.500000 0.437500 0.375000 +v 0.500000 0.500000 0.500000 +v 0.500000 0.500000 0.437500 +v 0.351934 -0.156094 0.351934 +v 0.327763 -0.186337 0.327763 +v 0.291904 -0.227419 0.291904 +v 0.253671 -0.266961 0.253671 +v 0.213121 -0.304804 0.213121 +v 0.169980 -0.341057 0.169980 +v 0.125000 -0.375000 0.125000 +v 0.437500 0.500000 0.500000 +v 0.437500 0.437500 0.500000 +v 0.375000 0.437500 0.500000 +v 0.437500 0.250000 0.500000 +v 0.375000 0.250000 0.500000 +v 0.437500 0.125000 0.500000 +v 0.437500 0.000000 0.500000 +v 0.375000 0.125000 0.500000 +v 0.375000 0.000000 0.500000 +v 0.437500 -0.062500 0.500000 +v 0.301029 -0.217358 0.500000 +v 0.339286 -0.172197 0.500000 +v 0.260345 -0.260345 0.500000 +v 0.217358 -0.301029 0.500000 +v 0.172197 -0.339286 0.500000 +v 0.125000 -0.375000 0.500000 +v 0.062500 -0.375000 0.500000 +v 0.062500 -0.437500 0.500000 +v -0.000000 -0.375000 0.500000 +v -0.125000 -0.437500 0.500000 +v -0.000000 -0.437500 0.500000 +v -0.125000 -0.375000 0.500000 +v -0.250000 -0.375000 0.500000 +v -0.437500 -0.437500 0.500000 +v -0.250000 -0.437500 0.500000 +v -0.437500 -0.375000 0.500000 +v -0.500000 -0.500000 0.500000 +v -0.500000 -0.437500 0.500000 +v 0.437500 0.000000 0.437500 +v 0.500000 0.000000 0.437500 +v 0.437500 0.000000 0.375000 +v 0.500000 0.000000 0.375000 +v 0.500000 0.125000 0.375000 +v 0.437500 0.125000 0.375000 +v 0.375000 0.000000 0.375000 +v 0.375000 0.125000 0.375000 +v 0.500000 0.125000 0.437500 +v 0.437500 0.125000 0.437500 +v 0.437500 0.250000 0.437500 +v 0.437500 0.250000 0.375000 +v 0.437500 0.437500 0.375000 +v 0.375000 0.250000 0.375000 +v 0.375000 0.437500 0.375000 +v 0.437500 0.437500 0.437500 +v 0.437500 0.500000 0.437500 +v -0.500000 -0.500000 -0.500000 +v 0.062500 -0.437500 -0.500000 +v -0.125000 -0.437500 -0.500000 +v -0.250000 -0.437500 -0.500000 +v -0.437500 -0.437500 -0.500000 +v -0.500000 -0.437500 -0.500000 +v 0.000000 -0.437500 -0.500000 +v 0.062500 -0.437500 -0.437500 +v 0.125000 -0.375000 -0.437500 +v 0.500000 -0.375000 -0.437500 +v 0.062500 -0.375000 -0.437500 +v 0.125000 -0.375000 -0.250000 +v 0.500000 -0.437500 -0.250000 +v 0.062500 -0.375000 -0.250000 +v 0.062500 -0.437500 -0.250000 +v 0.062500 -0.437500 -0.125000 +v 0.125000 -0.375000 -0.125000 +v 0.500000 -0.375000 -0.125000 +v 0.062500 -0.375000 -0.125000 +v 0.125000 -0.375000 0.000000 +v 0.500000 -0.375000 0.000000 +v 0.500000 -0.437500 0.000000 +v 0.062500 -0.375000 0.000000 +v 0.062500 -0.437500 0.000000 +v 0.062500 -0.437500 0.062500 +v 0.500000 -0.437500 0.062500 +v 0.125000 -0.375000 0.062500 +v 0.062500 -0.375000 0.062500 +v 0.375000 0.437500 0.437500 +v 0.375000 0.250000 0.437500 +v 0.375000 0.125000 0.437500 +v 0.375000 0.000000 0.437500 +v 0.062500 -0.375000 0.125000 +v -0.000000 -0.437500 0.062500 +v -0.000000 -0.375000 0.125000 +v -0.000000 -0.375000 0.062500 +v -0.125000 -0.375000 0.125000 +v -0.125000 -0.437500 0.062500 +v -0.125000 -0.375000 0.062500 +v -0.250000 -0.437500 0.062500 +v -0.250000 -0.375000 0.125000 +v -0.250000 -0.375000 0.062500 +v -0.437500 -0.375000 0.125000 +v -0.437500 -0.437500 0.062500 +v -0.437500 -0.375000 0.062500 +v -0.500000 -0.437500 0.062500 +v -0.500000 -0.437500 -0.437500 +v -0.500000 -0.437500 -0.250000 +v -0.500000 -0.437500 -0.000000 +v -0.500000 -0.437500 -0.125000 +v -0.437500 -0.437500 -0.437500 +v -0.250000 -0.437500 -0.437500 +v 0.000000 -0.437500 -0.437500 +v -0.125000 -0.437500 -0.437500 +v -0.000000 -0.437500 -0.250000 +v -0.000000 -0.437500 -0.125000 +v -0.000000 -0.437500 0.000000 +v -0.250000 -0.437500 0.000000 +v -0.125000 -0.437500 0.000000 +v -0.437500 -0.437500 -0.000000 +v -0.437500 -0.437500 -0.125000 +v -0.437500 -0.437500 -0.250000 +v -0.437500 -0.375000 -0.437500 +v -0.250000 -0.375000 -0.437500 +v -0.125000 -0.437500 -0.250000 +v -0.250000 -0.437500 -0.250000 +v -0.125000 -0.375000 -0.437500 +v 0.000000 -0.375000 -0.437500 +v -0.125000 -0.437500 -0.125000 +v -0.250000 -0.437500 -0.125000 +v -0.437500 -0.375000 -0.000000 +v -0.437500 -0.375000 -0.125000 +v -0.437500 -0.375000 -0.250000 +v -0.250000 -0.375000 -0.250000 +v -0.000000 -0.375000 -0.250000 +v -0.125000 -0.375000 -0.250000 +v -0.000000 -0.375000 -0.125000 +v -0.000000 -0.375000 0.000000 +v -0.125000 -0.375000 -0.125000 +v -0.125000 -0.375000 0.000000 +v -0.250000 -0.375000 -0.125000 +v -0.250000 -0.375000 -0.000000 +vt 1.000000 0.375000 +vt 0.937500 0.437500 +vt 1.000000 0.437500 +vt 0.875000 0.375000 +vt 0.875000 0.437500 +vt 0.125000 0.375000 +vt 0.062500 0.437500 +vt 0.125000 0.437500 +vt 0.000000 0.375000 +vt 0.000000 0.437500 +vt 0.875000 0.125000 +vt 0.937500 0.062500 +vt 0.937500 0.125000 +vt 0.875000 0.062500 +vt 1.000000 0.062500 +vt 1.000000 0.125000 +vt 0.937500 0.062500 +vt 1.000000 0.000000 +vt 1.000000 0.062500 +vt 0.750000 0.062500 +vt 0.750000 0.125000 +vt 0.937500 0.125000 +vt 0.625000 0.062500 +vt 0.500000 0.062500 +vt 0.500000 0.125000 +vt 0.625000 0.125000 +vt 0.375000 0.125000 +vt 0.437500 0.062500 +vt 0.437500 0.125000 +vt 0.000000 0.000000 +vt 0.282642 0.198971 +vt 0.239655 0.239655 +vt 0.327803 0.160714 +vt 0.198971 0.282642 +vt 0.160714 0.327803 +vt 0.125000 0.375000 +vt 0.062500 0.437500 +vt 0.125000 0.437500 +vt 0.062500 0.625000 +vt 0.062500 0.500000 +vt 0.125000 0.500000 +vt 0.125000 0.625000 +vt 0.062500 0.937500 +vt 0.062500 0.750000 +vt 0.125000 0.750000 +vt 0.125000 0.937500 +vt 0.000000 1.000000 +vt 0.062500 1.000000 +vt 0.851934 0.343906 +vt 1.000000 0.327803 +vt 0.827763 0.313663 +vt 1.000000 0.282642 +vt 0.791904 0.272581 +vt 1.000000 0.239655 +vt 0.753671 0.246329 +vt 1.000000 0.282642 +vt 0.753671 0.233039 +vt 0.713120 0.286879 +vt 1.000000 0.327803 +vt 0.669980 0.330020 +vt 1.000000 0.375000 +vt 0.625000 0.375000 +vt 0.937500 1.000000 +vt 0.937500 0.937500 +vt 1.000000 1.000000 +vt 0.875000 0.937500 +vt 0.937500 0.750000 +vt 0.875000 0.750000 +vt 0.937500 0.625000 +vt 0.937500 0.500000 +vt 0.875000 0.625000 +vt 0.875000 0.500000 +vt 0.875000 0.437500 +vt 0.875000 0.375000 +vt 0.937500 0.437500 +vt 1.000000 0.000000 +vt 0.801029 0.282642 +vt 0.839286 0.327803 +vt 0.760345 0.239655 +vt 0.717358 0.198971 +vt 0.672197 0.160714 +vt 0.625000 0.125000 +vt 0.562500 0.125000 +vt 0.562500 0.062500 +vt 0.500000 0.125000 +vt 0.375000 0.062500 +vt 0.500000 0.062500 +vt 0.375000 0.125000 +vt 0.250000 0.125000 +vt 0.062500 0.062500 +vt 0.250000 0.062500 +vt 0.062500 0.125000 +vt 0.000000 0.000000 +vt 0.000000 0.062500 +vt 0.625000 0.000000 +vt 0.672197 0.000000 +vt 0.717358 0.000000 +vt 0.246329 0.233039 +vt 0.000000 0.239655 +vt 0.208096 0.272581 +vt 0.760345 0.000000 +vt 0.000000 0.282642 +vt 0.172237 0.313663 +vt 0.000000 0.327803 +vt 0.148066 0.343906 +vt 0.937500 0.000000 +vt 0.875000 0.000000 +vt 1.000000 0.437500 +vt 0.937500 0.500000 +vt 1.000000 0.500000 +vt 0.937500 0.437500 +vt 1.000000 0.062500 +vt 0.937500 0.125000 +vt 1.000000 0.125000 +vt 0.937500 0.062500 +vt 0.937500 0.500000 +vt 1.000000 0.625000 +vt 1.000000 0.500000 +vt 0.937500 0.625000 +vt 0.875000 0.500000 +vt 0.875000 0.625000 +vt 0.937500 0.125000 +vt 1.000000 0.062500 +vt 1.000000 0.125000 +vt 0.937500 0.062500 +vt 0.937500 0.625000 +vt 1.000000 0.750000 +vt 1.000000 0.625000 +vt 0.937500 0.750000 +vt 0.937500 0.062500 +vt 1.000000 0.125000 +vt 1.000000 0.062500 +vt 0.937500 0.125000 +vt 0.937500 0.750000 +vt 1.000000 0.937500 +vt 1.000000 0.750000 +vt 0.937500 0.937500 +vt 0.875000 0.750000 +vt 0.875000 0.937500 +vt 0.937500 0.125000 +vt 1.000000 0.062500 +vt 1.000000 0.125000 +vt 0.937500 0.062500 +vt 0.937500 0.937500 +vt 1.000000 1.000000 +vt 1.000000 0.937500 +vt 0.937500 1.000000 +vt 0.937500 0.062500 +vt 1.000000 0.000000 +vt 1.000000 0.062500 +vt 0.937500 0.000000 +vt 0.000000 1.000000 +vt 1.000000 1.000000 +vt 0.562500 0.062500 +vt 0.375000 0.062500 +vt 0.000000 0.000000 +vt 0.250000 0.062500 +vt 0.062500 0.062500 +vt 0.000000 0.062500 +vt 0.500000 0.062500 +vt 1.000000 1.000000 +vt 0.562500 0.937500 +vt 1.000000 0.937500 +vt 0.562500 1.000000 +vt 1.000000 0.062500 +vt 0.625000 0.125000 +vt 1.000000 0.125000 +vt 0.562500 0.062500 +vt 0.562500 0.125000 +vt 1.000000 0.937500 +vt 0.625000 0.750000 +vt 1.000000 0.750000 +vt 0.625000 0.937500 +vt 1.000000 0.125000 +vt 0.625000 0.125000 +vt 1.000000 0.062500 +vt 0.562500 0.125000 +vt 0.562500 0.062500 +vt 1.000000 0.750000 +vt 0.562500 0.625000 +vt 1.000000 0.625000 +vt 0.562500 0.750000 +vt 1.000000 0.062500 +vt 0.625000 0.125000 +vt 1.000000 0.125000 +vt 0.562500 0.062500 +vt 0.562500 0.125000 +vt 1.000000 0.625000 +vt 0.625000 0.500000 +vt 1.000000 0.500000 +vt 0.625000 0.625000 +vt 1.000000 0.125000 +vt 0.625000 0.125000 +vt 1.000000 0.062500 +vt 0.562500 0.125000 +vt 0.562500 0.062500 +vt 1.000000 0.500000 +vt 0.562500 0.437500 +vt 1.000000 0.437500 +vt 0.562500 0.500000 +vt 1.000000 0.062500 +vt 0.625000 0.125000 +vt 1.000000 0.125000 +vt 0.562500 0.062500 +vt 0.562500 0.125000 +vt 1.000000 0.437500 +vt 0.625000 0.437500 +vt 0.062500 0.937500 +vt 0.000000 1.000000 +vt 0.062500 1.000000 +vt 0.000000 0.937500 +vt 0.875000 0.062500 +vt 0.937500 0.000000 +vt 0.875000 0.000000 +vt 0.125000 0.750000 +vt 0.062500 0.937500 +vt 0.125000 0.937500 +vt 0.062500 0.750000 +vt 0.000000 0.750000 +vt 0.000000 0.937500 +vt 0.937500 0.000000 +vt 0.875000 0.062500 +vt 0.875000 0.000000 +vt 0.062500 0.625000 +vt 0.000000 0.750000 +vt 0.062500 0.750000 +vt 0.000000 0.625000 +vt 0.875000 0.062500 +vt 0.937500 0.000000 +vt 0.875000 0.000000 +vt 0.125000 0.500000 +vt 0.062500 0.625000 +vt 0.125000 0.625000 +vt 0.062500 0.500000 +vt 0.000000 0.500000 +vt 0.000000 0.625000 +vt 0.875000 0.000000 +vt 0.875000 0.062500 +vt 0.937500 0.000000 +vt 0.000000 0.437500 +vt 0.062500 0.500000 +vt 0.062500 0.437500 +vt 0.000000 0.500000 +vt 0.562500 0.375000 +vt 0.562500 0.000000 +vt 0.437500 0.062500 +vt 0.375000 0.125000 +vt 0.437500 0.125000 +vt 0.000000 0.062500 +vt 0.000000 0.125000 +vt 0.500000 0.437500 +vt 0.500000 0.000000 +vt 0.562500 0.000000 +vt 0.375000 0.125000 +vt 0.437500 0.062500 +vt 0.437500 0.125000 +vt 0.000000 0.125000 +vt 0.000000 0.062500 +vt 0.375000 0.375000 +vt 0.500000 0.000000 +vt 0.500000 0.375000 +vt 0.375000 0.000000 +vt 0.437500 0.062500 +vt 0.375000 0.125000 +vt 0.437500 0.125000 +vt 0.000000 0.062500 +vt 0.000000 0.125000 +vt 0.250000 0.437500 +vt 0.375000 0.000000 +vt 0.375000 0.437500 +vt 0.250000 0.000000 +vt 0.375000 0.125000 +vt 0.437500 0.062500 +vt 0.437500 0.125000 +vt 0.000000 0.125000 +vt 0.000000 0.062500 +vt 0.062500 0.375000 +vt 0.062500 0.000000 +vt 0.250000 0.375000 +vt 0.250000 0.000000 +vt 0.437500 0.062500 +vt 0.375000 0.125000 +vt 0.437500 0.125000 +vt 0.000000 0.062500 +vt 0.000000 0.125000 +vt 0.000000 0.437500 +vt 0.062500 0.000000 +vt 0.062500 0.437500 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 0.937500 0.062500 +vt 1.000000 0.062500 +vt 0.750000 0.062500 +vt 0.437500 0.062500 +vt 0.500000 0.062500 +vt 0.625000 0.062500 +vt 0.875000 0.125000 +vt 0.875000 0.125000 +vt 0.875000 0.125000 +vt 0.875000 0.125000 +vt 0.000000 1.000000 +vt 0.000000 0.937500 +vt 0.062500 1.000000 +vt 0.062500 0.937500 +vt 0.250000 1.000000 +vt 0.250000 0.937500 +vt 0.500000 0.937500 +vt 0.500000 1.000000 +vt 0.375000 1.000000 +vt 0.375000 0.937500 +vt 0.937500 0.062500 +vt 0.750000 0.125000 +vt 0.937500 0.125000 +vt 0.750000 0.062500 +vt 0.562500 0.937500 +vt 0.562500 0.750000 +vt 0.500000 0.750000 +vt 0.500000 0.625000 +vt 0.625000 0.062500 +vt 0.500000 0.125000 +vt 0.625000 0.125000 +vt 0.500000 0.062500 +vt 0.562500 0.625000 +vt 0.562500 0.500000 +vt 0.500000 0.500000 +vt 0.562500 0.437500 +vt 0.500000 0.062500 +vt 0.375000 0.125000 +vt 0.500000 0.125000 +vt 0.375000 0.062500 +vt 0.375000 0.437500 +vt 0.500000 0.437500 +vt 0.250000 0.500000 +vt 0.375000 0.500000 +vt 0.250000 0.062500 +vt 0.062500 0.062500 +vt 0.250000 0.125000 +vt 0.062500 0.125000 +vt 0.250000 0.437500 +vt 0.062500 0.437500 +vt 0.000000 0.500000 +vt 0.062500 0.500000 +vt 0.000000 0.625000 +vt 0.062500 0.625000 +vt 0.000000 0.750000 +vt 0.062500 0.750000 +vt 0.250000 0.062500 +vt 0.062500 0.125000 +vt 0.250000 0.125000 +vt 0.062500 0.062500 +vt 0.375000 0.750000 +vt 0.250000 0.750000 +vt 0.500000 0.062500 +vt 0.375000 0.125000 +vt 0.500000 0.125000 +vt 0.375000 0.062500 +vt 0.375000 0.625000 +vt 0.250000 0.625000 +vt 0.625000 0.062500 +vt 0.500000 0.125000 +vt 0.625000 0.125000 +vt 0.500000 0.062500 +vt 0.937500 0.062500 +vt 0.750000 0.125000 +vt 0.937500 0.125000 +vt 0.750000 0.062500 +vt 0.062500 0.937500 +vt 0.062500 0.750000 +vt 0.250000 0.937500 +vt 0.250000 0.750000 +vt 0.937500 0.125000 +vt 0.750000 0.125000 +vt 0.937500 0.062500 +vt 0.750000 0.062500 +vt 0.937500 0.125000 +vt 0.750000 0.125000 +vt 0.937500 0.062500 +vt 0.750000 0.062500 +vt 0.937500 0.062500 +vt 0.750000 0.125000 +vt 0.937500 0.125000 +vt 0.750000 0.062500 +vt 0.375000 0.937500 +vt 0.375000 0.750000 +vt 0.500000 0.937500 +vt 0.500000 0.750000 +vt 0.625000 0.125000 +vt 0.500000 0.125000 +vt 0.625000 0.062500 +vt 0.500000 0.062500 +vt 0.500000 0.062500 +vt 0.375000 0.125000 +vt 0.500000 0.125000 +vt 0.375000 0.062500 +vt 0.500000 0.125000 +vt 0.375000 0.062500 +vt 0.500000 0.062500 +vt 0.375000 0.125000 +vt 0.375000 0.062500 +vt 0.375000 0.125000 +vt 0.625000 0.062500 +vt 0.500000 0.125000 +vt 0.625000 0.125000 +vt 0.500000 0.062500 +vt 0.625000 0.125000 +vt 0.500000 0.125000 +vt 0.625000 0.062500 +vt 0.500000 0.062500 +vt 0.250000 0.125000 +vt 0.062500 0.062500 +vt 0.250000 0.062500 +vt 0.062500 0.125000 +vt 0.062500 0.625000 +vt 0.250000 0.500000 +vt 0.250000 0.625000 +vt 0.062500 0.500000 +vt 0.250000 0.062500 +vt 0.062500 0.125000 +vt 0.250000 0.125000 +vt 0.062500 0.062500 +vt 0.250000 0.125000 +vt 0.062500 0.062500 +vt 0.250000 0.062500 +vt 0.062500 0.125000 +vt 0.375000 0.625000 +vt 0.500000 0.500000 +vt 0.500000 0.625000 +vt 0.375000 0.500000 +vn 0.0000 0.0000 -1.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn -0.0025 0.6034 -0.7974 +vn 0.0000 0.5958 -0.8031 +vn -0.0020 0.6464 -0.7630 +vn 0.0011 0.6238 -0.7816 +vn -0.0014 0.6874 -0.7263 +vn 0.0013 0.6569 -0.7539 +vn -0.0009 0.7263 -0.6874 +vn 0.0008 0.6947 -0.7193 +vn -0.0005 0.7630 -0.6464 +vn 0.0005 0.7309 -0.6825 +vn -0.0002 0.7974 -0.6034 +vn 0.0002 0.7655 -0.6435 +vn 0.0000 0.7982 -0.6024 +vn 0.0000 0.0000 1.0000 +vn -0.6024 0.7982 0.0000 +vn -0.6435 0.7655 0.0002 +vn -0.6034 0.7974 -0.0002 +vn -0.6825 0.7309 0.0005 +vn -0.6464 0.7630 -0.0005 +vn -0.7193 0.6947 0.0008 +vn -0.6874 0.7263 -0.0009 +vn -0.7539 0.6569 0.0013 +vn -0.7263 0.6874 -0.0014 +vn -0.7816 0.6238 0.0011 +vn -0.7630 0.6464 -0.0020 +vn -0.8031 0.5958 0.0000 +vn -0.7974 0.6034 -0.0025 +vn 0.0000 -1.0000 0.0000 +s off +f 1/1/1 2/2/1 3/3/1 +f 4/4/1 2/2/1 1/1/1 +f 4/4/1 5/5/1 2/2/1 +f 4/6/2 6/7/2 5/8/2 +f 7/9/2 8/10/2 6/7/2 +f 7/9/2 6/7/2 4/6/2 +f 5/11/3 9/12/3 2/13/3 +f 6/14/3 9/12/3 5/11/3 +f 2/13/3 10/15/3 3/16/3 +f 2/13/3 9/12/3 10/15/3 +f 11/17/4 12/18/4 13/19/4 +f 14/20/4 12/18/4 11/17/4 +f 15/21/4 11/17/4 16/22/4 +f 15/21/4 14/20/4 11/17/4 +f 17/23/4 12/18/4 14/20/4 +f 18/24/4 12/18/4 17/23/4 +f 19/25/4 17/23/4 20/26/4 +f 19/25/4 18/24/4 17/23/4 +f 21/27/4 22/28/4 23/29/4 +f 24/30/4 25/31/4 26/32/4 +f 24/30/4 27/33/4 25/31/4 +f 24/30/4 21/27/4 27/33/4 +f 24/30/4 22/28/4 21/27/4 +f 28/34/4 24/30/4 26/32/4 +f 29/35/4 24/30/4 28/34/4 +f 30/36/4 24/30/4 29/35/4 +f 10/37/4 30/36/4 31/38/4 +f 10/37/4 24/30/4 30/36/4 +f 32/39/4 33/40/4 34/41/4 +f 32/39/4 34/41/4 35/42/4 +f 36/43/4 37/44/4 38/45/4 +f 36/43/4 38/45/4 39/46/4 +f 40/47/4 36/43/4 41/48/4 +f 40/47/4 37/44/4 36/43/4 +f 40/47/4 24/30/4 10/37/4 +f 40/47/4 10/37/4 33/40/4 +f 40/47/4 33/40/4 32/39/4 +f 40/47/4 32/39/4 37/44/4 +f 24/30/4 12/18/4 18/24/4 +f 24/30/4 18/24/4 22/28/4 +f 42/49/5 1/1/5 29/50/5 +f 42/49/6 4/4/6 1/1/6 +f 43/51/7 29/50/7 28/52/7 +f 43/51/8 42/49/8 29/50/8 +f 44/53/9 28/52/9 26/54/9 +f 44/53/10 43/51/10 28/52/10 +f 45/55/11 26/54/11 25/56/11 +f 45/57/12 44/53/12 26/54/12 +f 46/58/13 25/56/13 27/59/13 +f 46/58/14 45/55/14 25/56/14 +f 47/60/15 27/59/15 21/61/15 +f 47/60/16 46/58/16 27/59/16 +f 48/62/17 47/60/17 21/61/17 +f 49/63/18 50/64/18 40/65/18 +f 51/66/18 52/67/18 50/64/18 +f 50/64/18 52/67/18 40/65/18 +f 51/66/18 53/68/18 52/67/18 +f 52/67/18 54/69/18 40/65/18 +f 54/69/18 55/70/18 40/65/18 +f 56/71/18 57/72/18 54/69/18 +f 54/69/18 57/72/18 55/70/18 +f 8/73/18 7/74/18 58/75/18 +f 58/75/18 24/76/18 55/70/18 +f 59/77/18 24/76/18 60/78/18 +f 60/78/18 24/76/18 7/74/18 +f 55/70/18 24/76/18 40/65/18 +f 7/74/18 24/76/18 58/75/18 +f 59/77/18 61/79/18 24/76/18 +f 61/79/18 62/80/18 24/76/18 +f 62/80/18 63/81/18 24/76/18 +f 63/81/18 64/82/18 24/76/18 +f 65/83/18 66/84/18 64/82/18 +f 64/82/18 66/84/18 24/76/18 +f 67/85/18 68/86/18 69/87/18 +f 70/88/18 68/86/18 67/85/18 +f 71/89/18 72/90/18 73/91/18 +f 74/92/18 72/90/18 71/89/18 +f 73/91/18 75/93/18 68/86/18 +f 76/94/18 75/93/18 72/90/18 +f 68/86/18 75/93/18 69/87/18 +f 72/90/18 75/93/18 73/91/18 +f 75/93/18 24/76/18 66/84/18 +f 75/93/18 66/84/18 69/87/18 +f 48/62/19 64/95/19 47/60/19 +f 47/60/20 63/96/20 46/58/20 +f 64/95/21 63/96/21 47/60/21 +f 46/58/22 62/97/22 45/55/22 +f 63/96/23 62/97/23 46/58/23 +f 45/98/24 61/99/24 44/100/24 +f 62/97/25 61/101/25 45/55/25 +f 44/100/26 59/102/26 43/103/26 +f 61/99/27 59/102/27 44/100/27 +f 43/103/28 60/104/28 42/105/28 +f 59/102/29 60/104/29 43/103/29 +f 42/105/30 7/9/30 4/6/30 +f 60/104/31 7/9/31 42/105/31 +f 6/14/3 58/106/3 9/12/3 +f 8/107/3 58/106/3 6/14/3 +f 10/108/1 77/109/1 78/110/1 +f 9/111/1 77/109/1 10/108/1 +f 78/112/32 79/113/32 80/114/32 +f 77/115/32 79/113/32 78/112/32 +f 79/116/1 81/117/1 80/118/1 +f 79/116/1 82/119/1 81/117/1 +f 83/120/1 84/121/1 79/116/1 +f 79/116/1 84/121/1 82/119/1 +f 82/122/3 85/123/3 81/124/3 +f 82/122/3 86/125/3 85/123/3 +f 86/126/1 37/127/1 85/128/1 +f 86/126/1 87/129/1 37/127/1 +f 87/130/32 38/131/32 37/132/32 +f 87/130/32 88/133/32 38/131/32 +f 88/134/1 39/135/1 38/136/1 +f 88/134/1 89/137/1 39/135/1 +f 90/138/1 91/139/1 88/134/1 +f 88/134/1 91/139/1 89/137/1 +f 89/140/3 36/141/3 39/142/3 +f 89/140/3 92/143/3 36/141/3 +f 92/144/1 41/145/1 36/146/1 +f 92/144/1 93/147/1 41/145/1 +f 93/148/3 40/149/3 41/150/3 +f 93/148/3 49/151/3 40/149/3 +f 75/93/32 94/152/32 24/76/32 +f 24/76/32 94/152/32 12/153/32 +f 12/18/1 95/154/1 13/19/1 +f 96/155/1 94/156/1 97/157/1 +f 94/156/1 98/158/1 97/157/1 +f 94/156/1 99/159/1 98/158/1 +f 12/18/1 94/156/1 100/160/1 +f 12/18/1 100/160/1 95/154/1 +f 100/160/1 94/156/1 96/155/1 +f 13/161/3 101/162/3 11/163/3 +f 95/164/3 101/162/3 13/161/3 +f 11/165/1 102/166/1 103/167/1 +f 11/165/1 101/168/1 102/166/1 +f 101/168/1 104/169/1 102/166/1 +f 103/170/3 105/171/3 15/172/3 +f 102/173/3 105/171/3 103/170/3 +f 15/174/18 105/175/18 106/176/18 +f 107/177/18 108/178/18 105/175/18 +f 105/175/18 108/178/18 106/176/18 +f 106/179/3 109/180/3 17/181/3 +f 108/182/3 109/180/3 106/179/3 +f 17/183/1 110/184/1 111/185/1 +f 17/183/1 109/186/1 110/184/1 +f 109/186/1 112/187/1 110/184/1 +f 111/188/3 113/189/3 114/190/3 +f 110/191/3 113/189/3 111/188/3 +f 114/192/18 113/193/18 115/194/18 +f 116/195/18 117/196/18 113/193/18 +f 113/193/18 117/196/18 115/194/18 +f 115/197/3 118/198/3 119/199/3 +f 117/200/3 118/198/3 115/197/3 +f 119/201/1 120/202/1 23/203/1 +f 119/201/1 118/204/1 120/202/1 +f 118/204/1 121/205/1 120/202/1 +f 23/206/3 48/62/3 21/61/3 +f 120/207/3 48/62/3 23/206/3 +f 92/208/2 49/209/2 93/210/2 +f 50/211/2 49/209/2 92/208/2 +f 122/212/3 50/213/3 92/143/3 +f 51/214/3 50/213/3 122/212/3 +f 90/215/2 122/216/2 91/217/2 +f 123/218/2 122/216/2 90/215/2 +f 53/219/2 51/220/2 122/216/2 +f 53/219/2 122/216/2 123/218/2 +f 52/221/32 123/222/32 87/130/32 +f 52/221/32 53/223/32 123/222/32 +f 86/224/2 52/225/2 87/226/2 +f 54/227/2 52/225/2 86/224/2 +f 124/228/3 54/229/3 86/125/3 +f 56/230/3 54/229/3 124/228/3 +f 83/231/2 124/232/2 84/233/2 +f 125/234/2 124/232/2 83/231/2 +f 57/235/2 56/236/2 124/232/2 +f 57/235/2 124/232/2 125/234/2 +f 77/115/32 57/237/32 125/238/32 +f 55/239/32 57/237/32 77/115/32 +f 58/240/2 77/241/2 9/242/2 +f 58/240/2 55/243/2 77/241/2 +f 126/244/3 65/245/3 48/62/3 +f 65/245/3 64/95/3 48/62/3 +f 118/246/2 126/247/2 121/248/2 +f 118/246/2 66/249/2 126/247/2 +f 66/249/2 65/250/2 126/247/2 +f 127/251/3 69/252/3 118/198/3 +f 69/252/3 66/253/3 118/198/3 +f 128/254/4 127/255/4 129/256/4 +f 67/257/4 69/258/4 128/254/4 +f 128/254/4 69/258/4 127/255/4 +f 130/259/3 67/260/3 128/261/3 +f 70/262/3 67/260/3 130/259/3 +f 131/263/2 130/264/2 132/265/2 +f 131/263/2 68/266/2 130/264/2 +f 68/266/2 70/267/2 130/264/2 +f 133/268/3 68/269/3 131/270/3 +f 73/271/3 68/269/3 133/268/3 +f 134/272/4 133/273/4 135/274/4 +f 71/275/4 73/276/4 134/272/4 +f 134/272/4 73/276/4 133/273/4 +f 136/277/3 74/278/3 134/279/3 +f 74/278/3 71/280/3 134/279/3 +f 137/281/2 136/282/2 138/283/2 +f 137/281/2 72/284/2 136/282/2 +f 72/284/2 74/285/2 136/282/2 +f 139/286/3 72/287/3 137/288/3 +f 76/289/3 72/287/3 139/286/3 +f 94/290/2 140/291/2 99/292/2 +f 94/290/2 141/293/2 140/291/2 +f 75/93/2 76/94/2 139/294/2 +f 94/290/2 75/93/2 142/295/2 +f 94/290/2 142/295/2 143/296/2 +f 94/290/2 143/296/2 141/293/2 +f 142/295/2 75/93/2 139/294/2 +f 77/115/32 83/297/32 79/113/32 +f 77/115/32 125/238/32 83/297/32 +f 124/228/3 82/122/3 84/298/3 +f 124/228/3 86/125/3 82/122/3 +f 88/133/32 123/222/32 90/299/32 +f 87/130/32 123/222/32 88/133/32 +f 91/300/3 92/143/3 89/140/3 +f 122/212/3 92/143/3 91/300/3 +f 99/301/3 140/302/3 98/303/3 +f 140/302/3 144/304/3 98/303/3 +f 97/305/3 98/303/3 145/306/3 +f 98/303/3 144/304/3 145/306/3 +f 146/307/3 95/164/3 100/308/3 +f 146/307/3 101/162/3 95/164/3 +f 145/306/3 96/309/3 97/305/3 +f 145/306/3 147/310/3 96/309/3 +f 100/308/3 147/310/3 146/307/3 +f 96/309/3 147/310/3 100/308/3 +f 101/311/2 107/312/2 104/313/2 +f 108/314/2 107/312/2 101/311/2 +f 104/315/3 105/171/3 102/173/3 +f 107/316/3 105/171/3 104/315/3 +f 148/317/3 109/180/3 108/182/3 +f 149/318/3 109/180/3 148/317/3 +f 109/319/2 116/320/2 112/321/2 +f 117/322/2 116/320/2 109/319/2 +f 112/323/3 116/324/3 110/191/3 +f 116/324/3 113/189/3 110/191/3 +f 150/325/3 127/251/3 117/200/3 +f 127/251/3 118/198/3 117/200/3 +f 126/244/3 120/207/3 121/326/3 +f 126/244/3 48/62/3 120/207/3 +f 127/327/1 132/328/1 129/329/1 +f 131/330/1 132/328/1 127/327/1 +f 132/331/3 128/261/3 129/332/3 +f 130/259/3 128/261/3 132/331/3 +f 151/333/3 131/270/3 152/334/3 +f 133/268/3 131/270/3 151/333/3 +f 133/335/1 137/336/1 135/337/1 +f 137/336/1 138/338/1 135/337/1 +f 136/277/3 135/339/3 138/340/3 +f 136/277/3 134/279/3 135/339/3 +f 142/341/3 137/288/3 153/342/3 +f 139/286/3 137/288/3 142/341/3 +f 143/343/3 153/342/3 154/344/3 +f 142/341/3 153/342/3 143/343/3 +f 141/345/3 154/344/3 155/346/3 +f 143/343/3 154/344/3 141/345/3 +f 140/302/3 155/346/3 144/304/3 +f 141/345/3 155/346/3 140/302/3 +f 145/347/1 156/348/1 157/349/1 +f 144/350/1 156/348/1 145/347/1 +f 146/307/3 108/182/3 101/162/3 +f 148/317/3 108/182/3 146/307/3 +f 145/306/3 158/351/3 147/310/3 +f 159/352/3 158/351/3 145/306/3 +f 146/353/1 160/354/1 161/355/1 +f 147/356/1 160/354/1 146/353/1 +f 149/318/3 117/200/3 109/180/3 +f 150/325/3 117/200/3 149/318/3 +f 148/317/3 162/357/3 149/318/3 +f 158/351/3 162/357/3 148/317/3 +f 150/325/3 131/270/3 127/251/3 +f 152/334/3 131/270/3 150/325/3 +f 163/358/3 152/334/3 162/357/3 +f 151/333/3 152/334/3 163/358/3 +f 151/333/3 137/288/3 133/268/3 +f 153/342/3 137/288/3 151/333/3 +f 154/359/2 164/360/2 165/361/2 +f 153/362/2 164/360/2 154/359/2 +f 159/352/3 154/344/3 163/358/3 +f 155/346/3 154/344/3 159/352/3 +f 144/363/2 166/364/2 156/365/2 +f 155/366/2 166/364/2 144/363/2 +f 156/367/3 166/368/3 157/369/3 +f 166/368/3 167/370/3 157/369/3 +f 157/371/4 167/372/4 145/373/4 +f 167/372/4 159/374/4 145/373/4 +f 161/375/4 168/376/4 146/377/4 +f 168/376/4 148/378/4 146/377/4 +f 159/352/3 163/358/3 158/351/3 +f 163/358/3 162/357/3 158/351/3 +f 147/379/2 169/380/2 160/381/2 +f 158/382/2 169/380/2 147/379/2 +f 160/383/3 169/384/3 161/385/3 +f 169/384/3 168/386/3 161/385/3 +f 170/387/4 171/388/4 149/389/4 +f 171/388/4 150/390/4 149/389/4 +f 149/391/1 172/392/1 170/393/1 +f 162/394/1 172/392/1 149/391/1 +f 168/395/18 158/396/18 148/397/18 +f 169/398/18 158/396/18 168/395/18 +f 171/388/18 152/399/18 150/390/18 +f 173/400/18 152/399/18 171/388/18 +f 162/401/2 173/402/2 172/403/2 +f 152/404/2 173/402/2 162/401/2 +f 174/405/4 175/406/4 163/407/4 +f 175/406/4 151/408/4 163/407/4 +f 175/409/18 153/410/18 151/411/18 +f 164/412/18 153/410/18 175/409/18 +f 165/413/3 175/414/3 174/415/3 +f 164/416/3 175/414/3 165/413/3 +f 163/417/1 165/418/1 174/419/1 +f 154/420/1 165/418/1 163/417/1 +f 167/421/18 155/422/18 159/423/18 +f 166/424/18 155/422/18 167/421/18 +f 172/425/3 171/426/3 170/427/3 +f 173/428/3 171/426/3 172/425/3 diff --git a/mymillwork/models/mymillwork_mach4.obj b/mymillwork/models/mymillwork_mach4.obj new file mode 100644 index 0000000..7dfbe04 --- /dev/null +++ b/mymillwork/models/mymillwork_mach4.obj @@ -0,0 +1,735 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +g node0_Body +v -0.500000 -0.125000 0.375000 +v -0.500000 -0.062500 0.375000 +v 0.500000 -0.125000 0.375000 +v 0.500000 -0.062500 0.375000 +v 0.187500 -0.187500 0.326797 +v 0.500000 -0.172197 0.339286 +v 0.250000 -0.187500 0.326797 +v 0.500000 -0.217358 0.301029 +v -0.187500 -0.187500 0.326797 +v -0.500000 -0.172197 0.339286 +v -0.250000 -0.187500 0.326797 +v -0.187500 -0.208820 0.308594 +v 0.187500 -0.208820 0.308594 +v 0.500000 -0.260345 0.260345 +v 0.250000 -0.229052 0.290401 +v -0.187500 -0.229658 0.289841 +v 0.187500 -0.229658 0.289841 +v 0.187500 -0.250000 0.270552 +v -0.500000 -0.217358 0.301029 +v -0.187500 -0.250000 0.270552 +v 0.500000 -0.301029 0.217358 +v 0.250000 -0.268679 0.251919 +v 0.250000 -0.306278 0.211453 +v -0.500000 -0.260345 0.260345 +v -0.250000 -0.229052 0.290401 +v 0.500000 -0.339286 0.172197 +v 0.250000 -0.341750 0.169109 +v -0.500000 -0.301029 0.217358 +v -0.250000 -0.268679 0.251919 +v -0.250000 -0.306278 0.211453 +v 0.500000 -0.375000 0.125000 +v 0.250000 -0.375000 0.125000 +v -0.500000 -0.339286 0.172197 +v -0.250000 -0.341750 0.169109 +v -0.500000 -0.375000 0.125000 +v -0.250000 -0.375000 0.125000 +v -0.500000 -0.062500 0.437500 +v 0.500000 -0.062500 0.437500 +v -0.500000 -0.500000 -0.500000 +v -0.500000 -0.437500 -0.437500 +v -0.500000 -0.437500 -0.500000 +v -0.500000 -0.437500 -0.250000 +v -0.500000 -0.375000 -0.250000 +v -0.500000 -0.375000 -0.437500 +v -0.500000 -0.437500 -0.125000 +v -0.500000 -0.437500 -0.000000 +v -0.500000 -0.375000 -0.000000 +v -0.500000 -0.375000 -0.125000 +v -0.500000 -0.437500 0.062500 +v -0.500000 -0.375000 0.062500 +v -0.500000 -0.500000 0.500000 +v -0.500000 -0.125000 0.375000 +v -0.500000 -0.062500 0.437500 +v -0.500000 -0.062500 0.375000 +v -0.500000 0.000000 0.437500 +v -0.500000 0.125000 0.375000 +v -0.500000 0.000000 0.375000 +v -0.500000 0.125000 0.437500 +v -0.500000 0.250000 0.437500 +v -0.500000 0.437500 0.375000 +v -0.500000 0.250000 0.375000 +v -0.500000 0.437500 0.437500 +v -0.500000 0.500000 0.500000 +v -0.500000 0.500000 0.437500 +v 0.500000 -0.437500 -0.437500 +v 0.500000 -0.500000 -0.500000 +v 0.500000 -0.437500 -0.500000 +v 0.500000 -0.437500 -0.250000 +v 0.500000 -0.375000 -0.437500 +v 0.500000 -0.375000 -0.250000 +v 0.500000 -0.437500 -0.125000 +v 0.500000 -0.437500 0.000000 +v 0.500000 -0.375000 0.000000 +v 0.500000 -0.375000 -0.125000 +v 0.500000 -0.437500 0.062500 +v 0.500000 -0.375000 0.062500 +v 0.500000 -0.500000 0.500000 +v 0.500000 -0.125000 0.375000 +v 0.500000 -0.062500 0.437500 +v 0.500000 -0.062500 0.375000 +v 0.500000 0.125000 0.437500 +v 0.500000 0.000000 0.437500 +v 0.500000 0.000000 0.375000 +v 0.500000 0.125000 0.375000 +v 0.500000 0.437500 0.437500 +v 0.500000 0.250000 0.437500 +v 0.500000 0.250000 0.375000 +v 0.500000 0.437500 0.375000 +v 0.500000 0.500000 0.500000 +v 0.500000 0.500000 0.437500 +v -0.250000 -0.375000 0.062500 +v -0.250000 -0.375000 0.000000 +v -0.250000 -0.437500 0.062500 +v -0.250000 -0.437500 0.000000 +v -0.250000 -0.375000 -0.125000 +v -0.250000 -0.375000 -0.250000 +v -0.250000 -0.437500 -0.125000 +v -0.250000 -0.437500 -0.250000 +v -0.250000 -0.375000 -0.437500 +v -0.250000 -0.437500 -0.500000 +v -0.250000 -0.437500 -0.437500 +v -0.250000 -0.187500 -0.500000 +v -0.187500 -0.187500 -0.500000 +v -0.187500 -0.250000 -0.500000 +v 0.187500 -0.250000 -0.500000 +v 0.187500 -0.187500 -0.500000 +v 0.250000 -0.187500 -0.500000 +v 0.250000 -0.375000 0.062500 +v 0.250000 -0.375000 0.000000 +v 0.250000 -0.437500 0.062500 +v 0.250000 -0.437500 0.000000 +v 0.250000 -0.375000 -0.125000 +v 0.250000 -0.375000 -0.250000 +v 0.250000 -0.437500 -0.250000 +v 0.250000 -0.437500 -0.125000 +v 0.250000 -0.375000 -0.437500 +v 0.250000 -0.437500 -0.500000 +v 0.250000 -0.437500 -0.437500 +v -0.500000 0.000000 0.437500 +v 0.500000 0.000000 0.437500 +v 0.500000 0.000000 0.375000 +v -0.500000 0.000000 0.375000 +v 0.500000 0.125000 0.375000 +v -0.500000 0.125000 0.375000 +v -0.500000 0.125000 0.437500 +v 0.500000 0.125000 0.437500 +v -0.500000 0.250000 0.437500 +v -0.500000 0.250000 0.375000 +v 0.187500 -0.187500 0.500000 +v 0.250000 -0.187500 0.500000 +v 0.250000 -0.500000 0.500000 +v -0.187500 -0.187500 0.500000 +v -0.250000 -0.187500 0.500000 +v -0.187500 -0.250000 0.500000 +v 0.187500 -0.250000 0.500000 +v -0.250000 -0.500000 0.500000 +v -0.250000 -0.500000 -0.500000 +v -0.500000 -0.375000 -0.000000 +v 0.250000 -0.500000 -0.500000 +v 0.500000 -0.375000 -0.437500 +v 0.500000 -0.437500 -0.250000 +v 0.500000 -0.375000 -0.125000 +v 0.500000 -0.375000 0.000000 +v 0.500000 -0.437500 0.000000 +v 0.500000 -0.437500 0.062500 +vt 0.000000 0.375000 +vt 0.000000 0.437500 +vt 1.000000 0.375000 +vt 1.000000 0.437500 +vt 0.687500 0.312500 +vt 1.000000 0.327803 +vt 0.750000 0.312500 +vt 1.000000 0.282642 +vt 0.312500 0.312500 +vt 0.000000 0.327803 +vt 0.250000 0.312500 +vt 0.312500 0.291180 +vt 0.687500 0.291180 +vt 1.000000 0.239655 +vt 0.750000 0.270949 +vt 0.312500 0.270342 +vt 0.687500 0.270342 +vt 0.687500 0.250000 +vt 0.000000 0.282642 +vt 0.312500 0.250000 +vt 1.000000 0.282642 +vt 0.750000 0.248081 +vt 0.750000 0.288547 +vt 0.000000 0.239655 +vt 0.250000 0.270949 +vt 1.000000 0.327803 +vt 0.750000 0.330891 +vt 0.000000 0.282642 +vt 0.250000 0.248081 +vt 0.250000 0.288547 +vt 1.000000 0.375000 +vt 0.750000 0.375000 +vt 0.000000 0.327803 +vt 0.250000 0.330891 +vt 0.000000 0.375000 +vt 0.250000 0.375000 +vt 0.250000 0.231321 +vt 0.750000 0.231321 +vt 0.000000 0.125000 +vt 0.000000 0.062500 +vt 1.000000 0.125000 +vt 1.000000 0.062500 +vt 1.000000 0.000000 +vt 0.937500 0.062500 +vt 1.000000 0.062500 +vt 0.750000 0.062500 +vt 0.750000 0.125000 +vt 0.937500 0.125000 +vt 0.625000 0.062500 +vt 0.500000 0.062500 +vt 0.500000 0.125000 +vt 0.625000 0.125000 +vt 0.437500 0.062500 +vt 0.375000 0.125000 +vt 0.437500 0.125000 +vt 0.282642 0.198971 +vt 0.000000 0.000000 +vt 0.239655 0.239655 +vt 0.327803 0.160714 +vt 0.198971 0.282642 +vt 0.160714 0.327803 +vt 0.125000 0.375000 +vt 0.062500 0.437500 +vt 0.125000 0.437500 +vt 0.062500 0.500000 +vt 0.125000 0.625000 +vt 0.125000 0.500000 +vt 0.062500 0.625000 +vt 0.062500 0.750000 +vt 0.125000 0.937500 +vt 0.125000 0.750000 +vt 0.062500 0.937500 +vt 0.000000 1.000000 +vt 0.062500 1.000000 +vt 0.937500 0.062500 +vt 1.000000 0.000000 +vt 1.000000 0.062500 +vt 0.750000 0.062500 +vt 0.937500 0.125000 +vt 0.750000 0.125000 +vt 0.625000 0.062500 +vt 0.500000 0.062500 +vt 0.500000 0.125000 +vt 0.625000 0.125000 +vt 0.375000 0.125000 +vt 0.437500 0.062500 +vt 0.437500 0.125000 +vt 0.000000 0.000000 +vt 0.282642 0.198971 +vt 0.239655 0.239655 +vt 0.327803 0.160714 +vt 0.198971 0.282642 +vt 0.160714 0.327803 +vt 0.125000 0.375000 +vt 0.062500 0.437500 +vt 0.125000 0.437500 +vt 0.062500 0.625000 +vt 0.062500 0.500000 +vt 0.125000 0.500000 +vt 0.125000 0.625000 +vt 0.062500 0.937500 +vt 0.062500 0.750000 +vt 0.125000 0.750000 +vt 0.125000 0.937500 +vt 0.000000 1.000000 +vt 0.062500 1.000000 +vt 0.250000 0.437500 +vt 0.000000 0.437500 +vt 0.437500 0.125000 +vt 0.375000 0.125000 +vt 0.330891 0.158250 +vt 0.288547 0.193722 +vt 0.500000 0.125000 +vt 0.248081 0.231321 +vt 0.209599 0.270949 +vt 0.437500 0.062500 +vt 0.500000 0.062500 +vt 0.625000 0.125000 +vt 0.173203 0.312500 +vt 0.750000 0.125000 +vt 0.625000 0.062500 +vt 0.750000 0.062500 +vt 0.937500 0.125000 +vt 1.000000 0.062500 +vt 0.937500 0.062500 +vt 1.000000 0.312500 +vt 0.250000 1.000000 +vt 0.250000 0.173203 +vt 0.312500 0.173203 +vt 0.312500 1.000000 +vt 1.000000 0.312500 +vt 0.210159 0.270342 +vt 0.229448 0.250000 +vt 0.191406 0.291180 +vt 0.173203 0.312500 +vt 1.000000 0.250000 +vt 0.312500 1.000000 +vt 0.312500 0.229448 +vt 0.687500 0.229448 +vt 0.687500 1.000000 +vt 1.000000 0.312500 +vt 0.229448 0.250000 +vt 0.210159 0.270342 +vt 0.191406 0.291180 +vt 0.173203 0.312500 +vt 1.000000 0.250000 +vt 0.687500 1.000000 +vt 0.687500 0.173203 +vt 0.750000 0.173203 +vt 0.750000 1.000000 +vt 0.437500 0.125000 +vt 0.330891 0.158250 +vt 0.375000 0.125000 +vt 0.288547 0.193722 +vt 0.500000 0.125000 +vt 0.248081 0.231321 +vt 0.209599 0.270949 +vt 0.437500 0.062500 +vt 0.500000 0.062500 +vt 0.625000 0.125000 +vt 0.173203 0.312500 +vt 1.000000 0.312500 +vt 0.750000 0.125000 +vt 0.750000 0.062500 +vt 0.625000 0.062500 +vt 0.937500 0.125000 +vt 1.000000 0.062500 +vt 0.937500 0.062500 +vt 1.000000 0.437500 +vt 0.750000 0.437500 +vt 0.000000 0.437500 +vt 0.000000 0.500000 +vt 1.000000 0.437500 +vt 1.000000 0.500000 +vt 1.000000 0.062500 +vt 0.000000 0.062500 +vt 1.000000 0.125000 +vt 0.000000 0.125000 +vt 1.000000 0.500000 +vt 0.000000 0.500000 +vt 1.000000 0.625000 +vt 0.000000 0.625000 +vt 0.000000 0.125000 +vt 0.000000 0.062500 +vt 1.000000 0.125000 +vt 1.000000 0.062500 +vt 1.000000 0.625000 +vt 0.000000 0.625000 +vt 1.000000 0.750000 +vt 0.000000 0.750000 +vt 1.000000 0.062500 +vt 0.000000 0.062500 +vt 1.000000 0.125000 +vt 0.000000 0.125000 +vt 1.000000 0.750000 +vt 0.000000 0.750000 +vt 1.000000 0.937500 +vt 0.000000 0.937500 +vt 0.000000 0.125000 +vt 0.000000 0.062500 +vt 1.000000 0.125000 +vt 1.000000 0.062500 +vt 0.000000 0.937500 +vt 0.000000 1.000000 +vt 1.000000 0.937500 +vt 1.000000 1.000000 +vt 0.000000 0.062500 +vt 0.000000 0.000000 +vt 1.000000 0.062500 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.687500 0.312500 +vt 0.750000 0.312500 +vt 1.000000 0.000000 +vt 0.750000 0.000000 +vt 0.312500 0.312500 +vt 0.250000 0.312500 +vt 0.312500 0.250000 +vt 0.687500 0.250000 +vt 0.250000 0.000000 +vt 0.000000 1.000000 +vt 0.250000 1.000000 +vt 0.250000 0.000000 +vt 0.000000 0.000000 +vt 0.250000 0.062500 +vt 0.000000 0.062500 +vt 0.250000 1.000000 +vt 0.000000 0.937500 +vt 0.250000 0.937500 +vt 0.000000 1.000000 +vt 0.250000 0.062500 +vt 0.000000 0.062500 +vt 0.250000 0.125000 +vt 0.000000 0.125000 +vt 0.250000 0.937500 +vt 0.000000 0.750000 +vt 0.250000 0.750000 +vt 0.000000 0.937500 +vt 0.250000 0.125000 +vt 0.000000 0.062500 +vt 0.250000 0.062500 +vt 0.000000 0.125000 +vt 0.250000 0.750000 +vt 0.000000 0.625000 +vt 0.250000 0.625000 +vt 0.000000 0.750000 +vt 0.250000 0.062500 +vt 0.000000 0.062500 +vt 0.250000 0.125000 +vt 0.000000 0.125000 +vt 0.250000 0.625000 +vt 0.000000 0.500000 +vt 0.250000 0.500000 +vt 0.000000 0.625000 +vt 0.250000 0.125000 +vt 0.000000 0.062500 +vt 0.250000 0.062500 +vt 0.000000 0.125000 +vt 0.250000 0.500000 +vt 0.000000 0.500000 +vt 0.250000 0.437500 +vt 0.000000 0.437500 +vt 0.250000 0.062500 +vt 0.000000 0.062500 +vt 0.250000 0.125000 +vt 0.000000 0.125000 +vt 0.750000 1.000000 +vt 1.000000 1.000000 +vt 0.750000 0.062500 +vt 0.750000 0.000000 +vt 1.000000 1.000000 +vt 0.750000 0.937500 +vt 1.000000 0.937500 +vt 0.750000 1.000000 +vt 1.000000 0.062500 +vt 0.750000 0.125000 +vt 1.000000 0.125000 +vt 0.750000 0.062500 +vt 1.000000 0.937500 +vt 0.750000 0.750000 +vt 1.000000 0.750000 +vt 0.750000 0.937500 +vt 1.000000 0.125000 +vt 1.000000 0.062500 +vt 1.000000 0.750000 +vt 0.750000 0.625000 +vt 1.000000 0.625000 +vt 0.750000 0.750000 +vt 1.000000 0.062500 +vt 0.750000 0.125000 +vt 1.000000 0.125000 +vt 0.750000 0.062500 +vt 1.000000 0.625000 +vt 0.750000 0.500000 +vt 1.000000 0.500000 +vt 0.750000 0.625000 +vt 1.000000 0.125000 +vt 0.750000 0.062500 +vt 1.000000 0.062500 +vt 0.750000 0.125000 +vt 1.000000 0.500000 +vt 0.750000 0.437500 +vt 1.000000 0.437500 +vt 0.750000 0.500000 +vt 1.000000 0.062500 +vt 0.750000 0.125000 +vt 1.000000 0.125000 +vt 0.750000 0.062500 +vt 0.312500 0.250000 +vt 0.250000 0.312500 +vt 0.312500 0.312500 +vt 0.687500 0.250000 +vt 0.750000 0.312500 +vt 0.687500 0.312500 +vn 0.0000 0.0000 -1.0000 +vn 0.0023 0.6034 -0.7974 +vn 0.0000 0.6323 -0.7747 +vn -0.0014 0.6464 -0.7630 +vn 0.0000 0.6107 -0.7919 +vn -0.0023 0.6034 -0.7974 +vn 0.0000 0.6493 -0.7605 +vn -0.0013 0.6874 -0.7263 +vn 0.0000 0.6881 -0.7256 +vn 0.0000 0.6689 -0.7433 +vn 0.0014 0.6464 -0.7630 +vn -0.0010 0.7263 -0.6874 +vn 0.0007 0.7326 -0.6807 +vn 0.0013 0.6874 -0.7263 +vn -0.0008 0.7630 -0.6464 +vn 0.0004 0.7666 -0.6422 +vn -0.0007 0.7326 -0.6807 +vn 0.0010 0.7263 -0.6874 +vn -0.0004 0.7974 -0.6034 +vn 0.0000 0.7985 -0.6019 +vn -0.0004 0.7666 -0.6422 +vn 0.0008 0.7630 -0.6464 +vn 0.0004 0.7974 -0.6034 +vn -0.0010 0.6967 -0.7174 +vn -0.0012 0.6589 -0.7522 +vn 0.0010 0.6967 -0.7174 +vn 0.0012 0.6589 -0.7522 +vn 0.0000 1.0000 0.0000 +vn -1.0000 0.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 0.0000 1.0000 +s off +f 1/1/1 2/2/1 3/3/1 +f 3/3/1 2/2/1 4/4/1 +f 5/5/2 3/3/2 6/6/2 +f 5/5/3 6/6/3 7/7/3 +f 8/8/4 7/7/4 6/6/4 +f 9/9/5 1/1/5 3/3/5 +f 9/9/5 3/3/5 5/5/5 +f 10/10/3 9/9/3 11/11/3 +f 10/10/6 1/1/6 9/9/6 +f 12/12/7 5/5/7 13/13/7 +f 12/12/7 9/9/7 5/5/7 +f 14/14/8 15/15/8 8/8/8 +f 16/16/9 17/17/9 18/18/9 +f 16/16/10 13/13/10 17/17/10 +f 16/16/10 12/12/10 13/13/10 +f 19/19/11 10/10/11 11/11/11 +f 20/20/9 16/16/9 18/18/9 +f 21/21/12 22/22/12 14/14/12 +f 23/23/13 22/22/13 21/21/13 +f 24/24/14 19/19/14 25/25/14 +f 26/26/15 23/23/15 21/21/15 +f 27/27/16 23/23/16 26/26/16 +f 28/28/17 29/29/17 30/30/17 +f 28/28/18 24/24/18 29/29/18 +f 31/31/19 27/27/19 26/26/19 +f 32/32/20 27/27/20 31/31/20 +f 33/33/21 30/30/21 34/34/21 +f 33/33/22 28/28/22 30/30/22 +f 35/35/23 33/33/23 34/34/23 +f 35/35/20 34/34/20 36/36/20 +f 25/25/24 29/37/24 24/24/24 +f 11/11/25 25/25/25 19/19/25 +f 22/38/26 15/15/26 14/14/26 +f 15/15/27 7/7/27 8/8/27 +f 2/39/28 37/40/28 4/41/28 +f 4/41/28 37/40/28 38/42/28 +f 39/43/29 40/44/29 41/45/29 +f 39/43/29 42/46/29 40/44/29 +f 40/44/29 43/47/29 44/48/29 +f 42/46/29 43/47/29 40/44/29 +f 39/43/29 45/49/29 42/46/29 +f 39/43/29 46/50/29 45/49/29 +f 45/49/29 47/51/29 48/52/29 +f 46/50/29 47/51/29 45/49/29 +f 49/53/29 35/54/29 50/55/29 +f 28/56/29 51/57/29 24/58/29 +f 33/59/29 51/57/29 28/56/29 +f 35/54/29 51/57/29 33/59/29 +f 49/53/29 51/57/29 35/54/29 +f 51/57/29 19/60/29 24/58/29 +f 51/57/29 10/61/29 19/60/29 +f 51/57/29 52/62/29 10/61/29 +f 52/62/29 53/63/29 54/64/29 +f 51/57/29 53/63/29 52/62/29 +f 55/65/29 56/66/29 57/67/29 +f 55/65/29 58/68/29 56/66/29 +f 59/69/29 60/70/29 61/71/29 +f 59/69/29 62/72/29 60/70/29 +f 62/72/29 63/73/29 64/74/29 +f 59/69/29 63/73/29 62/72/29 +f 51/57/29 63/73/29 53/63/29 +f 53/63/29 63/73/29 55/65/29 +f 55/65/29 63/73/29 58/68/29 +f 58/68/29 63/73/29 59/69/29 +f 39/43/29 51/57/29 49/53/29 +f 39/43/29 49/53/29 46/50/29 +f 65/75/30 66/76/30 67/77/30 +f 68/78/30 65/75/30 69/79/30 +f 68/78/30 66/76/30 65/75/30 +f 70/80/30 68/78/30 69/79/30 +f 71/81/30 66/76/30 68/78/30 +f 72/82/30 66/76/30 71/81/30 +f 73/83/30 71/81/30 74/84/30 +f 73/83/30 72/82/30 71/81/30 +f 31/85/30 75/86/30 76/87/30 +f 77/88/30 21/89/30 14/90/30 +f 77/88/30 26/91/30 21/89/30 +f 77/88/30 31/85/30 26/91/30 +f 77/88/30 75/86/30 31/85/30 +f 8/92/30 77/88/30 14/90/30 +f 6/93/30 77/88/30 8/92/30 +f 78/94/30 77/88/30 6/93/30 +f 79/95/30 78/94/30 80/96/30 +f 79/95/30 77/88/30 78/94/30 +f 81/97/30 82/98/30 83/99/30 +f 81/97/30 83/99/30 84/100/30 +f 85/101/30 86/102/30 87/103/30 +f 85/101/30 87/103/30 88/104/30 +f 89/105/30 85/101/30 90/106/30 +f 89/105/30 86/102/30 85/101/30 +f 89/105/30 77/88/30 79/95/30 +f 89/105/30 79/95/30 82/98/30 +f 89/105/30 82/98/30 81/97/30 +f 89/105/30 81/97/30 86/102/30 +f 77/88/30 66/76/30 75/86/30 +f 75/86/30 66/76/30 72/82/30 +f 91/107/28 50/108/28 36/36/28 +f 50/108/28 35/35/28 36/36/28 +f 91/109/29 36/110/29 34/111/29 +f 91/109/29 34/111/29 30/112/29 +f 92/113/29 30/112/29 29/114/29 +f 92/113/29 29/114/29 25/115/29 +f 92/113/29 93/116/29 91/109/29 +f 92/113/29 94/117/29 93/116/29 +f 92/113/29 91/109/29 30/112/29 +f 95/118/29 25/115/29 11/119/29 +f 95/118/29 92/113/29 25/115/29 +f 96/120/29 97/121/29 95/118/29 +f 96/120/29 98/122/29 97/121/29 +f 99/123/29 100/124/29 101/125/29 +f 102/126/29 99/123/29 96/120/29 +f 102/126/29 95/118/29 11/119/29 +f 102/126/29 96/120/29 95/118/29 +f 102/126/29 100/124/29 99/123/29 +f 102/127/28 11/128/28 9/129/28 +f 103/130/28 102/127/28 9/129/28 +f 103/131/30 16/132/30 20/133/30 +f 103/131/30 12/134/30 16/132/30 +f 103/131/30 9/135/30 12/134/30 +f 104/136/30 103/131/30 20/133/30 +f 104/137/28 20/138/28 18/139/28 +f 105/140/28 104/137/28 18/139/28 +f 106/141/29 18/142/29 17/143/29 +f 106/141/29 17/143/29 13/144/29 +f 106/141/29 13/144/29 5/145/29 +f 106/141/29 105/146/29 18/142/29 +f 106/147/28 5/148/28 7/149/28 +f 107/150/28 106/147/28 7/149/28 +f 108/151/30 27/152/30 32/153/30 +f 108/151/30 23/154/30 27/152/30 +f 109/155/30 22/156/30 23/154/30 +f 109/155/30 15/157/30 22/156/30 +f 109/155/30 23/154/30 108/151/30 +f 110/158/30 109/155/30 108/151/30 +f 111/159/30 109/155/30 110/158/30 +f 112/160/30 7/161/30 15/157/30 +f 112/160/30 15/157/30 109/155/30 +f 107/162/30 7/161/30 112/160/30 +f 107/162/30 112/160/30 113/163/30 +f 114/164/30 112/160/30 115/165/30 +f 114/164/30 113/163/30 112/160/30 +f 116/166/30 107/162/30 113/163/30 +f 117/167/30 116/166/30 118/168/30 +f 117/167/30 107/162/30 116/166/30 +f 76/169/28 32/32/28 31/31/28 +f 108/170/28 32/32/28 76/169/28 +f 37/171/1 119/172/1 38/173/1 +f 38/173/1 119/172/1 120/174/1 +f 120/175/31 119/176/31 121/177/31 +f 119/176/31 122/178/31 121/177/31 +f 121/179/1 122/180/1 123/181/1 +f 122/180/1 124/182/1 123/181/1 +f 124/183/28 125/184/28 123/185/28 +f 123/185/28 125/184/28 126/186/28 +f 126/187/1 125/188/1 86/189/1 +f 125/188/1 127/190/1 86/189/1 +f 86/191/31 127/192/31 87/193/31 +f 127/192/31 128/194/31 87/193/31 +f 87/195/1 128/196/1 88/197/1 +f 128/196/1 60/198/1 88/197/1 +f 60/199/28 62/200/28 88/201/28 +f 88/201/28 62/200/28 85/202/28 +f 62/203/1 64/204/1 85/205/1 +f 85/205/1 64/204/1 90/206/1 +f 64/207/28 63/208/28 90/209/28 +f 90/209/28 63/208/28 89/210/28 +f 89/211/32 129/212/32 130/213/32 +f 130/213/32 77/214/32 89/211/32 +f 130/213/32 131/215/32 77/214/32 +f 63/73/32 132/216/32 89/211/32 +f 89/211/32 132/216/32 129/212/32 +f 63/73/32 133/217/32 132/216/32 +f 129/212/32 134/218/32 135/219/32 +f 132/216/32 134/218/32 129/212/32 +f 133/217/32 51/57/32 136/220/32 +f 63/73/32 51/57/32 133/217/32 +f 136/220/31 39/221/31 137/222/31 +f 51/57/31 39/221/31 136/220/31 +f 137/223/1 39/224/1 100/225/1 +f 39/224/1 41/226/1 100/225/1 +f 100/227/28 40/228/28 101/229/28 +f 41/230/28 40/228/28 100/227/28 +f 101/231/1 40/232/1 99/233/1 +f 40/232/1 44/234/1 99/233/1 +f 99/235/28 43/236/28 96/237/28 +f 44/238/28 43/236/28 99/235/28 +f 96/239/32 42/240/32 98/241/32 +f 43/242/32 42/240/32 96/239/32 +f 98/243/28 45/244/28 97/245/28 +f 42/246/28 45/244/28 98/243/28 +f 97/247/1 45/248/1 95/249/1 +f 45/248/1 48/250/1 95/249/1 +f 95/251/28 138/252/28 92/253/28 +f 48/254/28 138/252/28 95/251/28 +f 92/255/32 46/256/32 94/257/32 +f 138/258/32 46/256/32 92/255/32 +f 94/259/28 46/260/28 93/261/28 +f 46/260/28 49/262/28 93/261/28 +f 93/263/1 49/264/1 91/265/1 +f 49/264/1 50/266/1 91/265/1 +f 77/214/31 139/267/31 66/268/31 +f 131/215/31 139/267/31 77/214/31 +f 66/76/1 117/269/1 67/77/1 +f 139/270/1 117/269/1 66/76/1 +f 67/271/28 118/272/28 65/273/28 +f 117/274/28 118/272/28 67/271/28 +f 65/275/1 116/276/1 140/277/1 +f 118/278/1 116/276/1 65/275/1 +f 140/279/28 113/280/28 70/281/28 +f 116/282/28 113/280/28 140/279/28 +f 70/283/32 114/164/32 141/284/32 +f 113/163/32 114/164/32 70/283/32 +f 141/285/28 115/286/28 71/287/28 +f 114/288/28 115/286/28 141/285/28 +f 71/289/1 112/290/1 142/291/1 +f 115/292/1 112/290/1 71/289/1 +f 142/293/28 109/294/28 143/295/28 +f 112/296/28 109/294/28 142/293/28 +f 143/297/32 111/298/32 144/299/32 +f 109/300/32 111/298/32 143/297/32 +f 144/301/28 110/302/28 145/303/28 +f 111/304/28 110/302/28 144/301/28 +f 145/305/1 108/306/1 76/307/1 +f 110/308/1 108/306/1 145/305/1 +f 104/309/1 100/225/1 102/310/1 +f 103/311/1 104/309/1 102/310/1 +f 117/269/1 100/225/1 104/309/1 +f 105/312/1 117/269/1 104/309/1 +f 107/313/1 105/312/1 106/314/1 +f 107/313/1 117/269/1 105/312/1 +f 129/212/32 135/219/32 130/213/32 +f 135/219/32 131/215/32 130/213/32 +f 133/217/32 134/218/32 132/216/32 +f 135/219/32 134/218/32 131/215/32 +f 134/218/32 136/220/32 131/215/32 +f 133/217/32 136/220/32 134/218/32 +f 136/220/31 139/267/31 131/215/31 +f 136/220/31 137/222/31 139/267/31 +f 139/270/1 100/225/1 117/269/1 +f 137/223/1 100/225/1 139/270/1 diff --git a/mymillwork/models/mymillwork_mach5.obj b/mymillwork/models/mymillwork_mach5.obj new file mode 100644 index 0000000..82506ca --- /dev/null +++ b/mymillwork/models/mymillwork_mach5.obj @@ -0,0 +1,182 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +g node0_Body +v 0.423880 -0.500000 -0.283227 +v 0.283227 -0.500000 -0.423880 +v 0.423880 0.500000 -0.283227 +v 0.283227 0.500000 -0.423880 +v 0.099456 -0.500000 -0.500000 +v 0.099456 0.500000 -0.500000 +v -0.099456 -0.500000 -0.500000 +v -0.099456 0.500000 -0.500000 +v -0.283227 -0.500000 -0.423880 +v -0.283227 0.500000 -0.423880 +v -0.423880 -0.500000 -0.283227 +v -0.423880 0.500000 -0.283227 +v -0.500000 0.500000 -0.099456 +v -0.500000 -0.500000 -0.099456 +v -0.500000 -0.500000 0.099456 +v -0.500000 0.500000 0.099456 +v -0.423880 -0.500000 0.283227 +v -0.423880 0.500000 0.283227 +v -0.283227 -0.500000 0.423880 +v -0.283227 0.500000 0.423880 +v -0.099456 -0.500000 0.500000 +v -0.099456 0.500000 0.500000 +v 0.099456 -0.500000 0.500000 +v 0.099456 0.500000 0.500000 +v 0.283227 0.500000 0.423880 +v 0.283227 -0.500000 0.423880 +v 0.423880 -0.500000 0.283227 +v 0.423880 0.500000 0.283227 +v 0.500000 -0.500000 0.099456 +v 0.500000 0.500000 0.099456 +v 0.500000 -0.500000 -0.099456 +v 0.500000 0.500000 -0.099456 +vt 0.923880 0.000000 +vt 0.783227 0.000000 +vt 0.923880 1.000000 +vt 0.783227 1.000000 +vt 0.599456 0.000000 +vt 0.599456 1.000000 +vt 0.400544 0.000000 +vt 0.400544 1.000000 +vt 0.216773 0.000000 +vt 0.216773 1.000000 +vt 0.076120 0.000000 +vt 0.076120 1.000000 +vt 0.783227 1.000000 +vt 0.783227 0.000000 +vt 0.599456 1.000000 +vt 0.599456 0.000000 +vt 0.400544 0.000000 +vt 0.400544 1.000000 +vt 0.216773 0.000000 +vt 0.216773 1.000000 +vt 0.076120 0.000000 +vt 0.216773 0.000000 +vt 0.076120 1.000000 +vt 0.216773 1.000000 +vt 0.400544 0.000000 +vt 0.400544 1.000000 +vt 0.599456 0.000000 +vt 0.599456 1.000000 +vt 0.783227 1.000000 +vt 0.783227 0.000000 +vt 0.923880 0.000000 +vt 0.923880 1.000000 +vt 0.216773 0.000000 +vt 0.400544 0.000000 +vt 0.216773 1.000000 +vt 0.400544 1.000000 +vt 0.599456 0.000000 +vt 0.599456 1.000000 +vt 0.783227 1.000000 +vt 0.783227 0.000000 +vt 0.076120 0.216773 +vt 0.000000 0.400544 +vt 0.216773 0.076120 +vt 0.783227 0.076120 +vt 0.000000 0.599456 +vt 0.076120 0.783227 +vt 0.923880 0.216773 +vt 0.216773 0.923880 +vt 0.400544 1.000000 +vt 0.599456 1.000000 +vt 0.923880 0.783227 +vt 1.000000 0.400544 +vt 1.000000 0.599456 +vt 0.783227 0.923880 +vt 0.000000 0.400544 +vt 0.076120 0.216773 +vt 0.216773 0.076120 +vt 0.783227 0.076120 +vt 0.400544 0.000000 +vt 0.599456 0.000000 +vt 0.076120 0.783227 +vt 0.000000 0.599456 +vt 0.923880 0.216773 +vt 0.216773 0.923880 +vt 0.923880 0.783227 +vt 1.000000 0.400544 +vt 1.000000 0.599456 +vt 0.783227 0.923880 +vn 0.7071 0.0000 -0.7071 +vn 0.3827 0.0000 -0.9239 +vn 0.0000 0.0000 -1.0000 +vn -0.3827 0.0000 -0.9239 +vn -0.7071 0.0000 -0.7071 +vn -0.9239 0.0000 -0.3827 +vn -1.0000 0.0000 0.0000 +vn -0.9239 0.0000 0.3827 +vn -0.7071 0.0000 0.7071 +vn -0.3827 0.0000 0.9239 +vn 0.0000 0.0000 1.0000 +vn 0.3827 0.0000 0.9239 +vn 0.7071 0.0000 0.7071 +vn 0.9239 0.0000 0.3827 +vn 1.0000 0.0000 0.0000 +vn 0.9239 0.0000 -0.3827 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +s off +f 1/1/1 2/2/1 3/3/1 +f 3/3/1 2/2/1 4/4/1 +f 2/2/2 5/5/2 4/4/2 +f 4/4/2 5/5/2 6/6/2 +f 5/5/3 7/7/3 6/6/3 +f 6/6/3 7/7/3 8/8/3 +f 7/7/4 9/9/4 8/8/4 +f 8/8/4 9/9/4 10/10/4 +f 9/9/5 11/11/5 10/10/5 +f 10/10/5 11/11/5 12/12/5 +f 12/13/6 11/14/6 13/15/6 +f 11/14/6 14/16/6 13/15/6 +f 14/16/7 15/17/7 13/15/7 +f 13/15/7 15/17/7 16/18/7 +f 15/17/8 17/19/8 16/18/8 +f 16/18/8 17/19/8 18/20/8 +f 17/21/9 19/22/9 18/23/9 +f 18/23/9 19/22/9 20/24/9 +f 19/22/10 21/25/10 20/24/10 +f 20/24/10 21/25/10 22/26/10 +f 21/25/11 23/27/11 22/26/11 +f 22/26/11 23/27/11 24/28/11 +f 24/28/12 23/27/12 25/29/12 +f 23/27/12 26/30/12 25/29/12 +f 26/30/13 27/31/13 25/29/13 +f 25/29/13 27/31/13 28/32/13 +f 27/33/14 29/34/14 28/35/14 +f 28/35/14 29/34/14 30/36/14 +f 29/34/15 31/37/15 30/36/15 +f 30/36/15 31/37/15 32/38/15 +f 32/38/16 31/37/16 3/39/16 +f 31/37/16 1/40/16 3/39/16 +f 17/41/17 15/42/17 19/43/17 +f 19/43/17 26/44/17 21/25/17 +f 21/25/17 26/44/17 23/27/17 +f 15/42/17 26/44/17 19/43/17 +f 14/45/17 11/46/17 15/42/17 +f 15/42/17 27/47/17 26/44/17 +f 11/46/17 27/47/17 15/42/17 +f 9/48/17 7/49/17 11/46/17 +f 7/49/17 5/50/17 11/46/17 +f 27/47/17 1/51/17 29/52/17 +f 29/52/17 1/51/17 31/53/17 +f 11/46/17 1/51/17 27/47/17 +f 5/50/17 1/51/17 11/46/17 +f 5/50/17 2/54/17 1/51/17 +f 16/55/18 18/56/18 20/57/18 +f 25/58/18 20/57/18 22/59/18 +f 25/58/18 22/59/18 24/60/18 +f 25/58/18 16/55/18 20/57/18 +f 12/61/18 13/62/18 16/55/18 +f 28/63/18 16/55/18 25/58/18 +f 28/63/18 12/61/18 16/55/18 +f 8/8/18 10/64/18 12/61/18 +f 6/6/18 8/8/18 12/61/18 +f 3/65/18 28/63/18 30/66/18 +f 3/65/18 30/66/18 32/67/18 +f 3/65/18 12/61/18 28/63/18 +f 3/65/18 6/6/18 12/61/18 +f 4/68/18 6/6/18 3/65/18 diff --git a/mymillwork/models/mymillwork_mach6.obj b/mymillwork/models/mymillwork_mach6.obj new file mode 100644 index 0000000..e2d7627 --- /dev/null +++ b/mymillwork/models/mymillwork_mach6.obj @@ -0,0 +1,226 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +g node0_Body +v -0.500000 -0.500000 0.500000 +v 0.500000 -0.500000 -0.500000 +v 0.500000 -0.500000 0.500000 +v -0.500000 -0.500000 -0.500000 +v -0.099456 -0.187500 0.500000 +v -0.500000 -0.187500 0.500000 +v 0.099456 -0.187500 0.500000 +v 0.500000 -0.187500 0.500000 +v 0.500000 -0.187500 0.099456 +v 0.500000 -0.187500 -0.099456 +v 0.500000 -0.187500 -0.500000 +v 0.099456 -0.187500 -0.500000 +v -0.099456 -0.187500 -0.500000 +v -0.500000 -0.187500 -0.500000 +v -0.500000 -0.187500 -0.099456 +v -0.500000 -0.187500 0.099456 +v -0.283227 -0.187500 0.423880 +v -0.423880 -0.187500 0.283227 +v -0.099456 0.500000 0.500000 +v 0.099456 0.500000 0.500000 +v 0.283227 -0.187500 0.423880 +v 0.423880 -0.187500 0.283227 +v 0.500000 0.500000 0.099456 +v 0.500000 0.500000 -0.099456 +v 0.423880 -0.187500 -0.283227 +v 0.283227 -0.187500 -0.423880 +v 0.099456 0.500000 -0.500000 +v -0.099456 0.500000 -0.500000 +v -0.423880 -0.187500 -0.283227 +v -0.283227 -0.187500 -0.423880 +v -0.500000 0.500000 -0.099456 +v -0.500000 0.500000 0.099456 +v -0.423880 0.500000 0.283227 +v -0.283227 0.500000 0.423880 +v 0.423880 0.500000 0.283227 +v 0.283227 0.500000 0.423880 +v 0.423880 0.500000 -0.283227 +v 0.283227 0.500000 -0.423880 +v -0.423880 0.500000 -0.283227 +v -0.283227 0.500000 -0.423880 +vt 0.000000 0.000000 +vt 1.000000 1.000000 +vt 1.000000 0.000000 +vt 0.000000 1.000000 +vt 0.400544 0.312500 +vt 0.000000 0.312500 +vt 0.599456 0.312500 +vt 1.000000 0.312500 +vt 0.000000 0.000000 +vt 0.400544 0.312500 +vt 0.000000 0.312500 +vt 1.000000 0.000000 +vt 0.599456 0.312500 +vt 1.000000 0.312500 +vt 0.599456 0.312500 +vt 0.000000 0.000000 +vt 0.400544 0.312500 +vt 0.000000 0.312500 +vt 1.000000 0.000000 +vt 0.599456 0.312500 +vt 1.000000 0.312500 +vt 0.400544 0.312500 +vt 0.216773 0.076120 +vt 0.076120 0.216773 +vt 0.000000 0.000000 +vt 0.000000 0.400544 +vt 0.400544 0.000000 +vt 0.400544 1.000000 +vt 0.599456 1.000000 +vt 1.000000 0.000000 +vt 0.783227 0.076120 +vt 0.599456 0.000000 +vt 0.923880 0.216773 +vt 1.000000 0.400544 +vt 0.400544 1.000000 +vt 0.599456 1.000000 +vt 1.000000 1.000000 +vt 0.923880 0.783227 +vt 1.000000 0.599456 +vt 0.783227 0.923880 +vt 0.599456 1.000000 +vt 0.599456 1.000000 +vt 0.400544 1.000000 +vt 0.000000 1.000000 +vt 0.000000 0.599456 +vt 0.076120 0.783227 +vt 0.216773 0.923880 +vt 0.400544 1.000000 +vt 0.599456 1.000000 +vt 0.400544 1.000000 +vt 0.216773 1.000000 +vt 0.216773 0.312500 +vt 0.076120 0.312500 +vt 0.216773 0.312500 +vt 0.076120 1.000000 +vt 0.216773 1.000000 +vt 1.000000 0.599456 +vt 0.923880 0.216773 +vt 1.000000 0.400544 +vt 0.783227 0.076120 +vt 0.400544 0.000000 +vt 0.599456 0.000000 +vt 0.216773 0.076120 +vt 0.923880 0.783227 +vt 0.783227 0.923880 +vt 0.000000 0.400544 +vt 0.076120 0.216773 +vt 0.000000 0.599456 +vt 0.076120 0.783227 +vt 0.216773 0.923880 +vt 0.783227 1.000000 +vt 0.783227 0.312500 +vt 0.923880 0.312500 +vt 0.923880 1.000000 +vt 0.216773 1.000000 +vt 0.216773 0.312500 +vt 0.783227 0.312500 +vt 0.783227 1.000000 +vt 0.923880 1.000000 +vt 0.923880 0.312500 +vt 0.783227 1.000000 +vt 0.783227 0.312500 +vt 0.216773 1.000000 +vt 0.216773 0.312500 +vt 0.076120 1.000000 +vt 0.076120 0.312500 +vt 0.783227 1.000000 +vt 0.783227 0.312500 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn -0.9239 0.0000 0.3827 +vn -0.7071 0.0000 0.7071 +vn -0.3827 0.0000 0.9239 +vn 0.3827 0.0000 0.9239 +vn 0.7071 0.0000 0.7071 +vn 0.9239 0.0000 0.3827 +vn 0.9239 0.0000 -0.3827 +vn 0.7071 0.0000 -0.7071 +vn 0.3827 0.0000 -0.9239 +vn -0.3827 0.0000 -0.9239 +vn -0.7071 0.0000 -0.7071 +vn -0.9239 0.0000 -0.3827 +s off +f 1/1/1 2/2/1 3/3/1 +f 4/4/1 2/2/1 1/1/1 +f 1/1/2 5/5/2 6/6/2 +f 1/1/2 7/7/2 5/5/2 +f 7/7/2 3/3/2 8/8/2 +f 1/1/2 3/3/2 7/7/2 +f 3/9/3 9/10/3 8/11/3 +f 9/10/3 2/12/3 10/13/3 +f 10/13/3 2/12/3 11/14/3 +f 3/9/3 2/12/3 9/10/3 +f 2/12/4 12/15/4 11/14/4 +f 12/15/4 4/16/4 13/17/4 +f 13/17/4 4/16/4 14/18/4 +f 2/12/4 4/16/4 12/15/4 +f 4/19/5 15/20/5 14/21/5 +f 15/20/5 1/1/5 16/22/5 +f 16/22/5 1/1/5 6/6/5 +f 4/19/5 1/1/5 15/20/5 +f 17/23/6 18/24/6 6/25/6 +f 16/26/6 6/25/6 18/24/6 +f 5/27/6 17/23/6 6/25/6 +f 19/28/2 5/5/2 20/29/2 +f 5/5/2 7/7/2 20/29/2 +f 8/30/6 21/31/6 7/32/6 +f 22/33/6 21/31/6 8/30/6 +f 9/34/6 22/33/6 8/30/6 +f 23/35/3 9/10/3 24/36/3 +f 9/10/3 10/13/3 24/36/3 +f 11/37/6 25/38/6 10/39/6 +f 11/37/6 26/40/6 25/38/6 +f 11/37/6 12/41/6 26/40/6 +f 27/42/4 12/15/4 28/43/4 +f 12/15/4 13/17/4 28/43/4 +f 14/44/6 15/45/6 29/46/6 +f 30/47/6 14/44/6 29/46/6 +f 13/48/6 14/44/6 30/47/6 +f 31/49/5 15/20/5 32/50/5 +f 15/20/5 16/22/5 32/50/5 +f 32/50/7 16/22/7 33/51/7 +f 16/22/7 18/52/7 33/51/7 +f 18/53/8 17/54/8 33/55/8 +f 33/55/8 17/54/8 34/56/8 +f 34/56/9 17/54/9 19/28/9 +f 17/54/9 5/5/9 19/28/9 +f 24/57/6 35/58/6 23/59/6 +f 24/57/6 36/60/6 35/58/6 +f 19/61/6 20/62/6 36/60/6 +f 34/63/6 19/61/6 36/60/6 +f 27/42/6 24/57/6 37/64/6 +f 27/42/6 37/64/6 38/65/6 +f 27/42/6 36/60/6 24/57/6 +f 32/66/6 33/67/6 34/63/6 +f 28/43/6 32/66/6 34/63/6 +f 28/43/6 34/63/6 36/60/6 +f 28/43/6 36/60/6 27/42/6 +f 31/68/6 32/66/6 28/43/6 +f 39/69/6 28/43/6 40/70/6 +f 39/69/6 31/68/6 28/43/6 +f 20/29/10 7/7/10 36/71/10 +f 7/7/10 21/72/10 36/71/10 +f 21/72/11 22/73/11 36/71/11 +f 36/71/11 22/73/11 35/74/11 +f 35/75/12 22/76/12 23/35/12 +f 22/76/12 9/10/12 23/35/12 +f 10/13/13 25/77/13 24/36/13 +f 24/36/13 25/77/13 37/78/13 +f 37/79/14 25/80/14 38/81/14 +f 25/80/14 26/82/14 38/81/14 +f 38/81/15 26/82/15 27/42/15 +f 26/82/15 12/15/15 27/42/15 +f 28/43/16 13/17/16 40/83/16 +f 13/17/16 30/84/16 40/83/16 +f 40/83/17 30/84/17 39/85/17 +f 30/84/17 29/86/17 39/85/17 +f 39/87/18 29/88/18 31/49/18 +f 29/88/18 15/20/18 31/49/18 diff --git a/mymillwork/models/mymillwork_mach7.obj b/mymillwork/models/mymillwork_mach7.obj new file mode 100644 index 0000000..58b4dc5 --- /dev/null +++ b/mymillwork/models/mymillwork_mach7.obj @@ -0,0 +1,116 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +g node0_Body +v 0.423880 -0.500000 0.216773 +v 0.283227 -0.500000 0.076120 +v 0.423880 0.500000 0.216773 +v 0.283227 0.500000 0.076120 +v 0.500000 0.500000 0.400544 +v 0.500000 -0.500000 0.400544 +v 0.099456 -0.500000 0.000000 +v 0.099456 0.500000 0.000000 +v -0.500000 -0.500000 0.400544 +v -0.423880 -0.500000 0.216773 +v -0.500000 -0.500000 0.500000 +v -0.283227 -0.500000 0.076120 +v -0.099456 -0.500000 0.000000 +v 0.500000 -0.500000 0.500000 +v -0.423880 0.500000 0.216773 +v -0.500000 0.500000 0.400544 +v -0.500000 0.500000 0.500000 +v -0.283227 0.500000 0.076120 +v -0.099456 0.500000 0.000000 +v 0.500000 0.500000 0.500000 +vt 0.283227 0.000000 +vt 0.423880 0.000000 +vt 0.283227 1.000000 +vt 0.423880 1.000000 +vt 0.099456 1.000000 +vt 0.099456 0.000000 +vt 0.783227 0.000000 +vt 0.599456 0.000000 +vt 0.783227 1.000000 +vt 0.599456 1.000000 +vt 0.000000 0.099456 +vt 0.076120 0.283227 +vt 0.000000 0.000000 +vt 0.216773 0.423880 +vt 0.400544 0.500000 +vt 0.599456 0.500000 +vt 1.000000 0.000000 +vt 0.923880 0.283227 +vt 1.000000 0.099456 +vt 0.783227 0.423880 +vt 0.076120 0.283227 +vt 0.000000 0.099456 +vt 0.000000 0.000000 +vt 0.216773 0.423880 +vt 0.400544 0.500000 +vt 0.599456 0.500000 +vt 1.000000 0.000000 +vt 0.923880 0.283227 +vt 1.000000 0.099456 +vt 0.783227 0.423880 +vt 0.000000 1.000000 +vt 0.000000 0.000000 +vt 0.400544 0.000000 +vt 0.400544 1.000000 +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vt 0.099456 1.000000 +vt 0.099456 0.000000 +vt 0.283227 1.000000 +vt 0.283227 0.000000 +vt 0.423880 0.000000 +vt 0.423880 1.000000 +vt 0.216773 0.000000 +vt 0.216773 1.000000 +vn 0.7071 0.0000 -0.7071 +vn 0.9239 0.0000 -0.3827 +vn 0.3827 0.0000 -0.9239 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 0.0000 1.0000 +vn -1.0000 0.0000 0.0000 +vn -0.9239 0.0000 -0.3827 +vn -0.7071 0.0000 -0.7071 +vn -0.3827 0.0000 -0.9239 +s off +f 1/1/1 2/2/1 3/3/1 +f 3/3/1 2/2/1 4/4/1 +f 5/5/2 6/6/2 3/3/2 +f 6/6/2 1/1/2 3/3/2 +f 2/7/3 7/8/3 4/9/3 +f 4/9/3 7/8/3 8/10/3 +f 9/11/4 10/12/4 11/13/4 +f 10/12/4 12/14/4 11/13/4 +f 12/14/4 13/15/4 11/13/4 +f 11/13/4 7/16/4 14/17/4 +f 13/15/4 7/16/4 11/13/4 +f 14/17/4 1/18/4 6/19/4 +f 7/16/4 2/20/4 14/17/4 +f 14/17/4 2/20/4 1/18/4 +f 15/21/5 16/22/5 17/23/5 +f 18/24/5 15/21/5 17/23/5 +f 19/25/5 18/24/5 17/23/5 +f 8/26/5 17/23/5 20/27/5 +f 8/26/5 19/25/5 17/23/5 +f 3/28/5 20/27/5 5/29/5 +f 4/30/5 8/26/5 20/27/5 +f 4/30/5 20/27/5 3/28/5 +f 20/31/6 6/6/6 5/5/6 +f 14/32/6 6/6/6 20/31/6 +f 7/8/7 13/33/7 8/10/7 +f 8/10/7 13/33/7 19/34/7 +f 20/35/8 17/36/8 14/17/8 +f 14/17/8 17/36/8 11/13/8 +f 16/37/9 11/13/9 17/36/9 +f 9/38/9 11/13/9 16/37/9 +f 15/39/10 10/40/10 16/37/10 +f 10/40/10 9/38/10 16/37/10 +f 12/41/11 10/40/11 18/42/11 +f 18/42/11 10/40/11 15/39/11 +f 13/33/12 12/43/12 19/34/12 +f 19/34/12 12/43/12 18/44/12 diff --git a/mymillwork/models/mymillwork_mach8.obj b/mymillwork/models/mymillwork_mach8.obj new file mode 100644 index 0000000..4b5d24e --- /dev/null +++ b/mymillwork/models/mymillwork_mach8.obj @@ -0,0 +1,149 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +g node0_Body +v -0.500000 -0.500000 0.000000 +v 0.500000 -0.500000 0.000000 +v -0.500000 -0.500000 0.500000 +v 0.500000 -0.500000 0.500000 +v -0.500000 -0.187500 0.400544 +v -0.500000 -0.187500 0.000000 +v -0.500000 -0.187500 0.500000 +v 0.099456 -0.187500 0.000000 +v 0.500000 -0.187500 0.000000 +v -0.099456 -0.187500 0.000000 +v 0.500000 -0.187500 0.500000 +v 0.500000 -0.187500 0.400544 +v -0.500000 0.500000 0.500000 +v 0.500000 0.500000 0.500000 +v -0.500000 0.500000 0.400544 +v -0.423880 -0.187500 0.216773 +v -0.283227 -0.187500 0.076120 +v 0.423880 -0.187500 0.216773 +v 0.283227 -0.187500 0.076120 +v 0.099456 0.500000 0.000000 +v -0.099456 0.500000 0.000000 +v 0.500000 0.500000 0.400544 +v 0.423880 0.500000 0.216773 +v 0.283227 0.500000 0.076120 +v -0.283227 0.500000 0.076120 +v -0.423880 0.500000 0.216773 +vt 0.000000 0.500000 +vt 1.000000 0.500000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 0.500000 0.000000 +vt 0.099456 0.312500 +vt 0.500000 0.312500 +vt 0.000000 0.312500 +vt 1.000000 0.000000 +vt 0.599456 0.312500 +vt 1.000000 0.312500 +vt 0.000000 0.000000 +vt 0.400544 0.312500 +vt 0.000000 0.312500 +vt 0.000000 0.312500 +vt 0.000000 0.000000 +vt 0.099456 0.312500 +vt 0.500000 0.000000 +vt 0.500000 0.312500 +vt 1.000000 0.312500 +vt 0.000000 1.000000 +vt 1.000000 1.000000 +vt 0.099456 1.000000 +vt 0.000000 0.500000 +vt 0.000000 0.099456 +vt 0.076120 0.283227 +vt 0.216773 0.423880 +vt 0.400544 0.500000 +vt 1.000000 0.500000 +vt 0.923880 0.283227 +vt 1.000000 0.099456 +vt 0.783227 0.423880 +vt 0.599456 0.500000 +vt 0.599456 1.000000 +vt 0.400544 1.000000 +vt 0.000000 1.000000 +vt 0.099456 1.000000 +vt 0.923880 0.283227 +vt 1.000000 0.000000 +vt 1.000000 0.099456 +vt 0.783227 0.423880 +vt 0.599456 0.500000 +vt 0.400544 0.500000 +vt 0.000000 0.000000 +vt 0.216773 0.423880 +vt 0.076120 0.283227 +vt 0.000000 0.099456 +vt 0.283227 1.000000 +vt 0.283227 0.312500 +vt 0.216773 1.000000 +vt 0.216773 0.312500 +vt 0.423880 1.000000 +vt 0.423880 0.312500 +vt 0.283227 0.312500 +vt 0.283227 1.000000 +vt 0.423880 1.000000 +vt 0.423880 0.312500 +vt 0.783227 1.000000 +vt 0.783227 0.312500 +vn 0.0000 -1.0000 0.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn 0.0000 1.0000 0.0000 +vn -0.9239 0.0000 -0.3827 +vn -0.3827 0.0000 -0.9239 +vn -0.7071 0.0000 -0.7071 +vn 0.9239 0.0000 -0.3827 +vn 0.7071 0.0000 -0.7071 +vn 0.3827 0.0000 -0.9239 +s off +f 1/1/1 2/2/1 3/3/1 +f 3/3/1 2/2/1 4/4/1 +f 1/5/2 5/6/2 6/7/2 +f 5/6/2 3/3/2 7/8/2 +f 1/5/2 3/3/2 5/6/2 +f 2/9/3 8/10/3 9/11/3 +f 8/10/3 1/12/3 10/13/3 +f 10/13/3 1/12/3 6/14/3 +f 2/9/3 1/12/3 8/10/3 +f 11/15/4 4/16/4 12/17/4 +f 12/17/4 2/18/4 9/19/4 +f 4/16/4 2/18/4 12/17/4 +f 11/20/5 13/21/5 7/8/5 +f 11/20/5 7/8/5 3/3/5 +f 11/20/5 3/3/5 4/4/5 +f 14/22/5 13/21/5 11/20/5 +f 15/23/2 5/6/2 13/21/2 +f 5/6/2 7/8/2 13/21/2 +f 6/24/6 5/25/6 16/26/6 +f 17/27/6 6/24/6 16/26/6 +f 10/28/6 6/24/6 17/27/6 +f 9/29/6 18/30/6 12/31/6 +f 9/29/6 19/32/6 18/30/6 +f 9/29/6 8/33/6 19/32/6 +f 20/34/3 8/10/3 21/35/3 +f 8/10/3 10/13/3 21/35/3 +f 14/36/4 12/17/4 22/37/4 +f 11/15/4 12/17/4 14/36/4 +f 23/38/6 14/39/6 22/40/6 +f 24/41/6 14/39/6 23/38/6 +f 20/42/6 14/39/6 24/41/6 +f 21/43/6 13/44/6 14/39/6 +f 21/43/6 14/39/6 20/42/6 +f 25/45/6 13/44/6 21/43/6 +f 26/46/6 15/47/6 13/44/6 +f 26/46/6 13/44/6 25/45/6 +f 26/48/7 16/49/7 15/23/7 +f 16/49/7 5/6/7 15/23/7 +f 21/35/8 10/13/8 25/50/8 +f 10/13/8 17/51/8 25/50/8 +f 25/52/9 17/53/9 26/48/9 +f 17/53/9 16/49/9 26/48/9 +f 12/17/10 18/54/10 22/37/10 +f 22/37/10 18/54/10 23/55/10 +f 23/55/11 18/54/11 24/56/11 +f 18/54/11 19/57/11 24/56/11 +f 24/58/12 19/59/12 20/34/12 +f 19/59/12 8/10/12 20/34/12 diff --git a/mymillwork/models/mymillwork_mach9.obj b/mymillwork/models/mymillwork_mach9.obj new file mode 100644 index 0000000..186c7b5 --- /dev/null +++ b/mymillwork/models/mymillwork_mach9.obj @@ -0,0 +1,930 @@ +# Blender v2.79 (sub 0) OBJ File: '' +# www.blender.org +g node0_Body +v -0.250000 -0.375000 0.000000 +v -0.500000 -0.437500 -0.000000 +v -0.250000 -0.437500 0.000000 +v -0.500000 -0.375000 -0.000000 +v -0.500000 -0.500000 -0.500000 +v -0.500000 -0.437500 -0.437500 +v -0.500000 -0.437500 -0.500000 +v -0.500000 -0.437500 -0.250000 +v -0.500000 -0.375000 -0.437500 +v -0.500000 -0.375000 -0.250000 +v -0.500000 -0.437500 -0.125000 +v -0.500000 -0.375000 -0.125000 +v -0.500000 -0.437500 0.062500 +v -0.500000 -0.375000 0.125000 +v -0.500000 -0.375000 0.062500 +v -0.500000 -0.500000 0.400544 +v -0.500000 -0.339286 0.172197 +v -0.500000 -0.301029 0.217358 +v -0.500000 -0.260345 0.260345 +v -0.500000 -0.217358 0.301029 +v -0.500000 -0.172197 0.339286 +v -0.500000 -0.125000 0.375000 +v -0.500000 -0.062500 0.400544 +v -0.500000 -0.062500 0.375000 +v -0.250345 -0.437500 0.062500 +v -0.250000 -0.437500 0.062357 +v -0.250000 -0.187500 0.062357 +v -0.250000 -0.375000 -0.125000 +v -0.250000 -0.375000 -0.250000 +v -0.250000 -0.437500 -0.125000 +v -0.250000 -0.437500 -0.250000 +v -0.250000 -0.375000 -0.437500 +v -0.250000 -0.437500 -0.500000 +v -0.250000 -0.437500 -0.437500 +v -0.250000 -0.187500 -0.500000 +v -0.489419 -0.125000 0.375000 +v -0.473396 -0.175889 0.336316 +v -0.456148 -0.224389 0.294677 +v -0.440422 -0.263964 0.256709 +v -0.423880 -0.301553 0.216773 +v -0.384086 -0.335433 0.176979 +v -0.358397 -0.355612 0.151290 +v -0.332107 -0.375000 0.125000 +v -0.283227 -0.375000 0.076120 +v -0.250345 -0.375000 0.062500 +v -0.250000 -0.500000 -0.500000 +v -0.250000 -0.500000 0.062357 +v -0.283227 -0.500000 0.076120 +v -0.423880 -0.500000 0.216773 +v -0.500000 0.437500 0.437500 +v -0.500000 0.500000 0.500000 +v -0.500000 0.500000 0.437500 +v -0.500000 0.437500 0.400544 +v -0.500000 0.250000 0.437500 +v -0.500000 0.250000 0.400544 +v -0.500000 0.125000 0.400544 +v -0.500000 0.000000 0.400544 +v -0.500000 0.125000 0.437500 +v -0.500000 0.000000 0.437500 +v -0.500000 -0.062500 0.437500 +v -0.500000 -0.500000 0.500000 +v -0.489419 -0.062500 0.375000 +v -0.099456 0.500000 0.000000 +v -0.187500 -0.187500 0.036469 +v -0.283227 0.500000 0.076120 +v -0.099456 -0.250000 0.000000 +v -0.187500 -0.250000 0.036469 +v -0.187500 -0.250000 -0.500000 +v -0.187500 -0.187500 -0.500000 +v 0.250000 -0.437500 -0.500000 +v 0.187500 -0.250000 -0.500000 +v 0.250000 -0.187500 -0.500000 +v 0.187500 -0.187500 -0.500000 +v -0.423880 0.500000 0.216773 +v -0.489419 0.437500 0.375000 +v -0.500000 0.500000 0.400544 +v -0.489419 0.250000 0.375000 +v -0.489419 0.125000 0.375000 +v -0.489419 0.000000 0.375000 +v 0.250000 -0.500000 -0.500000 +v 0.099456 -0.500000 0.000000 +v 0.250000 -0.500000 0.062357 +v -0.099456 -0.500000 0.000000 +v -0.250000 -0.500000 0.500000 +v 0.500000 -0.500000 0.500000 +v 0.250000 -0.187500 0.500000 +v 0.250000 -0.500000 0.500000 +v 0.187500 -0.250000 0.500000 +v -0.187500 -0.187500 0.500000 +v -0.187500 -0.250000 0.500000 +v 0.187500 -0.187500 0.500000 +v 0.500000 0.500000 0.500000 +v -0.250000 -0.187500 0.500000 +v 0.500000 0.500000 0.437500 +v -0.500000 0.250000 0.375000 +v -0.500000 0.437500 0.375000 +v -0.500000 0.125000 0.375000 +v -0.500000 0.000000 0.375000 +v 0.099456 -0.250000 0.000000 +v 0.187500 -0.250000 0.036469 +v 0.099456 0.500000 0.000000 +v 0.283227 0.500000 0.076120 +v 0.423880 0.500000 0.216773 +v 0.500000 0.500000 0.400544 +v 0.250000 -0.437500 0.062357 +v 0.250000 -0.375000 0.000000 +v 0.250000 -0.187500 0.062357 +v 0.250000 -0.437500 0.000000 +v 0.250000 -0.375000 -0.125000 +v 0.250000 -0.375000 -0.250000 +v 0.250000 -0.437500 -0.125000 +v 0.250000 -0.437500 -0.250000 +v 0.250000 -0.375000 -0.437500 +v 0.250000 -0.437500 -0.437500 +v 0.187500 -0.187500 0.036469 +v 0.500000 -0.500000 -0.500000 +v 0.500000 -0.437500 -0.500000 +v 0.423880 -0.500000 0.216773 +v 0.500000 -0.500000 0.400544 +v 0.283227 -0.500000 0.076120 +v 0.500000 0.437500 0.437500 +v 0.500000 0.250000 0.437500 +v 0.500000 0.437500 0.400544 +v 0.500000 0.250000 0.400544 +v 0.500000 0.125000 0.437500 +v 0.500000 0.000000 0.400544 +v 0.500000 0.125000 0.400544 +v 0.500000 0.000000 0.437500 +v 0.500000 -0.062500 0.437500 +v 0.500000 -0.062500 0.400544 +v 0.250345 -0.437500 0.062500 +v 0.250345 -0.375000 0.062500 +v 0.283227 -0.375000 0.076120 +v 0.423880 -0.301553 0.216773 +v 0.399201 -0.322955 0.192094 +v 0.332107 -0.375000 0.125000 +v 0.373884 -0.343598 0.166777 +v 0.489419 0.437500 0.375000 +v 0.489419 0.250000 0.375000 +v 0.489419 0.125000 0.375000 +v 0.489419 0.000000 0.375000 +v 0.489419 -0.062500 0.375000 +v 0.489419 -0.125000 0.375000 +v 0.474225 -0.173404 0.338318 +v 0.457924 -0.219659 0.298962 +v 0.441359 -0.261715 0.258973 +v 0.500000 -0.437500 -0.437500 +v 0.500000 -0.375000 -0.437500 +v 0.500000 -0.375000 -0.250000 +v 0.500000 -0.437500 -0.250000 +v 0.500000 -0.437500 -0.125000 +v 0.500000 -0.375000 -0.125000 +v 0.500000 -0.375000 0.000000 +v 0.500000 -0.437500 0.000000 +v 0.500000 -0.437500 0.062500 +v 0.500000 -0.375000 0.125000 +v 0.500000 -0.375000 0.062500 +v 0.500000 -0.339286 0.172197 +v 0.500000 -0.301029 0.217358 +v 0.500000 -0.260345 0.260345 +v 0.500000 -0.217358 0.301029 +v 0.500000 -0.172197 0.339286 +v 0.500000 -0.125000 0.375000 +v 0.500000 -0.062500 0.375000 +v 0.500000 0.000000 0.375000 +v 0.500000 0.125000 0.375000 +v 0.500000 0.437500 0.375000 +v 0.500000 0.250000 0.375000 +vt 0.250000 0.125000 +vt 0.000000 0.062500 +vt 0.250000 0.062500 +vt 0.000000 0.125000 +vt 1.000000 0.000000 +vt 0.937500 0.062500 +vt 1.000000 0.062500 +vt 0.750000 0.062500 +vt 0.937500 0.125000 +vt 0.750000 0.125000 +vt 0.625000 0.062500 +vt 0.500000 0.125000 +vt 0.625000 0.125000 +vt 0.500000 0.062500 +vt 0.437500 0.062500 +vt 0.375000 0.125000 +vt 0.437500 0.125000 +vt 0.099456 0.000000 +vt 0.327803 0.160714 +vt 0.282642 0.198971 +vt 0.239655 0.239655 +vt 0.198971 0.282642 +vt 0.160714 0.327803 +vt 0.125000 0.375000 +vt 0.099456 0.437500 +vt 0.125000 0.437500 +vt 0.250000 0.500000 +vt 0.249655 0.437500 +vt 0.250000 0.437643 +vt 0.000000 0.500000 +vt 0.000000 0.437500 +vt 0.500000 0.125000 +vt 0.500000 0.062500 +vt 0.437643 0.062500 +vt 0.437643 0.312500 +vt 0.625000 0.125000 +vt 0.750000 0.125000 +vt 0.625000 0.062500 +vt 0.750000 0.062500 +vt 0.937500 0.125000 +vt 1.000000 0.062500 +vt 0.937500 0.062500 +vt 1.000000 0.312500 +vt 0.250000 0.625000 +vt 0.000000 0.500000 +vt 0.250000 0.500000 +vt 0.000000 0.625000 +vt 0.000000 0.327803 +vt 0.010581 0.375000 +vt 0.026604 0.324111 +vt 0.000000 0.375000 +vt 0.000000 0.282642 +vt 0.043852 0.275611 +vt 0.000000 0.239655 +vt 0.059578 0.236036 +vt 0.000000 0.282642 +vt 0.059578 0.243291 +vt 0.076120 0.283227 +vt 0.000000 0.327803 +vt 0.115914 0.323021 +vt 0.141603 0.348710 +vt 0.000000 0.375000 +vt 0.167893 0.375000 +vt 0.216773 0.423880 +vt 0.000000 0.437500 +vt 0.249655 0.437500 +vt 0.249655 0.062500 +vt 0.000000 0.125000 +vt 0.249655 0.125000 +vt 0.000000 0.062500 +vt 0.250000 0.062500 +vt 0.000000 0.062500 +vt 0.250000 0.125000 +vt 0.000000 0.125000 +vt 0.250000 0.750000 +vt 0.000000 0.625000 +vt 0.250000 0.625000 +vt 0.000000 0.750000 +vt 0.250000 0.125000 +vt 0.000000 0.062500 +vt 0.250000 0.062500 +vt 0.000000 0.125000 +vt 0.250000 0.937500 +vt 0.000000 0.750000 +vt 0.250000 0.750000 +vt 0.000000 0.937500 +vt 0.250000 0.062500 +vt 0.000000 0.062500 +vt 0.250000 0.125000 +vt 0.000000 0.125000 +vt 0.250000 1.000000 +vt 0.000000 0.937500 +vt 0.250000 0.937500 +vt 0.000000 1.000000 +vt 0.250000 0.000000 +vt 0.000000 0.000000 +vt 0.250000 0.062500 +vt 0.000000 0.062500 +vt 0.250000 0.437643 +vt 0.000000 1.000000 +vt 0.250000 1.000000 +vt 0.216773 0.423880 +vt 0.076120 0.283227 +vt 0.000000 0.099456 +vt 0.062500 0.937500 +vt 0.000000 1.000000 +vt 0.062500 1.000000 +vt 0.099456 0.937500 +vt 0.062500 0.750000 +vt 0.099456 0.750000 +vt 0.099456 0.625000 +vt 0.099456 0.500000 +vt 0.062500 0.625000 +vt 0.062500 0.500000 +vt 0.062500 0.437500 +vt 0.000000 0.000000 +vt 0.000000 0.125000 +vt 0.000000 0.099456 +vt 0.010581 0.125000 +vt 0.010581 0.437500 +vt 0.000000 0.437500 +vt 0.400544 1.000000 +vt 0.312500 0.312500 +vt 0.216773 1.000000 +vt 0.400544 0.250000 +vt 0.312500 0.250000 +vt 0.250000 0.312500 +vt 0.250000 0.062500 +vt 0.216773 0.125000 +vt 0.312500 0.250000 +vt 0.250000 0.312500 +vt 0.312500 0.312500 +vt 0.750000 0.062500 +vt 0.687500 0.250000 +vt 0.750000 0.312500 +vt 0.687500 0.312500 +vt 0.250000 1.000000 +vt 0.250000 0.437643 +vt 0.312500 0.463531 +vt 0.312500 1.000000 +vt 0.167893 0.125000 +vt 0.141603 0.144388 +vt 0.115914 0.164567 +vt 0.423880 1.000000 +vt 0.283227 0.198447 +vt 0.283227 1.000000 +vt 0.423880 0.125000 +vt 0.076120 0.198447 +vt 0.125000 0.937500 +vt 0.099456 1.000000 +vt 0.125000 0.750000 +vt 0.125000 0.625000 +vt 0.125000 0.500000 +vt 0.125000 0.437500 +vt 0.163684 0.324111 +vt 0.125000 0.375000 +vt 0.243291 0.236036 +vt 0.205323 0.275611 +vt 0.750000 0.000000 +vt 0.599456 0.500000 +vt 0.750000 1.000000 +vt 0.750000 0.437643 +vt 0.400544 0.500000 +vt 0.250000 0.000000 +vt 1.000000 0.000000 +vt 0.750000 0.312500 +vt 0.750000 0.000000 +vt 0.687500 0.250000 +vt 0.312500 0.312500 +vt 0.312500 0.250000 +vt 0.687500 0.312500 +vt 1.000000 1.000000 +vt 0.250000 0.312500 +vt 1.000000 0.000000 +vt 0.000000 0.062500 +vt 0.000000 0.000000 +vt 1.000000 0.062500 +vt 0.125000 0.750000 +vt 0.125000 0.937500 +vt 0.125000 0.625000 +vt 0.125000 0.500000 +vt 0.312500 1.000000 +vt 0.312500 0.463531 +vt 0.400544 0.500000 +vt 0.687500 1.000000 +vt 0.599456 0.500000 +vt 0.687500 0.463531 +vt 1.000000 0.250000 +vt 0.463531 0.312500 +vt 0.463531 0.250000 +vt 1.000000 0.312500 +vt 0.076120 0.283227 +vt 0.000000 0.099456 +vt 0.216773 0.423880 +vt 0.400544 0.500000 +vt 0.599456 0.500000 +vt 0.783227 0.423880 +vt 0.923880 0.283227 +vt 1.000000 0.099456 +vt 0.599456 1.000000 +vt 0.599456 0.250000 +vt 0.437643 0.062500 +vt 0.500000 0.125000 +vt 0.437643 0.312500 +vt 0.500000 0.062500 +vt 0.625000 0.125000 +vt 0.750000 0.125000 +vt 0.625000 0.062500 +vt 0.750000 0.062500 +vt 1.000000 0.312500 +vt 0.937500 0.125000 +vt 1.000000 0.062500 +vt 0.937500 0.062500 +vt 0.750000 1.000000 +vt 0.687500 0.463531 +vt 0.750000 0.437643 +vt 0.687500 1.000000 +vt 1.000000 0.250000 +vt 0.463531 0.250000 +vt 0.463531 0.312500 +vt 1.000000 0.312500 +vt 0.000000 0.099456 +vt 0.000000 0.125000 +vt 0.010581 0.125000 +vt 0.000000 0.500000 +vt 0.010581 0.625000 +vt 0.010581 0.500000 +vt 0.000000 0.625000 +vt 0.000000 0.125000 +vt 0.000000 0.099456 +vt 0.010581 0.125000 +vt 0.000000 0.099456 +vt 0.000000 0.125000 +vt 0.010581 0.125000 +vt 0.000000 0.750000 +vt 0.010581 0.937500 +vt 0.010581 0.750000 +vt 0.000000 0.937500 +vt 0.000000 0.125000 +vt 0.000000 0.099456 +vt 0.010581 0.125000 +vt 1.000000 0.000000 +vt 1.000000 0.062500 +vt 0.923880 0.283227 +vt 1.000000 1.000000 +vt 1.000000 0.099456 +vt 0.783227 0.423880 +vt 0.000000 1.000000 +vt 0.062500 0.937500 +vt 0.062500 1.000000 +vt 0.062500 0.750000 +vt 0.099456 0.937500 +vt 0.099456 0.750000 +vt 0.062500 0.625000 +vt 0.099456 0.500000 +vt 0.099456 0.625000 +vt 0.062500 0.500000 +vt 0.062500 0.437500 +vt 0.099456 0.000000 +vt 0.099456 0.437500 +vt 0.000000 0.000000 +vt 0.783227 1.000000 +vt 0.687500 0.312500 +vt 0.750000 0.312500 +vt 0.687500 0.250000 +vt 0.750345 0.062500 +vt 0.750000 0.062500 +vt 0.750345 0.125000 +vt 0.783227 0.125000 +vt 0.099456 1.000000 +vt 0.283227 1.000000 +vt 0.283227 0.198447 +vt 0.423880 1.000000 +vt 0.307906 0.177045 +vt 0.832107 0.125000 +vt 0.873884 0.156402 +vt 0.899201 0.177045 +vt 0.125000 0.937500 +vt 0.125000 0.750000 +vt 0.125000 0.625000 +vt 0.125000 0.500000 +vt 0.125000 0.437500 +vt 0.125000 0.375000 +vt 0.161682 0.326596 +vt 0.201038 0.280341 +vt 0.241027 0.238285 +vt 1.000000 1.000000 +vt 0.750000 0.937500 +vt 1.000000 0.937500 +vt 0.750000 1.000000 +vt 1.000000 0.062500 +vt 0.750000 0.125000 +vt 1.000000 0.125000 +vt 0.750000 0.062500 +vt 1.000000 0.937500 +vt 0.750000 0.750000 +vt 1.000000 0.750000 +vt 0.750000 0.937500 +vt 1.000000 0.125000 +vt 1.000000 0.062500 +vt 1.000000 0.750000 +vt 0.750000 0.625000 +vt 1.000000 0.625000 +vt 0.750000 0.750000 +vt 1.000000 0.062500 +vt 0.750000 0.125000 +vt 1.000000 0.125000 +vt 0.750000 0.062500 +vt 1.000000 0.625000 +vt 0.750000 0.500000 +vt 1.000000 0.500000 +vt 0.750000 0.625000 +vt 1.000000 0.125000 +vt 0.750000 0.062500 +vt 1.000000 0.062500 +vt 0.750000 0.125000 +vt 1.000000 0.500000 +vt 0.750345 0.437500 +vt 1.000000 0.437500 +vt 0.750000 0.500000 +vt 0.750000 0.437643 +vt 0.937500 0.062500 +vt 0.750000 0.062500 +vt 0.937500 0.125000 +vt 0.750000 0.125000 +vt 0.625000 0.062500 +vt 0.500000 0.062500 +vt 0.625000 0.125000 +vt 0.500000 0.125000 +vt 0.375000 0.125000 +vt 0.437500 0.062500 +vt 0.437500 0.125000 +vt 0.327803 0.160714 +vt 0.282642 0.198971 +vt 0.239655 0.239655 +vt 0.198971 0.282642 +vt 0.160714 0.327803 +vt 0.125000 0.375000 +vt 0.125000 0.437500 +vt 0.125000 0.500000 +vt 0.125000 0.625000 +vt 0.125000 0.937500 +vt 0.125000 0.750000 +vt 1.000000 0.437500 +vt 0.832107 0.375000 +vt 1.000000 0.375000 +vt 0.783227 0.423880 +vt 0.750345 0.437500 +vt 1.000000 0.062500 +vt 1.000000 0.125000 +vt 1.000000 0.327803 +vt 0.989419 0.375000 +vt 1.000000 0.375000 +vt 0.974225 0.326596 +vt 1.000000 0.282642 +vt 0.957924 0.280341 +vt 1.000000 0.239655 +vt 0.941359 0.238285 +vt 1.000000 0.282642 +vt 0.941359 0.241027 +vt 0.923880 0.283227 +vt 0.899201 0.307906 +vt 1.000000 0.327803 +vt 0.873884 0.333223 +vt 0.989419 0.125000 +vt 1.000000 0.099456 +vt 1.000000 0.125000 +vt 1.000000 0.437500 +vt 0.989419 0.437500 +vt 0.989419 0.125000 +vt 1.000000 0.099456 +vt 1.000000 0.125000 +vt 0.989419 0.750000 +vt 1.000000 0.937500 +vt 1.000000 0.750000 +vt 0.989419 0.937500 +vt 1.000000 0.099456 +vt 0.989419 0.125000 +vt 1.000000 0.125000 +vt 0.989419 0.125000 +vt 1.000000 0.099456 +vt 1.000000 0.125000 +vt 0.989419 0.500000 +vt 1.000000 0.625000 +vt 1.000000 0.500000 +vt 0.989419 0.625000 +vt 1.000000 0.099456 +vt 0.989419 0.125000 +vt 1.000000 0.125000 +vn -0.0000 0.0000 1.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn -0.0051 0.6041 -0.7969 +vn 0.0000 0.6034 -0.7974 +vn -0.0058 0.6502 -0.7597 +vn 0.0045 0.6464 -0.7630 +vn -0.0020 0.6919 -0.7220 +vn 0.0050 0.6874 -0.7263 +vn -0.0003 0.7281 -0.6854 +vn 0.0022 0.7263 -0.6874 +vn 0.0014 0.7621 -0.6475 +vn -0.0006 0.7861 -0.6181 +vn 0.0003 0.7630 -0.6464 +vn 0.0000 0.8048 -0.5935 +vn 0.0028 0.7974 -0.6034 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 -1.0000 0.0000 +vn -0.3827 0.0000 -0.9239 +vn -0.7071 0.0000 -0.7071 +vn -0.9239 -0.0000 -0.3827 +vn 1.0000 0.0000 0.0000 +vn 0.3827 0.0000 -0.9239 +vn 0.7071 0.0000 -0.7071 +vn 0.9239 0.0000 -0.3827 +vn 0.0017 0.6037 -0.7972 +vn -0.0016 0.6464 -0.7630 +vn 0.0020 0.6476 -0.7620 +vn -0.0019 0.6874 -0.7263 +vn 0.0009 0.6889 -0.7249 +vn -0.0009 0.7263 -0.6874 +vn 0.0003 0.7271 -0.6865 +vn -0.0040 0.7630 -0.6464 +vn -0.0002 0.7555 -0.6551 +vn -0.0013 0.7974 -0.6034 +vn 0.0007 0.7747 -0.6323 +vn 0.0000 0.7994 -0.6008 +s off +f 1/1/1 2/2/1 3/3/1 +f 4/4/1 2/2/1 1/1/1 +f 5/5/2 6/6/2 7/7/2 +f 6/6/2 8/8/2 9/9/2 +f 5/5/2 8/8/2 6/6/2 +f 8/8/2 10/10/2 9/9/2 +f 5/5/2 11/11/2 8/8/2 +f 11/11/2 4/12/2 12/13/2 +f 2/14/2 4/12/2 11/11/2 +f 13/15/2 14/16/2 15/17/2 +f 14/16/2 16/18/2 17/19/2 +f 13/15/2 16/18/2 14/16/2 +f 16/18/2 18/20/2 17/19/2 +f 16/18/2 19/21/2 18/20/2 +f 16/18/2 20/22/2 19/21/2 +f 16/18/2 21/23/2 20/22/2 +f 16/18/2 22/24/2 21/23/2 +f 22/24/2 23/25/2 24/26/2 +f 5/5/2 16/18/2 11/11/2 +f 11/11/2 16/18/2 2/14/2 +f 2/14/2 16/18/2 13/15/2 +f 16/18/2 23/25/2 22/24/2 +f 3/27/3 25/28/3 26/29/3 +f 3/27/3 2/30/3 25/28/3 +f 2/30/3 13/31/3 25/28/3 +f 1/32/2 3/33/2 26/34/2 +f 27/35/2 28/36/2 1/32/2 +f 27/35/2 1/32/2 26/34/2 +f 29/37/2 30/38/2 28/36/2 +f 29/37/2 31/39/2 30/38/2 +f 29/37/2 28/36/2 27/35/2 +f 32/40/2 33/41/2 34/42/2 +f 35/43/2 32/40/2 29/37/2 +f 35/43/2 29/37/2 27/35/2 +f 35/43/2 33/41/2 32/40/2 +f 28/44/3 4/45/3 1/46/3 +f 12/47/3 4/45/3 28/44/3 +f 21/48/4 36/49/4 37/50/4 +f 21/48/5 22/51/5 36/49/5 +f 20/52/6 37/50/6 38/53/6 +f 20/52/7 21/48/7 37/50/7 +f 19/54/8 38/53/8 39/55/8 +f 19/54/9 20/52/9 38/53/9 +f 18/56/10 39/57/10 40/58/10 +f 18/56/11 19/54/11 39/57/11 +f 17/59/12 40/58/12 41/60/12 +f 17/59/13 41/60/13 42/61/13 +f 17/59/14 18/56/14 40/58/14 +f 14/62/15 42/61/15 43/63/15 +f 14/62/16 17/59/16 42/61/16 +f 44/64/3 15/65/3 43/63/3 +f 15/65/3 14/62/3 43/63/3 +f 45/66/3 15/65/3 44/64/3 +f 25/67/17 15/68/17 45/69/17 +f 13/70/17 15/68/17 25/67/17 +f 30/71/17 11/72/17 28/73/17 +f 11/72/17 12/74/17 28/73/17 +f 31/75/3 11/76/3 30/77/3 +f 8/78/3 11/76/3 31/75/3 +f 29/79/1 8/80/1 31/81/1 +f 10/82/1 8/80/1 29/79/1 +f 32/83/3 10/84/3 29/85/3 +f 9/86/3 10/84/3 32/83/3 +f 34/87/17 6/88/17 32/89/17 +f 6/88/17 9/90/17 32/89/17 +f 33/91/3 6/92/3 34/93/3 +f 7/94/3 6/92/3 33/91/3 +f 46/95/17 5/96/17 33/97/17 +f 5/96/17 7/98/17 33/97/17 +f 47/99/18 5/100/18 46/101/18 +f 48/102/18 5/100/18 47/99/18 +f 49/103/18 5/100/18 48/102/18 +f 16/104/18 5/100/18 49/103/18 +f 50/105/2 51/106/2 52/107/2 +f 53/108/2 54/109/2 50/105/2 +f 55/110/2 54/109/2 53/108/2 +f 50/105/2 54/109/2 51/106/2 +f 56/111/2 57/112/2 58/113/2 +f 57/112/2 59/114/2 58/113/2 +f 23/25/2 16/18/2 60/115/2 +f 16/18/2 61/116/2 60/115/2 +f 61/116/2 51/106/2 60/115/2 +f 60/115/2 51/106/2 59/114/2 +f 59/114/2 51/106/2 58/113/2 +f 58/113/2 51/106/2 54/109/2 +f 24/117/3 23/118/3 62/119/3 +f 22/51/17 62/120/17 36/49/17 +f 22/51/17 24/121/17 62/120/17 +f 63/122/19 64/123/19 65/124/19 +f 66/125/19 64/123/19 63/122/19 +f 66/125/19 67/126/19 64/123/19 +f 64/123/19 27/127/19 65/124/19 +f 26/128/19 25/67/19 45/69/19 +f 27/127/19 26/128/19 45/69/19 +f 27/127/19 45/69/19 44/129/19 +f 44/129/19 65/124/19 27/127/19 +f 68/130/17 33/97/17 35/131/17 +f 69/132/17 68/130/17 35/131/17 +f 70/133/17 33/97/17 68/130/17 +f 71/134/17 70/133/17 68/130/17 +f 72/135/17 71/134/17 73/136/17 +f 72/135/17 70/133/17 71/134/17 +f 35/137/3 27/138/3 64/139/3 +f 69/140/3 35/137/3 64/139/3 +f 43/141/20 42/142/20 44/129/20 +f 42/142/20 41/143/20 44/129/20 +f 65/144/20 40/145/20 74/146/20 +f 44/147/20 40/145/20 65/144/20 +f 41/143/20 40/148/20 44/129/20 +f 74/146/21 75/149/21 76/150/21 +f 75/149/21 53/108/21 76/150/21 +f 74/146/21 77/151/21 75/149/21 +f 74/146/21 78/152/21 77/151/21 +f 77/151/21 56/111/21 55/110/21 +f 78/152/21 56/111/21 77/151/21 +f 79/153/21 23/25/21 57/112/21 +f 62/154/21 23/25/21 79/153/21 +f 78/152/21 40/145/21 79/153/21 +f 74/146/21 40/145/21 78/152/21 +f 62/154/21 37/155/21 36/156/21 +f 40/145/21 39/157/21 79/153/21 +f 79/153/21 38/158/21 62/154/21 +f 62/154/21 38/158/21 37/155/21 +f 39/157/21 38/158/21 79/153/21 +f 80/159/17 33/97/17 70/133/17 +f 46/95/17 33/97/17 80/159/17 +f 81/160/18 80/161/18 82/162/18 +f 83/163/18 80/161/18 81/160/18 +f 47/99/18 46/101/18 83/163/18 +f 83/163/18 46/101/18 80/161/18 +f 16/104/18 84/164/18 61/116/18 +f 16/104/18 49/103/18 84/164/18 +f 49/103/18 48/102/18 84/164/18 +f 48/102/18 47/99/18 84/164/18 +f 85/165/1 86/166/1 87/167/1 +f 88/168/1 89/169/1 90/170/1 +f 91/171/1 89/169/1 88/168/1 +f 86/166/1 92/172/1 91/171/1 +f 85/165/1 92/172/1 86/166/1 +f 91/171/1 92/172/1 89/169/1 +f 84/164/1 93/173/1 61/116/1 +f 89/169/1 51/106/1 93/173/1 +f 93/173/1 51/106/1 61/116/1 +f 92/172/1 51/106/1 89/169/1 +f 92/174/3 52/175/3 51/176/3 +f 94/177/3 52/175/3 92/174/3 +f 76/150/2 53/108/2 52/107/2 +f 53/108/2 50/105/2 52/107/2 +f 95/178/2 53/108/2 96/179/2 +f 55/110/2 53/108/2 95/178/2 +f 55/110/2 58/113/2 54/109/2 +f 56/111/2 58/113/2 55/110/2 +f 57/112/2 97/180/2 98/181/2 +f 57/112/2 56/111/2 97/180/2 +f 57/112/2 23/25/2 59/114/2 +f 23/25/2 60/115/2 59/114/2 +f 68/182/3 67/183/3 66/184/3 +f 71/185/3 99/186/3 100/187/3 +f 71/185/3 66/184/3 99/186/3 +f 71/185/3 68/182/3 66/184/3 +f 68/188/22 64/189/22 67/190/22 +f 68/188/22 69/191/22 64/189/22 +f 74/192/3 76/193/3 52/175/3 +f 65/194/3 74/192/3 52/175/3 +f 63/195/3 65/194/3 52/175/3 +f 101/196/3 52/175/3 94/177/3 +f 101/196/3 63/195/3 52/175/3 +f 102/197/3 101/196/3 94/177/3 +f 103/198/3 94/177/3 104/199/3 +f 103/198/3 102/197/3 94/177/3 +f 101/200/17 66/125/17 63/122/17 +f 99/201/17 66/125/17 101/200/17 +f 105/202/22 106/203/22 107/204/22 +f 108/205/22 106/203/22 105/202/22 +f 109/206/22 107/204/22 106/203/22 +f 110/207/22 109/206/22 111/208/22 +f 110/207/22 107/204/22 109/206/22 +f 112/209/22 110/207/22 111/208/22 +f 72/210/22 107/204/22 110/207/22 +f 113/211/22 72/210/22 110/207/22 +f 70/212/22 113/211/22 114/213/22 +f 70/212/22 72/210/22 113/211/22 +f 72/214/3 115/215/3 107/216/3 +f 72/214/3 73/217/3 115/215/3 +f 71/218/2 100/219/2 115/220/2 +f 73/221/2 71/218/2 115/220/2 +f 57/222/18 98/223/18 79/224/18 +f 98/225/17 78/226/17 79/227/17 +f 98/225/17 97/228/17 78/226/17 +f 97/229/3 56/230/3 78/231/3 +f 55/232/18 95/233/18 77/234/18 +f 95/235/17 75/236/17 77/237/17 +f 95/235/17 96/238/17 75/236/17 +f 96/239/3 53/240/3 75/241/3 +f 116/242/17 70/133/17 117/243/17 +f 80/159/17 70/133/17 116/242/17 +f 118/244/18 116/245/18 119/246/18 +f 120/247/18 116/245/18 118/244/18 +f 82/162/18 116/245/18 120/247/18 +f 82/162/18 80/161/18 116/245/18 +f 47/99/18 83/163/18 84/164/18 +f 84/164/18 81/160/18 87/167/18 +f 83/163/18 81/160/18 84/164/18 +f 81/160/18 82/162/18 87/167/18 +f 86/166/1 88/168/1 87/167/1 +f 86/166/1 91/171/1 88/168/1 +f 88/168/1 84/164/1 87/167/1 +f 88/168/1 90/170/1 84/164/1 +f 89/169/1 93/173/1 90/170/1 +f 90/170/1 93/173/1 84/164/1 +f 87/167/18 119/246/18 85/165/18 +f 87/167/18 118/244/18 119/246/18 +f 82/162/18 120/247/18 87/167/18 +f 87/167/18 120/247/18 118/244/18 +f 92/248/22 121/249/22 94/250/22 +f 121/249/22 122/251/22 123/252/22 +f 92/248/22 122/251/22 121/249/22 +f 122/251/22 124/253/22 123/252/22 +f 125/254/22 126/255/22 127/256/22 +f 128/257/22 126/255/22 125/254/22 +f 129/258/22 119/259/22 130/260/22 +f 85/261/22 119/259/22 129/258/22 +f 92/248/22 85/261/22 129/258/22 +f 92/248/22 129/258/22 128/257/22 +f 92/248/22 128/257/22 125/254/22 +f 92/248/22 125/254/22 122/251/22 +f 102/262/23 115/263/23 101/200/23 +f 107/264/23 115/263/23 102/262/23 +f 100/265/23 99/201/23 115/263/23 +f 115/263/23 99/201/23 101/200/23 +f 131/266/23 105/267/23 132/268/23 +f 105/267/23 107/264/23 132/268/23 +f 132/268/23 107/264/23 133/269/23 +f 102/262/23 133/269/23 107/264/23 +f 94/250/22 121/249/22 104/270/22 +f 121/249/22 123/252/22 104/270/22 +f 103/271/24 134/272/24 102/273/24 +f 134/272/24 135/274/24 102/273/24 +f 136/275/24 133/269/24 137/276/24 +f 137/276/24 133/269/24 135/277/24 +f 135/277/24 133/269/24 102/262/24 +f 123/252/25 138/278/25 104/270/25 +f 138/278/25 103/271/25 104/270/25 +f 138/278/25 139/279/25 103/271/25 +f 124/253/25 140/280/25 139/279/25 +f 127/256/25 140/280/25 124/253/25 +f 139/279/25 140/280/25 103/271/25 +f 126/255/25 130/260/25 141/281/25 +f 130/260/25 142/282/25 141/281/25 +f 143/283/25 144/284/25 142/282/25 +f 142/282/25 145/285/25 141/281/25 +f 144/284/25 145/285/25 142/282/25 +f 145/285/25 146/286/25 141/281/25 +f 141/281/25 134/272/25 140/280/25 +f 140/280/25 134/272/25 103/271/25 +f 146/286/25 134/272/25 141/281/25 +f 117/287/3 114/288/3 147/289/3 +f 70/290/3 114/288/3 117/287/3 +f 147/291/17 113/292/17 148/293/17 +f 114/294/17 113/292/17 147/291/17 +f 148/295/3 110/296/3 149/297/3 +f 113/298/3 110/296/3 148/295/3 +f 149/299/1 112/209/1 150/300/1 +f 110/207/1 112/209/1 149/299/1 +f 150/301/3 111/302/3 151/303/3 +f 112/304/3 111/302/3 150/301/3 +f 151/305/17 109/306/17 152/307/17 +f 111/308/17 109/306/17 151/305/17 +f 152/309/3 106/310/3 153/311/3 +f 109/312/3 106/310/3 152/309/3 +f 153/313/1 108/314/1 154/315/1 +f 106/316/1 108/314/1 153/313/1 +f 154/317/3 131/318/3 155/319/3 +f 108/320/3 131/318/3 154/317/3 +f 108/320/3 105/321/3 131/318/3 +f 147/322/22 116/242/22 117/243/22 +f 150/323/22 147/322/22 148/324/22 +f 150/323/22 116/242/22 147/322/22 +f 149/325/22 150/323/22 148/324/22 +f 151/326/22 116/242/22 150/323/22 +f 154/327/22 151/326/22 152/328/22 +f 153/329/22 154/327/22 152/328/22 +f 156/330/22 155/331/22 157/332/22 +f 119/259/22 156/330/22 158/333/22 +f 119/259/22 155/331/22 156/330/22 +f 159/334/22 119/259/22 158/333/22 +f 160/335/22 119/259/22 159/334/22 +f 161/336/22 119/259/22 160/335/22 +f 162/337/22 119/259/22 161/336/22 +f 163/338/22 119/259/22 162/337/22 +f 130/260/22 163/338/22 164/339/22 +f 119/259/22 116/242/22 151/326/22 +f 119/259/22 151/326/22 154/327/22 +f 119/259/22 154/327/22 155/331/22 +f 130/260/22 119/259/22 163/338/22 +f 128/257/22 130/260/22 126/255/22 +f 129/258/22 130/260/22 128/257/22 +f 127/256/22 165/340/22 166/341/22 +f 127/256/22 126/255/22 165/340/22 +f 122/251/22 125/254/22 124/253/22 +f 125/254/22 127/256/22 124/253/22 +f 167/342/22 124/253/22 168/343/22 +f 123/252/22 124/253/22 167/342/22 +f 157/344/3 136/345/3 156/346/3 +f 133/347/3 136/345/3 157/344/3 +f 157/344/3 132/348/3 133/347/3 +f 155/349/17 131/266/17 157/350/17 +f 131/266/17 132/268/17 157/350/17 +f 162/351/5 143/352/5 163/353/5 +f 144/354/26 143/352/26 162/351/26 +f 161/355/27 144/354/27 162/351/27 +f 145/356/28 144/354/28 161/355/28 +f 160/357/29 145/356/29 161/355/29 +f 146/358/30 145/356/30 160/357/30 +f 159/359/31 146/360/31 160/357/31 +f 134/361/32 146/360/32 159/359/32 +f 135/362/33 159/359/33 158/363/33 +f 135/362/34 134/361/34 159/359/34 +f 137/364/35 158/363/35 156/346/35 +f 137/364/36 135/362/36 158/363/36 +f 136/345/37 137/364/37 156/346/37 +f 142/365/3 130/366/3 164/367/3 +f 143/352/17 164/368/17 163/353/17 +f 143/352/17 142/369/17 164/368/17 +f 138/370/3 123/371/3 167/372/3 +f 139/373/17 167/374/17 168/375/17 +f 139/373/17 138/376/17 167/374/17 +f 124/377/18 139/378/18 168/379/18 +f 140/380/3 127/381/3 166/382/3 +f 141/383/17 166/384/17 165/385/17 +f 141/383/17 140/386/17 166/384/17 +f 126/387/18 141/388/18 165/389/18 diff --git a/mymillwork/nodes.lua b/mymillwork/nodes.lua new file mode 100644 index 0000000..98049df --- /dev/null +++ b/mymillwork/nodes.lua @@ -0,0 +1,393 @@ +mymillwork.registered = {} + +mymillwork.nodes = { + { suffix = "crownmould", + model = "mymillwork_mach1.obj", + mdesc = "Crown Mould", + sbox = { type = "fixed", + fixed = {{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, + {-0.5, -0.375, 0.125, 0.5, -0.125, 0.375}, + {-0.5, -0.375, 0.375, 0.5, 0.5, 0.5}, + } + }, + cbox = { type = "fixed", + fixed = {{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, + {-0.5, -0.375, 0.125, 0.5, -0.125, 0.375}, + {-0.5, -0.375, 0.375, 0.5, 0.5, 0.5}, + } + }, + }, + + { suffix = "crownmould_ic", + model = "mymillwork_mach2.obj", + mdesc = "Crown Mould IC", + sbox = { type = "fixed", + fixed = {{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, + {-0.5, -0.375, 0.125, 0.375, -0.125, 0.375}, + {0.125, -0.375, -0.5, 0.375, -0.125, 0.125}, + {-0.5, -0.375, 0.375, 0.5, 0.5, 0.5}, + {0.375, -0.375, -0.5, 0.5, 0.5, 0.375}, + } + }, + cbox = { type = "fixed", + fixed = {{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, + {-0.5, -0.375, 0.125, 0.375, -0.125, 0.375}, + {0.125, -0.375, -0.5, 0.375, -0.125, 0.125}, + {-0.5, -0.375, 0.375, 0.5, 0.5, 0.5}, + {0.375, -0.375, -0.5, 0.5, 0.5, 0.375}, + } + }, + }, + + { suffix = "crownmould_oc", + model = "mymillwork_mach3.obj", + mdesc = "Crown Mould OC", + sbox = { type = "fixed", + fixed = {{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, + {-0.5, -0.375, 0.125, -0.125, -0.125, 0.5}, + {-0.5, -0.125, 0.375, -0.375, 0.5, 0.5}, + } + }, + cbox = { type = "fixed", + fixed = {{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, + {-0.5, -0.375, 0.125, -0.125, -0.125, 0.5}, + {-0.5, -0.125, 0.375, -0.375, 0.5, 0.5}, + } + }, + }, + + { suffix = "crownmould_beam", + model = "mymillwork_mach4.obj", + mdesc = "Crown Mould with Beam", + sbox = { type = "fixed", + fixed = {{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, + {-0.5, -0.375, 0.125, 0.5, -0.125, 0.375}, + {-0.25, -0.375, -0.5, 0.25, -0.1875, 0.125}, + {-0.5, -0.375, 0.375, 0.5, 0.5, 0.5}, + } + }, + cbox = { type = "fixed", + fixed = {{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, + {-0.5, -0.375, 0.125, 0.5, -0.125, 0.375}, + {-0.25, -0.375, -0.5, 0.25, -0.1875, 0.125}, + {-0.5, -0.375, 0.375, 0.5, 0.5, 0.5}, + } + }, + }, + + { suffix = "column", + model = "mymillwork_mach5.obj", + mdesc = "Column", + sbox = { type = "fixed", + fixed = {{-0.5,-0.5,-0.5,0.5,0.5,0.5}, + } + }, + cbox = { type = "fixed", + fixed = {{-0.5,-0.5,-0.5,0.5,0.5,0.5}, + } + }, + }, + + { suffix = "column_base", + model = "mymillwork_mach6.obj", + mdesc = "Column Base", + sbox = { type = "fixed", + fixed = {{-0.5,-0.5,-0.5,0.5,0.5,0.5}, + } + }, + cbox = { type = "fixed", + fixed = {{-0.5,-0.5,-0.5,0.5,0.5,0.5}, + } + }, + }, + + { suffix = "column_half", + model = "mymillwork_mach7.obj", + mdesc = "Half Column", + sbox = { type = "fixed", + fixed = {{-0.5,-0.5,0.0,0.5,0.5,0.5}, + } + }, + cbox = { type = "fixed", + fixed = {{-0.5,-0.5,0.0,0.5,0.5,0.5}, + } + }, + }, + + { suffix = "column_half_base", + model = "mymillwork_mach8.obj", + mdesc = "Half Column Base", + sbox = { type = "fixed", + fixed = {{-0.5,-0.5,0.0,0.5,0.5,0.5}, + } + }, + cbox = { type = "fixed", + fixed = {{-0.5,-0.5,0.0,0.5,0.5,0.5}, + } + }, + }, + + { suffix = "column_half_wbeam", + model = "mymillwork_mach9.obj", + mdesc = "Half Column Base With Beam", + sbox = { type = "fixed", + fixed = {{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, + {-0.5, -0.375, 0.0, 0.5, 0.5, 0.5}, + {-0.25, -0.375, -0.5, 0.25, -0.1875, 0.0}, + } + }, + cbox = { type = "fixed", + fixed = {{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, + {-0.5, -0.375, 0.0, 0.5, 0.5, 0.5}, + {-0.25, -0.375, -0.5, 0.25, -0.1875, 0.0}, + } + }, + }, + + { suffix = "column_quarter", + model = "mymillwork_mach10.obj", + mdesc = "Quarter Column", + sbox = { type = "fixed", + fixed = {{-0.5,-0.5,0,0,0.5,0.5}, + } + }, + cbox = { type = "fixed", + fixed = {{-0.5,-0.5,0,0,0.5,0.5}, + } + }, + }, + + { suffix = "column_quarter_base", + model = "mymillwork_mach11.obj", + mdesc = "Quarter Column Base", + sbox = { type = "fixed", + fixed = {{-0.5,-0.5,0,0,0.5,0.5}, + } + }, + cbox = { type = "fixed", + fixed = {{-0.5,-0.5,0,0,0.5,0.5}, + } + }, + }, + + { suffix = "column_quarter_wbase", + model = "mymillwork_mach12.obj", + mdesc = "Quarter Column Base Baseboard", + sbox = { type = "fixed", + fixed = {{-0.5,-0.5,0,0,0.5,0.5}, + {0.0, -0.5, 0.4375, 0.5, -0.1875, 0.5}, + {-0.5, -0.5, -0.5, -0.4375, -0.1875, 0.0}, + } + }, + cbox = { type = "fixed", + fixed = {{-0.5,-0.5,0,0,0.5,0.5}, + {0.0, -0.5, 0.4375, 0.5, -0.1875, 0.5}, + {-0.5, -0.5, -0.5, -0.4375, -0.1875, 0.0}, + } + }, + }, + + { suffix = "column_quarter_fancybase", + model = "mymillwork_mach13.obj", + mdesc = "Quarter Column Base Fancy Baseboard", + sbox = { type = "fixed", + fixed = {{-0.5,-0.5,0,0,0.5,0.5}, + {0.0, -0.5, 0.3125, 0.5, 0.1875, 0.5}, + {-0.5, -0.5, -0.5, -0.3125, 0.1875, 0.0}, + } + }, + cbox = { type = "fixed", + fixed = {{-0.5,-0.5,0,0,0.5,0.5}, + {0.0, -0.5, 0.3125, 0.5, 0.1875, 0.5}, + {-0.5, -0.5, -0.5, -0.3125, 0.1875, 0.0}, + } + }, + }, + + { suffix = "ceiling", + model = "mymillwork_mach14.obj", + mdesc = "Ceiling", + sbox = { type = "fixed", + fixed = {{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5}, + } + }, + cbox = { type = "fixed", + fixed = {{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5}, + } + }, + }, + + { suffix = "ceiling_post", + model = "mymillwork_mach15.obj", + mdesc = "Ceiling with Post", + sbox = { type = "fixed", + fixed = {{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5}, + {-0.125, -0.4375, -0.125, 0.125, 0.5, 0.125}, + } + }, + cbox = { type = "fixed", + fixed = {{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5}, + {-0.125, -0.4375, -0.125, 0.125, 0.5, 0.125}, + } + }, + }, + + { suffix = "beam", + model = "mymillwork_mach16.obj", + mdesc = "Beam", + sbox = { type = "fixed", + fixed = {{-0.25, -0.5, -0.5, 0.25, -0.1875, 0.5}, + } + }, + cbox = { type = "fixed", + fixed = {{-0.25, -0.5, -0.5, 0.25, -0.1875, 0.5}, + } + }, + }, + + { suffix = "beam_t", + model = "mymillwork_mach17.obj", + mdesc = "Beam T", + sbox = { type = "fixed", + fixed = {{-0.5, -0.5, -0.25, -0.25, -0.1875, 0.25}, + {-0.25, -0.5, -0.5, 0.25, -0.1875, 0.5}, + {0.25, -0.5, -0.25, 0.5, -0.1875, 0.25}, + } + }, + cbox = { type = "fixed", + fixed = {{-0.5, -0.5, -0.25, -0.25, -0.1875, 0.25}, + {-0.25, -0.5, -0.5, 0.25, -0.1875, 0.5}, + {0.25, -0.5, -0.25, 0.5, -0.1875, 0.25}, + } + }, + }, + + { suffix = "beam_ceiling_t", + model = "mymillwork_mach18.obj", + mdesc = "Ceiling with Beam T", + sbox = { type = "fixed", + fixed = {{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5}, + {-0.5, -0.4375, -0.25, -0.25, -0.1875, 0.25}, + {-0.25, -0.4375, -0.5, 0.25, -0.1875, 0.5}, + {0.25, -0.4375, -0.25, 0.5, -0.1875, 0.25}, + } + }, + cbox = { type = "fixed", + fixed = {{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5}, + {-0.5, -0.4375, -0.25, -0.25, -0.1875, 0.25}, + {-0.25, -0.4375, -0.5, 0.25, -0.1875, 0.5}, + {0.25, -0.4375, -0.25, 0.5, -0.1875, 0.25}, + } + }, + }, + + { suffix = "base", + model = "mymillwork_mach19.obj", + mdesc = "Baseboard", + sbox = { type = "fixed", + fixed = {{-0.5, -0.5, 0.4375, 0.5, -0.1875, 0.5}, + } + }, + cbox = { type = "fixed", + fixed = {{-0.5, -0.5, 0.4375, 0.5, -0.1875, 0.5}, + } + }, + }, + + { suffix = "base_ic", + model = "mymillwork_mach20.obj", + mdesc = "Baseboard IC", + sbox = { type = "fixed", + fixed = {{-0.5, -0.5, 0.4375, 0.5, -0.1875, 0.5}, + {-0.5, -0.5, -0.5, -0.4375, -0.1875, 0.4375}, + } + }, + cbox = { type = "fixed", + fixed = {{-0.5, -0.5, 0.4375, 0.5, -0.1875, 0.5}, + } + }, + }, + + { suffix = "base_oc", + model = "mymillwork_mach21.obj", + mdesc = "Baseboard OC", + sbox = { type = "fixed", + fixed = {{0.4375, -0.5, 0.4375, 0.5, -0.1875, 0.5}, + } + }, + cbox = { type = "fixed", + fixed = {{-0.5, -0.5, 0.4375, 0.5, -0.1875, 0.5}, + } + }, + }, + + { suffix = "base_fancy", + model = "mymillwork_mach22.obj", + mdesc = "Fancy Baseboard", + sbox = { type = "fixed", + fixed = {{-0.5, -0.5, 0.3125, 0.5, 0.1875, 0.5}, + } + }, + cbox = { type = "fixed", + fixed = {{-0.5, -0.5, 0.3125, 0.5, 0.1875, 0.5}, + } + }, + }, + + { suffix = "base_fancy_ic", + model = "mymillwork_mach23.obj", + mdesc = "Fancy Baseboard IC", + sbox = { type = "fixed", + fixed = {{-0.5, -0.5, 0.3125, 0.5, 0.1875, 0.5}, + {-0.5, -0.5, -0.5, -0.3125, 0.1875, 0.3125}, + } + }, + cbox = { type = "fixed", + fixed = {{-0.5, -0.5, 0.3125, 0.5, 0.1875, 0.5}, + {-0.5, -0.5, -0.5, -0.3125, 0.1875, 0.3125}, + } + }, + }, + + { suffix = "base_fancy_oc", + model = "mymillwork_mach24.obj", + mdesc = "Fancy Baseboard OC", + sbox = { type = "fixed", + fixed = {{0.3125, -0.5, 0.3125, 0.5, 0.1875, 0.5}, + } + }, + cbox = { type = "fixed", + fixed = {{0.3125, -0.5, 0.3125, 0.5, 0.1875, 0.5}, + } + }, + }, + +} + +function mymillwork.register(material, node_suffix, desc, image, group) + + for __, data in ipairs(mymillwork.nodes) do + mymillwork.register_all(data.suffix, data.model, data.mdesc, data.sbox, data.cbox, + node_suffix, material, desc, image, group) + end + +end + +function mymillwork.register_all(suffix, model, mdesc, sbox, cbox, node_suffix, material, desc, image, group) + + minetest.register_node("mymillwork:" .. suffix .. "_" .. node_suffix, { + description = desc .. " " .. mdesc, + drawtype = "mesh", + mesh = model, + tiles = { image }, + selection_box = sbox, + collision_box = cbox, + paramtype = "light", + paramtype2 = "facedir", + groups = group, + on_place = minetest.rotate_node, + }) + + table.insert(mymillwork.registered, {material, node_suffix}) + +end diff --git a/mymillwork/register.lua b/mymillwork/register.lua deleted file mode 100644 index fd9c8b8..0000000 --- a/mymillwork/register.lua +++ /dev/null @@ -1,104 +0,0 @@ - -mymillwork.register_all( - "default_stone", - "Stone", - "default_stone.png", - {cracky = 3,not_in_creative_inventory=1}, - "default:stone" - ) - -mymillwork.register_all( - "default_stone_brick", - "Stone Brick", - "default_stone_brick.png", - {cracky = 3,not_in_creative_inventory=1}, - "default:stonebrick" - ) - -mymillwork.register_all( - "default_cobble", - "Cobble", - "default_cobble.png", - {cracky = 3,not_in_creative_inventory=1}, - "default:cobble" - ) - -mymillwork.register_all( - "default_desert_stone", - "Desert Stone", - "default_desert_stone.png", - {cracky = 3,not_in_creative_inventory=1}, - "default:desert_stone" - ) - -mymillwork.register_all( - "default_sandstone", - "Sandstone", - "default_sandstone.png", - {crumbly=2, cracky = 3, not_in_creative_inventory=1}, - "default:sandstone" - ) - -mymillwork.register_all( - "default_clay", - "Clay", - "default_clay.png", - {crumbly=3,not_in_creative_inventory=1}, - "default:clay" - ) - -mymillwork.register_all( - "default_wood", - "Wood", - "default_wood.png", - {choppy = 3,not_in_creative_inventory=1}, - "default:wood" - ) - -mymillwork.register_all( - "default_junglewood", - "Jungle Wood", - "default_junglewood.png", - {choppy=2,oddly_breakable_by_hand=2,flammable=2,not_in_creative_inventory=1}, - "default:junglewood" - ) - -mymillwork.register_all( - "default_pine_wood", - "Pine Wood", - "default_pine_wood.png", - {choppy = 3,not_in_creative_inventory=1}, - "default:pine_wood" - ) - -mymillwork.register_all( - "default_acacia_wood", - "Acacia Wood", - "default_acacia_wood.png", - {choppy = 3,not_in_creative_inventory=1}, - "default:pine_acacia" - ) - -mymillwork.register_all( - "default_aspen_wood", - "Aspen Wood", - "default_aspen_wood.png", - {choppy = 3,not_in_creative_inventory=1}, - "default:aspen_wood" - ) - -mymillwork.register_all( - "default_coal_block", - "Coal Block", - "default_coal_block.png", - {cracky = 3,not_in_creative_inventory=1}, - "default:coalblock" - ) - -mymillwork.register_all( - "default_obsidian", - "Obsidian", - "default_obsidian.png", - {cracky = 1,not_in_creative_inventory=1}, - "default:obsidian" - ) diff --git a/mymillwork/screenshot.png b/mymillwork/screenshot.png index e301c2f..3a5ff68 100644 Binary files a/mymillwork/screenshot.png and b/mymillwork/screenshot.png differ diff --git a/playeranim/LICENSE.md b/playeranim/LICENSE.md deleted file mode 100644 index 5957b8c..0000000 --- a/playeranim/LICENSE.md +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2013-2014, Diego Martínez -Copyright (c) 2016-2018, Rui -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/playeranim/README.md b/playeranim/README.md deleted file mode 100644 index 9938d60..0000000 --- a/playeranim/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# playeranim - -Makes the head, and the right arm when you're mining, face the way you're facing, similar to Minecraft. Compatible with [3d_armor](https://github.com/stujones11/minetest-3d_armor). This is an ugly hack. Forked from [Kaeza's animplus mod](https://github.com/kaeza/minetest-animplus). - -The head only turns up and down relative to the body, except it turns slightly to the right/left when you strafe right/left. When you turn the body turns with the head. -Works in both singleplayer and multiplayer. - -Created by [Rui](https://github.com/Rui-Minetest), this document was written by [sloantothebone](https://github.com/sloantothebone). - -## Configuration - -### Version of player model - -Player models supported by this mod: -- `MTG_4_Jun_2017` (minetest_game after 4 Jun 2017, 0.4.16) -- `MTG_4_Nov_2017` (minetest_game after 4 Nov 2017, 0.5.0) - -As there is no automatic way to determine which version is used, this must be configured with advanced settings menu, or by manually editing `playeranim.model_version` entry in minetest.conf. -The default value is `MTG_4_Jun_2017`. - -Symptoms of having configured the incorrect player model: -- In rest, arms are raised up, and are either detached from the body, or are too close to the body -- Cape (if visible) points upward - -### The delay of sideways body rotation - -Configure `playeranim.body_rotation_delay`. -It's the number of frame delay of sideways body rotation. -The default value is `7`. - -### Lengthways body rotation in sneaking - -Configure `playeranim.body_x_rotation_sneak`. -It's the degrees of the body's X-axis rotation in sneaking. -The default value is `6.0`. - -### The speed of an animation - -Configure `playeranim.animation_speed`. -It's the number of stepping per seconds. -The default value is `2.4`. - -### The speed of an animation in sneaking - -Configure `playeranim.animation_speed_sneak`. -It's the number of stepping per seconds in sneaking. -The default value is `0.8`. diff --git a/playeranim/depends.txt b/playeranim/depends.txt deleted file mode 100644 index 9bcff68..0000000 --- a/playeranim/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -default? -player_api? diff --git a/playeranim/description.txt b/playeranim/description.txt deleted file mode 100644 index 0c1198d..0000000 --- a/playeranim/description.txt +++ /dev/null @@ -1 +0,0 @@ -Adds animations to the players' head and right arm. \ No newline at end of file diff --git a/playeranim/init.lua b/playeranim/init.lua deleted file mode 100644 index e6730e2..0000000 --- a/playeranim/init.lua +++ /dev/null @@ -1,301 +0,0 @@ -local ANIMATION_SPEED = tonumber(minetest.settings:get("playeranim.animation_speed")) or 2.4 -local ANIMATION_SPEED_SNEAK = tonumber(minetest.settings:get("playeranim.animation_speed_sneak")) or 0.8 -local BODY_ROTATION_DELAY = math.max(math.floor(tonumber(minetest.settings:get("playeranim.body_rotation_delay")) or 7), 1) -local BODY_X_ROTATION_SNEAK = tonumber(minetest.settings:get("playeranim.body_x_rotation_sneak")) or 6.0 - -local BONE_POSITION, BONE_ROTATION = (function() - local modname = minetest.get_current_modname() - local modpath = minetest.get_modpath(modname) - return dofile(modpath .. "/model.lua") -end)() - -local get_animation = player_api and player_api.get_animation or default.player_get_animation -if not get_animation then - error("player_api.get_animation or default.player_get_animation is not found") -end - -local function get_animation_speed(player) - if player:get_player_control().sneak then - return ANIMATION_SPEED_SNEAK - end - return ANIMATION_SPEED -end - -local math_deg = math.deg -local function get_pitch_deg(player) - return math_deg(player:get_look_vertical()) -end - -local players_animation_data = setmetatable({}, { - __index = { - init_player = function(self, player) - self[player] = { - time = 0, - yaw_history = {}, - bone_rotations = {}, - bone_positions = {}, - previous_animation = 0, - } - end, - - -- time - get_time = function(self, player) - return self[player].time - end, - - increment_time = function(self, player, dtime) - self[player].time = self:get_time(player) + dtime - end, - - reset_time = function(self, player) - self[player].time = 0 - end, - - -- yaw_history - get_yaw_history = function(self, player) - return self[player].yaw_history -- Return mutable reference - end, - - add_yaw_to_history = function(self, player) - local yaw = player:get_look_horizontal() - local history = self:get_yaw_history(player) - history[#history + 1] = yaw - end, - - clear_yaw_history = function(self, player) - if #self[player].yaw_history > 0 then - self[player].yaw_history = {} - end - end, - - -- bone_rotations - get_bone_rotation = function(self, player, bone) - return self[player].bone_rotations[bone] - end, - - set_bone_rotation = function(self, player, bone, rotation) - self[player].bone_rotations[bone] = rotation - end, - - -- bone_positions - get_bone_position = function(self, player, bone) - return self[player].bone_positions[bone] - end, - - set_bone_position = function(self, player, bone, position) - self[player].bone_positions[bone] = position - end, - - -- previous_animation - get_previous_animation = function(self, player) - return self[player].previous_animation - end, - - set_previous_animation = function(self, player, animation) - self[player].previous_animation = animation - end, - } -}) - -minetest.register_on_joinplayer(function(player) - players_animation_data:init_player(player) -end) - -local vector_add, vector_equals = vector.add, vector.equals -local function rotate_bone(player, bone, rotation, position_optional) - local previous_rotation = players_animation_data:get_bone_rotation(player, bone) - local rotation = vector_add(rotation, BONE_ROTATION[bone]) - - local previous_position = players_animation_data:get_bone_position(player, bone) - local position = BONE_POSITION[bone] - if position_optional then - position = vector_add(position, position_optional) - end - - if not previous_rotation - or not previous_position - or not vector_equals(rotation, previous_rotation) - or not vector_equals(position, previous_position) then - player:set_bone_position(bone, position, rotation) - players_animation_data:set_bone_rotation(player, bone, rotation) - players_animation_data:set_bone_position(player, bone, position) - end -end - --- Animation alias -local STAND = 1 -local WALK = 2 -local MINE = 3 -local WALK_MINE = 4 -local SIT = 5 -local LAY = 6 - --- Bone alias -local BODY = "Body" -local HEAD = "Head" -local CAPE = "Cape" -local LARM = "Arm_Left" -local RARM = "Arm_Right" -local LLEG = "Leg_Left" -local RLEG = "Leg_Right" - -local math_sin, math_cos, math_pi = math.sin, math.cos, math.pi -local ANIMATIONS = { - [STAND] = function(player, _time) - rotate_bone(player, BODY, {x = 0, y = 0, z = 0}) - rotate_bone(player, CAPE, {x = 0, y = 0, z = 0}) - rotate_bone(player, LARM, {x = 0, y = 0, z = 0}) - rotate_bone(player, RARM, {x = 0, y = 0, z = 0}) - rotate_bone(player, LLEG, {x = 0, y = 0, z = 0}) - rotate_bone(player, RLEG, {x = 0, y = 0, z = 0}) - end, - - [LAY] = function(player, _time) - rotate_bone(player, HEAD, {x = 0, y = 0, z = 0}) - rotate_bone(player, CAPE, {x = 0, y = 0, z = 0}) - rotate_bone(player, LARM, {x = 0, y = 0, z = 0}) - rotate_bone(player, RARM, {x = 0, y = 0, z = 0}) - rotate_bone(player, LLEG, {x = 0, y = 0, z = 0}) - rotate_bone(player, RLEG, {x = 0, y = 0, z = 0}) - rotate_bone(player, BODY, BONE_ROTATION.body_lay, BONE_POSITION.body_lay) - end, - - [SIT] = function(player, _time) - rotate_bone(player, LARM, {x = 0, y = 0, z = 0}) - rotate_bone(player, RARM, {x = 0, y = 0, z = 0}) - rotate_bone(player, LLEG, {x = 90, y = 0, z = 0}) - rotate_bone(player, RLEG, {x = 90, y = 0, z = 0}) - rotate_bone(player, BODY, BONE_ROTATION.body_sit, BONE_POSITION.body_sit) - end, - - [WALK] = function(player, time) - local speed = get_animation_speed(player) - local sin = math_sin(time * speed * math_pi) - - rotate_bone(player, CAPE, {x = -35 * sin - 35, y = 0, z = 0}) - rotate_bone(player, LARM, {x = -55 * sin, y = 0, z = 0}) - rotate_bone(player, RARM, {x = 55 * sin, y = 0, z = 0}) - rotate_bone(player, LLEG, {x = 55 * sin, y = 0, z = 0}) - rotate_bone(player, RLEG, {x = -55 * sin, y = 0, z = 0}) - end, - - [MINE] = function(player, time) - local speed = get_animation_speed(player) - - local cape_sin = math_sin(time * speed * math_pi) - local rarm_sin = math_sin(2 * time * speed * math_pi) - local rarm_cos = -math_cos(2 * time * speed * math_pi) - local pitch = 90 - get_pitch_deg(player) - - rotate_bone(player, CAPE, {x = -5 * cape_sin - 5, y = 0, z = 0}) - rotate_bone(player, LARM, {x = 0, y = 0, z = 0}) - rotate_bone(player, RARM, {x = 10 * rarm_sin + pitch, y = 10 * rarm_cos, z = 0}) - rotate_bone(player, LLEG, {x = 0, y = 0, z = 0}) - rotate_bone(player, RLEG, {x = 0, y = 0, z = 0}) - end, - - [WALK_MINE] = function(player, time) - local speed = get_animation_speed(player) - - local sin = math_sin(time * speed * math_pi) - local rarm_sin = math_sin(2 * time * speed * math_pi) - local rarm_cos = -math_cos(2 * time * speed * math_pi) - local pitch = 90 - get_pitch_deg(player) - - rotate_bone(player, CAPE, {x = -35 * sin - 35, y = 0, z = 0}) - rotate_bone(player, LARM, {x = -55 * sin, y = 0, z = 0}) - rotate_bone(player, RARM, {x = 10 * rarm_sin + pitch, y = 10 * rarm_cos, z = 0}) - rotate_bone(player, LLEG, {x = 55 * sin, y = 0, z = 0}) - rotate_bone(player, RLEG, {x = -55 * sin, y = 0, z = 0}) - end, -} - -local function set_animation(player, animation, force_animate) - local animation_changed - = (players_animation_data:get_previous_animation(player) ~= animation) - - if force_animate or animation_changed then - players_animation_data:set_previous_animation(player, animation) - ANIMATIONS[animation](player, players_animation_data:get_time(player)) - end -end - -local function rotate_head(player) - local head_x_rotation = -get_pitch_deg(player) - rotate_bone(player, HEAD, {x = head_x_rotation, y = 0, z = 0}) -end - -local table_remove, math_deg = table.remove, math.deg -local function rotate_body_and_head(player) - local body_x_rotation = (function() - local sneak = player:get_player_control().sneak - return sneak and BODY_X_ROTATION_SNEAK or 0 - end)() - - local body_y_rotation = (function() - local yaw_history = players_animation_data:get_yaw_history(player) - if #yaw_history > BODY_ROTATION_DELAY then - local body_yaw = table_remove(yaw_history, 1) - local player_yaw = player:get_look_horizontal() - return math_deg(player_yaw - body_yaw) - end - return 0 - end)() - - rotate_bone(player, BODY, {x = body_x_rotation, y = body_y_rotation, z = 0}) - - local head_x_rotation = -get_pitch_deg(player) - rotate_bone(player, HEAD, {x = head_x_rotation, y = -body_y_rotation, z = 0}) -end - - -local function animate_player(player, dtime) - local animation = get_animation(player).animation - - -- Yaw history - if animation == "lay" or animation == "sit" then - players_animation_data:clear_yaw_history(player) - else - players_animation_data:add_yaw_to_history(player) - end - - -- Increment animation time - if animation == "walk" - or animation == "mine" - or animation == "walk_mine" then - players_animation_data:increment_time(player, dtime) - else - players_animation_data:reset_time(player) - end - - -- Set animation - if animation == "stand" then - set_animation(player, STAND) - elseif animation == "lay" then - set_animation(player, LAY) - elseif animation == "sit" then - set_animation(player, SIT) - elseif animation == "walk" then - set_animation(player, WALK, true) - elseif animation == "mine" then - set_animation(player, MINE, true) - elseif animation == "walk_mine" then - set_animation(player, WALK_MINE, true) - end - - -- Rotate body and head - if animation == "lay" then - -- Do nothing - elseif animation == "sit" then - rotate_head(player) - else - rotate_body_and_head(player) - end -end - -local minetest_get_connected_players = minetest.get_connected_players -minetest.register_globalstep(function(dtime) - for _, player in ipairs(minetest_get_connected_players()) do - animate_player(player, dtime) - end -end) diff --git a/playeranim/mod.conf b/playeranim/mod.conf deleted file mode 100644 index 3e162f0..0000000 --- a/playeranim/mod.conf +++ /dev/null @@ -1,3 +0,0 @@ -name = playeranim -description = Adds animations to the players' head and right arm. -optional_depends = player_api, default diff --git a/playeranim/model.lua b/playeranim/model.lua deleted file mode 100644 index 717382c..0000000 --- a/playeranim/model.lua +++ /dev/null @@ -1,99 +0,0 @@ --- Bone alias -local BODY = "Body" -local HEAD = "Head" -local CAPE = "Cape" -local LARM = "Arm_Left" -local RARM = "Arm_Right" -local LLEG = "Leg_Left" -local RLEG = "Leg_Right" - --- Version of player model -local DEFAULT_PLAYER_MODEL_VERSION = "MTG_4_Jun_2017" - -local VALID_PLAYER_MODEL_VERSIONS = { - MTG_4_Jun_2017 = true, - MTG_4_Nov_2017 = true, -} - -local LEGACY_PLAYER_MODEL_VERSIONS = { - default_character_v1 = true, - default_character_v2 = true, - default_character_v3 = true, -} - -local BONE_POSITIONS = { - MTG_4_Jun_2017 = { - [BODY] = {x = 0, y = -3.5, z = 0}, - [HEAD] = {x = 0, y = 6.5, z = 0}, - [CAPE] = {x = 0, y = 6.5, z = 1.2}, - [LARM] = {x = 3, y = 5.5, z = 0}, - [RARM] = {x = -3, y = 5.5, z = 0}, - [LLEG] = {x = 1, y = 0, z = 0}, - [RLEG] = {x = -1, y = 0, z = 0}, - - body_sit = {x = 0, y = -5.5, z = 0}, - body_lay = {x = 0, y = -5.5, z = 0}, - }, - MTG_4_Nov_2017 = { - [BODY] = {x = 0, y = 6.25, z = 0}, - [HEAD] = {x = 0, y = 6.5, z = 0}, - [CAPE] = {x = 0, y = 6.5, z = 1.2}, - [LARM] = {x = 3, y = 5.5, z = 0}, - [RARM] = {x = -3, y = 5.5, z = 0}, - [LLEG] = {x = 1, y = 0, z = 0}, - [RLEG] = {x = -1, y = 0, z = 0}, - - body_sit = {x = 0, y = -5, z = 0}, - body_lay = {x = 0, y = -5, z = 0}, - }, -} - -local BONE_ROTATIONS = { - MTG_4_Jun_2017 = { - [BODY] = {x = 0, y = 0, z = 0}, - [HEAD] = {x = 0, y = 0, z = 0}, - [CAPE] = {x = 0, y = 0, z = 0}, - [LARM] = {x = 0, y = 0, z = 0}, - [RARM] = {x = 0, y = 0, z = 0}, - [LLEG] = {x = 0, y = 0, z = 0}, - [RLEG] = {x = 0, y = 0, z = 0}, - - body_sit = {x = 0, y = 0, z = 0}, - body_lay = {x = 270, y = 0, z = 0}, - }, - MTG_4_Nov_2017 = { - [BODY] = {x = 0, y = 0, z = 0}, - [HEAD] = {x = 0, y = 0, z = 0}, - [CAPE] = {x = 0, y = 0, z = 0}, - [LARM] = {x = 0, y = 0, z = 0}, - [RARM] = {x = 0, y = 0, z = 0}, - [LLEG] = {x = 0, y = 0, z = 0}, - [RLEG] = {x = 0, y = 0, z = 0}, - - body_sit = {x = 0, y = 0, z = 0}, - body_lay = {x = 270, y = 0, z = 0}, - }, -} - -local PLAYER_MODEL_VERSION = (function() - local version = minetest.settings:get("playeranim.model_version") - if version == nil or version == "" then - version = DEFAULT_PLAYER_MODEL_VERSION - end - - if LEGACY_PLAYER_MODEL_VERSIONS[version] then - error("The model version '" .. version .. "' is no longer suppported") - elseif not VALID_PLAYER_MODEL_VERSIONS[version] then - error("Invalid value for playeranim.model_version in minetest.conf: " .. version) - end - - return version -end)() - -local BONE_POSITION = BONE_POSITIONS[PLAYER_MODEL_VERSION] -local BONE_ROTATION = BONE_ROTATIONS[PLAYER_MODEL_VERSION] -if not BONE_POSITION or not BONE_ROTATION then - error("Internal error: invalid player_model_version: " .. PLAYER_MODEL_VERSION) -end - -return BONE_POSITION, BONE_ROTATION diff --git a/playeranim/screenshot.png b/playeranim/screenshot.png deleted file mode 100644 index 57aeefe..0000000 Binary files a/playeranim/screenshot.png and /dev/null differ diff --git a/playeranim/settingtypes.txt b/playeranim/settingtypes.txt deleted file mode 100644 index a36322f..0000000 --- a/playeranim/settingtypes.txt +++ /dev/null @@ -1,18 +0,0 @@ -# Version of player model. -# -# Player models supported by this mod: -# . -- `MTG_4_Jun_2017` (minetest_game after 4 Jun 2017, 0.4.16) -# . -- `MTG_4_Nov_2017` (minetest_game after 4 Nov 2017, 0.5.0) -playeranim.model_version (Version of player model) enum MTG_4_Jun_2017 MTG_4_Jun_2017,MTG_4_Nov_2017 - -# The number of frame delay of sideways body rotation. (between 1 and 20). -playeranim.body_rotation_delay (The delay of sideways body rotation) int 7 1 20 - -# The degrees of the body's X-axis rotation in sneaking. -playeranim.body_x_rotation_sneak (Lengthways body rotation in sneaking) float 6.0 - -# The number of stepping per seconds. -playeranim.animation_speed (The speed of an animation) float 2.4 - -# The number of stepping per seconds in sneaking. -playeranim.animation_speed_sneak (The speed of an animation in sneaking) float 0.8 diff --git a/realchess/.luacheckrc b/realchess/.luacheckrc deleted file mode 100644 index a21bce1..0000000 --- a/realchess/.luacheckrc +++ /dev/null @@ -1,7 +0,0 @@ -unused_args = false -allow_defined_top = true - -read_globals = { - "minetest", - "default", -} diff --git a/realchess/CREDITS b/realchess/CREDITS deleted file mode 100644 index 3655a1a..0000000 --- a/realchess/CREDITS +++ /dev/null @@ -1,6 +0,0 @@ -CREDITS -------- - -kilbith -beyondlimits <> - diff --git a/realchess/LICENSE b/realchess/LICENSE deleted file mode 100644 index d9cfc4c..0000000 --- a/realchess/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - -Copyright (C) 2004 Sam Hocevar - -Everyone is permitted to copy and distribute verbatim or modified -copies of this license document, and changing it is allowed as long -as the name is changed. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/realchess/README.md b/realchess/README.md deleted file mode 100644 index 551bc44..0000000 --- a/realchess/README.md +++ /dev/null @@ -1,3 +0,0 @@ -A mod for Minetest to play a realistic chess game (GUI-based). - -![Preview](https://i.imgur.com/xNwxC5Y.png) diff --git a/realchess/depends.txt b/realchess/depends.txt deleted file mode 100644 index 0a162e6..0000000 --- a/realchess/depends.txt +++ /dev/null @@ -1,4 +0,0 @@ -default -stairs -dye - diff --git a/realchess/description.txt b/realchess/description.txt deleted file mode 100644 index 94bef31..0000000 --- a/realchess/description.txt +++ /dev/null @@ -1 +0,0 @@ -Play a life-like chess game (formspec-based). diff --git a/realchess/init.lua b/realchess/init.lua deleted file mode 100644 index f037eee..0000000 --- a/realchess/init.lua +++ /dev/null @@ -1,892 +0,0 @@ -local realchess = {} -screwdriver = screwdriver or {} - -local function index_to_xy(idx) - idx = idx - 1 - local x = idx % 8 - local y = (idx - x) / 8 - return x, y -end - -local function xy_to_index(x, y) - return x + y * 8 + 1 -end - -local function get_square(a, b) - return (a * 8) - (8 - b) -end - -local chat_prefix = minetest.colorize("#FFFF00", "[Chess] ") -local letters = {'A','B','C','D','E','F','G','H'} - -local rowDirs = {-1, -1, -1, 0, 0, 1, 1, 1} -local colDirs = {-1, 0, 1, -1, 1, -1, 0, 1} - -local bishopThreats = {true, false, true, false, false, true, false, true} -local rookThreats = {false, true, false, true, true, false, true, false} -local queenThreats = {true, true, true, true, true, true, true, true} -local kingThreats = {true, true, true, true, true, true, true, true} - -local function board_to_table(inv) - local t = {} - for i = 1, 64 do - t[#t + 1] = inv:get_stack("board", i):get_name() - end - - return t -end - -local function attacked(color, idx, board) - local threatDetected = false - local kill = color == "white" - local pawnThreats = {kill, false, kill, false, false, not kill, false, not kill} - - for dir = 1, 8 do - if not threatDetected then - local col, row = index_to_xy(idx) - col, row = col + 1, row + 1 - - for step = 1, 8 do - row = row + rowDirs[dir] - col = col + colDirs[dir] - - if row >= 1 and row <= 8 and col >= 1 and col <= 8 then - local square = get_square(row, col) - local square_name = board[square] - local piece, pieceColor = square_name:match(":(%w+)_(%w+)") - - if piece then - if pieceColor ~= color then - if piece == "bishop" and bishopThreats[dir] then - threatDetected = true - elseif piece == "rook" and rookThreats[dir] then - threatDetected = true - elseif piece == "queen" and queenThreats[dir] then - threatDetected = true - else - if step == 1 then - if piece == "pawn" and pawnThreats[dir] then - threatDetected = true - end - if piece == "king" and kingThreats[dir] then - threatDetected = true - end - end - end - end - break - end - end - end - end - end - - return threatDetected -end - -local function locate_kings(board) - local Bidx, Widx - for i = 1, 64 do - local piece, color = board[i]:match(":(%w+)_(%w+)") - if piece == "king" then - if color == "black" then - Bidx = i - else - Widx = i - end - end - end - - return Bidx, Widx -end - -local pieces = { - "realchess:rook_black_1", - "realchess:knight_black_1", - "realchess:bishop_black_1", - "realchess:queen_black", - "realchess:king_black", - "realchess:bishop_black_2", - "realchess:knight_black_2", - "realchess:rook_black_2", - "realchess:pawn_black_1", - "realchess:pawn_black_2", - "realchess:pawn_black_3", - "realchess:pawn_black_4", - "realchess:pawn_black_5", - "realchess:pawn_black_6", - "realchess:pawn_black_7", - "realchess:pawn_black_8", - '','','','','','','','','','','','','','','','', - '','','','','','','','','','','','','','','','', - "realchess:pawn_white_1", - "realchess:pawn_white_2", - "realchess:pawn_white_3", - "realchess:pawn_white_4", - "realchess:pawn_white_5", - "realchess:pawn_white_6", - "realchess:pawn_white_7", - "realchess:pawn_white_8", - "realchess:rook_white_1", - "realchess:knight_white_1", - "realchess:bishop_white_1", - "realchess:queen_white", - "realchess:king_white", - "realchess:bishop_white_2", - "realchess:knight_white_2", - "realchess:rook_white_2" -} - -local pieces_str, x = "", 0 -for i = 1, #pieces do - local p = pieces[i]:match(":(%w+_%w+)") - if pieces[i]:find(":(%w+)_(%w+)") and not pieces_str:find(p) then - pieces_str = pieces_str .. x .. "=" .. p .. ".png," - x = x + 1 - end -end -pieces_str = pieces_str .. "69=mailbox_blank16.png" - -local fs = [[ - size[14.7,10;] - no_prepend[] - bgcolor[#080808BB;true] - background[0,0;14.7,10;chess_bg.png] - list[context;board;0.3,1;8,8;] - listcolors[#00000000;#00000000;#00000000;#30434C;#FFF] - tableoptions[background=#00000000;highlight=#00000000;border=false] - button[10.5,8.5;2,2;new;New game] -]] .. "tablecolumns[image," .. pieces_str .. - ";text;color;text;color;text;image," .. pieces_str .. "]" - -local function get_moves_list(meta, pieceFrom, pieceTo, pieceTo_s, from_x, to_x, from_y, to_y) - local moves = meta:get_string("moves") - local pieceFrom_s = pieceFrom:match(":(%w+_%w+)") - local pieceFrom_si_id = pieces_str:match("(%d+)=" .. pieceFrom_s) - local pieceTo_si_id = pieceTo_s ~= "" and pieces_str:match("(%d+)=" .. pieceTo_s) or "" - - local coordFrom = letters[from_x + 1] .. math.abs(from_y - 8) - local coordTo = letters[to_x + 1] .. math.abs(to_y - 8) - - local new_moves = pieceFrom_si_id .. "," .. - coordFrom .. "," .. - (pieceTo ~= "" and "#33FF33" or "#FFFFFF") .. ", > ,#FFFFFF," .. - coordTo .. "," .. - (pieceTo ~= "" and pieceTo_si_id or "69") .. "," .. - moves - - meta:set_string("moves", new_moves) -end - -local function get_eaten_list(meta, pieceTo, pieceTo_s) - local eaten = meta:get_string("eaten") - if pieceTo ~= "" then - eaten = eaten .. pieceTo_s .. "," - end - - meta:set_string("eaten", eaten) - - local eaten_t = string.split(eaten, ",") - local eaten_img = "" - - local a, b = 0, 0 - for i = 1, #eaten_t do - local is_white = eaten_t[i]:sub(-5,-1) == "white" - local X = (is_white and a or b) % 4 - local Y = ((is_white and a or b) % 16 - X) / 4 - - if is_white then - a = a + 1 - else - b = b + 1 - end - - eaten_img = eaten_img .. - "image[" .. ((X + (is_white and 11.7 or 8.8)) - (X * 0.45)) .. "," .. - ((Y + 5.56) - (Y * 0.2)) .. ";1,1;" .. eaten_t[i] .. ".png]" - end - - meta:set_string("eaten_img", eaten_img) -end - -function realchess.init(pos) - local meta = minetest.get_meta(pos) - local inv = meta:get_inventory() - - meta:set_string("formspec", fs) - meta:set_string("infotext", "Chess Board") - meta:set_string("playerBlack", "") - meta:set_string("playerWhite", "") - meta:set_string("lastMove", "") - meta:set_string("blackAttacked", "") - meta:set_string("whiteAttacked", "") - - meta:set_int("lastMoveTime", 0) - meta:set_int("castlingBlackL", 1) - meta:set_int("castlingBlackR", 1) - meta:set_int("castlingWhiteL", 1) - meta:set_int("castlingWhiteR", 1) - - meta:set_string("moves", "") - meta:set_string("eaten", "") - - inv:set_list("board", pieces) - inv:set_size("board", 64) -end - -function realchess.move(pos, from_list, from_index, to_list, to_index, _, player) - if from_list ~= "board" and to_list ~= "board" then - return 0 - end - - local meta = minetest.get_meta(pos) - local playerName = player:get_player_name() - local inv = meta:get_inventory() - local pieceFrom = inv:get_stack(from_list, from_index):get_name() - local pieceTo = inv:get_stack(to_list, to_index):get_name() - local lastMove = meta:get_string("lastMove") - local playerWhite = meta:get_string("playerWhite") - local playerBlack = meta:get_string("playerBlack") - local thisMove -- Will replace lastMove when move is legal - - if pieceFrom:find("white") then - if playerWhite ~= "" and playerWhite ~= playerName then - minetest.chat_send_player(playerName, chat_prefix .. "Someone else plays white pieces!") - return 0 - end - - if lastMove ~= "" and lastMove ~= "black" then - return 0 - end - - if pieceTo:find("white") then - -- Don't replace pieces of same color - return 0 - end - - playerWhite = playerName - thisMove = "white" - - elseif pieceFrom:find("black") then - if playerBlack ~= "" and playerBlack ~= playerName then - minetest.chat_send_player(playerName, chat_prefix .. "Someone else plays black pieces!") - return 0 - end - - if lastMove ~= "" and lastMove ~= "white" then - return 0 - end - - if pieceTo:find("black") then - -- Don't replace pieces of same color - return 0 - end - - playerBlack = playerName - thisMove = "black" - end - - -- MOVE LOGIC - - local from_x, from_y = index_to_xy(from_index) - local to_x, to_y = index_to_xy(to_index) - - -- PAWN - if pieceFrom:sub(11,14) == "pawn" then - if thisMove == "white" then - local pawnWhiteMove = inv:get_stack(from_list, xy_to_index(from_x, from_y - 1)):get_name() - -- white pawns can go up only - if from_y - 1 == to_y then - if from_x == to_x then - if pieceTo ~= "" then - return 0 - elseif to_index >= 1 and to_index <= 8 then - inv:set_stack(from_list, from_index, "realchess:queen_white") - end - elseif from_x - 1 == to_x or from_x + 1 == to_x then - if not pieceTo:find("black") then - return 0 - elseif to_index >= 1 and to_index <= 8 then - inv:set_stack(from_list, from_index, "realchess:queen_white") - end - else - return 0 - end - elseif from_y - 2 == to_y then - if pieceTo ~= "" or from_y < 6 or pawnWhiteMove ~= "" then - return 0 - end - else - return 0 - end - - --[[ - if x not changed - ensure that destination cell is empty - elseif x changed one unit left or right - ensure the pawn is killing opponent piece - else - move is not legal - abort - ]] - - if from_x == to_x then - if pieceTo ~= "" then - return 0 - end - elseif from_x - 1 == to_x or from_x + 1 == to_x then - if not pieceTo:find("black") then - return 0 - end - else - return 0 - end - - elseif thisMove == "black" then - local pawnBlackMove = inv:get_stack(from_list, xy_to_index(from_x, from_y + 1)):get_name() - -- black pawns can go down only - if from_y + 1 == to_y then - if from_x == to_x then - if pieceTo ~= "" then - return 0 - elseif to_index >= 57 and to_index <= 64 then - inv:set_stack(from_list, from_index, "realchess:queen_black") - end - elseif from_x - 1 == to_x or from_x + 1 == to_x then - if not pieceTo:find("white") then - return 0 - elseif to_index >= 57 and to_index <= 64 then - inv:set_stack(from_list, from_index, "realchess:queen_black") - end - else - return 0 - end - elseif from_y + 2 == to_y then - if pieceTo ~= "" or from_y > 1 or pawnBlackMove ~= "" then - return 0 - end - else - return 0 - end - - --[[ - if x not changed - ensure that destination cell is empty - elseif x changed one unit left or right - ensure the pawn is killing opponent piece - else - move is not legal - abort - ]] - - if from_x == to_x then - if pieceTo ~= "" then - return 0 - end - elseif from_x - 1 == to_x or from_x + 1 == to_x then - if not pieceTo:find("white") then - return 0 - end - else - return 0 - end - else - return 0 - end - - -- ROOK - elseif pieceFrom:sub(11,14) == "rook" then - if from_x == to_x then - -- Moving vertically - if from_y < to_y then - -- Moving down - -- Ensure that no piece disturbs the way - for i = from_y + 1, to_y - 1 do - if inv:get_stack(from_list, xy_to_index(from_x, i)):get_name() ~= "" then - return 0 - end - end - else - -- Mocing up - -- Ensure that no piece disturbs the way - for i = to_y + 1, from_y - 1 do - if inv:get_stack(from_list, xy_to_index(from_x, i)):get_name() ~= "" then - return 0 - end - end - end - elseif from_y == to_y then - -- Mocing horizontally - if from_x < to_x then - -- mocing right - -- ensure that no piece disturbs the way - for i = from_x + 1, to_x - 1 do - if inv:get_stack(from_list, xy_to_index(i, from_y)):get_name() ~= "" then - return 0 - end - end - else - -- Mocing left - -- Ensure that no piece disturbs the way - for i = to_x + 1, from_x - 1 do - if inv:get_stack(from_list, xy_to_index(i, from_y)):get_name() ~= "" then - return 0 - end - end - end - else - -- Attempt to move arbitrarily -> abort - return 0 - end - - if thisMove == "white" or thisMove == "black" then - if pieceFrom:sub(-1) == "1" then - meta:set_int("castlingWhiteL", 0) - elseif pieceFrom:sub(-1) == "2" then - meta:set_int("castlingWhiteR", 0) - end - end - - -- KNIGHT - elseif pieceFrom:sub(11,16) == "knight" then - -- Get relative pos - local dx = from_x - to_x - local dy = from_y - to_y - - -- Get absolute values - if dx < 0 then dx = -dx end - if dy < 0 then dy = -dy end - - -- Sort x and y - if dx > dy then dx, dy = dy, dx end - - -- Ensure that dx == 1 and dy == 2 - if dx ~= 1 or dy ~= 2 then - return 0 - end - -- Just ensure that destination cell does not contain friend piece - -- ^ It was done already thus everything ok - - -- BISHOP - elseif pieceFrom:sub(11,16) == "bishop" then - -- Get relative pos - local dx = from_x - to_x - local dy = from_y - to_y - - -- Get absolute values - if dx < 0 then dx = -dx end - if dy < 0 then dy = -dy end - - -- Ensure dx and dy are equal - if dx ~= dy then return 0 end - - if from_x < to_x then - if from_y < to_y then - -- Moving right-down - -- Ensure that no piece disturbs the way - for i = 1, dx - 1 do - if inv:get_stack(from_list, xy_to_index(from_x + i, from_y + i)):get_name() ~= "" then - return 0 - end - end - else - -- Moving right-up - -- Ensure that no piece disturbs the way - for i = 1, dx - 1 do - if inv:get_stack(from_list, xy_to_index(from_x + i, from_y - i)):get_name() ~= "" then - return 0 - end - end - end - else - if from_y < to_y then - -- Moving left-down - -- Ensure that no piece disturbs the way - for i = 1, dx - 1 do - if inv:get_stack(from_list, xy_to_index(from_x - i, from_y + i)):get_name() ~= "" then - return 0 - end - end - else - -- Moving left-up - -- ensure that no piece disturbs the way - for i = 1, dx - 1 do - if inv:get_stack(from_list, xy_to_index(from_x - i, from_y - i)):get_name() ~= "" then - return 0 - end - end - end - end - - -- QUEEN - elseif pieceFrom:sub(11,15) == "queen" then - local dx = from_x - to_x - local dy = from_y - to_y - - -- Get absolute values - if dx < 0 then dx = -dx end - if dy < 0 then dy = -dy end - - -- Ensure valid relative move - if dx ~= 0 and dy ~= 0 and dx ~= dy then - return 0 - end - - if from_x == to_x then - if from_y < to_y then - -- Goes down - -- Ensure that no piece disturbs the way - for i = 1, dx - 1 do - if inv:get_stack(from_list, xy_to_index(from_x, from_y + i)):get_name() ~= "" then - return 0 - end - end - else - -- Goes up - -- Ensure that no piece disturbs the way - for i = 1, dx - 1 do - if inv:get_stack(from_list, xy_to_index(from_x, from_y - i)):get_name() ~= "" then - return 0 - end - end - end - elseif from_x < to_x then - if from_y == to_y then - -- Goes right - -- Ensure that no piece disturbs the way - for i = 1, dx - 1 do - if inv:get_stack(from_list, xy_to_index(from_x + i, from_y)):get_name() ~= "" then - return 0 - end - end - elseif from_y < to_y then - -- Goes right-down - -- Ensure that no piece disturbs the way - for i = 1, dx - 1 do - if inv:get_stack(from_list, xy_to_index(from_x + i, from_y + i)):get_name() ~= "" then - return 0 - end - end - else - -- Goes right-up - -- Ensure that no piece disturbs the way - for i = 1, dx - 1 do - if inv:get_stack(from_list, xy_to_index(from_x + i, from_y - i)):get_name() ~= "" then - return 0 - end - end - end - else - if from_y == to_y then - -- Goes left - -- Ensure that no piece disturbs the way and destination cell does - for i = 1, dx - 1 do - if inv:get_stack(from_list, xy_to_index(from_x - i, from_y)):get_name() ~= "" then - return 0 - end - end - elseif from_y < to_y then - -- Goes left-down - -- Ensure that no piece disturbs the way - for i = 1, dx - 1 do - if inv:get_stack(from_list, xy_to_index(from_x - i, from_y + i)):get_name() ~= "" then - return 0 - end - end - else - -- Goes left-up - -- Ensure that no piece disturbs the way - for i = 1, dx - 1 do - if inv:get_stack(from_list, xy_to_index(from_x - i, from_y - i)):get_name() ~= "" then - return 0 - end - end - end - end - - -- KING - elseif pieceFrom:sub(11,14) == "king" then - local dx = from_x - to_x - local dy = from_y - to_y - local check = true - - if thisMove == "white" then - if from_y == 7 and to_y == 7 then - if to_x == 1 then - local castlingWhiteL = meta:get_int("castlingWhiteL") - local idx57 = inv:get_stack(from_list, 57):get_name() - - if castlingWhiteL == 1 and idx57 == "realchess:rook_white_1" then - for i = 58, from_index - 1 do - if inv:get_stack(from_list, i):get_name() ~= "" then - return 0 - end - end - inv:set_stack(from_list, 57, "") - inv:set_stack(from_list, 59, "realchess:rook_white_1") - check = false - end - elseif to_x == 6 then - local castlingWhiteR = meta:get_int("castlingWhiteR") - local idx64 = inv:get_stack(from_list, 64):get_name() - - if castlingWhiteR == 1 and idx64 == "realchess:rook_white_2" then - for i = from_index + 1, 63 do - if inv:get_stack(from_list, i):get_name() ~= "" then - return 0 - end - end - inv:set_stack(from_list, 62, "realchess:rook_white_2") - inv:set_stack(from_list, 64, "") - check = false - end - end - end - elseif thisMove == "black" then - if from_y == 0 and to_y == 0 then - if to_x == 1 then - local castlingBlackL = meta:get_int("castlingBlackL") - local idx1 = inv:get_stack(from_list, 1):get_name() - - if castlingBlackL == 1 and idx1 == "realchess:rook_black_1" then - for i = 2, from_index - 1 do - if inv:get_stack(from_list, i):get_name() ~= "" then - return 0 - end - end - - inv:set_stack(from_list, 1, "") - inv:set_stack(from_list, 3, "realchess:rook_black_1") - check = false - end - elseif to_x == 6 then - local castlingBlackR = meta:get_int("castlingBlackR") - local idx8 = inv:get_stack(from_list, 1):get_name() - - if castlingBlackR == 1 and idx8 == "realchess:rook_black_2" then - for i = from_index + 1, 7 do - if inv:get_stack(from_list, i):get_name() ~= "" then - return 0 - end - end - - inv:set_stack(from_list, 6, "realchess:rook_black_2") - inv:set_stack(from_list, 8, "") - check = false - end - end - end - end - - if check then - if dx < 0 then - dx = -dx - end - - if dy < 0 then - dy = -dy - end - - if dx > 1 or dy > 1 then - return 0 - end - end - - if thisMove == "white" then - meta:set_int("castlingWhiteL", 0) - meta:set_int("castlingWhiteR", 0) - - elseif thisMove == "black" then - meta:set_int("castlingBlackL", 0) - meta:set_int("castlingBlackR", 0) - end - end - - local board = board_to_table(inv) - board[to_index] = board[from_index] - board[from_index] = "" - - local black_king_idx, white_king_idx = locate_kings(board) - local blackAttacked = attacked("black", black_king_idx, board) - local whiteAttacked = attacked("white", white_king_idx, board) - - if blackAttacked then - if thisMove == "black" and meta:get_string("blackAttacked") == "true" then - return 0 - else - meta:set_string("blackAttacked", "true") - end - else - meta:set_string("blackAttacked", "") - end - - if whiteAttacked then - if thisMove == "white" and meta:get_string("whiteAttacked") == "true" then - return 0 - else - meta:set_string("whiteAttacked", "true") - end - else - meta:set_string("whiteAttacked", "") - end - - lastMove = thisMove - - meta:set_string("lastMove", lastMove) - meta:set_int("lastMoveTime", minetest.get_gametime()) - meta:set_string("playerWhite", playerWhite) - meta:set_string("playerBlack", playerBlack) - - local pieceTo_s = pieceTo ~= "" and pieceTo:match(":(%w+_%w+)") or "" - get_moves_list(meta, pieceFrom, pieceTo, pieceTo_s, from_x, to_x, from_y, to_y) - get_eaten_list(meta, pieceTo, pieceTo_s) - - return 1 -end - -function realchess.on_move(pos, from_list, from_index) - local meta = minetest.get_meta(pos) - local inv = meta:get_inventory() - inv:set_stack(from_list, from_index, '') - - local black_king_attacked = meta:get_string("blackAttacked") == "true" - local white_king_attacked = meta:get_string("whiteAttacked") == "true" - - local playerWhite = meta:get_string("playerWhite") - local playerBlack = meta:get_string("playerBlack") - - local moves = meta:get_string("moves") - local eaten_img = meta:get_string("eaten_img") - local lastMove = meta:get_string("lastMove") - local turnBlack = minetest.colorize("#000001", (lastMove == "white" and playerBlack ~= "") and - playerBlack .. "..." or playerBlack) - local turnWhite = minetest.colorize("#000001", (lastMove == "black" and playerWhite ~= "") and - playerWhite .. "..." or playerWhite) - local check_s = minetest.colorize("#FF0000", "\\[check\\]") - - local formspec = fs .. - "label[1.9,0.3;" .. turnBlack .. (black_king_attacked and " " .. check_s or "") .. "]" .. - "label[1.9,9.15;" .. turnWhite .. (white_king_attacked and " " .. check_s or "") .. "]" .. - "table[8.9,1.05;5.07,3.75;moves;" .. moves:sub(1,-2) .. ";1]" .. - eaten_img - - meta:set_string("formspec", formspec) - - return false -end - -local function timeout_format(timeout_limit) - local time_remaining = timeout_limit - minetest.get_gametime() - local minutes = math.floor(time_remaining / 60) - local seconds = time_remaining % 60 - - if minutes == 0 then - return seconds .. " sec." - end - - return minutes .. " min. " .. seconds .. " sec." -end - -function realchess.fields(pos, _, fields, sender) - local playerName = sender:get_player_name() - local meta = minetest.get_meta(pos) - local timeout_limit = meta:get_int("lastMoveTime") + 300 - local playerWhite = meta:get_string("playerWhite") - local playerBlack = meta:get_string("playerBlack") - local lastMoveTime = meta:get_int("lastMoveTime") - if fields.quit then return end - - -- Timeout is 5 min. by default for resetting the game (non-players only) - if fields.new then - if (playerWhite == playerName or playerBlack == playerName) then - realchess.init(pos) - - elseif lastMoveTime ~= 0 then - if minetest.get_gametime() >= timeout_limit and - (playerWhite ~= playerName or playerBlack ~= playerName) then - realchess.init(pos) - else - minetest.chat_send_player(playerName, chat_prefix .. - "You can't reset the chessboard, a game has been started. " .. - "If you aren't a current player, try again in " .. - timeout_format(timeout_limit)) - end - end - end -end - -function realchess.dig(pos, player) - if not player then - return false - end - - local meta = minetest.get_meta(pos) - local playerName = player:get_player_name() - local timeout_limit = meta:get_int("lastMoveTime") + 300 - local lastMoveTime = meta:get_int("lastMoveTime") - - -- Timeout is 5 min. by default for digging the chessboard (non-players only) - return (lastMoveTime == 0 and minetest.get_gametime() > timeout_limit) or - minetest.chat_send_player(playerName, chat_prefix .. - "You can't dig the chessboard, a game has been started. " .. - "Reset it first if you're a current player, or dig it again in " .. - timeout_format(timeout_limit)) -end - -minetest.register_node(":realchess:chessboard", { - description = "Chess Board", - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - inventory_image = "chessboard_top.png", - wield_image = "chessboard_top.png", - tiles = {"chessboard_top.png", "chessboard_top.png", "chessboard_sides.png"}, - groups = {choppy=3, oddly_breakable_by_hand=2, flammable=3}, - sounds = default.node_sound_wood_defaults(), - node_box = {type = "fixed", fixed = {-.375, -.5, -.375, .375, -.4375, .375}}, - sunlight_propagates = true, - on_rotate = screwdriver.rotate_simple, - can_dig = realchess.dig, - on_construct = realchess.init, - on_receive_fields = realchess.fields, - allow_metadata_inventory_move = realchess.move, - on_metadata_inventory_move = realchess.on_move, - allow_metadata_inventory_take = function() return 0 end -}) - -local function register_piece(name, count) - for _, color in pairs({"black", "white"}) do - if not count then - minetest.register_craftitem(":realchess:" .. name .. "_" .. color, { - description = color:gsub("^%l", string.upper) .. " " .. name:gsub("^%l", string.upper), - inventory_image = name .. "_" .. color .. ".png", - stack_max = 1, - groups = {not_in_creative_inventory=1} - }) - else - for i = 1, count do - minetest.register_craftitem(":realchess:" .. name .. "_" .. color .. "_" .. i, { - description = color:gsub("^%l", string.upper) .. " " .. name:gsub("^%l", string.upper), - inventory_image = name .. "_" .. color .. ".png", - stack_max = 1, - groups = {not_in_creative_inventory=1} - }) - end - end - end -end - -register_piece("pawn", 8) -register_piece("rook", 2) -register_piece("knight", 2) -register_piece("bishop", 2) -register_piece("queen") -register_piece("king") - --- Recipes - -minetest.register_craft({ - output = "realchess:chessboard", - recipe = { - {"dye:black", "dye:white", "dye:black"}, - {"stairs:slab_wood", "stairs:slab_wood", "stairs:slab_wood"} - } -}) diff --git a/realchess/mod.conf b/realchess/mod.conf deleted file mode 100644 index f03738b..0000000 --- a/realchess/mod.conf +++ /dev/null @@ -1 +0,0 @@ -name = realchess diff --git a/realchess/screenshot.png b/realchess/screenshot.png deleted file mode 100644 index 14587af..0000000 Binary files a/realchess/screenshot.png and /dev/null differ diff --git a/realchess/textures/bishop_black.png b/realchess/textures/bishop_black.png deleted file mode 100644 index b9d0670..0000000 Binary files a/realchess/textures/bishop_black.png and /dev/null differ diff --git a/realchess/textures/bishop_white.png b/realchess/textures/bishop_white.png deleted file mode 100644 index c474e7e..0000000 Binary files a/realchess/textures/bishop_white.png and /dev/null differ diff --git a/realchess/textures/chess_bg.png b/realchess/textures/chess_bg.png deleted file mode 100644 index 41ee603..0000000 Binary files a/realchess/textures/chess_bg.png and /dev/null differ diff --git a/realchess/textures/chessboard_sides.png b/realchess/textures/chessboard_sides.png deleted file mode 100644 index bb6e8ef..0000000 Binary files a/realchess/textures/chessboard_sides.png and /dev/null differ diff --git a/realchess/textures/chessboard_top.png b/realchess/textures/chessboard_top.png deleted file mode 100644 index 9dcbf5d..0000000 Binary files a/realchess/textures/chessboard_top.png and /dev/null differ diff --git a/realchess/textures/king_black.png b/realchess/textures/king_black.png deleted file mode 100644 index f557771..0000000 Binary files a/realchess/textures/king_black.png and /dev/null differ diff --git a/realchess/textures/king_white.png b/realchess/textures/king_white.png deleted file mode 100644 index d0b1aeb..0000000 Binary files a/realchess/textures/king_white.png and /dev/null differ diff --git a/realchess/textures/knight_black.png b/realchess/textures/knight_black.png deleted file mode 100644 index db229aa..0000000 Binary files a/realchess/textures/knight_black.png and /dev/null differ diff --git a/realchess/textures/knight_white.png b/realchess/textures/knight_white.png deleted file mode 100644 index d6c01a1..0000000 Binary files a/realchess/textures/knight_white.png and /dev/null differ diff --git a/realchess/textures/mailbox_blank16.png b/realchess/textures/mailbox_blank16.png deleted file mode 100644 index 017d4f9..0000000 Binary files a/realchess/textures/mailbox_blank16.png and /dev/null differ diff --git a/realchess/textures/pawn_black.png b/realchess/textures/pawn_black.png deleted file mode 100644 index 9f65545..0000000 Binary files a/realchess/textures/pawn_black.png and /dev/null differ diff --git a/realchess/textures/pawn_white.png b/realchess/textures/pawn_white.png deleted file mode 100644 index 3b35a78..0000000 Binary files a/realchess/textures/pawn_white.png and /dev/null differ diff --git a/realchess/textures/queen_black.png b/realchess/textures/queen_black.png deleted file mode 100644 index d9a80d6..0000000 Binary files a/realchess/textures/queen_black.png and /dev/null differ diff --git a/realchess/textures/queen_white.png b/realchess/textures/queen_white.png deleted file mode 100644 index db2947a..0000000 Binary files a/realchess/textures/queen_white.png and /dev/null differ diff --git a/realchess/textures/rook_black.png b/realchess/textures/rook_black.png deleted file mode 100644 index c0c5f86..0000000 Binary files a/realchess/textures/rook_black.png and /dev/null differ diff --git a/realchess/textures/rook_white.png b/realchess/textures/rook_white.png deleted file mode 100644 index e76ff59..0000000 Binary files a/realchess/textures/rook_white.png and /dev/null differ diff --git a/unifiedbricks/init.lua b/unifiedbricks/init.lua index e72b7f4..7e6e3d0 100644 --- a/unifiedbricks/init.lua +++ b/unifiedbricks/init.lua @@ -103,16 +103,21 @@ minetest.register_node("unifiedbricks:brickblock", { paramtype = "light", paramtype2 = "color", palette = "unifieddyes_palette_extended.png", + place_param2 = 240, is_ground_content = true, groups = {cracky=3, not_in_creative_inventory=1, ud_param2_colorable = 1}, sounds = default.node_sound_stone_defaults(), on_construct = unifieddyes.on_construct, + after_place_node = unifieddyes.recolor_on_place, + after_dig_node = unifieddyes.after_dig_node, + drop = "default:brick" }) minetest.override_item("default:brick", { + ud_replacement_node = "unifiedbricks:brickblock", palette = "unifieddyes_palette_extended.png", - airbrush_replacement_node = "unifiedbricks:brickblock", groups = {cracky = 3, ud_param2_colorable = 1}, + after_place_node = unifieddyes.recolor_on_place }) minetest.register_node("unifiedbricks:clayblock", { @@ -122,18 +127,23 @@ minetest.register_node("unifiedbricks:clayblock", { }, paramtype2 = "color", palette = "unifieddyes_palette_extended.png", + place_param2 = 240, is_ground_content = true, groups = {crumbly=3, not_in_creative_inventory=1, ud_param2_colorable = 1}, sounds = default.node_sound_dirt_defaults({ footstep = "", }), on_construct = unifieddyes.on_construct, + after_place_node = unifieddyes.recolor_on_place, + after_dig_node = unifieddyes.after_dig_node, + drop = "default:clay" }) minetest.override_item("default:clay", { + ud_replacement_node = "unifiedbricks:clayblock", palette = "unifieddyes_palette_extended.png", - airbrush_replacement_node = "unifiedbricks:clayblock", groups = {crumbly = 3, ud_param2_colorable = 1}, + after_place_node = unifieddyes.recolor_on_place, }) minetest.register_node("unifiedbricks:brickblock_multicolor_dark", { @@ -147,10 +157,13 @@ minetest.register_node("unifiedbricks:brickblock_multicolor_dark", { paramtype = "light", paramtype2 = "color", palette = "unifieddyes_palette_extended.png", + place_param2 = 240, is_ground_content = true, groups = {cracky=3, ud_param2_colorable = 1}, sounds = default.node_sound_stone_defaults(), on_construct = unifieddyes.on_construct, + after_place_node = unifieddyes.recolor_on_place, + after_dig_node = unifieddyes.after_dig_node, }) minetest.register_node("unifiedbricks:brickblock_multicolor_medium", { @@ -164,10 +177,13 @@ minetest.register_node("unifiedbricks:brickblock_multicolor_medium", { paramtype = "light", paramtype2 = "color", palette = "unifieddyes_palette_extended.png", + place_param2 = 240, is_ground_content = true, groups = {cracky=3, ud_param2_colorable = 1}, sounds = default.node_sound_stone_defaults(), on_construct = unifieddyes.on_construct, + after_place_node = unifieddyes.recolor_on_place, + after_dig_node = unifieddyes.after_dig_node, }) minetest.register_node("unifiedbricks:brickblock_multicolor_light", { @@ -181,10 +197,13 @@ minetest.register_node("unifiedbricks:brickblock_multicolor_light", { paramtype = "light", paramtype2 = "color", palette = "unifieddyes_palette_extended.png", + place_param2 = 240, is_ground_content = true, groups = {cracky=3, ud_param2_colorable = 1}, sounds = default.node_sound_stone_defaults(), on_construct = unifieddyes.on_construct, + after_place_node = unifieddyes.recolor_on_place, + after_dig_node = unifieddyes.after_dig_node, }) minetest.register_craft( { @@ -220,61 +239,6 @@ minetest.register_craft( { }, }) -unifieddyes.register_color_craft({ - output = "unifiedbricks:brickblock", - palette = "extended", - neutral_node = "default:brick", - type = "shapeless", - recipe = { - "NEUTRAL_NODE", - "MAIN_DYE" - } -}) - -unifieddyes.register_color_craft({ - output = "unifiedbricks:clayblock", - palette = "extended", - neutral_node = "default:clay", - type = "shapeless", - recipe = { - "NEUTRAL_NODE", - "MAIN_DYE" - } -}) - -unifieddyes.register_color_craft({ - output = "unifiedbricks:brickblock_multicolor_dark", - palette = "extended", - neutral_node = "unifiedbricks:brickblock_multicolor_dark", - type = "shapeless", - recipe = { - "NEUTRAL_NODE", - "MAIN_DYE" - } -}) - -unifieddyes.register_color_craft({ - output = "unifiedbricks:brickblock_multicolor_medium", - palette = "extended", - neutral_node = "unifiedbricks:brickblock_multicolor_medium", - type = "shapeless", - recipe = { - "NEUTRAL_NODE", - "MAIN_DYE" - } -}) - -unifieddyes.register_color_craft({ - output = "unifiedbricks:brickblock_multicolor_light", - palette = "extended", - neutral_node = "unifiedbricks:brickblock_multicolor_light", - type = "shapeless", - recipe = { - "NEUTRAL_NODE", - "MAIN_DYE" - } -}) - -- static nodes unifiedbricks.register_old_static_block = function(name, formalname, blocktype) @@ -379,4 +343,24 @@ minetest.register_lbm({ end }) +minetest.register_lbm({ + name = "unifiedbricks:recolor_bricks", + label = "Convert 89-color bricks to use UD extended palette", + run_at_every_load = false, + nodenames = { + "unifiedbricks:clayblock", + "unifiedbricks:brickblock", + "unifiedbricks:brickblock_multicolor_dark", + "unifiedbricks:brickblock_multicolor_medium", + "unifiedbricks:brickblock_multicolor_light", + }, + action = function(pos, node) + local meta = minetest.get_meta(pos) + if meta:get_string("palette") ~= "ext" then + minetest.swap_node(pos, { name = node.name, param2 = unifieddyes.convert_classic_palette[node.param2] }) + meta:set_string("palette", "ext") + end + end +}) + print("[UnifiedBricks] Loaded!") diff --git a/unifieddyes/API.md b/unifieddyes/API.md index 6f1b9d0..08b2ee2 100644 --- a/unifieddyes/API.md +++ b/unifieddyes/API.md @@ -12,8 +12,8 @@ minetest.register_node("mymod:colored_node", { paramtype2 = "color", palette = "unifieddyes_palette_extended.png", groups = {snappy = 1, cracky = 2, ud_param2_colorable = 1} - on_construct = unifieddyes.on_construct, - airbrush_replacement_node = "mymod:my_other_colored_node" + airbrush_replacement_node = "mymod:my_other_colored_node", + on_dig = unifieddyes.on_dig }) ``` @@ -32,12 +32,14 @@ minetest.register_node("mymod:colored_node", { If your node if of the kind where you need the split palette, but you need to put the *full color name* into the node name, as opposed to just the hue, then add the keys `ud_color_start` and `ud_color_end` and set them to the positions of the first and last characters of the color name (where 1 is the first character of the mod name at the start of the node name, i.e. "mymod:foo_bar_orange_baz" would have the start set to 15 and the end at 20). -`on_construct`: see below. - `airbrush_replacement_node`: The node to swap in when the airbrush is used on this node. For example, you could `minetest.override_item()` on some default node to add this field, pointing to a colorable node of your own, so that when the default node is painted, it's replaced with yours in the new color. #### Function calls +**`unifieddyes.on_dig(pos, node, digger)`** + +Set in a node definition's `on_dig` callback, this makes sure that if the player digs a neutral node, i.e. a colorable node that was left uncolored/white after placing, they receive a version of that item that has been stripped of its itemstack color setting, so that it is identical to what would have been in their inventory when that node was originally placed. This prevents the engine splitting stacks of that item due to technically-different but visually-identical itemstack coloring. This function is only needed in the definition of colorable versions of a node, not any uncolored counterparts. For example, if you have a mod that has a simple, wooden chair, and the mod turns it into one with a colored seat cushion when you airbrush or craft it with dye, then only that latter colored-seat version needs this function. + **`unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)` `unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)`** @@ -86,10 +88,6 @@ This is called when a node is punched while wielding the airbrush. This one does just what it sounds like - it shows the color selector formspec. -**`unifieddyes.on_construct(pos)`** - -This function, usually called from your node definition's `on_construct`, just sets the `palette = "ext"` metadata key for the node after it's been placed. This can then be read in an LBM to determine if this node needs to be converted from the old 89-color palette to the extended 256-color palette. Although it is good practice to call this for any node that uses the 256-color palette, it isn't actually necessary as long as the node has never used the 89-color palette, and won't be subjected to an LBM that changes its color. - **`unifieddyes.register_color_craft(recipe)`** This will loop through all of Unified Dyes' color lists, generating one recipe for every color in the palette given in the call. Example usage: @@ -127,7 +125,6 @@ Makes a colored itemstack out of the given `itemstack` and `color` (as a dye, e. Does just what it sounds like - it registers all the nodes that are needed for a given base node (`def`) to be able to use the split palette, each named according to `name`, with the palette hue appended. If a custom drop is needed, it can be passed along (only a string is allowed here, specifying a single item). - #### Tables In addition to the above API calls, Unified Dyes provides several useful tables @@ -151,8 +148,8 @@ If your mod used the old paradigm where you craft a neutral-colored item, place ```lua place_param2 = 240, after_dig_node = unifieddyes.after_dig_node, - after_place_node = unifieddyes.recolor_on_place, - ud_replacement_node = "mod:some_node" + ud_replacement_node = "mod:some_node", + on_dig = unifieddyes.on_dig ``` * Add the `airbrush_replacement_node` key to the node definition, if needed. @@ -167,10 +164,9 @@ If your mod used the old paradigm where you craft a neutral-colored item, place * Convert that remaining texture to grayscale, enhance its contrast as much as you can without distorting it, and rename it and the node it'll be used to something neutral-sounding. -* Add the `on_construct` and `palette` keys to your neutral node definition, for example: +* Add the `palette` key to your neutral node definition, for example: `palette = "unifieddyes_palette_extended.png",` - `on_construct = unifieddyes.on_construct,` * Adjust your node's groups to specify that the node can be colored. Example (note the last item): @@ -180,7 +176,7 @@ If your mod used the old paradigm where you craft a neutral-colored item, place * Add the above recipes helper call (which replaces those delted recipes) -* If your colored node is based on someone else's neutral node, for example if you made a mod that creates multiple colors of minetest_game's default clay, you may find it best to create a single "stand-in" node that's identical to the neutral node, but named for your mod, hidden from the creative inventory, and which has a properly-prepared grayscale texture image in addition to the above keys. Use `minetest.override_item()` to add the `on_construct`, `palette`, and `airbrush_replacement_node` keys, and the `ud_param2_colorable` group, to that "someone else's" node. Then use that node and your custom, hidden node in the craft helper call. +* If your colored node is based on someone else's neutral node, for example if you made a mod that creates multiple colors of minetest_game's default clay, you may find it best to create a single "stand-in" node that's identical to the neutral node, but named for your mod, hidden from the creative inventory, and which has a properly-prepared grayscale texture image in addition to the above keys. Use `minetest.override_item()` to add the `palette` and `airbrush_replacement_node` keys, and the `ud_param2_colorable` group, to that "someone else's" node. Then use that node and your custom, hidden node in the craft helper call. * You will need to write a run-only-once LBM to convert your old statically-colored nodes to use hardware coloring. See above for functions that will help reduce the work required for this part. diff --git a/unifieddyes/airbrush.lua b/unifieddyes/airbrush.lua new file mode 100644 index 0000000..262ca24 --- /dev/null +++ b/unifieddyes/airbrush.lua @@ -0,0 +1,503 @@ +-- This file supplies all the code related to the airbrush + +local S = minetest.get_translator("unifieddyes") + +function unifieddyes.on_airbrush(itemstack, player, pointed_thing) + local player_name = player:get_player_name() + local painting_with = nil + + if unifieddyes.player_current_dye[player_name] then + painting_with = unifieddyes.player_current_dye[player_name] + end + + if not painting_with then + minetest.chat_send_player(player_name, "*** You need to set a color first.") + minetest.chat_send_player(player_name, "*** Right-click any random node to open the color selector,") + minetest.chat_send_player(player_name, "*** or shift+right-click a colorized node to use its color.") + minetest.chat_send_player(player_name, "*** Be sure to click \"Accept\", or the color you select will be ignored.") + return + end + + local pos = minetest.get_pointed_thing_position(pointed_thing) + if not pos then + local look_angle = player:get_look_vertical() + if look_angle > -1.55 then + minetest.chat_send_player(player_name, "*** No node selected") + else + local hexcolor = unifieddyes.get_color_from_dye_name(painting_with) + if hexcolor then + local r = tonumber(string.sub(hexcolor,1,2),16) + local g = tonumber(string.sub(hexcolor,3,4),16) + local b = tonumber(string.sub(hexcolor,5,6),16) + player:set_sky({r=r,g=g,b=b,a=255},"plain") + end + end + return + end + + local node = minetest.get_node(pos) + local def = minetest.registered_items[node.name] + if not def then return end + + if minetest.is_protected(pos, player_name) then + minetest.chat_send_player(player_name, "*** Sorry, someone else owns that node.") + return + end + + if not (def.groups and def.groups.ud_param2_colorable and def.groups.ud_param2_colorable > 0) then + minetest.chat_send_player(player_name, "*** That node can't be colored.") + return + end + + local palette = nil + local fdir = 0 + if not def or not def.palette then + minetest.chat_send_player(player_name, "*** That node can't be colored -- it's either undefined or has no palette.") + return + elseif def.palette == "unifieddyes_palette_extended.png" then + palette = "extended" + elseif def.palette == "unifieddyes_palette_colorwallmounted.png" then + palette = "wallmounted" + fdir = node.param2 % 8 + elseif def.palette ~= "unifieddyes_palette_extended.png" + and def.palette ~= "unifieddyes_palette_colorwallmounted.png" + and string.find(def.palette, "unifieddyes_palette_") then + palette = "split" + fdir = node.param2 % 32 + else + minetest.chat_send_player(player_name, "*** That node can't be colored -- it has an invalid color mode.") + return + end + + local idx, hue = unifieddyes.getpaletteidx(painting_with, palette) + local inv = player:get_inventory() + if (not creative or not creative.is_enabled_for(player_name)) and not inv:contains_item("main", painting_with) then + local suff = "" + if not idx then + suff = " Besides, "..string.sub(painting_with, 5).." can't be applied to that node." + end + minetest.chat_send_player(player_name, "*** You're in survival mode, and you're out of "..string.sub(painting_with, 5).."."..suff) + return + end + + if not idx then + minetest.chat_send_player(player_name, "*** "..string.sub(painting_with, 5).." can't be applied to that node.") + return + end + + local oldidx = node.param2 - fdir + local name = def.airbrush_replacement_node or node.name + + if palette == "split" then + + local modname = string.sub(name, 1, string.find(name, ":")-1) + local nodename2 = string.sub(name, string.find(name, ":")+1) + local oldcolor = "snozzberry" + local newcolor = "razzberry" -- intentionally misspelled ;-) + + if def.ud_color_start and def.ud_color_end then + oldcolor = string.sub(node.name, def.ud_color_start, def.ud_color_end) + newcolor = string.sub(painting_with, 5) + else + if hue ~= 0 then + newcolor = unifieddyes.HUES_EXTENDED[hue][1] + else + newcolor = "grey" + end + + if def.airbrush_replacement_node then + oldcolor = "grey" + else + local s = string.sub(def.palette, 21) + oldcolor = string.sub(s, 1, string.find(s, "s.png")-1) + end + end + + name = modname..":"..string.gsub(nodename2, oldcolor, newcolor) + + if not minetest.registered_items[name] then + minetest.chat_send_player(player_name, "*** "..string.sub(painting_with, 5).." can't be applied to that node.") + return + end + elseif idx == oldidx then + return + end + minetest.swap_node(pos, {name = name, param2 = fdir + idx}) + if not creative or not creative.is_enabled_for(player_name) then + inv:remove_item("main", painting_with) + return + end +end + +local hps = 0.6 -- horizontal position scale +local vps = 1.3 -- vertical position scale +local vs = 0.1 -- vertical shift/offset + +local color_button_size = ";0.75,0.75;" +local color_square_size = ";0.69,0.69;" + +function unifieddyes.make_readable_color(color) + -- is this a low saturation color? + local has_low_saturtation = string.find(color, "s50"); + + -- remove _s50 tag, we care about that later again + local s = string.gsub(color, "_s50", "") + + -- replace underscores with spaces to make it look nicer + local s = string.gsub(s, "_", " ") + + -- capitalize words, you know, looks nicer ;) + s = string.gsub(s, "(%l)(%w*)", function(a,b) return string.upper(a)..b end) + + -- add the word dye, this is what the translations expect + s = s.." Dye" + + -- if it is a low sat color, append an appropriate string + if has_low_saturtation then + s = s.." (low saturation)" + end + + return s +end + +function unifieddyes.make_colored_square(hexcolor, colorname, showall, creative, painting_with, nodepalette, hp, v2, selindic, inv, explist) + + local dye = "dye:"..colorname + + local overlay = "" + local colorize = minetest.formspec_escape("^[colorize:#"..hexcolor..":255") + + if not creative and inv:contains_item("main", dye) then + overlay = "^unifieddyes_onhand_overlay.png" + end + + local unavail_overlay = "" + if not showall and not unifieddyes.palette_has_color[nodepalette.."_"..colorname] + or (explist and not explist[colorname]) then + if overlay == "" then + unavail_overlay = "^unifieddyes_unavailable_overlay.png" + else + unavail_overlay = "^unifieddyes_onhand_unavailable_overlay.png" + end + end + + local tooltip = "tooltip["..colorname..";".. + S(unifieddyes.make_readable_color(colorname)).. + "\n(dye:"..colorname..")]" + + if dye == painting_with then + overlay = "^unifieddyes_select_overlay.png" + selindic = "unifieddyes_white_square.png"..colorize..overlay..unavail_overlay.."]"..tooltip + end + + local form + if unavail_overlay == "" then + form = "image_button[".. + (hp*hps)..","..(v2*vps+vs).. + color_button_size.. + "unifieddyes_white_square.png"..colorize..overlay..unavail_overlay..";".. + colorname..";]".. + tooltip + else + form = "image[".. + (hp*hps)..","..(v2*vps+vs).. + color_square_size.. + "unifieddyes_white_square.png"..colorize..overlay..unavail_overlay.."]".. + tooltip + end + + return form, selindic +end + +function unifieddyes.show_airbrush_form(player) + if not player then return end + + local t = {} + + local player_name = player:get_player_name() + local painting_with = unifieddyes.player_selected_dye[player_name] or unifieddyes.player_current_dye[player_name] + local creative = creative and creative.is_enabled_for(player_name) + local inv = player:get_inventory() + local nodepalette = "extended" + local showall = unifieddyes.player_showall[player_name] + + t[1] = "size[14.5,8.5]label[7,-0.3;"..S("Select a color:").."]" + local selindic = "unifieddyes_select_overlay.png^unifieddyes_question.png]" + + local last_right_click = unifieddyes.player_last_right_clicked[player_name] + if last_right_click then + if not last_right_click.def then + last_right_click.def = {} + last_right_click.undef = true + elseif last_right_click.def.palette then + if last_right_click.def.palette == "unifieddyes_palette_colorwallmounted.png" then + nodepalette = "wallmounted" + elseif last_right_click.def.palette == "unifieddyes_palette_extended.png" then + t[#t+1] = "label[0.5,8.25;"..S("(Right-clicked a node that supports all 256 colors, showing them all)").."]" + showall = true + elseif last_right_click.def.palette ~= "unifieddyes_palette_extended.png" + and last_right_click.def.palette ~= "unifieddyes_palette_colorwallmounted.png" + and string.find(last_right_click.def.palette, "unifieddyes_palette_") then + nodepalette = "split" + end + end + end + + if last_right_click.undef then + t[#t+1] = "label[0.5,8.25;"..S("(Right-clicked an undefined node, showing all colors)").."]" + elseif not last_right_click.def.groups + or not last_right_click.def.groups.ud_param2_colorable + or not last_right_click.def.palette + or not string.find(last_right_click.def.palette, "unifieddyes_palette_") then + t[#t+1] = "label[0.5,8.25;"..S("(Right-clicked a node not supported by the Airbrush, showing all colors)").."]" + end + + local explist = last_right_click.def.explist + + for v = 0, 6 do + local val = unifieddyes.VALS_EXTENDED[v+1] + + local sat = "" + local v2=(v/2) + + for hi, h in ipairs(unifieddyes.HUES_EXTENDED) do + local hue = h[1] + local hp=hi-1 + + local r = h[2] + local g = h[3] + local b = h[4] + + local factor = 40 + if v > 3 then + factor = 75 + v2 = (v-2) + end + + local r2 = math.max(math.min(r + (4-v)*factor, 255), 0) + local g2 = math.max(math.min(g + (4-v)*factor, 255), 0) + local b2 = math.max(math.min(b + (4-v)*factor, 255), 0) + + local hexcolor = string.format("%02x", r2)..string.format("%02x", g2)..string.format("%02x", b2) + local f + f, selindic = unifieddyes.make_colored_square(hexcolor, val..hue..sat, showall, creative, painting_with, nodepalette, hp, v2, selindic, inv, explist) + t[#t+1] = f + end + + if v > 3 then + sat = "_s50" + v2 = (v-1.5) + + for hi, h in ipairs(unifieddyes.HUES_EXTENDED) do + local hue = h[1] + local hp=hi-1 + + local r = h[2] + local g = h[3] + local b = h[4] + + local factor = 75 + + local pr = 0.299 + local pg = 0.587 + local pb = 0.114 + + local r2 = math.max(math.min(r + (4-v)*factor, 255), 0) + local g2 = math.max(math.min(g + (4-v)*factor, 255), 0) + local b2 = math.max(math.min(b + (4-v)*factor, 255), 0) + + local p = math.sqrt(r2*r2*pr + g2*g2*pg + b2*b2*pb) + local r3 = math.floor(p+(r2-p)*0.5) + local g3 = math.floor(p+(g2-p)*0.5) + local b3 = math.floor(p+(b2-p)*0.5) + + local hexcolor = string.format("%02x", r3)..string.format("%02x", g3)..string.format("%02x", b3) + local f + f, selindic = unifieddyes.make_colored_square(hexcolor, val..hue..sat, showall, creative, painting_with, nodepalette, hp, v2, selindic, inv, explist) + t[#t+1] = f + end + end + end + + local v2=5 + for y = 0, 15 do + + local hp=15-y + + local hexgrey = string.format("%02x", y*17)..string.format("%02x", y*17)..string.format("%02x", y*17) + local grey = "grey_"..y + + if y == 0 then grey = "black" + elseif y == 4 then grey = "dark_grey" + elseif y == 8 then grey = "grey" + elseif y == 11 then grey = "light_grey" + elseif y == 15 then grey = "white" + end + + local f + f, selindic = unifieddyes.make_colored_square(hexgrey, grey, showall, creative, painting_with, nodepalette, hp, v2, selindic, inv, explist) + t[#t+1] = f + + end + + if not creative then + t[#t+1] = "image[10," + t[#t+1] = (vps*5.55+vs) + t[#t+1] = color_button_size + t[#t+1] = "unifieddyes_onhand_overlay.png]label[10.7," + t[#t+1] = (vps*5.51+vs) + t[#t+1] = ";"..S("Dyes").."]" + t[#t+1] = "label[10.7," + t[#t+1] = (vps*5.67+vs) + t[#t+1] = ";on hand]" + + end + + t[#t+1] = "image[10," + t[#t+1] = (vps*5+vs) + t[#t+1] = color_button_size + t[#t+1] = selindic + + if painting_with then + t[#t+1] = "label[10.7," + t[#t+1] = (vps*4.90+vs) + t[#t+1] = ";"..S("Your selection:").."]" + t[#t+1] = "label[10.7," + t[#t+1] = (vps*5.07+vs) + t[#t+1] = ";" + t[#t+1] = S(unifieddyes.make_readable_color(string.sub(painting_with, 5))) + t[#t+1] = "]label[10.7," + t[#t+1] = (vps*5.24+vs) + t[#t+1] = ";(" + t[#t+1] = painting_with + t[#t+1] = ")]" + else + t[#t+1] = "label[10.7," + t[#t+1] = (vps*5.07+vs) + t[#t+1] = ";"..S("Your selection").."]" + end + + t[#t+1] = "button_exit[10.5,8;2,1;cancel;"..S("Cancel").."]button_exit[12.5,8;2,1;accept;"..S("Accept").."]" + + + if last_right_click and last_right_click.def and nodepalette ~= "extended" then + if showall then + t[#t+1] = "button[0,8;2,1;show_avail;"..S("Show Available").."]" + t[#t+1] = "label[2,8.25;"..S("(Currently showing all 256 colors)").."]" + else + t[#t+1] = "button[0,8;2,1;show_all;"..S("Show All Colors").."]" + t[#t+1] = "label[2,8.25;"..S("(Currently only showing what the right-clicked node can use)").."]" + end + end + + minetest.show_formspec(player_name, "unifieddyes:dye_select_form", table.concat(t)) +end + +minetest.register_on_player_receive_fields(function(player, formname, fields) + + if formname == "unifieddyes:dye_select_form" then + + local player_name = player:get_player_name() + local nodepalette = "extended" + local showall = unifieddyes.player_showall[player_name] + + local last_right_click = unifieddyes.player_last_right_clicked[player_name] + if last_right_click and last_right_click.def then + if last_right_click.def.palette then + if last_right_click.def.palette == "unifieddyes_palette_colorwallmounted.png" then + nodepalette = "wallmounted" + elseif last_right_click.def.palette ~= "unifieddyes_palette_extended.png" then + nodepalette = "split" + end + end + end + + if fields.show_all then + unifieddyes.player_showall[player_name] = true + unifieddyes.show_airbrush_form(player) + return + elseif fields.show_avail then + unifieddyes.player_showall[player_name] = false + unifieddyes.show_airbrush_form(player) + return + elseif fields.quit then + if fields.accept then + local dye = unifieddyes.player_selected_dye[player_name] + if not dye then + minetest.chat_send_player(player_name, "*** Clicked \"Accept\", but no color was selected!") + return + elseif not showall + and not unifieddyes.palette_has_color[nodepalette.."_"..string.sub(dye, 5)] then + minetest.chat_send_player(player_name, "*** Clicked \"Accept\", but the selected color can't be used on the") + minetest.chat_send_player(player_name, "*** node that was right-clicked (and \"Show All\" wasn't in effect).") + if unifieddyes.player_current_dye[player_name] then + minetest.chat_send_player(player_name, "*** Ignoring it and sticking with "..string.sub(unifieddyes.player_current_dye[player_name], 5)..".") + else + minetest.chat_send_player(player_name, "*** Ignoring it.") + end + return + else + unifieddyes.player_current_dye[player_name] = dye + unifieddyes.player_selected_dye[player_name] = nil + minetest.chat_send_player(player_name, "*** Selected "..string.sub(dye, 5).." for the airbrush.") + return + end + else -- assume "Cancel" or Esc. + unifieddyes.player_selected_dye[player_name] = nil + return + end + else + local s1 = string.sub(minetest.serialize(fields), 11) + local s3 = string.sub(s1,1, string.find(s1, '"')-1) + + local inv = player:get_inventory() + local creative = creative and creative.is_enabled_for(player_name) + local dye = "dye:"..s3 + + if (showall or unifieddyes.palette_has_color[nodepalette.."_"..s3]) and + (minetest.registered_items[dye] and (creative or inv:contains_item("main", dye))) then + unifieddyes.player_selected_dye[player_name] = dye + unifieddyes.show_airbrush_form(player) + end + end + end +end) + +minetest.register_tool("unifieddyes:airbrush", { + description = S("Dye Airbrush"), + inventory_image = "unifieddyes_airbrush.png", + use_texture_alpha = true, + tool_capabilities = { + full_punch_interval=0.1, + }, + range = 12, + on_use = unifieddyes.on_airbrush, + on_place = function(itemstack, placer, pointed_thing) + local keys = placer:get_player_control() + local player_name = placer:get_player_name() + local pos = minetest.get_pointed_thing_position(pointed_thing) + local node + local def + + if pos then node = minetest.get_node(pos) end + if node then def = minetest.registered_items[node.name] end + + unifieddyes.player_last_right_clicked[player_name] = {pos = pos, node = node, def = def} + + if not keys.aux1 then + unifieddyes.show_airbrush_form(placer) + elseif keys.aux1 then + if not pos or not def then return end + local newcolor = unifieddyes.color_to_name(node.param2, def) + + if newcolor and string.find(def.paramtype2, "color") then + minetest.chat_send_player(player_name, "*** Switching to "..newcolor.." for the airbrush, to match that node.") + unifieddyes.player_current_dye[player_name] = "dye:"..newcolor + else + minetest.chat_send_player(player_name, "*** That node is uncolored.") + end + elseif def.on_rightclick then + return def.on_rightclick(pos, node, placer, itemstack, pointed_thing) + end + end +}) diff --git a/unifieddyes/aliases.lua b/unifieddyes/aliases.lua new file mode 100644 index 0000000..785eb58 --- /dev/null +++ b/unifieddyes/aliases.lua @@ -0,0 +1,23 @@ +minetest.register_alias("dye:light_red", "dye:pink") +minetest.register_alias("dye:medium_orange", "dye:brown") + +minetest.register_alias("unifieddyes:black", "dye:black") +minetest.register_alias("unifieddyes:dark_grey", "dye:dark_grey") +minetest.register_alias("unifieddyes:grey", "dye:grey") +minetest.register_alias("unifieddyes:light_grey", "dye:light_grey") +minetest.register_alias("unifieddyes:white", "dye:white") + +minetest.register_alias("unifieddyes:grey_0", "dye:black") +minetest.register_alias("unifieddyes:grey_4", "dye:dark_grey") +minetest.register_alias("unifieddyes:grey_8", "dye:grey") +minetest.register_alias("unifieddyes:grey_11", "dye:light_grey") +minetest.register_alias("unifieddyes:grey_15", "dye:white") + +minetest.register_alias("unifieddyes:white_paint", "dye:white") +minetest.register_alias("unifieddyes:titanium_dioxide", "dye:white") +minetest.register_alias("unifieddyes:lightgrey_paint", "dye:light_grey") +minetest.register_alias("unifieddyes:grey_paint", "dye:grey") +minetest.register_alias("unifieddyes:darkgrey_paint", "dye:dark_grey") +minetest.register_alias("unifieddyes:carbon_black", "dye:black") + +minetest.register_alias("unifieddyes:brown", "dye:brown") diff --git a/unifieddyes/api.lua b/unifieddyes/api.lua new file mode 100644 index 0000000..8b4eb14 --- /dev/null +++ b/unifieddyes/api.lua @@ -0,0 +1,494 @@ +-- This file supplies the majority of Unified Dyes' API + +local S = minetest.get_translator("unifieddyes") + +unifieddyes.player_current_dye = {} +unifieddyes.player_selected_dye = {} +unifieddyes.player_last_right_clicked = {} +unifieddyes.palette_has_color = {} +unifieddyes.player_showall = {} + +-- if a node with a palette is placed in the world, +-- but the itemstack used to place it has no palette_index (color byte), +-- create something appropriate to make it officially white. + +minetest.register_on_placenode( + function(pos, newnode, placer, oldnode, itemstack, pointed_thing) + local def = minetest.registered_items[newnode.name] + + if not def + or not def.palette + or def.after_place_node + or not placer then + return false + end + + local param2 + if not string.find(itemstack:to_string(), "palette_index") then + if def.palette == "unifieddyes_palette_extended.png" + and def.paramtype2 == "color" then + param2 = 240 + elseif def.palette == "unifieddyes_palette_colorwallmounted.png" + and def.paramtype2 == "colorwallmounted" then + param2 = newnode.param2 % 8 + elseif string.find(def.palette, "unifieddyes_palette_") + and def.paramtype2 == "colorfacedir" then -- it's a split palette + param2 = newnode.param2 % 32 + end + + if param2 then + minetest.swap_node(pos, {name = newnode.name, param2 = param2}) + end + end + + if def.palette ~= "" then + minetest.get_meta(pos):set_int("palette_index", param2 or 240) + end + end +) + +-- The complementary function: strip-off the color if the node being dug is still white/neutral + +local function move_item(item, pos, inv, digger, fix_color) + if not (digger and digger:is_player()) then return end + local creative = creative_mode or minetest.check_player_privs(digger, "creative") + item = unifieddyes.fix_bad_color_info(item, fix_color) + if inv:room_for_item("main", item) + and (not creative or not inv:contains_item("main", item, true)) then + inv:add_item("main", item) + elseif not creative then + minetest.item_drop(ItemStack(item), digger, pos) + end + minetest.remove_node(pos) +end + +function unifieddyes.on_dig(pos, node, digger) + if not digger then return end + local playername = digger:get_player_name() + if minetest.is_protected(pos, playername) then + minetest.record_protection_violation(pos, playername) + return + end + + local oldparam2 = minetest.get_node(pos).param2 + local def = minetest.registered_items[node.name] + local fix_color + + if def.paramtype2 == "color" and oldparam2 == 240 and def.palette == "unifieddyes_palette_extended.png" then + fix_color = 240 + elseif def.paramtype2 == "color" and oldparam2 == 0 and def.palette == "unifieddyes_palette_extended.png" then + fix_color = 0 + elseif def.paramtype2 == "colorwallmounted" and math.floor(oldparam2 / 8) == 0 and def.palette == "unifieddyes_palette_colorwallmounted.png" then + fix_color = 0 + elseif def.paramtype2 == "colorfacedir" and math.floor(oldparam2 / 32) == 0 and string.find(def.palette, "unifieddyes_palette_") then + fix_color = 0 + end + + local inv = digger:get_inventory() + if fix_color then + move_item(node.name, pos, inv, digger, fix_color) + else + return minetest.node_dig(pos, node, digger) + end +end + +-- just stubs to keep old mods from crashing when expecting auto-coloring +-- or getting back the dye on dig. + +function unifieddyes.recolor_on_place(foo) +end + +function unifieddyes.after_dig_node(foo) +end + +-- This helper function creates multiple copies of the passed node, +-- for the split palette - one per hue, plus grey - and assigns +-- proper palettes and other attributes + +function unifieddyes.generate_split_palette_nodes(name, def, drop) + for _, color in ipairs(unifieddyes.HUES_WITH_GREY) do + local def2 = table.copy(def) + local desc_color = string.gsub(string.upper(string.sub(color, 1, 1))..string.sub(color, 2), "_", " ") + if string.sub(def2.description, -1) == ")" then + def2.description = string.sub(def2.description, 1, -2)..", "..desc_color.." shades)" + else + def2.description = def2.description.."("..desc_color.." shades)" + end + def2.palette = "unifieddyes_palette_"..color.."s.png" + def2.paramtype2 = "colorfacedir" + def2.groups.ud_param2_colorable = 1 + + if drop then + def2.drop = { + items = { + {items = {drop.."_"..color}, inherit_color = true }, + } + } + end + + minetest.register_node(":"..name.."_"..color, def2) + end +end + +-- This helper function creates a colored itemstack + +function unifieddyes.fix_bad_color_info(item, paletteidx) + local stack=minetest.itemstring_with_color(item, paletteidx) + return string.gsub(stack, "u0001color", "u0001palette_index") +end + +function unifieddyes.make_colored_itemstack(item, palette, color) + local paletteidx = unifieddyes.getpaletteidx(color, palette) + return unifieddyes.fix_bad_color_info(item, paletteidx), paletteidx +end + +-- these helper functions register all of the recipes needed to create colored +-- nodes with any of the dyes supported by that node's palette. + +local function register_c(craft, h, sat, val) + local hue = (type(h) == "table") and h[1] or h + local color = "" + if val then + if craft.palette == "wallmounted" then + color = val..hue..sat + else + color = val..hue..sat + end + else + color = hue -- if val is nil, then it's grey. + end + + local dye = "dye:"..color + local recipe = minetest.serialize(craft.recipe) + recipe = string.gsub(recipe, "MAIN_DYE", dye) + recipe = string.gsub(recipe, "NEUTRAL_NODE", craft.neutral_node) + local newrecipe = minetest.deserialize(recipe) + + local coutput = craft.output or "" + local output = coutput + if craft.output_prefix then + if craft.palette ~= "split" then + output = craft.output_prefix..color..craft.output_suffix..coutput + else + if hue == "white" or hue == "black" or string.find(hue, "grey") then + output = craft.output_prefix.."grey"..craft.output_suffix..coutput + elseif hue == "pink" then + dye = "dye:light_red" + output = craft.output_prefix.."red"..craft.output_suffix..coutput + else + output = craft.output_prefix..hue..craft.output_suffix..coutput + end + end + end + + local colored_itemstack = + unifieddyes.make_colored_itemstack(output, craft.palette, dye) + + minetest.register_craft({ + output = colored_itemstack, + type = craft.type, + recipe = newrecipe + }) + +end + +function unifieddyes.register_color_craft(craft) + local hues_table = unifieddyes.HUES_EXTENDED + local sats_table = unifieddyes.SATS + local vals_table = unifieddyes.VALS_SPLIT + local greys_table = unifieddyes.GREYS + + if craft.palette == "wallmounted" then + register_c(craft, "green", "", "light_") + register_c(craft, "blue", "", "light_") + hues_table = unifieddyes.HUES_WALLMOUNTED + sats_table = {""} + vals_table = unifieddyes.VALS + elseif craft.palette == "extended" then + vals_table = unifieddyes.VALS_EXTENDED + greys_table = unifieddyes.GREYS_EXTENDED + end + + for _, hue in ipairs(hues_table) do + for _, val in ipairs(vals_table) do + for _, sat in ipairs(sats_table) do + + if sat == "_s50" and val ~= "" and val ~= "medium_" and val ~= "dark_" then break end + register_c(craft, hue, sat, val) + + end + end + end + + for _, grey in ipairs(greys_table) do + register_c(craft, grey) + end + + register_c(craft, "pink") + +end + +-- code borrowed from homedecor +-- call this function to reset the rotation of a "wallmounted" object on place + +function unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing) + local node = minetest.get_node(pos) + local colorbits = node.param2 - (node.param2 % 8) + + local yaw = placer:get_look_horizontal() + local dir = minetest.yaw_to_dir(yaw) -- -1.5) + local pitch = placer:get_look_vertical() + + local fdir = minetest.dir_to_wallmounted(dir) + + if pitch < -(math.pi/8) then + fdir = 0 + elseif pitch > math.pi/8 then + fdir = 1 + end + minetest.swap_node(pos, { name = node.name, param2 = fdir+colorbits }) +end + +-- use this when you have a "wallmounted" node that should never be oriented +-- to floor or ceiling... + +function unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing) + local node = minetest.get_node(pos) + local colorbits = node.param2 - (node.param2 % 8) + local yaw = placer:get_look_horizontal() + local dir = minetest.yaw_to_dir(yaw+1.5) + local fdir = minetest.dir_to_wallmounted(dir) + + minetest.swap_node(pos, { name = node.name, param2 = fdir+colorbits }) +end + +-- ... and use this one to force that kind of node off of floor/ceiling +-- orientation after the screwdriver rotates it. + +function unifieddyes.fix_after_screwdriver_nsew(pos, node, user, mode, new_param2) + local new_fdir = new_param2 % 8 + local color = new_param2 - new_fdir + if new_fdir < 2 then + new_fdir = 2 + minetest.swap_node(pos, { name = node.name, param2 = new_fdir + color }) + return true + end +end + +function unifieddyes.is_buildable_to(placer_name, ...) + for _, pos in ipairs({...}) do + local node = minetest.get_node_or_nil(pos) + local def = node and minetest.registered_nodes[node.name] + if not (def and def.buildable_to) or minetest.is_protected(pos, placer_name) then + return false + end + end + return true +end + +function unifieddyes.get_hsv(name) -- expects a node/item name + local hue = "" + local a,b + for _, i in ipairs(unifieddyes.HUES_EXTENDED) do + a,b = string.find(name, "_"..i[1]) + if a then + hue = i[1] + break + end + end + + if string.find(name, "_light_grey") then hue = "light_grey" + elseif string.find(name, "_lightgrey") then hue = "light_grey" + elseif string.find(name, "_dark_grey") then hue = "dark_grey" + elseif string.find(name, "_darkgrey") then hue = "dark_grey" + elseif string.find(name, "_grey") then hue = "grey" + elseif string.find(name, "_white") then hue = "white" + elseif string.find(name, "_black") then hue = "black" + end + + local sat = "" + if string.find(name, "_s50") then sat = "_s50" end + + local val = "" + if string.find(name, "dark_") then val = "dark_" end + if string.find(name, "medium_") then val = "medium_" end + if string.find(name, "light_") then val = "light_" end + + return hue, sat, val +end + +-- code partially borrowed from cheapie's plasticbox mod + +-- in the function below, color is just a color string, while +-- palette_type can be: +-- +-- "extended" = 256 color palette +-- "split" = 200 color palette split into pieces for colorfacedir +-- "wallmounted" = 32-color abridged palette + +function unifieddyes.getpaletteidx(color, palette_type) + + local origcolor = color + + if string.sub(color,1,4) == "dye:" then + color = string.sub(color,5,-1) + elseif string.sub(color,1,12) == "unifieddyes:" then + color = string.sub(color,13,-1) + else + return + end + + if palette_type == "wallmounted" then + if unifieddyes.gpidx_grayscale_wallmounted[color] then + return (unifieddyes.gpidx_grayscale_wallmounted[color] * 8), 0 + end + elseif palette_type == "split" then + if unifieddyes.gpidx_grayscale[color] then + return (unifieddyes.gpidx_grayscale[color] * 32), 0 + end + elseif palette_type == "extended" then + if unifieddyes.gpidx_grayscale_extended[color] then + return unifieddyes.gpidx_grayscale_extended[color]+240, 0 + end + end + + local shade = "" -- assume full + if string.sub(color,1,6) == "faint_" then + shade = "faint" + color = string.sub(color,7,-1) + elseif string.sub(color,1,7) == "pastel_" then + shade = "pastel" + color = string.sub(color,8,-1) + elseif string.sub(color,1,6) == "light_" then + shade = "light" + color = string.sub(color,7,-1) + elseif string.sub(color,1,7) == "bright_" then + shade = "bright" + color = string.sub(color,8,-1) + elseif string.sub(color,1,7) == "medium_" then + shade = "medium" + color = string.sub(color,8,-1) + elseif string.sub(color,1,5) == "dark_" then + shade = "dark" + color = string.sub(color,6,-1) + end + if string.sub(color,-4,-1) == "_s50" then + shade = shade.."s50" + color = string.sub(color,1,-5) + end + + if palette_type == "wallmounted" then + if color == "green" and shade == "light" then return 48,3 + elseif color == "brown" then return 17,1 + elseif color == "pink" then return 56,7 + elseif color == "blue" and shade == "light" then return 40,5 + elseif unifieddyes.gpidx_hues_wallmounted[color] and unifieddyes.gpidx_shades_wallmounted[shade] then + return (unifieddyes.gpidx_shades_wallmounted[shade] * 64 + unifieddyes.gpidx_hues_wallmounted[color] * 8), unifieddyes.gpidx_hues_wallmounted[color] + end + else + if color == "brown" then + color = "orange" + shade = "medium" + elseif color == "pink" then + color = "red" + shade = "light" + end + if palette_type == "split" then -- it's colorfacedir + if unifieddyes.gpidx_hues_extended[color] and unifieddyes.gpidx_shades_split[shade] then + return (unifieddyes.gpidx_shades_split[shade] * 32), unifieddyes.gpidx_hues_extended[color]+1 + end + elseif palette_type == "extended" then + if unifieddyes.gpidx_hues_extended[color] and unifieddyes.gpidx_shades_extended[shade] then + return (unifieddyes.gpidx_hues_extended[color] + unifieddyes.gpidx_shades_extended[shade]*24), unifieddyes.gpidx_hues_extended[color] + end + end + end +end + +function unifieddyes.get_color_from_dye_name(name) + if name == "dye:black" then + return "000000" + elseif name == "dye:white" then + return "ffffff" + end + local item = minetest.registered_items[name] + if not item then return end + local inv_image = item.inventory_image + if not inv_image then return end + return string.match(inv_image,"colorize:#(......):200") +end + +-- get a node's dye color based on its palette and param2 + +function unifieddyes.color_to_name(param2, def) + if not param2 or not def or not def.palette then return end + + if def.palette == "unifieddyes_palette_extended.png" then + local color = param2 + + local v = 0 + local s = 1 + if color < 24 then v = 1 + elseif color > 23 and color < 48 then v = 2 + elseif color > 47 and color < 72 then v = 3 + elseif color > 71 and color < 96 then v = 4 + elseif color > 95 and color < 120 then v = 5 + elseif color > 119 and color < 144 then v = 5 s = 2 + elseif color > 143 and color < 168 then v = 6 + elseif color > 167 and color < 192 then v = 6 s = 2 + elseif color > 191 and color < 216 then v = 7 + elseif color > 215 and color < 240 then v = 7 s = 2 + end + + if color > 239 then + if color == 240 then return "white" + elseif color == 244 then return "light_grey" + elseif color == 247 then return "grey" + elseif color == 251 then return "dark_grey" + elseif color == 255 then return "black" + else return "grey_"..15-(color-240) + end + else + local h = color - math.floor(color/24)*24 + return unifieddyes.VALS_EXTENDED[v]..unifieddyes.HUES_EXTENDED[h+1][1]..unifieddyes.SATS[s] + end + + elseif def.palette == "unifieddyes_palette_colorwallmounted.png" then + local color = math.floor(param2 / 8) + if color == 0 then return "white" + elseif color == 1 then return "light_grey" + elseif color == 2 then return "grey" + elseif color == 3 then return "dark_grey" + elseif color == 4 then return "black" + elseif color == 5 then return "light_blue" + elseif color == 6 then return "light_green" + elseif color == 7 then return "pink" + end + local v = math.floor(color/8) + local h = color - v * 8 + return unifieddyes.VALS[v]..unifieddyes.HUES_WALLMOUNTED[h+1] + + elseif string.find(def.palette, "unifieddyes_palette") then -- it's the split palette + -- palette names in this mode are always "unifieddyes_palette_COLORs.png" + + local s = string.sub(def.palette, 21) + local color = string.sub(s, 1, string.find(s, "s.png")-1) + + local v = math.floor(param2/32) + if color ~= "grey" then + if v == 0 then return "faint_"..color + elseif v == 1 then return color + elseif v == 2 then return color.."_s50" + elseif v == 3 then return "light_"..color + elseif v == 4 then return "medium_"..color + elseif v == 5 then return "medium_"..color.."_s50" + elseif v == 6 then return "dark_"..color + elseif v == 7 then return "dark_"..color.."_s50" + end + else + if v > 0 and v < 6 then return unifieddyes.GREYS[v] + else return "white" + end + end + end +end diff --git a/unifieddyes/color-tables.lua b/unifieddyes/color-tables.lua new file mode 100644 index 0000000..12eaa32 --- /dev/null +++ b/unifieddyes/color-tables.lua @@ -0,0 +1,237 @@ + +-- the names of the various colors here came from http://www.procato.com/rgb+index/ + +unifieddyes.HUES_EXTENDED = { + { "red", 0xff, 0x00, 0x00 }, + { "vermilion", 0xff, 0x40, 0x00 }, + { "orange", 0xff, 0x80, 0x00 }, + { "amber", 0xff, 0xbf, 0x00 }, + { "yellow", 0xff, 0xff, 0x00 }, + { "lime", 0xbf, 0xff, 0x00 }, + { "chartreuse", 0x80, 0xff, 0x00 }, + { "harlequin", 0x40, 0xff, 0x00 }, + { "green", 0x00, 0xff, 0x00 }, + { "malachite", 0x00, 0xff, 0x40 }, + { "spring", 0x00, 0xff, 0x80 }, + { "turquoise", 0x00, 0xff, 0xbf }, + { "cyan", 0x00, 0xff, 0xff }, + { "cerulean", 0x00, 0xbf, 0xff }, + { "azure", 0x00, 0x80, 0xff }, + { "sapphire", 0x00, 0x40, 0xff }, + { "blue", 0x00, 0x00, 0xff }, + { "indigo", 0x40, 0x00, 0xff }, + { "violet", 0x80, 0x00, 0xff }, + { "mulberry", 0xbf, 0x00, 0xff }, + { "magenta", 0xff, 0x00, 0xff }, + { "fuchsia", 0xff, 0x00, 0xbf }, + { "rose", 0xff, 0x00, 0x80 }, + { "crimson", 0xff, 0x00, 0x40 } +} + +unifieddyes.HUES_WITH_GREY = {} + +for _,i in ipairs(unifieddyes.HUES_EXTENDED) do + table.insert(unifieddyes.HUES_WITH_GREY, i[1]) +end +table.insert(unifieddyes.HUES_WITH_GREY, "grey") + +unifieddyes.HUES_WALLMOUNTED = { + "red", + "orange", + "yellow", + "green", + "cyan", + "blue", + "violet", + "magenta" +} + +unifieddyes.SATS = { + "", + "_s50" +} + +unifieddyes.VALS = { + "", + "medium_", + "dark_" +} + +unifieddyes.VALS_SPLIT = { + "faint_", + "light_", + "", + "medium_", + "dark_" +} + +unifieddyes.VALS_EXTENDED = { + "faint_", + "pastel_", + "light_", + "bright_", + "", + "medium_", + "dark_" +} + +unifieddyes.GREYS = { + "white", + "light_grey", + "grey", + "dark_grey", + "black" +} + +unifieddyes.GREYS_EXTENDED = table.copy(unifieddyes.GREYS) + +for i = 1, 14 do + if i ~= 0 and i ~= 4 and i ~= 8 and i ~= 11 and i ~= 15 then + table.insert(unifieddyes.GREYS_EXTENDED, "grey_"..i) + end +end + +local default_dyes = { + "black", + "blue", + "brown", + "cyan", + "dark_green", + "dark_grey", + "green", + "grey", + "magenta", + "orange", + "pink", + "red", + "violet", + "white", + "yellow" +} + +-- reverse lookups for getpaletteidx() + +unifieddyes.gpidx_aliases = { + ["pink"] = "light_red", + ["brown"] = "medium_orange", + ["azure"] = "light_blue" +} + +unifieddyes.gpidx_grayscale = { + ["white"] = 1, + ["light_grey"] = 2, + ["grey"] = 3, + ["dark_grey"] = 4, + ["black"] = 5, +} + +unifieddyes.gpidx_grayscale_extended = { + ["white"] = 0, + ["grey_14"] = 1, + ["grey_13"] = 2, + ["grey_12"] = 3, + ["light_grey"] = 4, + ["grey_11"] = 4, + ["grey_10"] = 5, + ["grey_9"] = 6, + ["grey_8"] = 7, + ["grey"] = 7, + ["grey_7"] = 8, + ["grey_6"] = 9, + ["grey_5"] = 10, + ["grey_4"] = 11, + ["dark_grey"] = 11, + ["grey_3"] = 12, + ["grey_2"] = 13, + ["grey_1"] = 14, + ["black"] = 15, +} + +unifieddyes.gpidx_grayscale_wallmounted = { + ["white"] = 0, + ["light_grey"] = 1, + ["grey"] = 2, + ["dark_grey"] = 3, + ["black"] = 4, +} + +unifieddyes.gpidx_hues_extended = { + ["red"] = 0, + ["vermilion"] = 1, + ["orange"] = 2, + ["amber"] = 3, + ["yellow"] = 4, + ["lime"] = 5, + ["chartreuse"] = 6, + ["harlequin"] = 7, + ["green"] = 8, + ["malachite"] = 9, + ["spring"] = 10, + ["aqua"] = 10, + ["turquoise"] = 11, + ["cyan"] = 12, + ["cerulean"] = 13, + ["azure"] = 14, + ["skyblue"] = 14, + ["sapphire"] = 15, + ["blue"] = 16, + ["indigo"] = 17, + ["violet"] = 18, + ["mulberry"] = 19, + ["magenta"] = 20, + ["fuchsia"] = 21, + ["rose"] = 22, + ["redviolet"] = 22, + ["crimson"] = 23, +} + +unifieddyes.gpidx_hues_wallmounted = { + ["red"] = 0, + ["orange"] = 1, + ["yellow"] = 2, + ["green"] = 3, + ["cyan"] = 4, + ["blue"] = 5, + ["violet"] = 6, + ["magenta"] = 7 +} + +unifieddyes.gpidx_shades = { + [""] = 1, + ["s50"] = 2, + ["light"] = 3, + ["medium"] = 4, + ["mediums50"] = 5, + ["dark"] = 6, + ["darks50"] = 7, +} + +unifieddyes.gpidx_shades_split = { + ["faint"] = 0, + [""] = 1, + ["s50"] = 2, + ["light"] = 3, + ["medium"] = 4, + ["mediums50"] = 5, + ["dark"] = 6, + ["darks50"] = 7, +} + +unifieddyes.gpidx_shades_extended = { + ["faint"] = 0, + ["pastel"] = 1, + ["light"] = 2, + ["bright"] = 3, + [""] = 4, + ["s50"] = 5, + ["medium"] = 6, + ["mediums50"] = 7, + ["dark"] = 8, + ["darks50"] = 9 +} + +unifieddyes.gpidx_shades_wallmounted = { + [""] = 1, + ["medium"] = 2, + ["dark"] = 3 +} diff --git a/unifieddyes/depends.txt b/unifieddyes/depends.txt deleted file mode 100644 index b08c42c..0000000 --- a/unifieddyes/depends.txt +++ /dev/null @@ -1,4 +0,0 @@ -default -dye -intllib? - diff --git a/unifieddyes/description.txt b/unifieddyes/description.txt deleted file mode 100644 index ef5380e..0000000 --- a/unifieddyes/description.txt +++ /dev/null @@ -1 +0,0 @@ -Unified Dyes expands the standard dye set from 15 to 90 colors. diff --git a/unifieddyes/dyes-crafting.lua b/unifieddyes/dyes-crafting.lua new file mode 100644 index 0000000..2c11c41 --- /dev/null +++ b/unifieddyes/dyes-crafting.lua @@ -0,0 +1,309 @@ +-- crafting! + +-- Generate all dyes that are not part of the default minetest_game dyes mod + +local S = minetest.get_translator("unifieddyes") + +for _, h in ipairs(unifieddyes.HUES_EXTENDED) do + local hue = h[1] + local r = h[2] + local g = h[3] + local b = h[4] + + for v = 0, 6 do + local val = unifieddyes.VALS_EXTENDED[v+1] + + local factor = 40 + if v > 3 then factor = 75 end + + local r2 = math.max(math.min(r + (4-v)*factor, 255), 0) + local g2 = math.max(math.min(g + (4-v)*factor, 255), 0) + local b2 = math.max(math.min(b + (4-v)*factor, 255), 0) + + -- full-sat color + + local desc = hue:gsub("%a", string.upper, 1).." Dye" + + if val ~= "" then + desc = val:sub(1, -2):gsub("%a", string.upper, 1) .." "..desc + end + + local color = string.format("%02x", r2)..string.format("%02x", g2)..string.format("%02x", b2) + if minetest.registered_items["dye:"..val..hue] then + minetest.override_item("dye:"..val..hue, { + inventory_image = "unifieddyes_dye.png^[colorize:#"..color..":200", + }) + else + if (val..hue) ~= "medium_orange" + and (val..hue) ~= "light_red" then + minetest.register_craftitem(":dye:"..val..hue, { + description = S(desc), + inventory_image = "unifieddyes_dye.png^[colorize:#"..color..":200", + groups = { dye=1, not_in_creative_inventory=1 }, + }) + end + end + minetest.register_alias("unifieddyes:"..val..hue, "dye:"..val..hue) + + if v > 3 then -- also register the low-sat version + + local pr = 0.299 + local pg = 0.587 + local pb = 0.114 + + local p = math.sqrt(r2*r2*pr + g2*g2*pg + b2*b2*pb) + local r3 = math.floor(p+(r2-p)*0.5) + local g3 = math.floor(p+(g2-p)*0.5) + local b3 = math.floor(p+(b2-p)*0.5) + + local color = string.format("%02x", r3)..string.format("%02x", g3)..string.format("%02x", b3) + + minetest.register_craftitem(":dye:"..val..hue.."_s50", { + description = S(desc.." (low saturation)"), + inventory_image = "unifieddyes_dye.png^[colorize:#"..color..":200", + groups = { dye=1, not_in_creative_inventory=1 }, + }) + minetest.register_alias("unifieddyes:"..val..hue.."_s50", "dye:"..val..hue.."_s50") + end + end +end + +-- register the greyscales too :P + +for y = 1, 14 do -- colors 0 and 15 are black and white, default dyes + + if y ~= 4 and y ~= 8 and y~= 11 then -- don't register the three greys, they're done separately. + + local rgb = string.format("%02x", y*17)..string.format("%02x", y*17)..string.format("%02x", y*17) + local name = "grey_"..y + local desc = "Grey Dye #"..y + + minetest.register_craftitem(":dye:"..name, { + description = S(desc), + inventory_image = "unifieddyes_dye.png^[colorize:#"..rgb..":200", + groups = { dye=1, not_in_creative_inventory=1 }, + }) + minetest.register_alias("unifieddyes:"..name, "dye:"..name) + end +end + +minetest.override_item("dye:grey", { + inventory_image = "unifieddyes_dye.png^[colorize:#888888:200", +}) + +minetest.override_item("dye:dark_grey", { + inventory_image = "unifieddyes_dye.png^[colorize:#444444:200", +}) + +minetest.register_craftitem(":dye:light_grey", { + description = S("Light grey Dye"), + inventory_image = "unifieddyes_dye.png^[colorize:#cccccc:200", + groups = { dye=1, not_in_creative_inventory=1 }, +}) + +-- build a table of color <-> palette associations to reduce the need for +-- realtime lookups with getpaletteidx() + +for _, palette in ipairs({"extended", "split", "wallmounted"}) do + local palette2 = palette + + for i in ipairs(unifieddyes.SATS) do + local sat = (palette == "wallmounted") and "" or unifieddyes.SATS[i] + for _, hue in ipairs(unifieddyes.HUES_EXTENDED) do + for _, val in ipairs(unifieddyes.VALS_EXTENDED) do + local color = val..hue[1]..sat + if unifieddyes.getpaletteidx("dye:"..color, palette2) then + unifieddyes.palette_has_color[palette.."_"..color] = true + end + end + end + end + + for y = 0, 15 do + local grey = "grey_"..y + + if y == 0 then grey = "black" + elseif y == 4 then grey = "dark_grey" + elseif y == 8 then grey = "grey" + elseif y == 11 then grey = "light_grey" + elseif y == 15 then grey = "white" + end + if unifieddyes.getpaletteidx("dye:"..grey, palette2) then + unifieddyes.palette_has_color[palette.."_"..grey] = true + end + end +end + +unifieddyes.palette_has_color["wallmounted_light_red"] = true + +unifieddyes.base_color_crafts = { + { "red", "flowers:rose", nil, nil, nil, nil, 4 }, + { "vermilion", "dye:red", "dye:orange", nil, nil, nil, 3 }, + { "orange", "flowers:tulip", nil, nil, nil, nil, 4 }, + { "orange", "dye:red", "dye:yellow", nil, nil, nil, 2 }, + { "amber", "dye:orange", "dye:yellow", nil, nil, nil, 2 }, + { "yellow", "flowers:dandelion_yellow", nil, nil, nil, nil, 4 }, + { "lime", "dye:yellow", "dye:chartreuse", nil, nil, nil, 2 }, + { "lime", "dye:yellow", "dye:yellow", "dye:green", nil, nil, 3 }, + { "chartreuse", "dye:yellow", "dye:green", nil, nil, nil, 2 }, + { "harlequin", "dye:chartreuse", "dye:green", nil, nil, nil, 2 }, + { "harlequin", "dye:yellow", "dye:green", "dye:green", nil, nil, 3 }, + { "green", "default:cactus", nil, nil, nil, nil, 4 }, + { "green", "dye:yellow", "dye:blue", nil, nil, nil, 2 }, + { "malachite", "dye:green", "dye:spring", nil, nil, nil, 2 }, + { "malachite", "dye:green", "dye:green", "dye:cyan", nil, nil, 3 }, + { "malachite", "dye:green", "dye:green", "dye:green", "dye:blue", nil, 4 }, + { "spring", "dye:green", "dye:cyan", nil, nil, nil, 2 }, + { "spring", "dye:green", "dye:green", "dye:blue", nil, nil, 3 }, + { "turquoise", "dye:spring", "dye:cyan", nil, nil, nil, 2 }, + { "turquoise", "dye:green", "dye:cyan", "dye:cyan", nil, nil, 3 }, + { "turquoise", "dye:green", "dye:green", "dye:green", "dye:blue", "dye:blue", 5 }, + { "cyan", "dye:green", "dye:blue", nil, nil, nil, 2 }, + { "cerulean", "dye:cyan", "dye:azure", nil, nil, nil, 2 }, + { "cerulean", "dye:cyan", "dye:cyan", "dye:blue", nil, nil, 3 }, + { "cerulean", "dye:green", "dye:green", "dye:blue", "dye:blue", "dye:blue", 5 }, + { "azure", "dye:cyan", "dye:blue", nil, nil, nil, 2 }, + { "azure", "dye:green", "dye:blue", "dye:blue", nil, nil, 3 }, + { "sapphire", "dye:azure", "dye:blue", nil, nil, nil, 2 }, + { "sapphire", "dye:cyan", "dye:blue", "dye:blue", nil, nil, 3 }, + { "sapphire", "dye:green", "dye:blue", "dye:blue", "dye:blue", nil, 4 }, + { "blue", "flowers:geranium", nil, nil, nil, nil, 4 }, + { "indigo", "dye:blue", "dye:violet", nil, nil, nil, 2 }, + { "violet", "flowers:viola", nil, nil, nil, nil, 4 }, + { "violet", "dye:blue", "dye:magenta", nil, nil, nil, 2 }, + { "mulberry", "dye:violet", "dye:magenta", nil, nil, nil, 2 }, + { "mulberry", "dye:violet", "dye:blue", "dye:red", nil, nil, 3 }, + { "magenta", "dye:blue", "dye:red", nil, nil, nil, 2 }, + { "fuchsia", "dye:magenta", "dye:rose", nil, nil, nil, 2 }, + { "fuchsia", "dye:blue", "dye:red", "dye:rose", nil, nil, 3 }, + { "fuchsia", "dye:red", "dye:violet", nil, nil, nil, 2 }, + { "rose", "dye:magenta", "dye:red", nil, nil, nil, 2 }, + { "rose", "dye:red", "dye:red", "dye:blue", nil, nil, 3 }, + { "crimson", "dye:rose", "dye:red", nil, nil, nil, 2 }, + { "crimson", "dye:magenta", "dye:red", "dye:red", nil, nil, 3 }, + { "crimson", "dye:red", "dye:red", "dye:red", "dye:blue", nil, 4 }, + + { "black", "default:coal_lump", nil, nil, nil, nil, 4 }, + { "white", "flowers:dandelion_white", nil, nil, nil, nil, 4 }, +} + +unifieddyes.shade_crafts = { + { "faint_", "", "dye:white", "dye:white", "dye:white", 4 }, + { "pastel_", "", "dye:white", "dye:white", nil, 3 }, + { "light_", "", "dye:white", nil, nil, 2 }, + { "bright_", "", "color", "dye:white", nil, 3 }, + { "", "_s50", "dye:light_grey", nil, nil, 2 }, + { "", "_s50", "dye:black", "dye:white", "dye:white", 3 }, + { "medium_", "", "dye:black", nil, nil, 2 }, + { "medium_", "_s50", "dye:grey", nil, nil, 2 }, + { "medium_", "_s50", "dye:black", "dye:white", nil, 3 }, + { "dark_", "", "dye:black", "dye:black", nil, 3 }, + { "dark_", "_s50", "dye:dark_grey", nil, nil, 2 }, + { "dark_", "_s50", "dye:black", "dye:black", "dye:white", 4 }, +} + +for _,i in ipairs(unifieddyes.base_color_crafts) do + local color = i[1] + local yield = i[7] + + minetest.register_craft( { + type = "shapeless", + output = "dye:"..color.." "..yield, + recipe = { + i[2], + i[3], + i[4], + i[5], + i[6], + }, + }) + + for _,j in ipairs(unifieddyes.shade_crafts) do + local firstdye = j[3] + if firstdye == "color" then firstdye = "dye:"..color end + + -- ignore black, white, anything containing the word "grey" + + if color ~= "black" and color ~= "white" and not string.find(color, "grey") then + + minetest.register_craft( { + type = "shapeless", + output = "dye:"..j[1]..color..j[2].." "..j[6], + recipe = { + "dye:"..color, + firstdye, + j[4], + j[5] + }, + }) + end + end +end + +-- greys + +unifieddyes.greymixes = { + { 1, "dye:black", "dye:black", "dye:black", "dye:dark_grey", 4 }, + { 2, "dye:black", "dye:black", "dye:dark_grey", nil, 3 }, + { 3, "dye:black", "dye:dark_grey", nil, nil, 2 }, + { 4, "dye:white", "dye:black", "dye:black", nil, 3 }, + { 5, "dye:dark_grey", "dye:dark_grey", "dye:grey", nil, 3 }, + { 6, "dye:dark_grey", "dye:grey", nil, nil, 2 }, + { 7, "dye:dark_grey", "dye:grey", "dye:grey", nil, 3 }, + { 8, "dye:white", "dye:black", nil, nil, 2 }, + { 9, "dye:grey", "dye:grey", "dye:light_grey", nil, 3 }, + { 10, "dye:grey", "dye:light_grey", "dye:light_grey", nil, 3 }, + { 11, "dye:white", "dye:white", "dye:black", nil, 3 }, + { 12, "dye:light_grey", "dye:light_grey", "dye:white", nil, 3 }, + { 13, "dye:light_grey", "dye:white", nil, nil, 2 }, + { 14, "dye:white", "dye:white", "dye:light_grey", nil, 3 }, +} + +for _, i in ipairs(unifieddyes.greymixes) do + local shade = i[1] + local dye1 = i[2] + local dye2 = i[3] + local dye3 = i[4] + local dye4 = i[5] + local yield = i[6] + local color = "grey_"..shade + if shade == 4 then + color = "dark_grey" + elseif shade == 8 then + color = "grey" + elseif shade == 11 then + color = "light_grey" + end + + minetest.register_craft( { + type = "shapeless", + output = "dye:"..color.." "..yield, + recipe = { + dye1, + dye2, + dye3, + dye4, + }, + }) +end + +-- other crafts +-- we can't make dark orange anymore because brown/medium orange conflicts + +minetest.register_craft( { + type = "shapeless", + output = "dye:dark_orange", + recipe = { + "dye:brown", + "dye:brown" + }, +}) + +minetest.register_craft( { + output = "unifieddyes:airbrush", + recipe = { + { "basic_materials:brass_ingot", "", "basic_materials:plastic_sheet" }, + { "", "default:steel_ingot", "" }, + { "", "", "default:steel_ingot" } + }, +}) diff --git a/unifieddyes/init.lua b/unifieddyes/init.lua index b692810..a8e5092 100644 --- a/unifieddyes/init.lua +++ b/unifieddyes/init.lua @@ -2,12 +2,12 @@ Unified Dyes -This mod provides an extension to the Minetest 0.4.x dye system +This mod provides an extension to the Minetest dye system ============================================================================== -Copyright (C) 2012-2013, Vanessa Ezekowitz -Email: vanessaezekowitz@gmail.com +Copyright (C) 2012-2013, Vanessa Dannenberg +Email: vanessa.e.dannenberg@gmail.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -33,1499 +33,13 @@ unifieddyes = {} local creative_mode = minetest.settings:get_bool("creative_mode") --- Boilerplate to support localized strings if intllib mod is installed. -local S -if minetest.get_modpath("intllib") then - S = intllib.Getter() -else - S = function(s) return s end -end - --- the names of the various colors here came from http://www.procato.com/rgb+index/ - -unifieddyes.HUES_EXTENDED = { - { "red", 0xff, 0x00, 0x00 }, - { "vermilion", 0xff, 0x40, 0x00 }, - { "orange", 0xff, 0x80, 0x00 }, - { "amber", 0xff, 0xbf, 0x00 }, - { "yellow", 0xff, 0xff, 0x00 }, - { "lime", 0xbf, 0xff, 0x00 }, - { "chartreuse", 0x80, 0xff, 0x00 }, - { "harlequin", 0x40, 0xff, 0x00 }, - { "green", 0x00, 0xff, 0x00 }, - { "malachite", 0x00, 0xff, 0x40 }, - { "spring", 0x00, 0xff, 0x80 }, - { "turquoise", 0x00, 0xff, 0xbf }, - { "cyan", 0x00, 0xff, 0xff }, - { "cerulean", 0x00, 0xbf, 0xff }, - { "azure", 0x00, 0x80, 0xff }, - { "sapphire", 0x00, 0x40, 0xff }, - { "blue", 0x00, 0x00, 0xff }, - { "indigo", 0x40, 0x00, 0xff }, - { "violet", 0x80, 0x00, 0xff }, - { "mulberry", 0xbf, 0x00, 0xff }, - { "magenta", 0xff, 0x00, 0xff }, - { "fuchsia", 0xff, 0x00, 0xbf }, - { "rose", 0xff, 0x00, 0x80 }, - { "crimson", 0xff, 0x00, 0x40 } -} - -unifieddyes.HUES_WITH_GREY = {} - -for _,i in ipairs(unifieddyes.HUES_EXTENDED) do - table.insert(unifieddyes.HUES_WITH_GREY, i[1]) -end -table.insert(unifieddyes.HUES_WITH_GREY, "grey") - -unifieddyes.HUES_WALLMOUNTED = { - "red", - "orange", - "yellow", - "green", - "cyan", - "blue", - "violet", - "magenta" -} - -unifieddyes.SATS = { - "", - "_s50" -} - -unifieddyes.VALS = { - "", - "medium_", - "dark_" -} - -unifieddyes.VALS_SPLIT = { - "faint_", - "light_", - "", - "medium_", - "dark_" -} - -unifieddyes.VALS_EXTENDED = { - "faint_", - "pastel_", - "light_", - "bright_", - "", - "medium_", - "dark_" -} - -unifieddyes.GREYS = { - "white", - "light_grey", - "grey", - "dark_grey", - "black" -} - -unifieddyes.GREYS_EXTENDED = table.copy(unifieddyes.GREYS) - -for i = 1, 14 do - if i ~= 0 and i ~= 4 and i ~= 8 and i ~= 11 and i ~= 15 then - table.insert(unifieddyes.GREYS_EXTENDED, "grey_"..i) - end -end - -local default_dyes = { - "black", - "blue", - "brown", - "cyan", - "dark_green", - "dark_grey", - "green", - "grey", - "magenta", - "orange", - "pink", - "red", - "violet", - "white", - "yellow" -} - -unifieddyes.player_current_dye = {} -unifieddyes.player_selected_dye = {} -unifieddyes.player_last_right_clicked = {} -unifieddyes.palette_has_color = {} -unifieddyes.player_showall = {} - --- if a node with a palette is placed in the world, --- but the itemstack used to place it has no palette_index (color byte), --- create something appropriate to make it officially white. - -minetest.register_on_placenode( - function(pos, newnode, placer, oldnode, itemstack, pointed_thing) - local def = minetest.registered_items[newnode.name] - - if not def - or not def.palette - or def.after_place_node then - return false - end - - if not string.find(itemstack:to_string(), "palette_index") then - local param2 - local color = 0 - - if def.palette == "unifieddyes_palette_extended.png" - and def.paramtype2 == "color" then - param2 = 240 - color = 240 - elseif def.palette == "unifieddyes_palette_colorwallmounted.png" - and def.paramtype2 == "colorwallmounted" then - param2 = newnode.param2 % 8 - elseif string.find(def.palette, "unifieddyes_palette_") - and def.paramtype2 == "colorfacedir" then -- it's a split palette - param2 = newnode.param2 % 32 - end - - if param2 then - minetest.swap_node(pos, {name = newnode.name, param2 = param2}) - minetest.get_meta(pos):set_int("palette_index", color) - end - end - end -) - --- just stubs to keep old mods from crashing when expecting auto-coloring --- or getting back the dye on dig. - -function unifieddyes.recolor_on_place(foo) -end - -function unifieddyes.after_dig_node(foo) -end - --- This helper function creates multiple copies of the passed node, --- for the split palette - one per hue, plus grey - and assigns --- proper palettes and other attributes - -function unifieddyes.generate_split_palette_nodes(name, def, drop) - for _, color in ipairs(unifieddyes.HUES_WITH_GREY) do - local def2 = table.copy(def) - local desc_color = string.gsub(string.upper(string.sub(color, 1, 1))..string.sub(color, 2), "_", " ") - if string.sub(def2.description, -1) == ")" then - def2.description = string.sub(def2.description, 1, -2)..", "..desc_color.." shades)" - else - def2.description = def2.description.."("..desc_color.." shades)" - end - def2.palette = "unifieddyes_palette_"..color.."s.png" - def2.paramtype2 = "colorfacedir" - def2.groups.ud_param2_colorable = 1 - - if drop then - def2.drop = { - items = { - {items = {drop.."_"..color}, inherit_color = true }, - } - } - end - - minetest.register_node(":"..name.."_"..color, def2) - end -end - --- This helper function creates a colored itemstack - -function unifieddyes.make_colored_itemstack(item, palette, color) - local paletteidx = unifieddyes.getpaletteidx(color, palette) - local stack = ItemStack(item) - stack:get_meta():set_int("palette_index", paletteidx) - return stack:to_string(),paletteidx -end - --- these helper functions register all of the recipes needed to create colored --- nodes with any of the dyes supported by that node's palette. - -local function register_c(craft, h, sat, val) - local hue = (type(h) == "table") and h[1] or h - local color = "" - if val then - if craft.palette == "wallmounted" then - color = val..hue..sat - else - color = val..hue..sat - end - else - color = hue -- if val is nil, then it's grey. - end - - local dye = "dye:"..color - local recipe = minetest.serialize(craft.recipe) - recipe = string.gsub(recipe, "MAIN_DYE", dye) - recipe = string.gsub(recipe, "NEUTRAL_NODE", craft.neutral_node) - local newrecipe = minetest.deserialize(recipe) - - local coutput = craft.output or "" - local output = coutput - if craft.output_prefix then - if craft.palette ~= "split" then - output = craft.output_prefix..color..craft.output_suffix..coutput - else - if hue == "white" or hue == "black" or string.find(hue, "grey") then - output = craft.output_prefix.."grey"..craft.output_suffix..coutput - elseif hue == "pink" then - dye = "dye:light_red" - output = craft.output_prefix.."red"..craft.output_suffix..coutput - else - output = craft.output_prefix..hue..craft.output_suffix..coutput - end - end - end - - local colored_itemstack = - unifieddyes.make_colored_itemstack(output, craft.palette, dye) - - minetest.register_craft({ - output = colored_itemstack, - type = craft.type, - recipe = newrecipe - }) - -end - -function unifieddyes.register_color_craft(craft) - local hues_table = unifieddyes.HUES_EXTENDED - local sats_table = unifieddyes.SATS - local vals_table = unifieddyes.VALS_SPLIT - local greys_table = unifieddyes.GREYS - - if craft.palette == "wallmounted" then - register_c(craft, "green", "", "light_") - register_c(craft, "blue", "", "light_") - hues_table = unifieddyes.HUES_WALLMOUNTED - sats_table = {""} - vals_table = unifieddyes.VALS - elseif craft.palette == "extended" then - vals_table = unifieddyes.VALS_EXTENDED - greys_table = unifieddyes.GREYS_EXTENDED - end - - for _, hue in ipairs(hues_table) do - for _, val in ipairs(vals_table) do - for _, sat in ipairs(sats_table) do - - if sat == "_s50" and val ~= "" and val ~= "medium_" and val ~= "dark_" then break end - register_c(craft, hue, sat, val) - - end - end - end - - for _, grey in ipairs(greys_table) do - register_c(craft, grey) - end - - register_c(craft, "pink") - -end - --- code borrowed from homedecor --- call this function to reset the rotation of a "wallmounted" object on place - -function unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing) - local node = minetest.get_node(pos) - local colorbits = node.param2 - (node.param2 % 8) - - local yaw = placer:get_look_horizontal() - local dir = minetest.yaw_to_dir(yaw) -- -1.5) - local pitch = placer:get_look_vertical() - - local fdir = minetest.dir_to_wallmounted(dir) - - if pitch < -(math.pi/8) then - fdir = 0 - elseif pitch > math.pi/8 then - fdir = 1 - end - minetest.swap_node(pos, { name = node.name, param2 = fdir+colorbits }) -end - --- use this when you have a "wallmounted" node that should never be oriented --- to floor or ceiling... - -function unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing) - local node = minetest.get_node(pos) - local colorbits = node.param2 - (node.param2 % 8) - local yaw = placer:get_look_horizontal() - local dir = minetest.yaw_to_dir(yaw+1.5) - local fdir = minetest.dir_to_wallmounted(dir) - - minetest.swap_node(pos, { name = node.name, param2 = fdir+colorbits }) -end - --- ... and use this one to force that kind of node off of floor/ceiling --- orientation after the screwdriver rotates it. - -function unifieddyes.fix_after_screwdriver_nsew(pos, node, user, mode, new_param2) - local new_fdir = new_param2 % 8 - local color = new_param2 - new_fdir - if new_fdir < 2 then - new_fdir = 2 - minetest.swap_node(pos, { name = node.name, param2 = new_fdir + color }) - return true - end -end - -function unifieddyes.is_buildable_to(placer_name, ...) - for _, pos in ipairs({...}) do - local node = minetest.get_node_or_nil(pos) - local def = node and minetest.registered_nodes[node.name] - if not (def and def.buildable_to) or minetest.is_protected(pos, placer_name) then - return false - end - end - return true -end - -function unifieddyes.get_hsv(name) -- expects a node/item name - local hue = "" - local a,b - for _, i in ipairs(unifieddyes.HUES_EXTENDED) do - a,b = string.find(name, "_"..i[1]) - if a then - hue = i[1] - break - end - end - - if string.find(name, "_light_grey") then hue = "light_grey" - elseif string.find(name, "_lightgrey") then hue = "light_grey" - elseif string.find(name, "_dark_grey") then hue = "dark_grey" - elseif string.find(name, "_darkgrey") then hue = "dark_grey" - elseif string.find(name, "_grey") then hue = "grey" - elseif string.find(name, "_white") then hue = "white" - elseif string.find(name, "_black") then hue = "black" - end - - local sat = "" - if string.find(name, "_s50") then sat = "_s50" end - - local val = "" - if string.find(name, "dark_") then val = "dark_" end - if string.find(name, "medium_") then val = "medium_" end - if string.find(name, "light_") then val = "light_" end - - return hue, sat, val -end - --- code partially borrowed from cheapie's plasticbox mod - --- in the function below, color is just a color string, while --- palette_type can be: --- --- "extended" = 256 color palette --- "split" = 200 color palette split into pieces for colorfacedir --- "wallmounted" = 32-color abridged palette - - -function unifieddyes.getpaletteidx(color, palette_type) - - local origcolor = color - local aliases = { - ["pink"] = "light_red", - ["brown"] = "medium_orange", - ["azure"] = "light_blue" - } - - local grayscale = { - ["white"] = 1, - ["light_grey"] = 2, - ["grey"] = 3, - ["dark_grey"] = 4, - ["black"] = 5, - } - - local grayscale_extended = { - ["white"] = 0, - ["grey_14"] = 1, - ["grey_13"] = 2, - ["grey_12"] = 3, - ["light_grey"] = 4, - ["grey_11"] = 4, - ["grey_10"] = 5, - ["grey_9"] = 6, - ["grey_8"] = 7, - ["grey"] = 7, - ["grey_7"] = 8, - ["grey_6"] = 9, - ["grey_5"] = 10, - ["grey_4"] = 11, - ["dark_grey"] = 11, - ["grey_3"] = 12, - ["grey_2"] = 13, - ["grey_1"] = 14, - ["black"] = 15, - } - - local grayscale_wallmounted = { - ["white"] = 0, - ["light_grey"] = 1, - ["grey"] = 2, - ["dark_grey"] = 3, - ["black"] = 4, - } - - local hues_extended = { - ["red"] = 0, - ["vermilion"] = 1, - ["orange"] = 2, - ["amber"] = 3, - ["yellow"] = 4, - ["lime"] = 5, - ["chartreuse"] = 6, - ["harlequin"] = 7, - ["green"] = 8, - ["malachite"] = 9, - ["spring"] = 10, - ["aqua"] = 10, - ["turquoise"] = 11, - ["cyan"] = 12, - ["cerulean"] = 13, - ["azure"] = 14, - ["skyblue"] = 14, - ["sapphire"] = 15, - ["blue"] = 16, - ["indigo"] = 17, - ["violet"] = 18, - ["mulberry"] = 19, - ["magenta"] = 20, - ["fuchsia"] = 21, - ["rose"] = 22, - ["redviolet"] = 22, - ["crimson"] = 23, - } - - local hues_wallmounted = { - ["red"] = 0, - ["orange"] = 1, - ["yellow"] = 2, - ["green"] = 3, - ["cyan"] = 4, - ["blue"] = 5, - ["violet"] = 6, - ["magenta"] = 7 - } - - local shades = { - [""] = 1, - ["s50"] = 2, - ["light"] = 3, - ["medium"] = 4, - ["mediums50"] = 5, - ["dark"] = 6, - ["darks50"] = 7, - } - - local shades_split = { - ["faint"] = 0, - [""] = 1, - ["s50"] = 2, - ["light"] = 3, - ["medium"] = 4, - ["mediums50"] = 5, - ["dark"] = 6, - ["darks50"] = 7, - } - - local shades_extended = { - ["faint"] = 0, - ["pastel"] = 1, - ["light"] = 2, - ["bright"] = 3, - [""] = 4, - ["s50"] = 5, - ["medium"] = 6, - ["mediums50"] = 7, - ["dark"] = 8, - ["darks50"] = 9 - } - - local shades_wallmounted = { - [""] = 1, - ["medium"] = 2, - ["dark"] = 3 - } - - if string.sub(color,1,4) == "dye:" then - color = string.sub(color,5,-1) - elseif string.sub(color,1,12) == "unifieddyes:" then - color = string.sub(color,13,-1) - else - return - end - - if palette_type == "wallmounted" then - if grayscale_wallmounted[color] then - return (grayscale_wallmounted[color] * 8), 0 - end - elseif palette_type == "split" then - if grayscale[color] then - return (grayscale[color] * 32), 0 - end - elseif palette_type == "extended" then - if grayscale_extended[color] then - return grayscale_extended[color]+240, 0 - end - end - - local shade = "" -- assume full - if string.sub(color,1,6) == "faint_" then - shade = "faint" - color = string.sub(color,7,-1) - elseif string.sub(color,1,7) == "pastel_" then - shade = "pastel" - color = string.sub(color,8,-1) - elseif string.sub(color,1,6) == "light_" then - shade = "light" - color = string.sub(color,7,-1) - elseif string.sub(color,1,7) == "bright_" then - shade = "bright" - color = string.sub(color,8,-1) - elseif string.sub(color,1,7) == "medium_" then - shade = "medium" - color = string.sub(color,8,-1) - elseif string.sub(color,1,5) == "dark_" then - shade = "dark" - color = string.sub(color,6,-1) - end - if string.sub(color,-4,-1) == "_s50" then - shade = shade.."s50" - color = string.sub(color,1,-5) - end - - if palette_type == "wallmounted" then - if color == "green" and shade == "light" then return 48,3 - elseif color == "brown" then return 17,1 - elseif color == "pink" then return 56,7 - elseif color == "blue" and shade == "light" then return 40,5 - elseif hues_wallmounted[color] and shades_wallmounted[shade] then - return (shades_wallmounted[shade] * 64 + hues_wallmounted[color] * 8), hues_wallmounted[color] - end - else - if color == "brown" then - color = "orange" - shade = "medium" - elseif color == "pink" then - color = "red" - shade = "light" - end - if palette_type == "split" then -- it's colorfacedir - if hues_extended[color] and shades_split[shade] then - return (shades_split[shade] * 32), hues_extended[color]+1 - end - elseif palette_type == "extended" then - if hues_extended[color] and shades_extended[shade] then - return (hues_extended[color] + shades_extended[shade]*24), hues_extended[color] - end - end - end -end - -function unifieddyes.get_color_from_dye_name(name) - if name == "dye:black" then - return "000000" - elseif name == "dye:white" then - return "ffffff" - end - local item = minetest.registered_items[name] - if not item then return end - local inv_image = item.inventory_image - if not inv_image then return end - return string.match(inv_image,"colorize:#(......):200") -end - --- punch-to-recolor using the airbrush - -function unifieddyes.on_airbrush(itemstack, player, pointed_thing) - local player_name = player:get_player_name() - local painting_with = nil - - if unifieddyes.player_current_dye[player_name] then - painting_with = unifieddyes.player_current_dye[player_name] - end - - if not painting_with then - minetest.chat_send_player(player_name, "*** You need to set a color first.") - minetest.chat_send_player(player_name, "*** Right-click any random node to open the color selector,") - minetest.chat_send_player(player_name, "*** or shift+right-click a colorized node to use its color.") - minetest.chat_send_player(player_name, "*** Be sure to click \"Accept\", or the color you select will be ignored.") - return - end - - local pos = minetest.get_pointed_thing_position(pointed_thing) - if not pos then - local look_angle = player:get_look_vertical() - if look_angle > -1.55 then - minetest.chat_send_player(player_name, "*** No node selected") - else - local hexcolor = unifieddyes.get_color_from_dye_name(painting_with) - local r = tonumber(string.sub(hexcolor,1,2),16) - local g = tonumber(string.sub(hexcolor,3,4),16) - local b = tonumber(string.sub(hexcolor,5,6),16) - player:set_sky({r=r,g=g,b=b,a=255},"plain") - end - return - end - - local node = minetest.get_node(pos) - local def = minetest.registered_items[node.name] - if not def then return end - - if minetest.is_protected(pos, player_name) then - minetest.chat_send_player(player_name, "*** Sorry, someone else owns that node.") - return - end - - if not (def.groups and def.groups.ud_param2_colorable and def.groups.ud_param2_colorable > 0) then - minetest.chat_send_player(player_name, "*** That node can't be colored.") - return - end - - local palette = nil - local fdir = 0 - if not def or not def.palette then - minetest.chat_send_player(player_name, "*** That node can't be colored -- it's either undefined or has no palette.") - return - elseif def.palette == "unifieddyes_palette_extended.png" then - palette = "extended" - elseif def.palette == "unifieddyes_palette_colorwallmounted.png" then - palette = "wallmounted" - fdir = node.param2 % 8 - elseif def.palette ~= "unifieddyes_palette_extended.png" - and def.palette ~= "unifieddyes_palette_colorwallmounted.png" - and string.find(def.palette, "unifieddyes_palette_") then - palette = "split" - fdir = node.param2 % 32 - else - minetest.chat_send_player(player_name, "*** That node can't be colored -- it has an invalid color mode.") - return - end - - local idx, hue = unifieddyes.getpaletteidx(painting_with, palette) - local inv = player:get_inventory() - if (not creative or not creative.is_enabled_for(player_name)) and not inv:contains_item("main", painting_with) then - local suff = "" - if not idx then - suff = " Besides, "..string.sub(painting_with, 5).." can't be applied to that node." - end - minetest.chat_send_player(player_name, "*** You're in survival mode, and you're out of "..string.sub(painting_with, 5).."."..suff) - return - end - - if not idx then - minetest.chat_send_player(player_name, "*** "..string.sub(painting_with, 5).." can't be applied to that node.") - return - end - - local oldidx = node.param2 - fdir - local name = def.airbrush_replacement_node or node.name - - if palette == "split" then - - local modname = string.sub(name, 1, string.find(name, ":")-1) - local nodename2 = string.sub(name, string.find(name, ":")+1) - local oldcolor = "snozzberry" - local newcolor = "razzberry" -- intentionally misspelled ;-) - - if def.ud_color_start and def.ud_color_end then - oldcolor = string.sub(node.name, def.ud_color_start, def.ud_color_end) - newcolor = string.sub(painting_with, 5) - else - if hue ~= 0 then - newcolor = unifieddyes.HUES_EXTENDED[hue][1] - else - newcolor = "grey" - end - - if def.airbrush_replacement_node then - oldcolor = "grey" - else - local s = string.sub(def.palette, 21) - oldcolor = string.sub(s, 1, string.find(s, "s.png")-1) - end - end - - name = modname..":"..string.gsub(nodename2, oldcolor, newcolor) - - if not minetest.registered_items[name] then - minetest.chat_send_player(player_name, "*** "..string.sub(painting_with, 5).." can't be applied to that node.") - return - end - elseif idx == oldidx then - return - end - minetest.swap_node(pos, {name = name, param2 = fdir + idx}) - if not creative or not creative.is_enabled_for(player_name) then - inv:remove_item("main", painting_with) - return - end -end - --- get a node's dye color based on its palette and param2 - -function unifieddyes.color_to_name(param2, def) - if not param2 or not def or not def.palette then return end - - if def.palette == "unifieddyes_palette_extended.png" then - local color = param2 - - local v = 0 - local s = 1 - if color < 24 then v = 1 - elseif color > 23 and color < 48 then v = 2 - elseif color > 47 and color < 72 then v = 3 - elseif color > 71 and color < 96 then v = 4 - elseif color > 95 and color < 120 then v = 5 - elseif color > 119 and color < 144 then v = 5 s = 2 - elseif color > 143 and color < 168 then v = 6 - elseif color > 167 and color < 192 then v = 6 s = 2 - elseif color > 191 and color < 216 then v = 7 - elseif color > 215 and color < 240 then v = 7 s = 2 - end - - if color > 239 then - if color == 240 then return "white" - elseif color == 244 then return "light_grey" - elseif color == 247 then return "grey" - elseif color == 251 then return "dark_grey" - elseif color == 255 then return "black" - else return "grey_"..15-(color-240) - end - else - local h = color - math.floor(color/24)*24 - return unifieddyes.VALS_EXTENDED[v]..unifieddyes.HUES_EXTENDED[h+1][1]..unifieddyes.SATS[s] - end - - elseif def.palette == "unifieddyes_palette_colorwallmounted.png" then - local color = math.floor(param2 / 8) - if color == 0 then return "white" - elseif color == 1 then return "light_grey" - elseif color == 2 then return "grey" - elseif color == 3 then return "dark_grey" - elseif color == 4 then return "black" - elseif color == 5 then return "light_blue" - elseif color == 6 then return "light_green" - elseif color == 7 then return "pink" - end - local v = math.floor(color/8) - local h = color - v * 8 - return unifieddyes.VALS[v]..unifieddyes.HUES_WALLMOUNTED[h+1] - - elseif string.find(def.palette, "unifieddyes_palette") then -- it's the split palette - -- palette names in this mode are always "unifieddyes_palette_COLORs.png" - - local s = string.sub(def.palette, 21) - local color = string.sub(s, 1, string.find(s, "s.png")-1) - - local v = math.floor(param2/32) - if color ~= "grey" then - if v == 0 then return "faint_"..color - elseif v == 1 then return color - elseif v == 2 then return color.."_s50" - elseif v == 3 then return "light_"..color - elseif v == 4 then return "medium_"..color - elseif v == 5 then return "medium_"..color.."_s50" - elseif v == 6 then return "dark_"..color - elseif v == 7 then return "dark_"..color.."_s50" - end - else - if v > 0 and v < 6 then return unifieddyes.GREYS[v] - else return "white" - end - end - end -end - -local hps = 0.6 -- horizontal position scale -local vps = 1.3 -- vertical position scale -local vs = 0.1 -- vertical shift/offset - -local color_button_size = ";0.75,0.75;" -local color_square_size = ";0.69,0.69;" - -function unifieddyes.make_readable_color(color) - local s = string.gsub(color, "_", " ") - s = string.gsub(s, "s50", "(low saturation)") - return s -end - -function unifieddyes.make_colored_square(hexcolor, colorname, showall, creative, painting_with, nodepalette, hp, v2, selindic, inv, explist) - - local dye = "dye:"..colorname - - local overlay = "" - local colorize = minetest.formspec_escape("^[colorize:#"..hexcolor..":255") - - if not creative and inv:contains_item("main", dye) then - overlay = "^unifieddyes_onhand_overlay.png" - end - - local unavail_overlay = "" - if not showall and not unifieddyes.palette_has_color[nodepalette.."_"..colorname] - or (explist and not explist[colorname]) then - if overlay == "" then - unavail_overlay = "^unifieddyes_unavailable_overlay.png" - else - unavail_overlay = "^unifieddyes_onhand_unavailable_overlay.png" - end - end - - local tooltip = "tooltip["..colorname..";".. - unifieddyes.make_readable_color(colorname).. - "\n(dye:"..colorname..")]" - - if dye == painting_with then - overlay = "^unifieddyes_select_overlay.png" - selindic = "unifieddyes_white_square.png"..colorize..overlay..unavail_overlay.."]"..tooltip - end - - local form - if unavail_overlay == "" then - form = "image_button[".. - (hp*hps)..","..(v2*vps+vs).. - color_button_size.. - "unifieddyes_white_square.png"..colorize..overlay..unavail_overlay..";".. - colorname..";]".. - tooltip - else - form = "image[".. - (hp*hps)..","..(v2*vps+vs).. - color_square_size.. - "unifieddyes_white_square.png"..colorize..overlay..unavail_overlay.."]".. - tooltip - end - - return form, selindic -end - -function unifieddyes.show_airbrush_form(player) - if not player then return end - - local t = {} - - local player_name = player:get_player_name() - local painting_with = unifieddyes.player_selected_dye[player_name] or unifieddyes.player_current_dye[player_name] - local creative = creative and creative.is_enabled_for(player_name) - local inv = player:get_inventory() - local nodepalette = "extended" - local showall = unifieddyes.player_showall[player_name] - - t[1] = "size[14.5,8.5]label[7,-0.3;Select a color:]" - local selindic = "unifieddyes_select_overlay.png^unifieddyes_question.png]" - - local last_right_click = unifieddyes.player_last_right_clicked[player_name] - if last_right_click then - if last_right_click.def and last_right_click.def.palette then - if last_right_click.def.palette == "unifieddyes_palette_colorwallmounted.png" then - nodepalette = "wallmounted" - elseif last_right_click.def.palette == "unifieddyes_palette_extended.png" then - t[#t+1] = "label[0.5,8.25;(Right-clicked a node that supports all 256 colors, showing them all)]" - showall = true - elseif last_right_click.def.palette ~= "unifieddyes_palette_extended.png" - and last_right_click.def.palette ~= "unifieddyes_palette_colorwallmounted.png" - and string.find(last_right_click.def.palette, "unifieddyes_palette_") then - nodepalette = "split" - end - end - end - - if not last_right_click.def.groups - or not last_right_click.def.groups.ud_param2_colorable - or not last_right_click.def.palette - or not string.find(last_right_click.def.palette, "unifieddyes_palette_") then - t[#t+1] = "label[0.5,8.25;(Right-clicked a node not supported by the Airbrush, showing all colors)]" - end - - local explist = last_right_click.def.explist - - for v = 0, 6 do - local val = unifieddyes.VALS_EXTENDED[v+1] - - local sat = "" - local v2=(v/2) - - for hi, h in ipairs(unifieddyes.HUES_EXTENDED) do - local hue = h[1] - local hp=hi-1 - - local r = h[2] - local g = h[3] - local b = h[4] - - local factor = 40 - if v > 3 then - factor = 75 - v2 = (v-2) - end - - local r2 = math.max(math.min(r + (4-v)*factor, 255), 0) - local g2 = math.max(math.min(g + (4-v)*factor, 255), 0) - local b2 = math.max(math.min(b + (4-v)*factor, 255), 0) - - local hexcolor = string.format("%02x", r2)..string.format("%02x", g2)..string.format("%02x", b2) - local f - f, selindic = unifieddyes.make_colored_square(hexcolor, val..hue..sat, showall, creative, painting_with, nodepalette, hp, v2, selindic, inv, explist) - t[#t+1] = f - end - - if v > 3 then - sat = "_s50" - v2 = (v-1.5) - - for hi, h in ipairs(unifieddyes.HUES_EXTENDED) do - local hue = h[1] - local hp=hi-1 - - local r = h[2] - local g = h[3] - local b = h[4] - - local factor = 75 - - local pr = 0.299 - local pg = 0.587 - local pb = 0.114 - - local r2 = math.max(math.min(r + (4-v)*factor, 255), 0) - local g2 = math.max(math.min(g + (4-v)*factor, 255), 0) - local b2 = math.max(math.min(b + (4-v)*factor, 255), 0) - - local p = math.sqrt(r2*r2*pr + g2*g2*pg + b2*b2*pb) - local r3 = math.floor(p+(r2-p)*0.5) - local g3 = math.floor(p+(g2-p)*0.5) - local b3 = math.floor(p+(b2-p)*0.5) - - local hexcolor = string.format("%02x", r3)..string.format("%02x", g3)..string.format("%02x", b3) - local f - f, selindic = unifieddyes.make_colored_square(hexcolor, val..hue..sat, showall, creative, painting_with, nodepalette, hp, v2, selindic, inv, explist) - t[#t+1] = f - end - end - end - - local v2=5 - for y = 0, 15 do - - local hp=15-y - - local hexgrey = string.format("%02x", y*17)..string.format("%02x", y*17)..string.format("%02x", y*17) - local grey = "grey_"..y - - if y == 0 then grey = "black" - elseif y == 4 then grey = "dark_grey" - elseif y == 8 then grey = "grey" - elseif y == 11 then grey = "light_grey" - elseif y == 15 then grey = "white" - end - - local f - f, selindic = unifieddyes.make_colored_square(hexgrey, grey, showall, creative, painting_with, nodepalette, hp, v2, selindic, inv, explist) - t[#t+1] = f - - end - - if not creative then - t[#t+1] = "image[10," - t[#t+1] = (vps*5.55+vs) - t[#t+1] = color_button_size - t[#t+1] = "unifieddyes_onhand_overlay.png]label[10.7," - t[#t+1] = (vps*5.51+vs) - t[#t+1] = ";Dyes]" - t[#t+1] = "label[10.7," - t[#t+1] = (vps*5.67+vs) - t[#t+1] = ";on hand]" - - end - - t[#t+1] = "image[10," - t[#t+1] = (vps*5+vs) - t[#t+1] = color_button_size - t[#t+1] = selindic - - if painting_with then - t[#t+1] = "label[10.7," - t[#t+1] = (vps*4.90+vs) - t[#t+1] = ";Your selection:]" - t[#t+1] = "label[10.7," - t[#t+1] = (vps*5.07+vs) - t[#t+1] = ";" - t[#t+1] = unifieddyes.make_readable_color(string.sub(painting_with, 5)) - t[#t+1] = "]label[10.7," - t[#t+1] = (vps*5.24+vs) - t[#t+1] = ";(" - t[#t+1] = painting_with - t[#t+1] = ")]" - else - t[#t+1] = "label[10.7," - t[#t+1] = (vps*5.07+vs) - t[#t+1] = ";Your selection]" - end - - t[#t+1] = "button_exit[10.5,8;2,1;cancel;Cancel]button_exit[12.5,8;2,1;accept;Accept]" - - - if last_right_click and last_right_click.def and nodepalette ~= "extended" then - if showall then - t[#t+1] = "button[0,8;2,1;show_avail;Show Available]" - t[#t+1] = "label[2,8.25;(Currently showing all 256 colors)]" - else - t[#t+1] = "button[0,8;2,1;show_all;Show All Colors]" - t[#t+1] = "label[2,8.25;(Currently only showing what the right-clicked node can use)]" - end - end - - minetest.show_formspec(player_name, "unifieddyes:dye_select_form", table.concat(t)) -end - -minetest.register_tool("unifieddyes:airbrush", { - description = S("Dye Airbrush"), - inventory_image = "unifieddyes_airbrush.png", - use_texture_alpha = true, - tool_capabilities = { - full_punch_interval=0.1, - }, - range = 12, - on_use = unifieddyes.on_airbrush, - on_place = function(itemstack, placer, pointed_thing) - local keys = placer:get_player_control() - local player_name = placer:get_player_name() - local pos = minetest.get_pointed_thing_position(pointed_thing) - local node - local def - - if pos then node = minetest.get_node(pos) end - if node then def = minetest.registered_items[node.name] end - - unifieddyes.player_last_right_clicked[player_name] = {pos = pos, node = node, def = def} - - if not keys.sneak then - unifieddyes.show_airbrush_form(placer) - elseif keys.sneak then - - if not pos or not def then return end - local newcolor = unifieddyes.color_to_name(node.param2, def) - - if not newcolor then - minetest.chat_send_player(player_name, "*** That node is uncolored.") - return - end - minetest.chat_send_player(player_name, "*** Switching to "..newcolor.." for the airbrush, to match that node.") - unifieddyes.player_current_dye[player_name] = "dye:"..newcolor - end - end -}) - -minetest.register_craft( { - output = "unifieddyes:airbrush", - recipe = { - { "basic_materials:brass_ingot", "", "basic_materials:plastic_sheet" }, - { "", "default:steel_ingot", "" }, - { "", "", "default:steel_ingot" } - }, -}) - -minetest.register_on_player_receive_fields(function(player, formname, fields) - - if formname == "unifieddyes:dye_select_form" then - - local player_name = player:get_player_name() - local nodepalette = "extended" - local showall = unifieddyes.player_showall[player_name] - - local last_right_click = unifieddyes.player_last_right_clicked[player_name] - if last_right_click and last_right_click.def then - if last_right_click.def.palette then - if last_right_click.def.palette == "unifieddyes_palette_colorwallmounted.png" then - nodepalette = "wallmounted" - elseif last_right_click.def.palette ~= "unifieddyes_palette_extended.png" then - nodepalette = "split" - end - end - end - - if fields.show_all then - unifieddyes.player_showall[player_name] = true - unifieddyes.show_airbrush_form(player) - return - elseif fields.show_avail then - unifieddyes.player_showall[player_name] = false - unifieddyes.show_airbrush_form(player) - return - elseif fields.quit then - if fields.accept then - local dye = unifieddyes.player_selected_dye[player_name] - if not dye then - minetest.chat_send_player(player_name, "*** Clicked \"Accept\", but no color was selected!") - return - elseif not showall - and not unifieddyes.palette_has_color[nodepalette.."_"..string.sub(dye, 5)] then - minetest.chat_send_player(player_name, "*** Clicked \"Accept\", but the selected color can't be used on the") - minetest.chat_send_player(player_name, "*** node that was right-clicked (and \"Show All\" wasn't in effect).") - if unifieddyes.player_current_dye[player_name] then - minetest.chat_send_player(player_name, "*** Ignoring it and sticking with "..string.sub(unifieddyes.player_current_dye[player_name], 5)..".") - else - minetest.chat_send_player(player_name, "*** Ignoring it.") - end - return - else - unifieddyes.player_current_dye[player_name] = dye - unifieddyes.player_selected_dye[player_name] = nil - minetest.chat_send_player(player_name, "*** Selected "..string.sub(dye, 5).." for the airbrush.") - return - end - else -- assume "Cancel" or Esc. - unifieddyes.player_selected_dye[player_name] = nil - return - end - else - local s1 = string.sub(minetest.serialize(fields), 11) - local s3 = string.sub(s1,1, string.find(s1, '"')-1) - - local inv = player:get_inventory() - local creative = creative and creative.is_enabled_for(player_name) - local dye = "dye:"..s3 - - if (showall or unifieddyes.palette_has_color[nodepalette.."_"..s3]) and - (minetest.registered_items[dye] and (creative or inv:contains_item("main", dye))) then - unifieddyes.player_selected_dye[player_name] = dye - unifieddyes.show_airbrush_form(player) - end - end - end -end) - --- Generate all dyes that are not part of the default minetest_game dyes mod - -for _, h in ipairs(unifieddyes.HUES_EXTENDED) do - local hue = h[1] - local r = h[2] - local g = h[3] - local b = h[4] - - for v = 0, 6 do - local val = unifieddyes.VALS_EXTENDED[v+1] - - local factor = 40 - if v > 3 then factor = 75 end - - local r2 = math.max(math.min(r + (4-v)*factor, 255), 0) - local g2 = math.max(math.min(g + (4-v)*factor, 255), 0) - local b2 = math.max(math.min(b + (4-v)*factor, 255), 0) - - -- full-sat color - - local desc = hue:gsub("%a", string.upper, 1).." Dye" - - if val ~= "" then - desc = val:sub(1, -2):gsub("%a", string.upper, 1) .." "..desc - end - - local color = string.format("%02x", r2)..string.format("%02x", g2)..string.format("%02x", b2) - if minetest.registered_items["dye:"..val..hue] then - minetest.override_item("dye:"..val..hue, { - inventory_image = "unifieddyes_dye.png^[colorize:#"..color..":200", - }) - else - if (val..hue) ~= "medium_orange" - and (val..hue) ~= "light_red" then - minetest.register_craftitem(":dye:"..val..hue, { - description = S(desc), - inventory_image = "unifieddyes_dye.png^[colorize:#"..color..":200", - groups = { dye=1, not_in_creative_inventory=1 }, - }) - end - end - minetest.register_alias("unifieddyes:"..val..hue, "dye:"..val..hue) - - if v > 3 then -- also register the low-sat version - - local pr = 0.299 - local pg = 0.587 - local pb = 0.114 - - local p = math.sqrt(r2*r2*pr + g2*g2*pg + b2*b2*pb) - local r3 = math.floor(p+(r2-p)*0.5) - local g3 = math.floor(p+(g2-p)*0.5) - local b3 = math.floor(p+(b2-p)*0.5) - - local color = string.format("%02x", r3)..string.format("%02x", g3)..string.format("%02x", b3) - - minetest.register_craftitem(":dye:"..val..hue.."_s50", { - description = S(desc.." (low saturation)"), - inventory_image = "unifieddyes_dye.png^[colorize:#"..color..":200", - groups = { dye=1, not_in_creative_inventory=1 }, - }) - minetest.register_alias("unifieddyes:"..val..hue.."_s50", "dye:"..val..hue.."_s50") - end - end -end - --- register the greyscales too :P - -for y = 1, 14 do -- colors 0 and 15 are black and white, default dyes - - if y ~= 4 and y ~= 8 and y~= 11 then -- don't register the three greys, they're done separately. - - local rgb = string.format("%02x", y*17)..string.format("%02x", y*17)..string.format("%02x", y*17) - local name = "grey_"..y - local desc = "Grey Dye #"..y - - minetest.register_craftitem(":dye:"..name, { - description = S(desc), - inventory_image = "unifieddyes_dye.png^[colorize:#"..rgb..":200", - groups = { dye=1, not_in_creative_inventory=1 }, - }) - minetest.register_alias("unifieddyes:"..name, "dye:"..name) - end -end - -minetest.override_item("dye:grey", { - inventory_image = "unifieddyes_dye.png^[colorize:#888888:200", -}) - -minetest.override_item("dye:dark_grey", { - inventory_image = "unifieddyes_dye.png^[colorize:#444444:200", -}) - -minetest.register_craftitem(":dye:light_grey", { - description = S("Light grey Dye"), - inventory_image = "unifieddyes_dye.png^[colorize:#cccccc:200", - groups = { dye=1, not_in_creative_inventory=1 }, -}) - --- build a table of color <-> palette associations to reduce the need for --- realtime lookups with getpaletteidx() - -for _, palette in ipairs({"extended", "split", "wallmounted"}) do - local palette2 = palette - - for i in ipairs(unifieddyes.SATS) do - local sat = (palette == "wallmounted") and "" or unifieddyes.SATS[i] - for _, hue in ipairs(unifieddyes.HUES_EXTENDED) do - for _, val in ipairs(unifieddyes.VALS_EXTENDED) do - local color = val..hue[1]..sat - if unifieddyes.getpaletteidx("dye:"..color, palette2) then - unifieddyes.palette_has_color[palette.."_"..color] = true - end - end - end - end - - for y = 0, 15 do - local grey = "grey_"..y - - if y == 0 then grey = "black" - elseif y == 4 then grey = "dark_grey" - elseif y == 8 then grey = "grey" - elseif y == 11 then grey = "light_grey" - elseif y == 15 then grey = "white" - end - if unifieddyes.getpaletteidx("dye:"..grey, palette2) then - unifieddyes.palette_has_color[palette.."_"..grey] = true - end - end -end - -unifieddyes.palette_has_color["wallmounted_light_red"] = true - --- crafting! - -unifieddyes.base_color_crafts = { - { "red", "flowers:rose", nil, nil, nil, nil, 4 }, - { "vermilion", "dye:red", "dye:orange", nil, nil, nil, 3 }, - { "orange", "flowers:tulip", nil, nil, nil, nil, 4 }, - { "orange", "dye:red", "dye:yellow", nil, nil, nil, 2 }, - { "amber", "dye:orange", "dye:yellow", nil, nil, nil, 2 }, - { "yellow", "flowers:dandelion_yellow", nil, nil, nil, nil, 4 }, - { "lime", "dye:yellow", "dye:chartreuse", nil, nil, nil, 2 }, - { "lime", "dye:yellow", "dye:yellow", "dye:green", nil, nil, 3 }, - { "chartreuse", "dye:yellow", "dye:green", nil, nil, nil, 2 }, - { "harlequin", "dye:chartreuse", "dye:green", nil, nil, nil, 2 }, - { "harlequin", "dye:yellow", "dye:green", "dye:green", nil, nil, 3 }, - { "green", "default:cactus", nil, nil, nil, nil, 4 }, - { "green", "dye:yellow", "dye:blue", nil, nil, nil, 2 }, - { "malachite", "dye:green", "dye:spring", nil, nil, nil, 2 }, - { "malachite", "dye:green", "dye:green", "dye:cyan", nil, nil, 3 }, - { "malachite", "dye:green", "dye:green", "dye:green", "dye:blue", nil, 4 }, - { "spring", "dye:green", "dye:cyan", nil, nil, nil, 2 }, - { "spring", "dye:green", "dye:green", "dye:blue", nil, nil, 3 }, - { "turquoise", "dye:spring", "dye:cyan", nil, nil, nil, 2 }, - { "turquoise", "dye:green", "dye:cyan", "dye:cyan", nil, nil, 3 }, - { "turquoise", "dye:green", "dye:green", "dye:green", "dye:blue", "dye:blue", 5 }, - { "cyan", "dye:green", "dye:blue", nil, nil, nil, 2 }, - { "cerulean", "dye:cyan", "dye:azure", nil, nil, nil, 2 }, - { "cerulean", "dye:cyan", "dye:cyan", "dye:blue", nil, nil, 3 }, - { "cerulean", "dye:green", "dye:green", "dye:blue", "dye:blue", "dye:blue", 5 }, - { "azure", "dye:cyan", "dye:blue", nil, nil, nil, 2 }, - { "azure", "dye:green", "dye:blue", "dye:blue", nil, nil, 3 }, - { "sapphire", "dye:azure", "dye:blue", nil, nil, nil, 2 }, - { "sapphire", "dye:cyan", "dye:blue", "dye:blue", nil, nil, 3 }, - { "sapphire", "dye:green", "dye:blue", "dye:blue", "dye:blue", nil, 4 }, - { "blue", "flowers:geranium", nil, nil, nil, nil, 4 }, - { "indigo", "dye:blue", "dye:violet", nil, nil, nil, 2 }, - { "violet", "flowers:viola", nil, nil, nil, nil, 4 }, - { "violet", "dye:blue", "dye:magenta", nil, nil, nil, 2 }, - { "mulberry", "dye:violet", "dye:magenta", nil, nil, nil, 2 }, - { "mulberry", "dye:violet", "dye:blue", "dye:red", nil, nil, 3 }, - { "magenta", "dye:blue", "dye:red", nil, nil, nil, 2 }, - { "fuchsia", "dye:magenta", "dye:rose", nil, nil, nil, 2 }, - { "fuchsia", "dye:blue", "dye:red", "dye:rose", nil, nil, 3 }, - { "fuchsia", "dye:red", "dye:violet", nil, nil, nil, 2 }, - { "rose", "dye:magenta", "dye:red", nil, nil, nil, 2 }, - { "rose", "dye:red", "dye:red", "dye:blue", nil, nil, 3 }, - { "crimson", "dye:rose", "dye:red", nil, nil, nil, 2 }, - { "crimson", "dye:magenta", "dye:red", "dye:red", nil, nil, 3 }, - { "crimson", "dye:red", "dye:red", "dye:red", "dye:blue", nil, 4 }, - - { "black", "default:coal_lump", nil, nil, nil, nil, 4 }, - { "white", "flowers:dandelion_white", nil, nil, nil, nil, 4 }, -} - -unifieddyes.shade_crafts = { - { "faint_", "", "dye:white", "dye:white", "dye:white", 4 }, - { "pastel_", "", "dye:white", "dye:white", nil, 3 }, - { "light_", "", "dye:white", nil, nil, 2 }, - { "bright_", "", "color", "dye:white", nil, 3 }, - { "", "_s50", "dye:light_grey", nil, nil, 2 }, - { "", "_s50", "dye:black", "dye:white", "dye:white", 3 }, - { "medium_", "", "dye:black", nil, nil, 2 }, - { "medium_", "_s50", "dye:grey", nil, nil, 2 }, - { "medium_", "_s50", "dye:black", "dye:white", nil, 3 }, - { "dark_", "", "dye:black", "dye:black", nil, 3 }, - { "dark_", "_s50", "dye:dark_grey", nil, nil, 2 }, - { "dark_", "_s50", "dye:black", "dye:black", "dye:white", 4 }, -} - -for _,i in ipairs(unifieddyes.base_color_crafts) do - local color = i[1] - local yield = i[7] - - minetest.register_craft( { - type = "shapeless", - output = "dye:"..color.." "..yield, - recipe = { - i[2], - i[3], - i[4], - i[5], - i[6], - }, - }) - - for _,j in ipairs(unifieddyes.shade_crafts) do - local firstdye = j[3] - if firstdye == "color" then firstdye = "dye:"..color end - - -- ignore black, white, anything containing the word "grey" - - if color ~= "black" and color ~= "white" and not string.find(color, "grey") then - - minetest.register_craft( { - type = "shapeless", - output = "dye:"..j[1]..color..j[2].." "..j[6], - recipe = { - "dye:"..color, - firstdye, - j[4], - j[5] - }, - }) - end - end -end - --- greys - -unifieddyes.greymixes = { - { 1, "dye:black", "dye:black", "dye:black", "dye:dark_grey", 4 }, - { 2, "dye:black", "dye:black", "dye:dark_grey", nil, 3 }, - { 3, "dye:black", "dye:dark_grey", nil, nil, 2 }, - { 4, "dye:white", "dye:black", "dye:black", nil, 3 }, - { 5, "dye:dark_grey", "dye:dark_grey", "dye:grey", nil, 3 }, - { 6, "dye:dark_grey", "dye:grey", nil, nil, 2 }, - { 7, "dye:dark_grey", "dye:grey", "dye:grey", nil, 3 }, - { 8, "dye:white", "dye:black", nil, nil, 2 }, - { 9, "dye:grey", "dye:grey", "dye:light_grey", nil, 3 }, - { 10, "dye:grey", "dye:light_grey", "dye:light_grey", nil, 3 }, - { 11, "dye:white", "dye:white", "dye:black", nil, 3 }, - { 12, "dye:light_grey", "dye:light_grey", "dye:white", nil, 3 }, - { 13, "dye:light_grey", "dye:white", nil, nil, 2 }, - { 14, "dye:white", "dye:white", "dye:light_grey", nil, 3 }, -} - -for _, i in ipairs(unifieddyes.greymixes) do - local shade = i[1] - local dye1 = i[2] - local dye2 = i[3] - local dye3 = i[4] - local dye4 = i[5] - local yield = i[6] - local color = "grey_"..shade - if shade == 4 then - color = "dark_grey" - elseif shade == 8 then - color = "grey" - elseif shade == 11 then - color = "light_grey" - end - - minetest.register_craft( { - type = "shapeless", - output = "dye:"..color.." "..yield, - recipe = { - dye1, - dye2, - dye3, - dye4, - }, - }) -end - --- we can't make dark orange anymore because brown/medium orange conflicts - -minetest.register_craft( { - type = "shapeless", - output = "dye:dark_orange", - recipe = { - "dye:brown", - "dye:brown" - }, -}) - --- aliases - -minetest.register_alias("dye:light_red", "dye:pink") -minetest.register_alias("dye:medium_orange", "dye:brown") - -minetest.register_alias("unifieddyes:black", "dye:black") -minetest.register_alias("unifieddyes:dark_grey", "dye:dark_grey") -minetest.register_alias("unifieddyes:grey", "dye:grey") -minetest.register_alias("unifieddyes:light_grey", "dye:light_grey") -minetest.register_alias("unifieddyes:white", "dye:white") - -minetest.register_alias("unifieddyes:grey_0", "dye:black") -minetest.register_alias("unifieddyes:grey_4", "dye:dark_grey") -minetest.register_alias("unifieddyes:grey_8", "dye:grey") -minetest.register_alias("unifieddyes:grey_11", "dye:light_grey") -minetest.register_alias("unifieddyes:grey_15", "dye:white") - -minetest.register_alias("unifieddyes:white_paint", "dye:white") -minetest.register_alias("unifieddyes:titanium_dioxide", "dye:white") -minetest.register_alias("unifieddyes:lightgrey_paint", "dye:light_grey") -minetest.register_alias("unifieddyes:grey_paint", "dye:grey") -minetest.register_alias("unifieddyes:darkgrey_paint", "dye:dark_grey") -minetest.register_alias("unifieddyes:carbon_black", "dye:black") - -minetest.register_alias("unifieddyes:brown", "dye:brown") +local S = minetest.get_translator("unifieddyes") +local modpath=minetest.get_modpath(minetest.get_current_modname()) + +dofile(modpath.."/color-tables.lua") +dofile(modpath.."/api.lua") +dofile(modpath.."/airbrush.lua") +dofile(modpath.."/dyes-crafting.lua") +dofile(modpath.."/aliases.lua") print(S("[UnifiedDyes] Loaded!")) - diff --git a/unifieddyes/locale/de.txt b/unifieddyes/locale/de.txt deleted file mode 100644 index 01d6da4..0000000 --- a/unifieddyes/locale/de.txt +++ /dev/null @@ -1,74 +0,0 @@ -# Translation by Xanthin - -Lime Dye = Gelbgruener Farbstoff (Gelbgruen) -Aqua Dye = Aqua Farbstoff -Sky-blue Dye = Himmelblauer Farbstoff -Red-violet Dye = Rotvioletter Farbstoff -Light Grey Dye = Hellgrauer Farbstoff - -Dark Red Dye (low saturation) = Dunkelroter Farbstoff (geringe Saettigung) -Dark Orange Dye (low saturation) = Dunkeloranger Farbstoff (geringe Saettigung) -Dark Yellow Dye (low saturation) = Dunkelgelber Farbstoff (geringe Saettigung) -Dark Lime Dye (low saturation) = Gelbgruenerlime Farbstoff (geringe Saettigung) -Dark Green Dye (low saturation) = Dunkelgruener Farbstoff (geringe Saettigung) -Dark Aqua Dye (low saturation) = Dunkelaqua Farbstoff (geringe Saettigung) -Dark Cyan Dye (low saturation) = Dunkeltuerkiser Farbstoff (geringe Saettigung) -Dark Sky-blue Dye (low saturation) = Dunkelhimmelblauer Farbstoff (geringe Saettigung) -Dark Blue Dye (low saturation) = Dunkelblauer Farbstoff (geringe Saettigung) -Dark Violet Dye (low saturation) = Dunkelvioletter Farbstoff (geringe Saettigung) -Dark Magenta Dye (low saturation) = Dunkelmagenta Farbstoff (geringe Saettigung) -Dark Red-violet Dye (low saturation) = Dunkelrotvioletter Farbstoff (geringe Saettigung) - -Dark Red Dye = Dunkelroter Farbstoff -Dark Orange Dye = Dunkeloranger Farbstoff -Dark Yellow Dye = Dunkelgelber Farbstoff -Dark Lime Dye = Dunkelgelbgruener Farbstoff -Dark Green Dye = Dunkelgruener Farbstoff -Dark Aqua Dye = Dunkelaqua Farbstoff -Dark Cyan Dye = Dunkeltuerkiser Farbstoff -Dark Sky-blue Dye = Dunkelhimmelblauer Farbstoff -Dark Blue Dye = Dunkelblauer Farbstoff -Dark Violet Dye = Dunkelvioletter Farbstoff -Dark Magenta Dye = Dunkelmagenta Farbstoff -Dark Red-violet Dye = Dunkelrotvioletter Farbstoff - -Medium Red Dye (low saturation) = Mittelroter Farbstoff (geringe Saettigung) -Medium Orange Dye (low saturation) = Mitteloranger Farbstoff (geringe Saettigung) -Medium Yellow Dye (low saturation) = Mittelgelber Farbstoff (geringe Saettigung) -Medium Lime Dye (low saturation) = Mittelgelbgruener Farbstoff (geringe Saettigung) -Medium Green Dye (low saturation) = Mittelgruener Farbstoff (geringe Saettigung) -Medium Aqua Dye (low saturation) = Mittelaqua Farbstoff (geringe Saettigung) -Medium Cyan Dye (low saturation) = Mitteltuerkiser Farbstoff (geringe Saettigung) -Medium Sky-blue Dye (low saturation) = Mittelhimmelblauer Farbstoff (geringe Saettigung) -Medium Blue Dye (low saturation) = Mittelblauer Farbstoff (geringe Saettigung) -Medium Violet Dye (low saturation) = Mittelvioletter Farbstoff (geringe Saettigung) -Medium Magenta Dye (low saturation) = Mittelmagenta Farbstoff (geringe Saettigung) -Medium Red-violet Dye (low saturation) = Mittelrotvioletter Farbstoff (geringe Saettigung) - -Medium Red Dye = Mittelroter Farbstoff -Medium Orange Dye = Mitteloranger Farbstoff -Medium Yellow Dye = Mittelgelber Farbstoff -Medium Lime Dye = Mittelgelbgruener Farbstoff -Medium Green Dye = Mittelgruener Farbstoff -Medium Aqua Dye = Mittelaqua Farbstoff -Medium Cyan Dye = Mitteltuerkiser Farbstoff -Medium Sky-blue = Mittelhimmelblauer Farbstoff -Medium Blue Dye = Mittelblauer Farbstoff -Medium Violet Dye = Mittelvioletter Farbstoff -Medium Magenta Dye = Mittelmagenta Farbstoff -Medium Red-violet Dye = Mittelrotvioletter Farbstoff - -Red Dye (low saturation) = Roter Farbstoff (geringe Saettigung) -Orange Dye (low saturation) = Oranger Farbstoff (geringe Saettigung) -Yellow Dye (low saturation) = Gelber Farbstoff (geringe Saettigung) -Lime Dye (low saturation) = Gelbgruener Farbstoff (geringe Saettigung) -Green Dye (low saturation) = Gruener Farbstoff (geringe Saettigung) -Aqua Dye (low saturation) = Aqua Farbstoff (geringe Saettigung) -Cyan Dye (low saturation) = Tuerkiser Farbstoff (geringe Saettigung) -Sky-blue Dye (low saturation) = Himmelblauer Farbstoff (geringe Saettigung) -Blue Dye (low saturation) = Blauer Farbstoff (geringe Saettigung) -Violet Dye (low saturation) = Violetter Farbstoff (geringe Saettigung) -Magenta Dye (low saturation) = Magenta Farbstoff (geringe Saettigung) lila -Red-violet Dye (low saturation) = Rotvioletter Farbstoff (geringe Saettigung) - -[UnifiedDyes] Loaded! = [UnifiedDyes] geladen! diff --git a/unifieddyes/locale/es.txt b/unifieddyes/locale/es.txt deleted file mode 100644 index 7b46b48..0000000 --- a/unifieddyes/locale/es.txt +++ /dev/null @@ -1,87 +0,0 @@ -# Traducido por Carlos Barraza - -Lime Dye = Colorante Lima -Aqua Dye = Colorante Agua -Sky-blue Dye = Colorante Azul Cielo -Red-violet Dye = Colorante Rojo Violeta -Light Grey Dye = Colorante Gris Claro - -Dark Red Dye (low saturation) = Colorante Rojo Oscuro (baja saturación) -Dark Orange Dye (low saturation) = Colorante Naranja Oscuro (baja saturación) -Dark Yellow Dye (low saturation) = Colorante Amarillo Oscuro (baja saturación) -Dark Lime Dye (low saturation) = Colorante Lima Oscuro (baja saturación) -Dark Green Dye (low saturation) = Colorante Verde Oscuro (baja saturación) -Dark Aqua Dye (low saturation) = Colorante Agua Oscuro (baja saturación) -Dark Cyan Dye (low saturation) = Colorante Cian Oscuro (baja saturación) -Dark Sky-blue Dye (low saturation) = Colorante Azul Cielo Oscuro (baja saturación) -Dark Blue Dye (low saturation) = Colorante Azul Oscuro (baja saturación) -Dark Violet Dye (low saturation) = Colorante Violeta Oscuro (baja saturación) -Dark Magenta Dye (low saturation) = Colorante Magenta Oscuro (baja saturación) -Dark Red-violet Dye (low saturation) = Colorante Rojo Violeta Oscuro (baja saturación) - -Dark Red Dye = Colorante Rojo Oscuro -Dark Orange Dye = Colorante Naranja Oscuro -Dark Yellow Dye = Colorante Amarillo Oscuro -Dark Lime Dye = Colorante Lima Oscuro -Dark Green Dye = Colorante Verde Oscuro -Dark Aqua Dye = Colorante Agua Oscuro -Dark Cyan Dye = Colorante Cian Oscuro -Dark Sky-blue Dye = Colorante Azul Cielo Oscuro -Dark Blue Dye = Colorante Azul Oscuro -Dark Violet Dye = Colorante Violeta Oscuro -Dark Magenta Dye = Colorante Magenta Oscuro -Dark Red-violet Dye = Colorante Rojo Violeta Oscuro - -Medium Red Dye (low saturation) = Colorante Rojo Claro (baja saturación) -Medium Orange Dye (low saturation) = Colorante Naranja Claro (baja saturación) -Medium Yellow Dye (low saturation) = Colorante Amarillo Claro (baja saturación) -Medium Lime Dye (low saturation) = Colorante Lima Claro (baja saturación) -Medium Green Dye (low saturation) = Colorante Verde Claro (baja saturación) -Medium Aqua Dye (low saturation) = Colorante Agua Claro (baja saturación) -Medium Cyan Dye (low saturation) = Colorante Cian Claro (baja saturación) -Medium Sky-blue Dye (low saturation) = Colorante Azul Cielo Claro (baja saturación) -Medium Blue Dye (low saturation) = Colorante Azul Claro (baja saturación) -Medium Violet Dye (low saturation) = Colorante Violeta Claro (baja saturación) -Medium Magenta Dye (low saturation) = Colorante Magenta Claro (baja saturación) -Medium Red-violet Dye (low saturation) = Colorante Rojo Violeta Claro (baja saturación) - -Medium Red Dye = Colorante Rojo Claro -Medium Orange Dye = Colorante Naranja Claro -Medium Yellow Dye = Colorante Amarillo Claro -Medium Lime Dye = Colorante Lima Claro -Medium Green Dye = Colorante Verde Claro -Medium Aqua Dye = Colorante Agua Claro -Medium Cyan Dye = Colorante Cian Claro -Medium Sky-blue = Colorante Azul Cielo Claro -Medium Blue Dye = Colorante Azul Claro -Medium Violet Dye = Colorante Violeta Claro -Medium Magenta Dye = Colorante Magenta Claro -Medium Red-violet Dye = Colorante Rojo Violeta Claro - -Red Dye (low saturation) = Colorante Rojo (baja saturación) -Orange Dye (low saturation) = Colorante Naranja (baja saturación) -Yellow Dye (low saturation) = Colorante Amarillo (baja saturación) -Lime Dye (low saturation) = Colorante Lima (baja saturación) -Green Dye (low saturation) = Colorante Verde (baja saturación) -Aqua Dye (low saturation) = Colorante Agua (baja saturación) -Cyan Dye (low saturation) = Colorante Cian (baja saturación) -Sky-blue Dye (low saturation) = Colorante Azul Cielo (baja saturación) -Blue Dye (low saturation) = Colorante Azul (baja saturación) -Violet Dye (low saturation) = Colorante Violeta (baja saturación) -Magenta Dye (low saturation) = Colorante Magenta (baja saturación) -Red-violet Dye (low saturation) = Colorante Rojo Violeta (baja saturación) - -Red Dye = Colorante Rojo -Orange Dye = Colorante Naranja -Yellow Dye = Colorante Amarillo -Lime Dye = Colorante Lima -Green Dye = Colorante Verde -Aqua Dye = Colorante Agua -Cyan Dye = Colorante Cian -Sky-blue Dye = Colorante Azul Cielo -Blue Dye = Colorante Azul -Violet Dye = Colorante Violeta -Magenta Dye = Colorante Magenta -Red-violet Dye = Colorante Rojo Violeta - -[UnifiedDyes] Loaded! = [ColorantesUnificados] Cargado. diff --git a/unifieddyes/locale/fr.txt b/unifieddyes/locale/fr.txt deleted file mode 100644 index f8e48e2..0000000 --- a/unifieddyes/locale/fr.txt +++ /dev/null @@ -1,87 +0,0 @@ -# Template - -Lime Dye = Teinture citron-vert -Aqua Dye = Teinture aqua -Sky-blue Dye = Teinture bleu ciel -Red-violet Dye = Teinture rouge-violet -Light Grey Dye = Teinture gris clair - -Dark Red Dye (low saturation) = Teinture rouge foncé (basse saturation) -Dark Orange Dye (low saturation) = Teinture orange foncé (basse saturation) -Dark Yellow Dye (low saturation) = Teinture jaune foncé (basse saturation) -Dark Lime Dye (low saturation) = Teinture citron-vert foncé (basse saturation) -Dark Green Dye (low saturation) = Teinture vert foncé (basse saturation) -Dark Aqua Dye (low saturation) = Teinture aqua foncé (basse saturation) -Dark Cyan Dye (low saturation) = Teinture cyan foncé (basse saturation) -Dark Sky-blue Dye (low saturation) = Teinture bleu ciel foncé (basse saturation) -Dark Blue Dye (low saturation) = Teinture bleu foncé (basse saturation) -Dark Violet Dye (low saturation) = Teinture violet foncé (basse saturation) -Dark Magenta Dye (low saturation) = Teinture magenta foncé (basse saturation) -Dark Red-violet Dye (low saturation) = Teinture rouge-violet foncé (basse saturation) - -Dark Red Dye = Teinture rouge foncé -Dark Orange Dye = Teinture orange foncé -Dark Yellow Dye = Teinture jaune foncé -Dark Lime Dye = Teinture citron-vert foncé -Dark Green Dye = Teinture vert foncé -Dark Aqua Dye = Teinture aqua foncé -Dark Cyan Dye = Teinture cyan foncé -Dark Sky-blue Dye = Teinture bleu ciel foncé -Dark Blue Dye = Teinture bleu foncé -Dark Violet Dye = Teinture violet foncé -Dark Magenta Dye = Teinture magenta foncé -Dark Red-violet Dye = Teinture rouge-violet foncé - -Medium Red Dye (low saturation) = Teinture rouge moyen (basse saturation) -Medium Orange Dye (low saturation) = Teinture orange moyen (basse saturation) -Medium Yellow Dye (low saturation) = Teinture jaune moyen (basse saturation) -Medium Lime Dye (low saturation) = Teinture citron-vert moyen (basse saturation) -Medium Green Dye (low saturation) = Teinture vert moyen (basse saturation) -Medium Aqua Dye (low saturation) = Teinture aqua moyen (basse saturation) -Medium Cyan Dye (low saturation) = Teinture cyan moyen (basse saturation) -Medium Sky-blue Dye (low saturation) = Teinture bleu ciel moyen (basse saturation) -Medium Blue Dye (low saturation) = Teinture bleu moyen (basse saturation) -Medium Violet Dye (low saturation) = Teinture violet moyen (basse saturation) -Medium Magenta Dye (low saturation) = Teinture magenta moyen (basse saturation) -Medium Red-violet Dye (low saturation) = Teinture rouge-violet moyen (basse saturation) - -Medium Red Dye = Teinture rouge moyen -Medium Orange Dye = Teinture orange moyen -Medium Yellow Dye = Teinture jaune moyen -Medium Lime Dye = Teinture citron-vert moyen -Medium Green Dye = Teinture vert moyen -Medium Aqua Dye = Teinture aqua moyen -Medium Cyan Dye = Teinture cyan moyen -Medium Sky-blue = Teinture bleu ciel moyen -Medium Blue Dye = Teinture bleu moyen -Medium Violet Dye = Teinture violet moyen -Medium Magenta Dye = Teinture magenta moyen -Medium Red-violet Dye = Teinture rouge-violet moyen - -Red Dye (low saturation) = Teinture rouge (basse saturation) -Orange Dye (low saturation) = Teinture orange (basse saturation) -Yellow Dye (low saturation) = Teinture jaune (basse saturation) -Lime Dye (low saturation) = Teinture citron-vert (basse saturation) -Green Dye (low saturation) = Teinture vert (basse saturation) -Aqua Dye (low saturation) = Teinture aqua (basse saturation) -Cyan Dye (low saturation) = Teinture cyan (basse saturation) -Sky-blue Dye (low saturation) = Teinture bleu ciel (basse saturation) -Blue Dye (low saturation) = Teinture bleu (basse saturation) -Violet Dye (low saturation) = Teinture violet (basse saturation) -Magenta Dye (low saturation) = Teinture magenta (basse saturation) -Red-violet Dye (low saturation) = Teinture rouge-violet (basse saturation) - -Red Dye = Teinture rouge -Orange Dye = Teinture orange -Yellow Dye = Teinture jaune -Lime Dye = Teinture citron-vert -Green Dye = Teinture vert -Aqua Dye = Teinture aqua -Cyan Dye = Teinture cyan -Sky-blue Dye = Teinture bleu ciel -Blue Dye = Teinture bleu -Violet Dye = Teinture violet -Magenta Dye = Teinture magenta -Red-violet Dye = Teinture rouge-violet - -[UnifiedDyes] Loaded! = [UnifiedDyes] chargé ! diff --git a/unifieddyes/locale/ms.txt b/unifieddyes/locale/ms.txt deleted file mode 100644 index 9ecf80e..0000000 --- a/unifieddyes/locale/ms.txt +++ /dev/null @@ -1,87 +0,0 @@ -# Malay translation by MuhdNurHidayat - -Lime Dye = Pewarna Hijau Pucuk Pisang -Aqua Dye = Pewarna Akuamarin -Sky-blue Dye = Pewarna Biru Langit -Red-violet Dye = Pewarna Merah Lembayung -Light Grey Dye = Pewarna Kelabu Muda - -Dark Red Dye (low saturation) = Pewarna Merah Tua (penepuan rendah) -Dark Orange Dye (low saturation) = Pewarna Jingga Tua (penepuan rendah) -Dark Yellow Dye (low saturation) = Pewarna Kuning Tua (penepuan rendah) -Dark Lime Dye (low saturation) = Pewarna Hijau Pucuk Pisang Tua (penepuan rendah) -Dark Green Dye (low saturation) = Pewarna Hijau Tua (penepuan rendah) -Dark Aqua Dye (low saturation) = Pewarna Akuamarin Tua (penepuan rendah) -Dark Cyan Dye (low saturation) = Pewarna Sian Tua (penepuan rendah) -Dark Sky-blue Dye (low saturation) = Pewarna Biru Langit Tua (penepuan rendah) -Dark Blue Dye (low saturation) = Pewarna Biru Tua (penepuan rendah) -Dark Violet Dye (low saturation) = Pewarna Lembayung Tua (penepuan rendah) -Dark Magenta Dye (low saturation) = Pewarna Magenta Tua (penepuan rendah) -Dark Red-violet Dye (low saturation) = Pewarna Merah Lembayung Tua (penepuan rendah) - -Dark Red Dye = Pewarna Merah Tua -Dark Orange Dye = Pewarna Jingga Tua -Dark Yellow Dye = Pewarna Kuning Tua -Dark Lime Dye = Pewarna Hijau Pucuk Pisang Tua -Dark Green Dye = Pewarna Hijau Tua -Dark Aqua Dye = Pewarna Akuamarin Tua -Dark Cyan Dye = Pewarna Sian Tua -Dark Sky-blue Dye = Pewarna Biru Langit Tua -Dark Blue Dye = Pewarna Biru Tua -Dark Violet Dye = Pewarna Lembayung Tua -Dark Magenta Dye = Pewarna Magenta Tua -Dark Red-violet Dye = Pewarna Merah Lembayung Tua - -Medium Red Dye (low saturation) = Pewarna Merah Sederhana (penepuan rendah) -Medium Orange Dye (low saturation) = Pewarna Jingga Sederhana (penepuan rendah) -Medium Yellow Dye (low saturation) = Pewarna Kuning Sederhana (penepuan rendah) -Medium Lime Dye (low saturation) = Pewarna Hijau Pucuk Pisang Sederhana (penepuan rendah) -Medium Green Dye (low saturation) = Pewarna Hijau Sederhana (penepuan rendah) -Medium Aqua Dye (low saturation) = Pewarna Akuamarin Sederhana (penepuan rendah) -Medium Cyan Dye (low saturation) = Pewarna Sian Sederhana (penepuan rendah) -Medium Sky-blue Dye (low saturation) = Pewarna Biru Langit Sederhana (penepuan rendah) -Medium Blue Dye (low saturation) = Pewarna Biru Sederhana (penepuan rendah) -Medium Violet Dye (low saturation) = Pewarna Lembayung Sederhana (penepuan rendah) -Medium Magenta Dye (low saturation) = Pewarna Magenta Sederhana (penepuan rendah) -Medium Red-violet Dye (low saturation) = Pewarna Merah Lembayung Sederhana (penepuan rendah) - -Medium Red Dye = Pewarna Merah Sederhana -Medium Orange Dye = Pewarna Jingga Sederhana -Medium Yellow Dye = Pewarna Kuning Sederhana -Medium Lime Dye = Pewarna Hijau Pucuk Pisang Sederhana -Medium Green Dye = Pewarna Hijau Sederhana -Medium Aqua Dye = Pewarna Akuamarin Sederhana -Medium Cyan Dye = Pewarna Sian Sederhana -Medium Sky-blue = Pewarna Biru Langit Sederhana -Medium Blue Dye = Pewarna Biru Sederhana -Medium Violet Dye = Pewarna Lembayung Sederhana -Medium Magenta Dye = Pewarna Magenta Sederhana -Medium Red-violet Dye = Pewarna Merah Lembayung Sederhana - -Red Dye (low saturation) = Pewarna Merah (penepuan rendah) -Orange Dye (low saturation) = Pewarna Jingga (penepuan rendah) -Yellow Dye (low saturation) = Pewarna Kuning (penepuan rendah) -Lime Dye (low saturation) = Pewarna Hijau Pucuk Pisang (penepuan rendah) -Green Dye (low saturation) = Pewarna Hijau (penepuan rendah) -Aqua Dye (low saturation) = Pewarna Akuamarin (penepuan rendah) -Cyan Dye (low saturation) = Pewarna Sian (penepuan rendah) -Sky-blue Dye (low saturation) = Pewarna Biru Langit (penepuan rendah) -Blue Dye (low saturation) = Pewarna Biru (penepuan rendah) -Violet Dye (low saturation) = Pewarna Lembayung (penepuan rendah) -Magenta Dye (low saturation) = Pewarna Magenta (penepuan rendah) -Red-violet Dye (low saturation) = Pewarna Merah Lembayung(penepuan rendah) - -Red Dye = Pewarna Merah -Orange Dye = Pewarna Jingga -Yellow Dye = Pewarna Kuning -Lime Dye = Pewarna Hijau Pucuk Pisang -Green Dye = Pewarna Hijau -Aqua Dye = Pewarna Akuamarin -Cyan Dye = Pewarna Sian -Sky-blue Dye = Pewarna Biru Langit -Blue Dye = Pewarna Biru -Violet Dye = Pewarna Lembayung -Magenta Dye = Pewarna Magenta -Red-violet Dye = Pewarna Merah Lembayung - -[UnifiedDyes] Loaded! = [UnifiedDyes] Telah Dimuatkan! diff --git a/unifieddyes/locale/pt.txt b/unifieddyes/locale/pt.txt deleted file mode 100644 index def3571..0000000 --- a/unifieddyes/locale/pt.txt +++ /dev/null @@ -1,85 +0,0 @@ -Lime Dye = Corante Lima -Aqua Dye = Corante Água -Sky-blue Dye = Corante Azul-Céu -Red-violet Dye = Corante Vermelho-Violeta -Light Grey Dye = Corante Cinza Claro - -Dark Red Dye (low saturation) = Corante Vermelho Escuro (baixa saturação) -Dark Orange Dye (low saturation) = Corante Laranja Escuro (baixa saturação) -Dark Yellow Dye (low saturation) = Corante Amarelo Escuro (baixa saturação) -Dark Lime Dye (low saturation) = Corante Lima Escuro (baixa saturação) -Dark Green Dye (low saturation) = Corante Verde Escuro (baixa saturação) -Dark Aqua Dye (low saturation) = Corante Água Escuro (baixa saturação) -Dark Cyan Dye (low saturation) = Corante Ciano Escuro (baixa saturação) -Dark Sky-blue Dye (low saturation) = Corante Azul-Céu Escuro (baixa saturação) -Dark Blue Dye (low saturation) = Corante Azul Escuro (baixa saturação) -Dark Violet Dye (low saturation) = Corante Violeta Escuro (baixa saturação) -Dark Magenta Dye (low saturation) = Corante Magenta Escuro (baixa saturação) -Dark Red-violet Dye (low saturation) = Corante Vermelho-Violeta Escuro (baixa saturação) - -Dark Red Dye = Corante Vermelho Escuro -Dark Orange Dye = Corante Laranja Escuro -Dark Yellow Dye = Corante Amarelo Escuro -Dark Lime Dye = Corante Lima Escuro -Dark Green Dye = Corante Verde Escuro -Dark Aqua Dye = Corante Água Escuro -Dark Cyan Dye = Corante Ciano Escuro -Dark Sky-blue Dye = Corante Azul-Céu Escuro -Dark Blue Dye = Corante Azul Escuro -Dark Violet Dye = Corante Violeta Escuro -Dark Magenta Dye = Corante Magenta Escuro -Dark Red-violet Dye = Corante Vermelho-Violeta Escuro - -Medium Red Dye (low saturation) = Corante Vermelho Médio (baixa saturação) -Medium Orange Dye (low saturation) = Corante Laranja Médio (baixa saturação) -Medium Yellow Dye (low saturation) = Corante Amarelo Médio (baixa saturação) -Medium Lime Dye (low saturation) = Corante Lima Médio (baixa saturação) -Medium Green Dye (low saturation) = Corante Verde Médio (baixa saturação) -Medium Aqua Dye (low saturation) = Corante Água Médio (baixa saturação) -Medium Cyan Dye (low saturation) = Corante Ciano Médio (baixa saturação) -Medium Sky-blue Dye (low saturation) = Corante Azul-Céu Médio (baixa saturação) -Medium Blue Dye (low saturation) = Corante Azul Médio (baixa saturação) -Medium Violet Dye (low saturation) = Corante Violeta Médio (baixa saturação) -Medium Magenta Dye (low saturation) = Corante Magenta Médio (baixa saturação) -Medium Red-violet Dye (low saturation) = Corante Vermelho-Violeta Médio (baixa saturação) - -Medium Red Dye = Corante Vermelho Médio -Medium Orange Dye = Corante Laranja Médio -Medium Yellow Dye = Corante Amarelo Médio -Medium Lime Dye = Corante Lima Médio -Medium Green Dye = Corante Verde Médio -Medium Aqua Dye = Corante Água Médio -Medium Cyan Dye = Corante Ciano Médio -Medium Sky-blue = Corante Azul-Céu Médio -Medium Blue Dye = Corante Azul Médio -Medium Violet Dye = Corante Violeta Médio -Medium Magenta Dye = Corante Magenta Médio -Medium Red-violet Dye = Corante Vermelho-Violeta Médio - -Red Dye (low saturation) = Corante Vermelho (baixa saturação) -Orange Dye (low saturation) = Corante Laranja (baixa saturação) -Yellow Dye (low saturation) = Corante Amarelo (baixa saturação) -Lime Dye (low saturation) = Corante Lima (baixa saturação) -Green Dye (low saturation) = Corante Vermelho (baixa saturação) -Aqua Dye (low saturation) = Corante Água (baixa saturação) -Cyan Dye (low saturation) = Corante Ciano (baixa saturação) -Sky-blue Dye (low saturation) = Corante Azul-Céu (baixa saturação) -Blue Dye (low saturation) = Corante Azul (baixa saturação) -Violet Dye (low saturation) = Corante Violeta (baixa saturação) -Magenta Dye (low saturation) = Corante Magenta (baixa saturação) -Red-violet Dye (low saturation) = Corante Vermelho-Violeta (baixa saturação) - -Red Dye = Corante Vermelho -Orange Dye = Corante Laranja -Yellow Dye = Corante Amarelo -Lime Dye = Corante Lima -Green Dye = Corante Verde -Aqua Dye = Corante Água -Cyan Dye = Corano Ciano -Sky-blue Dye = Corante Azul-Céu -Blue Dye = Corante Azul -Violet Dye = Corante Violeta -Magenta Dye = Corante Magenta -Red-violet Dye = Corante Vermelho-Violeta - -[UnifiedDyes] Loaded! = [UnifiedDyes] Carregado! diff --git a/unifieddyes/locale/template.txt b/unifieddyes/locale/template.txt index 126bef8..d793116 100644 --- a/unifieddyes/locale/template.txt +++ b/unifieddyes/locale/template.txt @@ -1,87 +1,104 @@ +# textdomain: unifieddyes + # Template -Lime Dye = -Aqua Dye = -Sky-blue Dye = -Red-violet Dye = -Light Grey Dye = +Lime Dye= +Aqua Dye= +Sky-blue Dye= +Red-violet Dye= +Light Grey Dye= -Dark Red Dye (low saturation) = -Dark Orange Dye (low saturation) = -Dark Yellow Dye (low saturation) = -Dark Lime Dye (low saturation) = -Dark Green Dye (low saturation) = -Dark Aqua Dye (low saturation) = -Dark Cyan Dye (low saturation) = -Dark Sky-blue Dye (low saturation) = -Dark Blue Dye (low saturation) = -Dark Violet Dye (low saturation) = -Dark Magenta Dye (low saturation) = -Dark Red-violet Dye (low saturation) = +Dark Red Dye (low saturation)= +Dark Orange Dye (low saturation)= +Dark Yellow Dye (low saturation)= +Dark Lime Dye (low saturation)= +Dark Green Dye (low saturation)= +Dark Aqua Dye (low saturation)= +Dark Cyan Dye (low saturation)= +Dark Sky-blue Dye (low saturation)= +Dark Blue Dye (low saturation)= +Dark Violet Dye (low saturation)= +Dark Magenta Dye (low saturation)= +Dark Red-violet Dye (low saturation)= -Dark Red Dye = -Dark Orange Dye = -Dark Yellow Dye = -Dark Lime Dye = -Dark Green Dye = -Dark Aqua Dye = -Dark Cyan Dye = -Dark Sky-blue Dye = -Dark Blue Dye = -Dark Violet Dye = -Dark Magenta Dye = -Dark Red-violet Dye = +Dark Red Dye= +Dark Orange Dye= +Dark Yellow Dye= +Dark Lime Dye= +Dark Green Dye= +Dark Aqua Dye= +Dark Cyan Dye= +Dark Sky-blue Dye= +Dark Blue Dye= +Dark Violet Dye= +Dark Magenta Dye= +Dark Red-violet Dye= -Medium Red Dye (low saturation) = -Medium Orange Dye (low saturation) = -Medium Yellow Dye (low saturation) = -Medium Lime Dye (low saturation) = -Medium Green Dye (low saturation) = -Medium Aqua Dye (low saturation) = -Medium Cyan Dye (low saturation) = -Medium Sky-blue Dye (low saturation) = -Medium Blue Dye (low saturation) = -Medium Violet Dye (low saturation) = -Medium Magenta Dye (low saturation) = -Medium Red-violet Dye (low saturation) = +Medium Red Dye (low saturation)= +Medium Orange Dye (low saturation)= +Medium Yellow Dye (low saturation)= +Medium Lime Dye (low saturation)= +Medium Green Dye (low saturation)= +Medium Aqua Dye (low saturation)= +Medium Cyan Dye (low saturation)= +Medium Sky-blue Dye (low saturation)= +Medium Blue Dye (low saturation)= +Medium Violet Dye (low saturation)= +Medium Magenta Dye (low saturation)= +Medium Red-violet Dye (low saturation)= -Medium Red Dye = -Medium Orange Dye = -Medium Yellow Dye = -Medium Lime Dye = -Medium Green Dye = -Medium Aqua Dye = -Medium Cyan Dye = -Medium Sky-blue = -Medium Blue Dye = -Medium Violet Dye = -Medium Magenta Dye = -Medium Red-violet Dye = +Medium Red Dye= +Medium Orange Dye= +Medium Yellow Dye= +Medium Lime Dye= +Medium Green Dye= +Medium Aqua Dye= +Medium Cyan Dye= +Medium Sky-blue= +Medium Blue Dye= +Medium Violet Dye= +Medium Magenta Dye= +Medium Red-violet Dye= -Red Dye (low saturation) = -Orange Dye (low saturation) = -Yellow Dye (low saturation) = -Lime Dye (low saturation) = -Green Dye (low saturation) = -Aqua Dye (low saturation) = -Cyan Dye (low saturation) = -Sky-blue Dye (low saturation) = -Blue Dye (low saturation) = -Violet Dye (low saturation) = -Magenta Dye (low saturation) = -Red-violet Dye (low saturation) = +Red Dye (low saturation)= +Orange Dye (low saturation)= +Yellow Dye (low saturation)= +Lime Dye (low saturation)= +Green Dye (low saturation)= +Aqua Dye (low saturation)= +Cyan Dye (low saturation)= +Sky-blue Dye (low saturation)= +Blue Dye (low saturation)= +Violet Dye (low saturation)= +Magenta Dye (low saturation)= +Red-violet Dye (low saturation)= -Red Dye = -Orange Dye = -Yellow Dye = -Lime Dye = -Green Dye = -Aqua Dye = -Cyan Dye = -Sky-blue Dye = -Blue Dye = -Violet Dye = -Magenta Dye = -Red-violet Dye = +Red Dye= +Orange Dye= +Yellow Dye= +Lime Dye= +Green Dye= +Aqua Dye= +Cyan Dye= +Sky-blue Dye= +Blue Dye= +Violet Dye= +Magenta Dye= +Red-violet Dye= -[UnifiedDyes] Loaded! = +[UnifiedDyes] Loaded!= + +Dye Airbrush= + +Select a color:= +(Right-clicked a node that supports all 256 colors, showing them all)= +(Right-clicked a node not supported by the Airbrush, showing all colors)= +Dyes= +Your selection= +Your selection:= +Cancel= +Accept= +Show Available= +(Currently showing all 256 colors)= +Show All Colors= +(Currently only showing what the right-clicked node can use)= diff --git a/unifieddyes/locale/tr.txt b/unifieddyes/locale/tr.txt deleted file mode 100644 index 6109389..0000000 --- a/unifieddyes/locale/tr.txt +++ /dev/null @@ -1,88 +0,0 @@ -# TUrkish translation -# Mahmutelmas06@hotmail.com - -Lime Dye = Limon Yeşili Boya -Aqua Dye = Deniz mavisi Boya -Sky-blue Dye = Gök-Mavi Boya -Red-violet Dye = Kırmızılı Boya -Light Grey Dye = Açık Grey Boya - -Dark Red Dye (low saturation) = Koyu Kırmızı Boya (düşük doygunluk) -Dark Orange Dye (low saturation) = Koyu Turuncu Boya (düşük doygunluk) -Dark Yellow Dye (low saturation) = Koyu Sarı Boya (düşük doygunluk) -Dark Lime Dye (low saturation) = Koyu Limon Yeşili Boya (düşük doygunluk) -Dark Green Dye (low saturation) = Koyu Yeşil Boya (düşük doygunluk) -Dark Aqua Dye (low saturation) = Koyu Deniz mavisi boya (düşük doygunluk) -Dark Cyan Dye (low saturation) = Koyu Cam göbeği Boya (düşük doygunluk) -Dark Sky-blue Dye (low saturation) = Koyu Gök-Mavi Boya (düşük doygunluk) -Dark Blue Dye (low saturation) = Koyu Mavi Boya (düşük doygunluk) -Dark Violet Dye (low saturation) = Koyu mor Boya (düşük doygunluk) -Dark Magenta Dye (low saturation) = Koyu Kızılımsı Mor Boya (düşük doygunluk) -Dark Red-violet Dye (low saturation) = Koyu Kırmızılı Boya (düşük doygunluk) - -Dark Red Dye = Koyu Kırmızı Boya -Dark Orange Dye = Koyu Turuncu Boya -Dark Yellow Dye = Koyu Sarı Boya -Dark Lime Dye = Koyu Limon Yeşili Boya -Dark Green Dye = Koyu Yeşil Boya -Dark Aqua Dye = Koyu Deniz mavisi Boya -Dark Cyan Dye = Koyu Cam göbeği Boya -Dark Sky-blue Dye = Koyu Gök-Mavi Boya -Dark Blue Dye = Koyu Mavi Boya -Dark Violet Dye = Koyu mor Boya -Dark Magenta Dye = Koyu Kızılımsı Mor Boya -Dark Red-violet Dye = Koyu Kırmızılı Boya - -Medium Red Dye (low saturation) = Kırmızı Boya (düşük doygunluk) -Medium Orange Dye (low saturation) = Turuncu Boya (düşük doygunluk) -Medium Yellow Dye (low saturation) = Sarı Boya (düşük doygunluk) -Medium Lime Dye (low saturation) = Limon Yeşili Boya (düşük doygunluk) -Medium Green Dye (low saturation) = Yeşil Boya (düşük doygunluk) -Medium Aqua Dye (low saturation) = Deniz mavisi Boya (düşük doygunluk) -Medium Cyan Dye (low saturation) = Cam göbeği Boya (düşük doygunluk) -Medium Sky-blue Dye (low saturation) = Gök-Mavi Boya (düşük doygunluk) -Medium Blue Dye (low saturation) = Mavi Boya (düşük doygunluk) -Medium Violet Dye (low saturation) = Koyu mor Boya (düşük doygunluk) -Medium Magenta Dye (low saturation) = Kızılımsı Mor Boya (düşük doygunluk) -Medium Red-violet Dye (low saturation) = Kırmızılı Boya (düşük doygunluk) - -Medium Red Dye = Kırmızı Boya -Medium Orange Dye = Turuncu Boya -Medium Yellow Dye = Sarı Boya -Medium Lime Dye = Limon Yeşili Boya -Medium Green Dye = Yeşil Boya -Medium Aqua Dye = Deniz mavisi Boya -Medium Cyan Dye = Cam göbeği Boya -Medium Sky-blue = Gök-Mavi -Medium Blue Dye = Mavi Boya -Medium Violet Dye = Koyu mor Boya -Medium Magenta Dye = Kızılımsı Mor Boya -Medium Red-violet Dye = Kırmızılı Boya - -Red Dye (low saturation) = Kırmızı Boya (düşük doygunluk) -Orange Dye (low saturation) = Turuncu Boya (düşük doygunluk) -Yellow Dye (low saturation) = Sarı Boya (düşük doygunluk) -Lime Dye (low saturation) = Limon Yeşili Boya (düşük doygunluk) -Green Dye (low saturation) = Yeşil Boya (düşük doygunluk) -Aqua Dye (low saturation) = Deniz mavisi Boya (düşük doygunluk) -Cyan Dye (low saturation) = Cam göbeği Boya (düşük doygunluk) -Sky-blue Dye (low saturation) = Gök-Mavi Boya (düşük doygunluk) -Blue Dye (low saturation) = Mavi Boya (düşük doygunluk) -Violet Dye (low saturation) = Koyu mor Boya (düşük doygunluk) -Magenta Dye (low saturation) = Kızılımsı Mor Boya (düşük doygunluk) -Red-violet Dye (low saturation) = Kırmızılı Boya (düşük doygunluk) - -Red Dye = Kırmızı Boya -Orange Dye = Turuncu Boya -Yellow Dye = Sarı Boya -Lime Dye = Limon Yeşili Boya -Green Dye = Yeşil Boya -Aqua Dye = Deniz mavisi Boya -Cyan Dye = Cam göbeği Boya -Sky-blue Dye = Gök-Mavi Boya -Blue Dye = Mavi Boya -Violet Dye = Koyu mor Boya -Magenta Dye = Kızılımsı Mor Boya -Red-violet Dye = Kırmızılı Boya - -[UnifiedDyes] Loaded! = [UnifiedBoyas] yüklendi! diff --git a/unifieddyes/locale/unifieddyes.de.tr b/unifieddyes/locale/unifieddyes.de.tr new file mode 100644 index 0000000..b9f198b --- /dev/null +++ b/unifieddyes/locale/unifieddyes.de.tr @@ -0,0 +1,91 @@ +# textdomain: unifieddyes + +# Translation by Xanthin + +Lime Dye=Gelbgruener Farbstoff (Gelbgruen) +Aqua Dye=Aqua Farbstoff +Sky-blue Dye=Himmelblauer Farbstoff +Red-violet Dye=Rotvioletter Farbstoff +Light Grey Dye=Hellgrauer Farbstoff + +Dark Red Dye (low saturation)=Dunkelroter Farbstoff (geringe Saettigung) +Dark Orange Dye (low saturation)=Dunkeloranger Farbstoff (geringe Saettigung) +Dark Yellow Dye (low saturation)=Dunkelgelber Farbstoff (geringe Saettigung) +Dark Lime Dye (low saturation)=Gelbgruenerlime Farbstoff (geringe Saettigung) +Dark Green Dye (low saturation)=Dunkelgruener Farbstoff (geringe Saettigung) +Dark Aqua Dye (low saturation)=Dunkelaqua Farbstoff (geringe Saettigung) +Dark Cyan Dye (low saturation)=Dunkeltuerkiser Farbstoff (geringe Saettigung) +Dark Sky-blue Dye (low saturation)=Dunkelhimmelblauer Farbstoff (geringe Saettigung) +Dark Blue Dye (low saturation)=Dunkelblauer Farbstoff (geringe Saettigung) +Dark Violet Dye (low saturation)=Dunkelvioletter Farbstoff (geringe Saettigung) +Dark Magenta Dye (low saturation)=Dunkelmagenta Farbstoff (geringe Saettigung) +Dark Red-violet Dye (low saturation)=Dunkelrotvioletter Farbstoff (geringe Saettigung) + +Dark Red Dye=Dunkelroter Farbstoff +Dark Orange Dye=Dunkeloranger Farbstoff +Dark Yellow Dye=Dunkelgelber Farbstoff +Dark Lime Dye=Dunkelgelbgruener Farbstoff +Dark Green Dye=Dunkelgruener Farbstoff +Dark Aqua Dye=Dunkelaqua Farbstoff +Dark Cyan Dye=Dunkeltuerkiser Farbstoff +Dark Sky-blue Dye=Dunkelhimmelblauer Farbstoff +Dark Blue Dye=Dunkelblauer Farbstoff +Dark Violet Dye=Dunkelvioletter Farbstoff +Dark Magenta Dye=Dunkelmagenta Farbstoff +Dark Red-violet Dye=Dunkelrotvioletter Farbstoff + +Medium Red Dye (low saturation)=Mittelroter Farbstoff (geringe Saettigung) +Medium Orange Dye (low saturation)=Mitteloranger Farbstoff (geringe Saettigung) +Medium Yellow Dye (low saturation)=Mittelgelber Farbstoff (geringe Saettigung) +Medium Lime Dye (low saturation)=Mittelgelbgruener Farbstoff (geringe Saettigung) +Medium Green Dye (low saturation)=Mittelgruener Farbstoff (geringe Saettigung) +Medium Aqua Dye (low saturation)=Mittelaqua Farbstoff (geringe Saettigung) +Medium Cyan Dye (low saturation)=Mitteltuerkiser Farbstoff (geringe Saettigung) +Medium Sky-blue Dye (low saturation)=Mittelhimmelblauer Farbstoff (geringe Saettigung) +Medium Blue Dye (low saturation)=Mittelblauer Farbstoff (geringe Saettigung) +Medium Violet Dye (low saturation)=Mittelvioletter Farbstoff (geringe Saettigung) +Medium Magenta Dye (low saturation)=Mittelmagenta Farbstoff (geringe Saettigung) +Medium Red-violet Dye (low saturation)=Mittelrotvioletter Farbstoff (geringe Saettigung) + +Medium Red Dye=Mittelroter Farbstoff +Medium Orange Dye=Mitteloranger Farbstoff +Medium Yellow Dye=Mittelgelber Farbstoff +Medium Lime Dye=Mittelgelbgruener Farbstoff +Medium Green Dye=Mittelgruener Farbstoff +Medium Aqua Dye=Mittelaqua Farbstoff +Medium Cyan Dye=Mitteltuerkiser Farbstoff +Medium Sky-blue=Mittelhimmelblauer Farbstoff +Medium Blue Dye=Mittelblauer Farbstoff +Medium Violet Dye=Mittelvioletter Farbstoff +Medium Magenta Dye=Mittelmagenta Farbstoff +Medium Red-violet Dye=Mittelrotvioletter Farbstoff + +Red Dye (low saturation)=Roter Farbstoff (geringe Saettigung) +Orange Dye (low saturation)=Oranger Farbstoff (geringe Saettigung) +Yellow Dye (low saturation)=Gelber Farbstoff (geringe Saettigung) +Lime Dye (low saturation)=Gelbgruener Farbstoff (geringe Saettigung) +Green Dye (low saturation)=Gruener Farbstoff (geringe Saettigung) +Aqua Dye (low saturation)=Aqua Farbstoff (geringe Saettigung) +Cyan Dye (low saturation)=Tuerkiser Farbstoff (geringe Saettigung) +Sky-blue Dye (low saturation)=Himmelblauer Farbstoff (geringe Saettigung) +Blue Dye (low saturation)=Blauer Farbstoff (geringe Saettigung) +Violet Dye (low saturation)=Violetter Farbstoff (geringe Saettigung) +Magenta Dye (low saturation)=Magenta Farbstoff (geringe Saettigung) lila +Red-violet Dye (low saturation)=Rotvioletter Farbstoff (geringe Saettigung) + +[UnifiedDyes] Loaded!=[UnifiedDyes] geladen! + +Dye Airbrush=Farbstroff Airbrush + +Select a color:=Wähle eine Farbe +(Right-clicked a node that supports all 256 colors, showing them all)=(Angeklickter Block unterstützt alle 256 Farben, zeige alle) +(Right-clicked a node not supported by the Airbrush, showing all colors)=(Angeklickter Block unterstützt kein Airbrush, zeige alle Farben) +Dyes=Farbstoffe +Your selection=Deine Auswahl +Your selection:=Deine Auswahl: +Cancel=Abbrechen +Accept=Übernehmen +Show Available=Zeige verfügbare +(Currently showing all 256 colors)=(Zeige alle 256 Farben) +Show All Colors=Zeige alle Farben +(Currently only showing what the right-clicked node can use)=(Zeige alle, die der angeklickte Block verwenden kann) diff --git a/unifieddyes/locale/unifieddyes.es.tr b/unifieddyes/locale/unifieddyes.es.tr new file mode 100644 index 0000000..05a474c --- /dev/null +++ b/unifieddyes/locale/unifieddyes.es.tr @@ -0,0 +1,89 @@ +# textdomain: unifieddyes + +# Traducido por Carlos Barraza + +Lime Dye=Colorante Lima +Aqua Dye=Colorante Agua +Sky-blue Dye=Colorante Azul Cielo +Red-violet Dye=Colorante Rojo Violeta +Light Grey Dye=Colorante Gris Claro + +Dark Red Dye (low saturation)=Colorante Rojo Oscuro (baja saturación) +Dark Orange Dye (low saturation)=Colorante Naranja Oscuro (baja saturación) +Dark Yellow Dye (low saturation)=Colorante Amarillo Oscuro (baja saturación) +Dark Lime Dye (low saturation)=Colorante Lima Oscuro (baja saturación) +Dark Green Dye (low saturation)=Colorante Verde Oscuro (baja saturación) +Dark Aqua Dye (low saturation)=Colorante Agua Oscuro (baja saturación) +Dark Cyan Dye (low saturation)=Colorante Cian Oscuro (baja saturación) +Dark Sky-blue Dye (low saturation)=Colorante Azul Cielo Oscuro (baja saturación) +Dark Blue Dye (low saturation)=Colorante Azul Oscuro (baja saturación) +Dark Violet Dye (low saturation)=Colorante Violeta Oscuro (baja saturación) +Dark Magenta Dye (low saturation)=Colorante Magenta Oscuro (baja saturación) +Dark Red-violet Dye (low saturation)=Colorante Rojo Violeta Oscuro (baja saturación) + +Dark Red Dye=Colorante Rojo Oscuro +Dark Orange Dye=Colorante Naranja Oscuro +Dark Yellow Dye=Colorante Amarillo Oscuro +Dark Lime Dye=Colorante Lima Oscuro +Dark Green Dye=Colorante Verde Oscuro +Dark Aqua Dye=Colorante Agua Oscuro +Dark Cyan Dye=Colorante Cian Oscuro +Dark Sky-blue Dye=Colorante Azul Cielo Oscuro +Dark Blue Dye=Colorante Azul Oscuro +Dark Violet Dye=Colorante Violeta Oscuro +Dark Magenta Dye=Colorante Magenta Oscuro +Dark Red-violet Dye=Colorante Rojo Violeta Oscuro + +Medium Red Dye (low saturation)=Colorante Rojo Claro (baja saturación) +Medium Orange Dye (low saturation)=Colorante Naranja Claro (baja saturación) +Medium Yellow Dye (low saturation)=Colorante Amarillo Claro (baja saturación) +Medium Lime Dye (low saturation)=Colorante Lima Claro (baja saturación) +Medium Green Dye (low saturation)=Colorante Verde Claro (baja saturación) +Medium Aqua Dye (low saturation)=Colorante Agua Claro (baja saturación) +Medium Cyan Dye (low saturation)=Colorante Cian Claro (baja saturación) +Medium Sky-blue Dye (low saturation)=Colorante Azul Cielo Claro (baja saturación) +Medium Blue Dye (low saturation)=Colorante Azul Claro (baja saturación) +Medium Violet Dye (low saturation)=Colorante Violeta Claro (baja saturación) +Medium Magenta Dye (low saturation)=Colorante Magenta Claro (baja saturación) +Medium Red-violet Dye (low saturation)=Colorante Rojo Violeta Claro (baja saturación) + +Medium Red Dye=Colorante Rojo Claro +Medium Orange Dye=Colorante Naranja Claro +Medium Yellow Dye=Colorante Amarillo Claro +Medium Lime Dye=Colorante Lima Claro +Medium Green Dye=Colorante Verde Claro +Medium Aqua Dye=Colorante Agua Claro +Medium Cyan Dye=Colorante Cian Claro +Medium Sky-blue=Colorante Azul Cielo Claro +Medium Blue Dye=Colorante Azul Claro +Medium Violet Dye=Colorante Violeta Claro +Medium Magenta Dye=Colorante Magenta Claro +Medium Red-violet Dye=Colorante Rojo Violeta Claro + +Red Dye (low saturation)=Colorante Rojo (baja saturación) +Orange Dye (low saturation)=Colorante Naranja (baja saturación) +Yellow Dye (low saturation)=Colorante Amarillo (baja saturación) +Lime Dye (low saturation)=Colorante Lima (baja saturación) +Green Dye (low saturation)=Colorante Verde (baja saturación) +Aqua Dye (low saturation)=Colorante Agua (baja saturación) +Cyan Dye (low saturation)=Colorante Cian (baja saturación) +Sky-blue Dye (low saturation)=Colorante Azul Cielo (baja saturación) +Blue Dye (low saturation)=Colorante Azul (baja saturación) +Violet Dye (low saturation)=Colorante Violeta (baja saturación) +Magenta Dye (low saturation)=Colorante Magenta (baja saturación) +Red-violet Dye (low saturation)=Colorante Rojo Violeta (baja saturación) + +Red Dye=Colorante Rojo +Orange Dye=Colorante Naranja +Yellow Dye=Colorante Amarillo +Lime Dye=Colorante Lima +Green Dye=Colorante Verde +Aqua Dye=Colorante Agua +Cyan Dye=Colorante Cian +Sky-blue Dye=Colorante Azul Cielo +Blue Dye=Colorante Azul +Violet Dye=Colorante Violeta +Magenta Dye=Colorante Magenta +Red-violet Dye=Colorante Rojo Violeta + +[UnifiedDyes] Loaded!=[ColorantesUnificados] Cargado. diff --git a/unifieddyes/locale/unifieddyes.fr.tr b/unifieddyes/locale/unifieddyes.fr.tr new file mode 100644 index 0000000..24c839c --- /dev/null +++ b/unifieddyes/locale/unifieddyes.fr.tr @@ -0,0 +1,104 @@ +# textdomain: unifieddyes + +# Template + +Lime Dye=Teinture citron-vert +Aqua Dye=Teinture aqua +Sky-blue Dye=Teinture bleu ciel +Red-violet Dye=Teinture rouge-violet +Light Grey Dye=Teinture gris clair + +Dark Red Dye (low saturation)=Teinture rouge foncé (basse saturation) +Dark Orange Dye (low saturation)=Teinture orange foncé (basse saturation) +Dark Yellow Dye (low saturation)=Teinture jaune foncé (basse saturation) +Dark Lime Dye (low saturation)=Teinture citron-vert foncé (basse saturation) +Dark Green Dye (low saturation)=Teinture vert foncé (basse saturation) +Dark Aqua Dye (low saturation)=Teinture aqua foncé (basse saturation) +Dark Cyan Dye (low saturation)=Teinture cyan foncé (basse saturation) +Dark Sky-blue Dye (low saturation)=Teinture bleu ciel foncé (basse saturation) +Dark Blue Dye (low saturation)=Teinture bleu foncé (basse saturation) +Dark Violet Dye (low saturation)=Teinture violet foncé (basse saturation) +Dark Magenta Dye (low saturation)=Teinture magenta foncé (basse saturation) +Dark Red-violet Dye (low saturation)=Teinture rouge-violet foncé (basse saturation) + +Dark Red Dye=Teinture rouge foncé +Dark Orange Dye=Teinture orange foncé +Dark Yellow Dye=Teinture jaune foncé +Dark Lime Dye=Teinture citron-vert foncé +Dark Green Dye=Teinture vert foncé +Dark Aqua Dye=Teinture aqua foncé +Dark Cyan Dye=Teinture cyan foncé +Dark Sky-blue Dye=Teinture bleu ciel foncé +Dark Blue Dye=Teinture bleu foncé +Dark Violet Dye=Teinture violet foncé +Dark Magenta Dye=Teinture magenta foncé +Dark Red-violet Dye=Teinture rouge-violet foncé + +Medium Red Dye (low saturation)=Teinture rouge moyen (basse saturation) +Medium Orange Dye (low saturation)=Teinture orange moyen (basse saturation) +Medium Yellow Dye (low saturation)=Teinture jaune moyen (basse saturation) +Medium Lime Dye (low saturation)=Teinture citron-vert moyen (basse saturation) +Medium Green Dye (low saturation)=Teinture vert moyen (basse saturation) +Medium Aqua Dye (low saturation)=Teinture aqua moyen (basse saturation) +Medium Cyan Dye (low saturation)=Teinture cyan moyen (basse saturation) +Medium Sky-blue Dye (low saturation)=Teinture bleu ciel moyen (basse saturation) +Medium Blue Dye (low saturation)=Teinture bleu moyen (basse saturation) +Medium Violet Dye (low saturation)=Teinture violet moyen (basse saturation) +Medium Magenta Dye (low saturation)=Teinture magenta moyen (basse saturation) +Medium Red-violet Dye (low saturation)=Teinture rouge-violet moyen (basse saturation) + +Medium Red Dye=Teinture rouge moyen +Medium Orange Dye=Teinture orange moyen +Medium Yellow Dye=Teinture jaune moyen +Medium Lime Dye=Teinture citron-vert moyen +Medium Green Dye=Teinture vert moyen +Medium Aqua Dye=Teinture aqua moyen +Medium Cyan Dye=Teinture cyan moyen +Medium Sky-blue=Teinture bleu ciel moyen +Medium Blue Dye=Teinture bleu moyen +Medium Violet Dye=Teinture violet moyen +Medium Magenta Dye=Teinture magenta moyen +Medium Red-violet Dye=Teinture rouge-violet moyen + +Red Dye (low saturation)=Teinture rouge (basse saturation) +Orange Dye (low saturation)=Teinture orange (basse saturation) +Yellow Dye (low saturation)=Teinture jaune (basse saturation) +Lime Dye (low saturation)=Teinture citron-vert (basse saturation) +Green Dye (low saturation)=Teinture vert (basse saturation) +Aqua Dye (low saturation)=Teinture aqua (basse saturation) +Cyan Dye (low saturation)=Teinture cyan (basse saturation) +Sky-blue Dye (low saturation)=Teinture bleu ciel (basse saturation) +Blue Dye (low saturation)=Teinture bleu (basse saturation) +Violet Dye (low saturation)=Teinture violet (basse saturation) +Magenta Dye (low saturation)=Teinture magenta (basse saturation) +Red-violet Dye (low saturation)=Teinture rouge-violet (basse saturation) + +Red Dye=Teinture rouge +Orange Dye=Teinture orange +Yellow Dye=Teinture jaune +Lime Dye=Teinture citron-vert +Green Dye=Teinture vert +Aqua Dye=Teinture aqua +Cyan Dye=Teinture cyan +Sky-blue Dye=Teinture bleu ciel +Blue Dye=Teinture bleu +Violet Dye=Teinture violet +Magenta Dye=Teinture magenta +Red-violet Dye=Teinture rouge-violet + +[UnifiedDyes] Loaded!=[UnifiedDyes] chargé ! + +Dye Airbrush=Aérographe à colorants + +Select a color:=Choisissez une couleur +(Right-clicked a node that supports all 256 colors, showing them all)=(Le bloc supporte toutes les 256 couleurs, affichage de toutes celles-ci) +(Right-clicked a node not supported by the Airbrush, showing all colors)=(Le bloc n’est pas supporté par l’aérographe, affichage de toutes les couleurs) +Dyes=Teintures +Your selection=Votre sélection +Your selection:=Votre sélection : +Cancel=Annuler +Accept=Valider +Show Available=Voir dispo. +(Currently showing all 256 colors)=(Actuellement en train d’afficher toutes les 256 couleurs) +Show All Colors=Voir toutes +(Currently only showing what the right-clicked node can use)=(Actuellement en train d’afficher uniquement ce que le bloc peut utiliser) diff --git a/unifieddyes/locale/unifieddyes.ms.tr b/unifieddyes/locale/unifieddyes.ms.tr new file mode 100644 index 0000000..120e43c --- /dev/null +++ b/unifieddyes/locale/unifieddyes.ms.tr @@ -0,0 +1,89 @@ +# textdomain: unifieddyes + +# Malay translation by MuhdNurHidayat + +Lime Dye=Pewarna Hijau Pucuk Pisang +Aqua Dye=Pewarna Akuamarin +Sky-blue Dye=Pewarna Biru Langit +Red-violet Dye=Pewarna Merah Lembayung +Light Grey Dye=Pewarna Kelabu Muda + +Dark Red Dye (low saturation)=Pewarna Merah Tua (penepuan rendah) +Dark Orange Dye (low saturation)=Pewarna Jingga Tua (penepuan rendah) +Dark Yellow Dye (low saturation)=Pewarna Kuning Tua (penepuan rendah) +Dark Lime Dye (low saturation)=Pewarna Hijau Pucuk Pisang Tua (penepuan rendah) +Dark Green Dye (low saturation)=Pewarna Hijau Tua (penepuan rendah) +Dark Aqua Dye (low saturation)=Pewarna Akuamarin Tua (penepuan rendah) +Dark Cyan Dye (low saturation)=Pewarna Sian Tua (penepuan rendah) +Dark Sky-blue Dye (low saturation)=Pewarna Biru Langit Tua (penepuan rendah) +Dark Blue Dye (low saturation)=Pewarna Biru Tua (penepuan rendah) +Dark Violet Dye (low saturation)=Pewarna Lembayung Tua (penepuan rendah) +Dark Magenta Dye (low saturation)=Pewarna Magenta Tua (penepuan rendah) +Dark Red-violet Dye (low saturation)=Pewarna Merah Lembayung Tua (penepuan rendah) + +Dark Red Dye=Pewarna Merah Tua +Dark Orange Dye=Pewarna Jingga Tua +Dark Yellow Dye=Pewarna Kuning Tua +Dark Lime Dye=Pewarna Hijau Pucuk Pisang Tua +Dark Green Dye=Pewarna Hijau Tua +Dark Aqua Dye=Pewarna Akuamarin Tua +Dark Cyan Dye=Pewarna Sian Tua +Dark Sky-blue Dye=Pewarna Biru Langit Tua +Dark Blue Dye=Pewarna Biru Tua +Dark Violet Dye=Pewarna Lembayung Tua +Dark Magenta Dye=Pewarna Magenta Tua +Dark Red-violet Dye=Pewarna Merah Lembayung Tua + +Medium Red Dye (low saturation)=Pewarna Merah Sederhana (penepuan rendah) +Medium Orange Dye (low saturation)=Pewarna Jingga Sederhana (penepuan rendah) +Medium Yellow Dye (low saturation)=Pewarna Kuning Sederhana (penepuan rendah) +Medium Lime Dye (low saturation)=Pewarna Hijau Pucuk Pisang Sederhana (penepuan rendah) +Medium Green Dye (low saturation)=Pewarna Hijau Sederhana (penepuan rendah) +Medium Aqua Dye (low saturation)=Pewarna Akuamarin Sederhana (penepuan rendah) +Medium Cyan Dye (low saturation)=Pewarna Sian Sederhana (penepuan rendah) +Medium Sky-blue Dye (low saturation)=Pewarna Biru Langit Sederhana (penepuan rendah) +Medium Blue Dye (low saturation)=Pewarna Biru Sederhana (penepuan rendah) +Medium Violet Dye (low saturation)=Pewarna Lembayung Sederhana (penepuan rendah) +Medium Magenta Dye (low saturation)=Pewarna Magenta Sederhana (penepuan rendah) +Medium Red-violet Dye (low saturation)=Pewarna Merah Lembayung Sederhana (penepuan rendah) + +Medium Red Dye=Pewarna Merah Sederhana +Medium Orange Dye=Pewarna Jingga Sederhana +Medium Yellow Dye=Pewarna Kuning Sederhana +Medium Lime Dye=Pewarna Hijau Pucuk Pisang Sederhana +Medium Green Dye=Pewarna Hijau Sederhana +Medium Aqua Dye=Pewarna Akuamarin Sederhana +Medium Cyan Dye=Pewarna Sian Sederhana +Medium Sky-blue=Pewarna Biru Langit Sederhana +Medium Blue Dye=Pewarna Biru Sederhana +Medium Violet Dye=Pewarna Lembayung Sederhana +Medium Magenta Dye=Pewarna Magenta Sederhana +Medium Red-violet Dye=Pewarna Merah Lembayung Sederhana + +Red Dye (low saturation)=Pewarna Merah (penepuan rendah) +Orange Dye (low saturation)=Pewarna Jingga (penepuan rendah) +Yellow Dye (low saturation)=Pewarna Kuning (penepuan rendah) +Lime Dye (low saturation)=Pewarna Hijau Pucuk Pisang (penepuan rendah) +Green Dye (low saturation)=Pewarna Hijau (penepuan rendah) +Aqua Dye (low saturation)=Pewarna Akuamarin (penepuan rendah) +Cyan Dye (low saturation)=Pewarna Sian (penepuan rendah) +Sky-blue Dye (low saturation)=Pewarna Biru Langit (penepuan rendah) +Blue Dye (low saturation)=Pewarna Biru (penepuan rendah) +Violet Dye (low saturation)=Pewarna Lembayung (penepuan rendah) +Magenta Dye (low saturation)=Pewarna Magenta (penepuan rendah) +Red-violet Dye (low saturation)=Pewarna Merah Lembayung(penepuan rendah) + +Red Dye=Pewarna Merah +Orange Dye=Pewarna Jingga +Yellow Dye=Pewarna Kuning +Lime Dye=Pewarna Hijau Pucuk Pisang +Green Dye=Pewarna Hijau +Aqua Dye=Pewarna Akuamarin +Cyan Dye=Pewarna Sian +Sky-blue Dye=Pewarna Biru Langit +Blue Dye=Pewarna Biru +Violet Dye=Pewarna Lembayung +Magenta Dye=Pewarna Magenta +Red-violet Dye=Pewarna Merah Lembayung + +[UnifiedDyes] Loaded!=[UnifiedDyes] Telah Dimuatkan! diff --git a/unifieddyes/locale/unifieddyes.pt.tr b/unifieddyes/locale/unifieddyes.pt.tr new file mode 100644 index 0000000..f461667 --- /dev/null +++ b/unifieddyes/locale/unifieddyes.pt.tr @@ -0,0 +1,87 @@ +# textdomain: unifieddyes + +Lime Dye=Corante Lima +Aqua Dye=Corante Água +Sky-blue Dye=Corante Azul-Céu +Red-violet Dye=Corante Vermelho-Violeta +Light Grey Dye=Corante Cinza Claro + +Dark Red Dye (low saturation)=Corante Vermelho Escuro (baixa saturação) +Dark Orange Dye (low saturation)=Corante Laranja Escuro (baixa saturação) +Dark Yellow Dye (low saturation)=Corante Amarelo Escuro (baixa saturação) +Dark Lime Dye (low saturation)=Corante Lima Escuro (baixa saturação) +Dark Green Dye (low saturation)=Corante Verde Escuro (baixa saturação) +Dark Aqua Dye (low saturation)=Corante Água Escuro (baixa saturação) +Dark Cyan Dye (low saturation)=Corante Ciano Escuro (baixa saturação) +Dark Sky-blue Dye (low saturation)=Corante Azul-Céu Escuro (baixa saturação) +Dark Blue Dye (low saturation)=Corante Azul Escuro (baixa saturação) +Dark Violet Dye (low saturation)=Corante Violeta Escuro (baixa saturação) +Dark Magenta Dye (low saturation)=Corante Magenta Escuro (baixa saturação) +Dark Red-violet Dye (low saturation)=Corante Vermelho-Violeta Escuro (baixa saturação) + +Dark Red Dye=Corante Vermelho Escuro +Dark Orange Dye=Corante Laranja Escuro +Dark Yellow Dye=Corante Amarelo Escuro +Dark Lime Dye=Corante Lima Escuro +Dark Green Dye=Corante Verde Escuro +Dark Aqua Dye=Corante Água Escuro +Dark Cyan Dye=Corante Ciano Escuro +Dark Sky-blue Dye=Corante Azul-Céu Escuro +Dark Blue Dye=Corante Azul Escuro +Dark Violet Dye=Corante Violeta Escuro +Dark Magenta Dye=Corante Magenta Escuro +Dark Red-violet Dye=Corante Vermelho-Violeta Escuro + +Medium Red Dye (low saturation)=Corante Vermelho Médio (baixa saturação) +Medium Orange Dye (low saturation)=Corante Laranja Médio (baixa saturação) +Medium Yellow Dye (low saturation)=Corante Amarelo Médio (baixa saturação) +Medium Lime Dye (low saturation)=Corante Lima Médio (baixa saturação) +Medium Green Dye (low saturation)=Corante Verde Médio (baixa saturação) +Medium Aqua Dye (low saturation)=Corante Água Médio (baixa saturação) +Medium Cyan Dye (low saturation)=Corante Ciano Médio (baixa saturação) +Medium Sky-blue Dye (low saturation)=Corante Azul-Céu Médio (baixa saturação) +Medium Blue Dye (low saturation)=Corante Azul Médio (baixa saturação) +Medium Violet Dye (low saturation)=Corante Violeta Médio (baixa saturação) +Medium Magenta Dye (low saturation)=Corante Magenta Médio (baixa saturação) +Medium Red-violet Dye (low saturation)=Corante Vermelho-Violeta Médio (baixa saturação) + +Medium Red Dye=Corante Vermelho Médio +Medium Orange Dye=Corante Laranja Médio +Medium Yellow Dye=Corante Amarelo Médio +Medium Lime Dye=Corante Lima Médio +Medium Green Dye=Corante Verde Médio +Medium Aqua Dye=Corante Água Médio +Medium Cyan Dye=Corante Ciano Médio +Medium Sky-blue=Corante Azul-Céu Médio +Medium Blue Dye=Corante Azul Médio +Medium Violet Dye=Corante Violeta Médio +Medium Magenta Dye=Corante Magenta Médio +Medium Red-violet Dye=Corante Vermelho-Violeta Médio + +Red Dye (low saturation)=Corante Vermelho (baixa saturação) +Orange Dye (low saturation)=Corante Laranja (baixa saturação) +Yellow Dye (low saturation)=Corante Amarelo (baixa saturação) +Lime Dye (low saturation)=Corante Lima (baixa saturação) +Green Dye (low saturation)=Corante Vermelho (baixa saturação) +Aqua Dye (low saturation)=Corante Água (baixa saturação) +Cyan Dye (low saturation)=Corante Ciano (baixa saturação) +Sky-blue Dye (low saturation)=Corante Azul-Céu (baixa saturação) +Blue Dye (low saturation)=Corante Azul (baixa saturação) +Violet Dye (low saturation)=Corante Violeta (baixa saturação) +Magenta Dye (low saturation)=Corante Magenta (baixa saturação) +Red-violet Dye (low saturation)=Corante Vermelho-Violeta (baixa saturação) + +Red Dye=Corante Vermelho +Orange Dye=Corante Laranja +Yellow Dye=Corante Amarelo +Lime Dye=Corante Lima +Green Dye=Corante Verde +Aqua Dye=Corante Água +Cyan Dye=Corano Ciano +Sky-blue Dye=Corante Azul-Céu +Blue Dye=Corante Azul +Violet Dye=Corante Violeta +Magenta Dye=Corante Magenta +Red-violet Dye=Corante Vermelho-Violeta + +[UnifiedDyes] Loaded!=[UnifiedDyes] Carregado! diff --git a/unifieddyes/locale/unifieddyes.ru.tr b/unifieddyes/locale/unifieddyes.ru.tr new file mode 100644 index 0000000..0aec3ff --- /dev/null +++ b/unifieddyes/locale/unifieddyes.ru.tr @@ -0,0 +1,76 @@ +# textdomain: unifieddyes + +# Translation by @drakes_journey + +Lime Dye=Лаймовая краска +Aqua Dye=Аквамариновая краска +Sky-blue Dye=Голубая краска +Red-violet Dye=Красно-фиолетовая краска +Light Grey Dye=Светло-серая краска + +Dark Red Dye (low saturation)=Темная красная краска (низкая насыщенность) +Dark Orange Dye (low saturation)=Темная оранжевая краска (низкая насыщенность) +Dark Yellow Dye (low saturation)=Темная желтая краска (низкая насыщенность) +Dark Lime Dye (low saturation)=Темная лаймовая краска (низкая насыщенность) +Dark Green Dye (low saturation)=Темная зеленая краска (низкая насыщенность) +Dark Aqua Dye (low saturation)=Темная аквамариновая краска (низкая насыщенность) +Dark Cyan Dye (low saturation)=Темная бирюзовая краска (низкая насыщенность) +Dark Sky-blue Dye (low saturation)=Темная голубая краска (низкая насыщенность) +Dark Blue Dye (low saturation)=Темная синяя краска (низкая насыщенность) +Dark Violet Dye (low saturation)=Темная фиолетовая краска (низкая насыщенность) +Dark Magenta Dye (low saturation)=Темная пурпурная краска (низкая насыщенность) +Dark Red-violet Dye (low saturation)=Темная краснофиолетовая краска (низкая насыщенность) + +Dark Red Dye=Темная красная краска +Dark Orange Dye=Темная оранжевая краска +Dark Yellow Dye=Темная желтая краска +Dark Lime Dye=Темная зеленая краска +Dark Green Dye=Темная зеленая краска +Dark Aqua Dye=Темная аквамариновая краска +Dark Cyan Dye=Темная бирюзовая краска +Dark Sky-blue Dye=Темная голубая краска +Dark Blue Dye=Темная синяя краска +Dark Violet Dye=Темная фиолетовая краска +Dark Magenta Dye=Темная пурпурная краска +Dark Red-violet Dye=Темная красно-фиолетовая краска + +Medium Red Dye (low saturation)=Средне-красная краска (низкая насыщенность) +Medium Orange Dye (low saturation)=Средне-оранжевая краска (низкая насыщенность) +Medium Yellow Dye (low saturation)=Средне-желтая краска (низкая насыщенность) +Medium Lime Dye (low saturation)=Средне-зеленая краска (низкая насыщенность) +Medium Green Dye (low saturation)=Средне-зеленая краска (низкая насыщенность) +Medium Aqua Dye (low saturation)=Средне-аквамариновая краска (низкая насыщенность) +Medium Cyan Dye (low saturation)=Средне-бирюзовая краска (низкая насыщенность) +Medium Sky-blue Dye (low saturation)=Средне-голубая краска (низкая насыщенность) +Medium Blue Dye (low saturation)=Средне-синяя краска (низкая насыщенность) +Medium Violet Dye (low saturation)=Средне-фиолетовая краска (низкая насыщенность) +Medium Magenta Dye (low saturation)=Средне-пурпурная краска (низкая насыщенность) +Medium Red-violet Dye (low saturation)=Средне-краснофиолетовая краска (низкая насыщенность) + +Medium Red Dye=Средне-красная краска +Medium Orange Dye=Средне-оранжевая краска +Medium Yellow Dye=Средне-желтая краска +Medium Lime Dye=Средне-лаймовая краска +Medium Green Dye=Средне-зеленая краска +Medium Aqua Dye=Средне-аквамариновая краска +Medium Cyan Dye=Средне-бирюзовая краска +Medium Sky-blue=Средне-голубая краска +Medium Blue Dye=Средне-синяя краска +Medium Violet Dye=Средне-фиолетовая краска +Medium Magenta Dye=Средне-пурпурная краска +Medium Red-violet Dye=Средне-краснофиолетовая краска + +Red Dye (low saturation)=Красная краска (низкая насыщенность) +Orange Dye (low saturation)=Оранжевая краска (низкая насыщенность) +Yellow Dye (low saturation)=Желтая краска (низкая насыщенность) +Lime Dye (low saturation)=Лаймовая краска (низкая насыщенность) +Green Dye (low saturation)=Зеленая краска (низкая насыщенность) +Aqua Dye (low saturation)=Аквамариновая краска (низкая насыщенность) +Cyan Dye (low saturation)=Бирюзовая краска (низкая насыщенность) +Sky-blue Dye (low saturation)=Голубая краска (низкая насыщенность) +Blue Dye (low saturation)=Синяя краска (низкая насыщенность) +Violet Dye (low saturation)=Фиолетовая краска (низкая насыщенность) +Magenta Dye (low saturation)=Пурпурная краска (низкая насыщенность) +Red-violet Dye (low saturation)=Краснофиолетовая краска (низкая насыщенность) + +[UnifiedDyes] Loaded!=[UnifiedDyes] загружен! diff --git a/unifieddyes/locale/unifieddyes.tr.tr b/unifieddyes/locale/unifieddyes.tr.tr new file mode 100644 index 0000000..a3ecfd3 --- /dev/null +++ b/unifieddyes/locale/unifieddyes.tr.tr @@ -0,0 +1,90 @@ +# textdomain: unifieddyes + +# TUrkish translation +# Mahmutelmas06@hotmail.com + +Lime Dye=Limon Yeşili Boya +Aqua Dye=Deniz mavisi Boya +Sky-blue Dye=Gök-Mavi Boya +Red-violet Dye=Kırmızılı Boya +Light Grey Dye=Açık Grey Boya + +Dark Red Dye (low saturation)=Koyu Kırmızı Boya (düşük doygunluk) +Dark Orange Dye (low saturation)=Koyu Turuncu Boya (düşük doygunluk) +Dark Yellow Dye (low saturation)=Koyu Sarı Boya (düşük doygunluk) +Dark Lime Dye (low saturation)=Koyu Limon Yeşili Boya (düşük doygunluk) +Dark Green Dye (low saturation)=Koyu Yeşil Boya (düşük doygunluk) +Dark Aqua Dye (low saturation)=Koyu Deniz mavisi boya (düşük doygunluk) +Dark Cyan Dye (low saturation)=Koyu Cam göbeği Boya (düşük doygunluk) +Dark Sky-blue Dye (low saturation)=Koyu Gök-Mavi Boya (düşük doygunluk) +Dark Blue Dye (low saturation)=Koyu Mavi Boya (düşük doygunluk) +Dark Violet Dye (low saturation)=Koyu mor Boya (düşük doygunluk) +Dark Magenta Dye (low saturation)=Koyu Kızılımsı Mor Boya (düşük doygunluk) +Dark Red-violet Dye (low saturation)=Koyu Kırmızılı Boya (düşük doygunluk) + +Dark Red Dye=Koyu Kırmızı Boya +Dark Orange Dye=Koyu Turuncu Boya +Dark Yellow Dye=Koyu Sarı Boya +Dark Lime Dye=Koyu Limon Yeşili Boya +Dark Green Dye=Koyu Yeşil Boya +Dark Aqua Dye=Koyu Deniz mavisi Boya +Dark Cyan Dye=Koyu Cam göbeği Boya +Dark Sky-blue Dye=Koyu Gök-Mavi Boya +Dark Blue Dye=Koyu Mavi Boya +Dark Violet Dye=Koyu mor Boya +Dark Magenta Dye=Koyu Kızılımsı Mor Boya +Dark Red-violet Dye=Koyu Kırmızılı Boya + +Medium Red Dye (low saturation)=Kırmızı Boya (düşük doygunluk) +Medium Orange Dye (low saturation)=Turuncu Boya (düşük doygunluk) +Medium Yellow Dye (low saturation)=Sarı Boya (düşük doygunluk) +Medium Lime Dye (low saturation)=Limon Yeşili Boya (düşük doygunluk) +Medium Green Dye (low saturation)=Yeşil Boya (düşük doygunluk) +Medium Aqua Dye (low saturation)=Deniz mavisi Boya (düşük doygunluk) +Medium Cyan Dye (low saturation)=Cam göbeği Boya (düşük doygunluk) +Medium Sky-blue Dye (low saturation)=Gök-Mavi Boya (düşük doygunluk) +Medium Blue Dye (low saturation)=Mavi Boya (düşük doygunluk) +Medium Violet Dye (low saturation)=Koyu mor Boya (düşük doygunluk) +Medium Magenta Dye (low saturation)=Kızılımsı Mor Boya (düşük doygunluk) +Medium Red-violet Dye (low saturation)=Kırmızılı Boya (düşük doygunluk) + +Medium Red Dye=Kırmızı Boya +Medium Orange Dye=Turuncu Boya +Medium Yellow Dye=Sarı Boya +Medium Lime Dye=Limon Yeşili Boya +Medium Green Dye=Yeşil Boya +Medium Aqua Dye=Deniz mavisi Boya +Medium Cyan Dye=Cam göbeği Boya +Medium Sky-blue=Gök-Mavi +Medium Blue Dye=Mavi Boya +Medium Violet Dye=Koyu mor Boya +Medium Magenta Dye=Kızılımsı Mor Boya +Medium Red-violet Dye=Kırmızılı Boya + +Red Dye (low saturation)=Kırmızı Boya (düşük doygunluk) +Orange Dye (low saturation)=Turuncu Boya (düşük doygunluk) +Yellow Dye (low saturation)=Sarı Boya (düşük doygunluk) +Lime Dye (low saturation)=Limon Yeşili Boya (düşük doygunluk) +Green Dye (low saturation)=Yeşil Boya (düşük doygunluk) +Aqua Dye (low saturation)=Deniz mavisi Boya (düşük doygunluk) +Cyan Dye (low saturation)=Cam göbeği Boya (düşük doygunluk) +Sky-blue Dye (low saturation)=Gök-Mavi Boya (düşük doygunluk) +Blue Dye (low saturation)=Mavi Boya (düşük doygunluk) +Violet Dye (low saturation)=Koyu mor Boya (düşük doygunluk) +Magenta Dye (low saturation)=Kızılımsı Mor Boya (düşük doygunluk) +Red-violet Dye (low saturation)=Kırmızılı Boya (düşük doygunluk) + +Red Dye=Kırmızı Boya +Orange Dye=Turuncu Boya +Yellow Dye=Sarı Boya +Lime Dye=Limon Yeşili Boya +Green Dye=Yeşil Boya +Aqua Dye=Deniz mavisi Boya +Cyan Dye=Cam göbeği Boya +Sky-blue Dye=Gök-Mavi Boya +Blue Dye=Mavi Boya +Violet Dye=Koyu mor Boya +Magenta Dye=Kızılımsı Mor Boya +Red-violet Dye=Kırmızılı Boya + +[UnifiedDyes] Loaded!=[UnifiedBoyas] yüklendi! diff --git a/unifieddyes/mod.conf b/unifieddyes/mod.conf index 861cb26..8afae56 100644 --- a/unifieddyes/mod.conf +++ b/unifieddyes/mod.conf @@ -1 +1,4 @@ name = unifieddyes +description = Unified Dyes expands the standard dye set from 15 to 90 colors. +depends = default, dye, basic_materials +min_minetest_version = 5.2.0 diff --git a/worldedit/.gitignore b/worldedit/.gitignore new file mode 100644 index 0000000..5236e1e --- /dev/null +++ b/worldedit/.gitignore @@ -0,0 +1,2 @@ +*~ + diff --git a/worldedit/ChatCommands.md b/worldedit/ChatCommands.md index 528f2df..1d3b4e9 100644 --- a/worldedit/ChatCommands.md +++ b/worldedit/ChatCommands.md @@ -29,24 +29,26 @@ Many commands also have shorter names that can be typed faster. For example, if ### `//about` -Get information about the mod. +Get information about the WorldEdit mod. //about -### `//inspect on/off/1/0/true/false/yes/no/enable/disable/` +### `//help [all/]` + +Get help for WorldEdit commands. `all` shows all WorldEdit commands, `` +the help text for the given command. + + //help + //help all + //help hollowpyramid + + +### `//inspect [on/off/1/0/true/false/yes/no/enable/disable]` Enable or disable node inspection. //inspect on //inspect off - //inspect 1 - //inspect 0 - //inspect true - //inspect false - //inspect yes - //inspect no - //inspect enable - //inspect disable //inspect ### `//reset` @@ -81,18 +83,19 @@ Set WorldEdit region position 2 to the player's location. ### `//p set/set1/set2/get` -Set WorldEdit region, WorldEdit position 1, or WorldEdit position 2 by punching nodes, or display the current WorldEdit region. +Set WorldEdit region, WorldEdit position 1, or WorldEdit position 2 by +punching nodes, or print the current WorldEdit region. //p set //p set1 //p set2 //p get -### `//fixedpos set1 x y z` +### `//fixedpos set1/set2 ` -Set a WorldEdit region position to the position at (``, ``, ``). +Set the WorldEdit region position 1 or 2 to the position (``, ``, ``). - //fixedpos set1 0 0 0 + //fixedpos set1 0 0 0 //fixedpos set1 -30 5 28 //fixedpos set2 1004 -200 432 @@ -121,9 +124,12 @@ Set the current WorldEdit region to ``. Set the param2 value of all nodes in the current WorldEdit region to ``. -### `//mix [] []...` + //param2 8 -Fill the current WorldEdit region with a random mix of ``, ``, `...`. Weightings can be optionally specified via a number after a node name. +### `//mix [count1] [count2] ...` + +Fill the current WorldEdit region with a random mix of ``, ``, `...`. +Weightings can be optionally specified via the `[count1]`, `[count2]`, `...` parameters after a node name. //mix air //mix cactus stone glass sandstone @@ -152,13 +158,15 @@ Replace all nodes other than `` with `` in the curren ### `//hollowcube ` -Adds a hollow cube with its ground level centered at WorldEdit position 1 with dimensions `` x `` x ``, composed of ``. +Adds a hollow cube with its ground level centered at WorldEdit position 1 with +dimensions `` x `` x ``, composed of ``. //hollowcube 6 5 6 Diamond Block ### `//cube ` -Adds a cube with its ground level centered at WorldEdit position 1 with dimensions `` x `` x ``, composed of ``. +Adds a cube with its ground level centered at WorldEdit position 1 with +dimensions `` x `` x ``, composed of ``. //cube 6 5 6 Diamond Block //cube 7 2 1 default:cobble @@ -197,7 +205,8 @@ Add dome centered at WorldEdit position 1 with radius ``, composed of `< ### `//hollowcylinder x/y/z/? [radius2] ` -Add hollow cylinder at WorldEdit position 1 along the x/y/z/? axis with length ``, base radius `` (and top radius `[radius2]`), composed of ``. +Add hollow cylinder at WorldEdit position 1 along the given axis with length ``, +base radius `` (and top radius `[radius2]`), composed of ``. Despite its name this command allows you to create cones (`radius2` = 0) as well as any shapes inbetween (0 < `radius2` < `radius1`). Swapping `radius1` and `radius2` will create the same object but upside-down. @@ -213,7 +222,8 @@ Swapping `radius1` and `radius2` will create the same object but upside-down. ### `//cylinder x/y/z/? [radius2] ` -Add cylinder at WorldEdit position 1 along the x/y/z/? axis with length ``, base radius `` (and top radius `[radius2]`), composed of ``. +Add cylinder at WorldEdit position 1 along the given axis with length ``, +base radius `` (and top radius `[radius2]`), composed of ``. Can also create shapes other than cylinders, e.g. cones (see documentation above). //cylinder x +5 8 Bronze Block @@ -225,18 +235,18 @@ Can also create shapes other than cylinders, e.g. cones (see documentation above //cylinder x 6 0 5 Dirt //cylinder z 20 10 20 default:desert_stone -### `//hollowpyramid x/y/z? ` +### `//hollowpyramid x/y/z/? ` -Add hollow pyramid centered at WorldEdit position 1 along the x/y/z/? axis with height ``, composed of ``. +Add hollow pyramid centered at WorldEdit position 1 along the given axis with height `` composed of ``. //hollowpyramid x 8 Diamond Block //hollowpyramid y -5 glass //hollowpyramid z 2 mesecons:wire_00000000_off //hollowpyramid ? 12 mesecons:wire_00000000_off -### `//pyramid x/y/z? ` +### `//pyramid x/y/z/? ` -Add pyramid centered at WorldEdit position 1 along the x/y/z/? axis with height ``, composed of ``. +Add pyramid centered at WorldEdit position 1 along the given axis with height `` composed of ``. //pyramid x 8 Diamond Block //pyramid y -5 glass @@ -245,7 +255,8 @@ Add pyramid centered at WorldEdit position 1 along the x/y/z/? axis with height ### `//spiral ` -Add spiral centered at WorldEdit position 1 with side length ``, height ``, space between walls ``, composed of ``. +Add spiral centered at WorldEdit position 1 with side length ``, +height ``, space between walls ``, composed of ``. //spiral 20 5 3 Diamond Block //spiral 5 2 1 glass @@ -253,7 +264,7 @@ Add spiral centered at WorldEdit position 1 with side length ``, height ### `//copy x/y/z/? ` -Copy the current WorldEdit region along the x/y/z/? axis by `` nodes. +Copy the current WorldEdit region along the given axis by `` nodes. //copy x 15 //copy y -7 @@ -262,7 +273,7 @@ Copy the current WorldEdit region along the x/y/z/? axis by `` nodes. ### `//move x/y/z/? ` -Move the current WorldEdit positions and region along the x/y/z/? axis by `` nodes. +Move the current WorldEdit positions and region along the given axis by `` nodes. //move x 15 //move y -7 @@ -271,7 +282,7 @@ Move the current WorldEdit positions and region along the x/y/z/? axis by `` -Stack the current WorldEdit region along the x/y/z/? axis `` times. +Stack the current WorldEdit region along the given axis `` times. //stack x 3 //stack y -1 @@ -287,7 +298,9 @@ Stack the current WorldEdit region `` times by offset ``, ``, `` ### `//stretch ` -Scale the current WorldEdit positions and region by a factor of ``, ``, `` along the X, Y, and Z axes, repectively, with position 1 as the origin. +Scale the current WorldEdit positions and region by a factor of +``, ``, `` along the X, Y, and Z axes, +respectively, with position 1 as the origin. //stretch 2 2 2 //stretch 1 2 1 @@ -295,25 +308,22 @@ Scale the current WorldEdit positions and region by a factor of ``, `< ### `//transpose x/y/z/? x/y/z/?` -Transpose the current WorldEdit positions and region along the x/y/z/? and x/y/z/? axes. +Transpose the current WorldEdit positions and region along given axes. //transpose x y - //transpose x z //transpose y z //transpose ? y ### `//flip x/y/z/?` -Flip the current WorldEdit region along the x/y/z/? axis. +Flip the current WorldEdit region along the given axis. //flip x - //flip y - //flip z //flip ? ### `//rotate x/y/z/? ` -Rotate the current WorldEdit positions and region along the x/y/z/? axis by angle `` (90 degree increment). +Rotate the current WorldEdit positions and region along the given axis by angle `` (90 degree increment). //rotate x 90 //rotate y 180 @@ -341,6 +351,13 @@ Removes any fluid node within the current WorldEdit region. //drain +### `//clearcut` + +Removes any plant, tree or foilage-like nodes in the selected region. +The idea is to remove anything that isn't part of the terrain, leaving a "natural" empty space ready for building. + + //clearcut + ### `//hide` Hide all nodes in the current WorldEdit region non-destructively. @@ -349,7 +366,7 @@ Hide all nodes in the current WorldEdit region non-destructively. ### `//suppress ` -Suppress all in the current WorldEdit region non-destructively. +Suppress all `` in the current WorldEdit region non-destructively. //suppress Diamond Block //suppress glass @@ -357,7 +374,7 @@ Suppress all in the current WorldEdit region non-destructively. ### `//highlight ` -Highlight in the current WorldEdit region by hiding everything else non-destructively. +Highlight `` in the current WorldEdit region by hiding everything else non-destructively. //highlight Diamond Block //highlight glass @@ -401,8 +418,8 @@ Executes `` as a Lua chunk in the global namespace. Executes `` as a Lua chunk in the global namespace with the variable pos available, for each node in the current WorldEdit region. - //luatransform minetest.add_node(pos, {name="default:stone"}) - //luatransform if minetest.get_node(pos).name == "air" then minetest.add_node(pos, {name="default:water_source"}) + //luatransform minetest.swap_node(pos, {name="default:stone"}) + //luatransform if minetest.get_node(pos).name == "air" then minetest.add_node(pos, {name="default:water_source"}) end ### `//mtschemcreate ` @@ -431,42 +448,44 @@ Clears all objects within the WorldEdit region. //clearobjects -### `//shift x/y/z/?/up/down/left/right/front/back [+|-]` +### `//shift x/y/z/?/up/down/left/right/front/back [+/-]` -Shifts the selection area by `[+|-]` without touching its contents. The shifting axis can be absolute (`x/y/z`) or -relative (`up/down/left/right/front/back`). +Shifts the selection area by `[+|-]` without moving its contents. +The shifting axis can be absolute (`x/y/z`) or relative (`up/down/left/right/front/back`). //shift left 5 -### `//expand [+|-]x/y/z/?/up/down/left/right/front/back [reverse-amount]` +### `//expand [+/-]x/y/z/?/up/down/left/right/front/back [reverse amount]` -Expands the selection by `` in the selected absolute or relative axis. If specified, the selection can be expanded in the -opposite direction over the same axis by `[reverse-amount]`. +Expands the selection by `` in the selected absolute or relative axis. +If specified, the selection can be expanded in the opposite direction over the same axis by `[reverse amount]`. //expand right 7 5 -### `//contract [+|-]x/y/z/?/up/down/left/right/front/back [reverse-amount]` +### `//contract [+/-]x/y/z/?/up/down/left/right/front/back [reverse amount]` -Contracts the selection by `` in the selected absolute or relative axis. If specified, the selection can be contracted in the -opposite direction over the same axis by `[reverse-amount]`. +Contracts the selection by `` in the selected absolute or relative axis. +If specified, the selection can be contracted in the opposite direction over the same axis by `[reverse amount]`. //expand right 7 5 -### `//outset [hv] ` +### `//outset [h/v] ` -Expands the selection in all directions by ``. If specified, the selection can be expanded horizontally in the x and z axes `[h]` -or vertically in the y axis `[v]`. +Expands the selection in all directions by ``. If specified, +the selection can be expanded horizontally in the x and z axes using `h` +or vertically in the y axis using `v`. //outset v 5 -### `//inset [hv] ` +### `//inset [h/v] ` -Contracts the selection in all directions by ``. If specified, the selection can be contracted horizontally in the x and z axes `[h]` -or vertically in the y axis `[v]`. +Contracts the selection in all directions by ``. If specified, +the selection can be contracted horizontally in the x and z axes using `h` +or vertically in the y axis using `v`. - //outset v 5 + //inset h 5 -### `//brush none/ [parameters]` +### `//brush none/( [parameters])` Assigns the given `` to the currently held brush item, it will be ran with the first pointed solid node (as determined via raycast) as WorldEdit position 1 when using that specific brush item. @@ -476,3 +495,14 @@ Note that this functionality requires the `worldedit_brush` mod enabled. //brush cube 8 8 8 Cobblestone //brush spr 12 glass //brush none + +### `//cubeapply /( ) [parameters]` + +Selects a cube with side length of `` around the WorldEdit position 1 and runs the given `` on the newly selected region. +If ``, `` and `` are given, they instead specify the length of the cuboid in X, Y, Z direction. +This is mostly useful for brushes since it allows commands such as `//replace` to be ran, but it can also be used standalone. + + //cubeapply 10 replaceinverse air default:water_source + //brush cubeapply 15 drain + //brush cubeapply 12 3 12 drain + //brush cubeapply 1 deleteblocks diff --git a/worldedit/README.md b/worldedit/README.md index c781e57..ad47b3e 100644 --- a/worldedit/README.md +++ b/worldedit/README.md @@ -1,4 +1,4 @@ -WorldEdit v1.2 +WorldEdit v1.3 ============== The ultimate in-game world editing tool for [Minetest](http://minetest.net/)! Tons of functionality to help with building, fixing, and more. @@ -11,47 +11,52 @@ For more information, see the [forum topic](https://forum.minetest.net/viewtopic Installing ---------- -If you are using Windows, consider installing this mod using [MODSTER](https://forum.minetest.net/viewtopic.php?id=6497), a super simple mod installer that will take care of everything for you. If you are using MODSTER, skip directly to step 6 in the instructions below. - There is a nice installation guide over at the [Minetest Wiki](http://wiki.minetest.com/wiki/Installing_mods). Here is a short summary: -1. Download the mod from the [official releases page](https://github.com/Uberi/Minetest-WorldEdit/releases). The download links are labelled "Source Code". If you are using Windows, you will probably want to download the ZIP version. -2. You should have a file named `SOMETHING.zip` or `SOMETHING.tar.gz`. +1. Download the mod from the [official releases page](https://github.com/Uberi/Minetest-WorldEdit/releases). The download links are labelled "Source Code". If you are using Windows, you'll want to download the ZIP version. +2. You should have a file named `Minetest-WorldEdit-x.x.zip`. 3. Extract this file using your archiver of choice. If you are using Windows, open the ZIP file and move the folder inside to a safe place outside of the ZIP file. -4. Make sure that you now have a folder with a file named README.md inside it. If you just have another folder inside this folder, use this nested folder instead. +4. Make sure that you now have a folder with a file named README.md inside it. If you just have another folder inside this folder, use the nested folder instead. 5. Move this folder into the `MINETEST_FOLDER/mods` folder, where `MINETEST_FOLDER` is the folder Minetest is located in. 6. Open Minetest to a world selection screen. -7. Select a world you want to use WorldEdit in by left clicking on it once, and press the **Configure** button. -8. You should have a mod selection screen. Select the one named something like `Minetest-WorldEdit` by left clicking once and press the **Enable MP** button. +7. Select a world you want to use WorldEdit in by left clicking on it once and press the **Configure** button. +8. You should have a mod selection screen. Select the one named something like `Minetest-WorldEdit` by left clicking once and press the **Enable Modpack** button. 9. Press the **Save** button. You can now use WorldEdit in that world. Repeat steps 7 to 9 to enable WorldEdit for other worlds too. -If you are having trouble, try asking for help in the [IRC channel](http://webchat.freenode.net/?channels=#minetest) (faster but may not always have helpers online) or ask on the [forum topic](https://forum.minetest.net/viewtopic.php?id=572) (slower but more likely to get help). +If you are having trouble, try asking for help in the [IRC channel](https://webchat.freenode.net/?channels=#minetest) (faster but may not always have helpers online) +or ask on the [forum topic](https://forum.minetest.net/viewtopic.php?id=572) (slower but more likely to get help). Usage ----- -WorldEdit works primarily through the WorldEdit GUI and chat commands. Depending on your key bindings, you can invoke chat entry with the "t" key, and open the chat console with the "F10" key. +WorldEdit works primarily through the WorldEdit GUI and chat commands. Depending on your key bindings, you can invoke chat entry with the "T" key and open the chat console with the "F10" key. -WorldEdit has a huge potential for abuse by untrusted players. Therefore, users will not be able to use WorldEdit unless they have the `worldedit` privelege. This is available by default in single player, but in multiplayer the permission must be explicitly given by someone with the right credentials, using the follwoing chat command: `/grant worldedit`. This privelege can later be removed using the following chat command: `/revoke worldedit`. +WorldEdit has a huge potential for abuse by untrusted players. Therefore, users will not be able to use WorldEdit unless they have the `worldedit` privilege. +This is available by default in singleplayer, but in multiplayer the permission must be explicitly given by someone with the right credentials, +using the following chat command: `/grant worldedit`. This privilege can later be removed using the following chat command: `/revoke worldedit`. -Certain functions/commands such as WorldEdit `//lua` and `//luatransform` chat commands additionally require the `server` privilege. This is because it is extremely dangerous to give access to these commands to untrusted players, since they essentially are able to control the computer the server is running on. Give this privilege only to people you trust with your computer. +Certain functions/commands such as WorldEdit `//lua` and `//luatransform` chat commands additionally require the `server` privilege. +This is because it is extremely dangerous to give access to these commands to untrusted players, since they essentially are able to control the computer the server is running on. +Give this privilege only to people you trust with your computer. -For in-game information about these commands, type `/help ` in the chat. For example, to learn more about the `//copy` command, simply type `/help /copy` to display information relevant to copying a region. +For in-game information about these commands, type `//help ` in the chat. For example, to learn more about the `//copy` command, simply type `//help copy` to display information relevant to copying a region. Interface --------- WorldEdit is accessed in-game in two main ways. -The GUI adds a screen to each player's inventory that gives access to various WorldEdit functions. The [tutorial](Tutorial.md) and the [Chat Commands Reference](ChatCommands.md) may be helpful in learning to use it. +The GUI adds a screen to each player's inventory that gives access to various WorldEdit functions. The [tutorial](Tutorial.md) may be helpful in learning to use it. The chat interface adds many chat commands that perform various WorldEdit powered tasks. It is documented in the [Chat Commands Reference](ChatCommands.md). Compatibility ------------- -This mod supports Minetest versions 0.4.8 and newer. Older versions of WorldEdit may work with older versions of Minetest, but are not recommended or supported. +This mod supports Minetest versions 5.0 and newer. Older versions of WorldEdit may work with older versions of Minetest, but are not recommended or supported. -WorldEdit works quite well with other mods, and does not have any known mod conflicts. +WorldEdit works quite well with other mods and does not have any known mod conflicts. -WorldEdit GUI requires one of [sfinv](https://github.com/minetest/minetest_game/tree/master/mods/sfinv) (included in minetest_game since 0.4.15), [Unified Inventory](https://forum.minetest.net/viewtopic.php?id=3933) or [Inventory++](https://forum.minetest.net/viewtopic.php?id=6204). +WorldEdit GUI requires one of [sfinv](https://github.com/minetest/minetest_game/tree/master/mods/sfinv) (included in minetest_game), +[Unified Inventory](https://forum.minetest.net/viewtopic.php?t=12767), +[Inventory++](https://forum.minetest.net/viewtopic.php?id=6204) or [Smart Inventory](https://forum.minetest.net/viewtopic.php?t=16597). If you use any other inventory manager mods, note that they may conflict with the WorldEdit GUI. If this is the case, it may be necessary to disable them. @@ -59,9 +64,9 @@ WorldEdit API ------------- WorldEdit exposes all significant functionality in a simple Lua interface. -Adding WorldEdit to the file "depends.txt" in your mod gives you access to all of the `worldedit` functions. The API is useful for tasks such as high-performance node manipulation, alternative interfaces, and map creation. +Adding WorldEdit as a dependency to your mod gives you access to all of the `worldedit` functions. The API is useful for tasks such as high-performance node manipulation, alternative interfaces and map creation. -AGPLv3 compatible mods may further include WorldEdit files in their own mods. This may be useful if a modder wishes to completely avoid any dependencies on WorldEdit. Note that it is required to give credit to the authors. +AGPLv3 compatible mods may further include WorldEdit files in their own mods. This can be useful if a modder wishes to completely avoid any dependency on WorldEdit. Note that it is required to give credit to the authors in this case. This API is documented in the [WorldEdit API Reference](WorldEdit%20API.md). @@ -79,13 +84,16 @@ Nodes ----- Node names are required for many types of commands that identify or modify specific types of nodes. They can be specified in a number of ways. -First, by description - the tooltip that appears when hovering over the item in an inventory. This is case insensitive and includes values such as "Cobblestone" and "bronze block". Note that certain commands (namely, `//replace` and `//replaceinverse`) do not support descriptions that contain spaces in the `` field. +First, by description - the tooltip that appears when hovering over the item in an inventory. This is case insensitive and includes values such as "Cobblestone" and "bronze block". +Note that certain commands (namely, `//replace` and `//replaceinverse`) do not support descriptions that contain spaces in the `` field. -Second, by name - the node name that is defined by code, but without the mod name prefix. This is case sensitive and includes values such as "piston_normal_off" and "cactus". Nodes defined in the `default` mod always take precedence over other nodes when searching for the correct one, and if there are multiple possible nodes (such as "a:celery" and "b:celery"), one is chosen in no particular order. +Second, by name - the node name that is defined by code, but without the mod name prefix. This is case sensitive and includes values such as "piston_normal_off" and "cactus". +If there are multiple possible nodes (such as "a:celery" and "b:celery"), one is chosen in no particular order. Finally, by full name - the unambiguous identifier of the node, prefixes and all. This is case sensitive and includes values such as "default:stone" and "mesecons:wire_00000000_off". -The node name "air" can be used anywhere a normal node name can, and acts as a blank node. This is useful for clearing or removing nodes. For example, `//set air` would remove all the nodes in the current WorldEdit region. Similarly, `//sphere 10 air`, when WorldEdit position 1 underground, would dig a large sphere out of the ground. +The node name "air" can be used anywhere a normal node name can and acts as a blank node. This is useful for clearing or removing nodes. +For example, `//set air` would remove all the nodes in the current WorldEdit region. Similarly, `//sphere 10 air`, when WorldEdit position 1 underground, would dig a large sphere out of the ground. Regions ------- @@ -93,11 +101,11 @@ Most WorldEdit commands operate on regions. Regions are a set of two positions t Each positions together define two opposing corners of the cube. With two opposing corners it is possible to determine both the location and dimensions of the region. -Regions are not saved between server restarts. They start off as empty regions, and cannot be used with most WorldEdit commands until they are set to valid values. +Regions are not saved between server restarts. They start off as empty regions and cannot be used with most WorldEdit commands until they are set to valid values. Markers ------- -Entities are used to mark the location of the WorldEdit regions. They appear as boxes containing the number 1 or 2, and represent position 1 and 2 of the WorldEdit region, respectively. +Entities are used to mark the location of the WorldEdit regions. They appear as boxes containing the number 1 or 2 and represent the first and second position of the WorldEdit region, respectively. To remove the entities, simply punch them. This does not reset the positions themselves. @@ -105,9 +113,11 @@ Schematics ---------- WorldEdit supports two different types of schematics. -The first is the WorldEdit Schematic format, with the file extension ".we", and in some older versions, ".wem". There have been several previous versions of the WorldEdit Schematic format, but WorldEdit is capable of loading any past versions, and will always support them - there is no need to worry about schematics becoming obselete. +The first is the WorldEdit Schematic format, with the file extension ".we", and in some older versions, ".wem". +There have been several previous versions of the WorldEdit Schematic format, but WorldEdit is capable of loading any past versions, and will always support them - there is no need to worry about schematics becoming obsolete. -As of version 5, WorldEdit schematics include a header. The header is seperated from the content by a colon (`:`). It contains fields seperated by commas (`,`). Currently only one field is used, which contains the version in ASCII decimal. +As of version 5, WorldEdit schematics include a header. The header is seperated from the content by a colon (`:`). It may contain fields seperated by commas (`,`). +Currently only one field is used, which contains the version as an ASCII decimal. The current version of the WorldEdit Schematic format is essentially an array of node data tables in Lua 5.1 table syntax preceded by a header. Specifically it looks like this: @@ -130,32 +140,53 @@ The ordering of the values and minor aspects of the syntax, such as trailing com The WorldEdit Schematic format is accessed via the WorldEdit API, or WorldEdit serialization chat commands such as `//serialize` and `//deserialize`. -The second is the Minetest Schematic format (MTS). The details of this format may be found in the Minetest documentation and are out of the scope of this document. Access to this format is done via specialized MTS commands such as `//mtschemcreate` and `//mtschemplace`. +The second is the Minetest Schematic format (MTS). The details of this format may be found in the Minetest documentation and are out of the scope of this document. +Access to this format is done via specialized MTS commands such as `//mtschemcreate` and `//mtschemplace`. Authors ------- WorldEdit would not be possible without the contributions of many developers and designers. Below, they are listed alphabetically: - cheapie + Alexander Weber + ANAND + beyondlimits + Carter Kolwey cornernote - cyisfor - danierukun + Cy + Daniel Sosa electricface est31 + Eugen Wesseloh + h3ndrik + HybridDog + Isidor Zeuner + Jean-Patrick Guerrero + Joseph Pickard kaeza - khonkhortisan - pickardjoe + kilbith + KodexKy + Kyle + MT-Modder + Niwla23 + Panquesito7 + Pedro Gimeno + Rui Sebastien Ponce sfan5 ShadowNinja + shivajiva101 spillz + Starbeamrainbowlabs + TalkLounge + tenplus1 Uberi/Temperest + Wuzzy License ------- -Copyright 2013 sfan5, Anthony Zhang (Uberi/Temperest), and Brett O'Donnell (cornernote). +Copyright (c) 2012 sfan5, Anthony Zhang (Uberi/Temperest), and Brett O'Donnell (cornernote). -This mod is licensed under the [GNU Affero General Public License](http://www.gnu.org/licenses/agpl-3.0.html). +This mod is licensed under the [GNU Affero General Public License](https://www.gnu.org/licenses/agpl-3.0.html). Basically, this means everyone is free to use, modify, and distribute the files, as long as these modifications are also licensed the same way. Most importantly, the Affero variant of the GPL requires you to publish your modifications in source form, even if the mod is run only on the server, and not distributed. diff --git a/worldedit/Tutorial.md b/worldedit/Tutorial.md index 1ed3998..d3c58a4 100644 --- a/worldedit/Tutorial.md +++ b/worldedit/Tutorial.md @@ -1,13 +1,11 @@ WorldEdit Tutorial ================== -This is a step-by-step tutorial outlining the basic usage of WorldEdit. For more information, see the [README](README.md). +This is a step-by-step tutorial outlining the basic usage of WorldEdit. Let's start with a few assumptions: -* You have a compatible version of Minetest working. - * See the [README](README.md) for compatibility information. +* You have a compatible version of Minetest working, that is 5.0 or later. * You have WorldEdit installed as a mod. - * If using Windows, [MODSTER](https://forum.minetest.net/viewtopic.php?pid=101463) makes installing mods totally painless. * Simply download the file, extract the archive, and move it to the correct mod folder for Minetest. * See the installation instructions in [README](README.md) if you need more details. * You are familiar with the basics of the game. @@ -59,7 +57,7 @@ Look at the place between the two markers: it is now filled with MESE blocks! The `//set ` command fills the region with whatever node you want. It is a region-oriented command, which means it works inside the WorldEdit region only. -Now, try a few different variations, such as `//set torch`, `//set cobble`, and `//set water`. +Now, try a few different variations, such as `//set torch`, `//set cobble`, and `//set water source`. ### WorldEdit GUI @@ -75,7 +73,7 @@ Look at the place between the two markers: it is now filled with MESE blocks! The "Set Nodes" function fills the region with whatever node you want. It is a region-oriented command, which means it works inside the WorldEdit region only. -Now, try a few different variations on the node name, such as "torch", "cobble", and "water". +Now, try a few different variations on the node name, such as "torch", "cobble", and "water source". Step 3: Position commands ------------------------- @@ -117,4 +115,4 @@ A very useful command to check out is the `//save ` command, which ca This only scratches the surface of what WorldEdit is capable of. Most of the functions in the WorldEdit GUI correspond to chat commands, and so the [Chat Commands Reference](ChatCommands.md) may be useful if you get stuck. -It is helpful to explore the various buttons in the interface and check out what they do. Learning the chat command interface is also useful if you use WorldEdit intensively - an experienced chat command user can usually work faster than an experienced WorldEdit GUI user. \ No newline at end of file +It is helpful to explore the various buttons in the interface and check out what they do. Learning the chat command interface is also useful if you use WorldEdit intensively - an experienced chat command user can usually work faster than an experienced WorldEdit GUI user. diff --git a/worldedit/WorldEdit API.md b/worldedit/WorldEdit API.md index 9bcb4e8..fc9cf65 100644 --- a/worldedit/WorldEdit API.md +++ b/worldedit/WorldEdit API.md @@ -24,6 +24,7 @@ Contained in manipulations.lua, this module allows several node operations to be ### count = worldedit.set(pos1, pos2, node_name) Sets a region defined by positions `pos1` and `pos2` to `node_name`. To clear a region, use "air" as the value of `node_name`. +If `node_name` is a list of nodes, each set node is randomly picked from it. Returns the number of nodes set. @@ -54,6 +55,7 @@ Returns the number of nodes copied. ### count = worldedit.copy2(pos1, pos2, off) Copies the region defined by positions `pos1` and `pos2` by the offset vector `off`. +Note that the offset needs to be big enough that there is no overlap. Returns the number of nodes copied. @@ -72,6 +74,7 @@ Returns the number of nodes stacked. ### count = worldedit.stack2(pos1, pos2, direction, amount) Duplicates the region defined by positions `pos1` and `pos2` `amount` times with offset vector `direction`. +Note that the offset vector needs to be big enough that there is no overlap. Returns the number of nodes stacked. diff --git a/worldedit/modpack.conf b/worldedit/modpack.conf new file mode 100644 index 0000000..4d9e6f5 --- /dev/null +++ b/worldedit/modpack.conf @@ -0,0 +1,2 @@ +name = Minetest-WorldEdit +description = WorldEdit is an in-game world editor. Use it to repair griefing, or just create awesome buildings in seconds. diff --git a/worldedit/modpack.txt b/worldedit/modpack.txt deleted file mode 100644 index e69de29..0000000 diff --git a/worldedit/worldedit/code.lua b/worldedit/worldedit/code.lua index 948cb27..48c992e 100644 --- a/worldedit/worldedit/code.lua +++ b/worldedit/worldedit/code.lua @@ -50,10 +50,3 @@ function worldedit.luatransform(pos1, pos2, code) return nil end - -local input = io.open(minetest.get_worldpath().."/init.lua", "r") -if input then - local code = input:read("*a") - input:close() - worldedit.lua(code) -end \ No newline at end of file diff --git a/worldedit/worldedit/common.lua b/worldedit/worldedit/common.lua index be9a2c9..9a2215d 100644 --- a/worldedit/worldedit/common.lua +++ b/worldedit/worldedit/common.lua @@ -46,6 +46,9 @@ end function worldedit.keep_loaded(pos1, pos2) + -- Create a vmanip and read the area from map, this + -- causes all MapBlocks to be loaded into memory. + -- This doesn't actually *keep* them loaded, unlike the name implies. local manip = minetest.get_voxel_manip() manip:read_from_map(pos1, pos2) end @@ -107,7 +110,9 @@ end function mh.finish(manip, data) -- Update map - manip:set_data(data) + if data ~= nil then + manip:set_data(data) + end manip:write_to_map() manip:update_map() end diff --git a/worldedit/worldedit/cuboid.lua b/worldedit/worldedit/cuboid.lua index ce20761..d27e233 100644 --- a/worldedit/worldedit/cuboid.lua +++ b/worldedit/worldedit/cuboid.lua @@ -98,21 +98,6 @@ worldedit.marker_move = function(name, marker, deltavector) return true end --- Updates the location ingame of the markers -worldedit.marker_update = function(name, marker) - if marker == nil then - worldedit.mark_pos1(name) - worldedit.mark_pos2(name) - elseif marker == 1 then - worldedit.mark_pos1(name) - elseif marker == 2 then - worldedit.mark_pos2(name) - else - minetest.debug( - "worldedit: Invalid execution of function update_markers") - end -end - -- Returns two vectors with the directions for volumetric expansion worldedit.get_expansion_directions = function(mark1, mark2) @@ -149,7 +134,7 @@ end -- Return the marker that is closest to the player worldedit.marker_get_closest_to_player = function(name) - local playerpos = minetest.get_player_by_name(name):getpos() + local playerpos = minetest.get_player_by_name(name):get_pos() local dist1 = vector.distance(playerpos, worldedit.pos1[name]) local dist2 = vector.distance(playerpos, worldedit.pos2[name]) @@ -255,4 +240,4 @@ worldedit.translate_direction = function(name, direction) end return resaxis, resdir -end \ No newline at end of file +end diff --git a/worldedit/worldedit/init.lua b/worldedit/worldedit/init.lua index a38e3e6..67e1c40 100644 --- a/worldedit/worldedit/init.lua +++ b/worldedit/worldedit/init.lua @@ -1,7 +1,7 @@ ---- Worldedit. +--- WorldEdit mod for the Minetest engine -- @module worldedit --- @release 1.2 --- @copyright 2013 sfan5, Anthony Zhang (Uberi/Temperest), and Brett O'Donnell (cornernote). +-- @release 1.3 +-- @copyright 2012 sfan5, Anthony Zhang (Uberi/Temperest), and Brett O'Donnell (cornernote) -- @license GNU Affero General Public License version 3 (AGPLv3) -- @author sfan5 -- @author Anthony Zang (Uberi/Temperest) @@ -11,18 +11,10 @@ worldedit = {} -local ver = {major=1, minor=2} +local ver = {major=1, minor=3} worldedit.version = ver worldedit.version_string = string.format("%d.%d", ver.major, ver.minor) -if not minetest.get_voxel_manip then - local err_msg = "This version of WorldEdit requires Minetest 0.4.8 or later! You have an old version." - minetest.log("error", string.rep("#", 128)) - minetest.log("error", err_msg) - minetest.log("error", string.rep("#", 128)) - error(err_msg) -end - local path = minetest.get_modpath(minetest.get_current_modname()) local function load_module(path) diff --git a/worldedit/worldedit/manipulations.lua b/worldedit/worldedit/manipulations.lua index ee51561..3bad0dd 100644 --- a/worldedit/worldedit/manipulations.lua +++ b/worldedit/worldedit/manipulations.lua @@ -76,9 +76,6 @@ function worldedit.replace(pos1, pos2, search_node, replace_node, inverse) local count = 0 - --- TODO: This could be shortened by checking `inverse` in the loop, - -- but that would have a speed penalty. Is the penalty big enough - -- to matter? if not inverse then for i in area:iterp(pos1, pos2) do if data[i] == search_id then @@ -101,27 +98,47 @@ function worldedit.replace(pos1, pos2, search_node, replace_node, inverse) end +local function deferred_execution(next_one, finished) + -- Allocate 100% of server step for execution (might lag a little) + local allocated_usecs = + tonumber(minetest.settings:get("dedicated_server_step")) * 1000000 + local function f() + local deadline = minetest.get_us_time() + allocated_usecs + repeat + local is_done = next_one() + if is_done then + if finished then + finished() + end + return + end + until minetest.get_us_time() >= deadline + minetest.after(0, f) + end + f() +end + --- Duplicates a region `amount` times with offset vector `direction`. --- Stacking is spread across server steps, one copy per step. +-- Stacking is spread across server steps. -- @return The number of nodes stacked. function worldedit.stack2(pos1, pos2, direction, amount, finished) + -- Protect arguments from external changes during execution + pos1 = table.copy(pos1) + pos2 = table.copy(pos2) + direction = table.copy(direction) + local i = 0 local translated = {x=0, y=0, z=0} - local function next_one() - if i < amount then - i = i + 1 - translated.x = translated.x + direction.x - translated.y = translated.y + direction.y - translated.z = translated.z + direction.z - worldedit.copy2(pos1, pos2, translated) - minetest.after(0, next_one) - else - if finished then - finished() - end - end + local function step() + translated.x = translated.x + direction.x + translated.y = translated.y + direction.y + translated.z = translated.z + direction.z + worldedit.copy2(pos1, pos2, translated) + i = i + 1 + return i >= amount end - next_one() + deferred_execution(step, finished) + return worldedit.volume(pos1, pos2) * amount end @@ -135,181 +152,187 @@ end function worldedit.copy(pos1, pos2, axis, amount) local pos1, pos2 = worldedit.sort_pos(pos1, pos2) - worldedit.keep_loaded(pos1, pos2) + -- Decide if we need to copy stuff backwards (only applies to metadata) + local backwards = amount > 0 and amount < (pos2[axis] - pos1[axis] + 1) - local get_node, get_meta, set_node = minetest.get_node, - minetest.get_meta, minetest.set_node - -- Copy things backwards when negative to avoid corruption. - -- FIXME: Lots of code duplication here. - if amount < 0 then - local pos = {} - pos.x = pos1.x - while pos.x <= pos2.x do - pos.y = pos1.y - while pos.y <= pos2.y do - pos.z = pos1.z - while pos.z <= pos2.z do - local node = get_node(pos) -- Obtain current node - local meta = get_meta(pos):to_table() -- Get meta of current node - local value = pos[axis] -- Store current position - pos[axis] = value + amount -- Move along axis - set_node(pos, node) -- Copy node to new position - get_meta(pos):from_table(meta) -- Set metadata of new node - pos[axis] = value -- Restore old position - pos.z = pos.z + 1 - end - pos.y = pos.y + 1 - end - pos.x = pos.x + 1 - end - else - local pos = {} - pos.x = pos2.x - while pos.x >= pos1.x do - pos.y = pos2.y - while pos.y >= pos1.y do - pos.z = pos2.z - while pos.z >= pos1.z do - local node = get_node(pos) -- Obtain current node - local meta = get_meta(pos):to_table() -- Get meta of current node - local value = pos[axis] -- Store current position - pos[axis] = value + amount -- Move along axis - set_node(pos, node) -- Copy node to new position - get_meta(pos):from_table(meta) -- Set metadata of new node - pos[axis] = value -- Restore old position - pos.z = pos.z - 1 - end - pos.y = pos.y - 1 - end - pos.x = pos.x - 1 - end - end - return worldedit.volume(pos1, pos2) + local off = {x=0, y=0, z=0} + off[axis] = amount + return worldedit.copy2(pos1, pos2, off, backwards) end --- Copies a region by offset vector `off`. -- @param pos1 -- @param pos2 -- @param off +-- @param meta_backwards (not officially part of API) -- @return The number of nodes copied. -function worldedit.copy2(pos1, pos2, off) +function worldedit.copy2(pos1, pos2, off, meta_backwards) local pos1, pos2 = worldedit.sort_pos(pos1, pos2) - worldedit.keep_loaded(pos1, pos2) + local src_manip, src_area = mh.init(pos1, pos2) + local src_stride = {x=1, y=src_area.ystride, z=src_area.zstride} + local src_offset = vector.subtract(pos1, src_area.MinEdge) - local get_node, get_meta, set_node = minetest.get_node, - minetest.get_meta, minetest.set_node - local pos = {} - pos.x = pos2.x - while pos.x >= pos1.x do - pos.y = pos2.y - while pos.y >= pos1.y do - pos.z = pos2.z - while pos.z >= pos1.z do - local node = get_node(pos) -- Obtain current node - local meta = get_meta(pos):to_table() -- Get meta of current node - local newpos = vector.add(pos, off) -- Calculate new position - set_node(newpos, node) -- Copy node to new position - get_meta(newpos):from_table(meta) -- Set metadata of new node - pos.z = pos.z - 1 + local dpos1 = vector.add(pos1, off) + local dpos2 = vector.add(pos2, off) + local dim = vector.add(vector.subtract(pos2, pos1), 1) + + local dst_manip, dst_area = mh.init(dpos1, dpos2) + local dst_stride = {x=1, y=dst_area.ystride, z=dst_area.zstride} + local dst_offset = vector.subtract(dpos1, dst_area.MinEdge) + + local function do_copy(src_data, dst_data) + for z = 0, dim.z-1 do + local src_index_z = (src_offset.z + z) * src_stride.z + 1 -- +1 for 1-based indexing + local dst_index_z = (dst_offset.z + z) * dst_stride.z + 1 + for y = 0, dim.y-1 do + local src_index_y = src_index_z + (src_offset.y + y) * src_stride.y + local dst_index_y = dst_index_z + (dst_offset.y + y) * dst_stride.y + -- Copy entire row at once + local src_index_x = src_index_y + src_offset.x + local dst_index_x = dst_index_y + dst_offset.x + for x = 0, dim.x-1 do + dst_data[dst_index_x + x] = src_data[src_index_x + x] + end end - pos.y = pos.y - 1 end - pos.x = pos.x - 1 end + + -- Copy node data + local src_data = src_manip:get_data() + local dst_data = dst_manip:get_data() + do_copy(src_data, dst_data) + dst_manip:set_data(dst_data) + + -- Copy param1 + src_manip:get_light_data(src_data) + dst_manip:get_light_data(dst_data) + do_copy(src_data, dst_data) + dst_manip:set_light_data(dst_data) + + -- Copy param2 + src_manip:get_param2_data(src_data) + dst_manip:get_param2_data(dst_data) + do_copy(src_data, dst_data) + dst_manip:set_param2_data(dst_data) + + mh.finish(dst_manip) + src_data = nil + dst_data = nil + + -- Copy metadata + local get_meta = minetest.get_meta + if meta_backwards then + for z = dim.z-1, 0, -1 do + for y = dim.y-1, 0, -1 do + for x = dim.x-1, 0, -1 do + local pos = {x=pos1.x+x, y=pos1.y+y, z=pos1.z+z} + local meta = get_meta(pos):to_table() + pos = vector.add(pos, off) + get_meta(pos):from_table(meta) + end + end + end + else + for z = 0, dim.z-1 do + for y = 0, dim.y-1 do + for x = 0, dim.x-1 do + local pos = {x=pos1.x+x, y=pos1.y+y, z=pos1.z+z} + local meta = get_meta(pos):to_table() + pos = vector.add(pos, off) + get_meta(pos):from_table(meta) + end + end + end + end + return worldedit.volume(pos1, pos2) end +--- Deletes all node metadata in the region +-- @param pos1 +-- @param pos2 +-- @return The number of nodes that had their meta deleted. +function worldedit.delete_meta(pos1, pos2) + local pos1, pos2 = worldedit.sort_pos(pos1, pos2) + + local meta_positions = minetest.find_nodes_with_meta(pos1, pos2) + local get_meta = minetest.get_meta + for _, pos in ipairs(meta_positions) do + get_meta(pos):from_table(nil) + end + + return #meta_positions +end + --- Moves a region along `axis` by `amount` nodes. -- @return The number of nodes moved. function worldedit.move(pos1, pos2, axis, amount) local pos1, pos2 = worldedit.sort_pos(pos1, pos2) - worldedit.keep_loaded(pos1, pos2) + local dim = vector.add(vector.subtract(pos2, pos1), 1) + local overlap = math.abs(amount) < dim[axis] + -- Decide if we need to copy metadata backwards + local backwards = overlap and amount > 0 - --- TODO: Move slice by slice using schematic method in the move axis - -- and transfer metadata in separate loop (and if the amount is - -- greater than the length in the axis, copy whole thing at a time and - -- erase original after, using schematic method). - local get_node, get_meta, set_node, remove_node = minetest.get_node, - minetest.get_meta, minetest.set_node, minetest.remove_node - -- Copy things backwards when negative to avoid corruption. - --- FIXME: Lots of code duplication here. - if amount < 0 then - local pos = {} - pos.x = pos1.x - while pos.x <= pos2.x do - pos.y = pos1.y - while pos.y <= pos2.y do - pos.z = pos1.z - while pos.z <= pos2.z do - local node = get_node(pos) -- Obtain current node - local meta = get_meta(pos):to_table() -- Get metadata of current node - remove_node(pos) -- Remove current node - local value = pos[axis] -- Store current position - pos[axis] = value + amount -- Move along axis - set_node(pos, node) -- Move node to new position - get_meta(pos):from_table(meta) -- Set metadata of new node - pos[axis] = value -- Restore old position - pos.z = pos.z + 1 - end - pos.y = pos.y + 1 - end - pos.x = pos.x + 1 + local function nuke_area(my_off, my_dim) + if my_dim.x == 0 or my_dim.y == 0 or my_dim.z == 0 then + return end + local my_pos1 = vector.add(pos1, my_off) + local my_pos2 = vector.subtract(vector.add(my_pos1, my_dim), 1) + worldedit.set(my_pos1, my_pos2, "air") + worldedit.delete_meta(my_pos1, my_pos2) + end + + -- Copy stuff to new location + local off = {x=0, y=0, z=0} + off[axis] = amount + worldedit.copy2(pos1, pos2, off, backwards) + -- Nuke old area + if not overlap then + nuke_area({x=0, y=0, z=0}, dim) else - local pos = {} - pos.x = pos2.x - while pos.x >= pos1.x do - pos.y = pos2.y - while pos.y >= pos1.y do - pos.z = pos2.z - while pos.z >= pos1.z do - local node = get_node(pos) -- Obtain current node - local meta = get_meta(pos):to_table() -- Get metadata of current node - remove_node(pos) -- Remove current node - local value = pos[axis] -- Store current position - pos[axis] = value + amount -- Move along axis - set_node(pos, node) -- Move node to new position - get_meta(pos):from_table(meta) -- Set metadata of new node - pos[axis] = value -- Restore old position - pos.z = pos.z - 1 - end - pos.y = pos.y - 1 - end - pos.x = pos.x - 1 + -- Source and destination region are overlapping, which means we can't + -- blindly delete the [pos1, pos2] area + local leftover = vector.new(dim) -- size of the leftover slice + leftover[axis] = math.abs(amount) + if amount > 0 then + nuke_area({x=0, y=0, z=0}, leftover) + else + local top = {x=0, y=0, z=0} -- offset of the leftover slice from pos1 + top[axis] = dim[axis] - math.abs(amount) + nuke_area(top, leftover) end end + return worldedit.volume(pos1, pos2) end - --- Duplicates a region along `axis` `amount` times. --- Stacking is spread across server steps, one copy per step. +-- Stacking is spread across server steps. -- @param pos1 -- @param pos2 -- @param axis Axis direction, "x", "y", or "z". -- @param count -- @return The number of nodes stacked. -function worldedit.stack(pos1, pos2, axis, count) +function worldedit.stack(pos1, pos2, axis, count, finished) local pos1, pos2 = worldedit.sort_pos(pos1, pos2) local length = pos2[axis] - pos1[axis] + 1 if count < 0 then count = -count length = -length end - local amount = 0 - local copy = worldedit.copy - local i = 1 - local function next_one() - if i <= count then - i = i + 1 - amount = amount + length - copy(pos1, pos2, axis, amount) - minetest.after(0, next_one) - end + + local i, distance = 0, 0 + local function step() + distance = distance + length + worldedit.copy(pos1, pos2, axis, distance) + i = i + 1 + return i >= count end - next_one() + deferred_execution(step, finished) + return worldedit.volume(pos1, pos2) * count end @@ -529,20 +552,22 @@ end -- @param pos2 -- @param angle Angle in degrees (90 degree increments only). -- @return The number of nodes oriented. --- TODO: Support 6D facedir rotation along arbitrary axis. function worldedit.orient(pos1, pos2, angle) local pos1, pos2 = worldedit.sort_pos(pos1, pos2) local registered_nodes = minetest.registered_nodes local wallmounted = { - [90] = {[0]=0, 1, 5, 4, 2, 3}, - [180] = {[0]=0, 1, 3, 2, 5, 4}, - [270] = {[0]=0, 1, 4, 5, 3, 2} + [90] = {0, 1, 5, 4, 2, 3, 0, 0}, + [180] = {0, 1, 3, 2, 5, 4, 0, 0}, + [270] = {0, 1, 4, 5, 3, 2, 0, 0} } local facedir = { - [90] = {[0]=1, 2, 3, 0}, - [180] = {[0]=2, 3, 0, 1}, - [270] = {[0]=3, 0, 1, 2} + [90] = { 1, 2, 3, 0, 13, 14, 15, 12, 17, 18, 19, 16, + 9, 10, 11, 8, 5, 6, 7, 4, 23, 20, 21, 22}, + [180] = { 2, 3, 0, 1, 10, 11, 8, 9, 6, 7, 4, 5, + 18, 19, 16, 17, 14, 15, 12, 13, 22, 23, 20, 21}, + [270] = { 3, 0, 1, 2, 19, 16, 17, 18, 15, 12, 13, 14, + 7, 4, 5, 6, 11, 8, 9, 10, 21, 22, 23, 20} } angle = angle % 360 @@ -558,8 +583,7 @@ function worldedit.orient(pos1, pos2, angle) worldedit.keep_loaded(pos1, pos2) local count = 0 - local set_node, get_node, get_meta, swap_node = minetest.set_node, - minetest.get_node, minetest.get_meta, minetest.swap_node + local get_node, swap_node = minetest.get_node, minetest.swap_node local pos = {x=pos1.x, y=0, z=0} while pos.x <= pos2.x do pos.y = pos1.y @@ -569,17 +593,20 @@ function worldedit.orient(pos1, pos2, angle) local node = get_node(pos) local def = registered_nodes[node.name] if def then - if def.paramtype2 == "wallmounted" then - node.param2 = wallmounted_substitution[node.param2] - local meta = get_meta(pos):to_table() - set_node(pos, node) - get_meta(pos):from_table(meta) + local paramtype2 = def.paramtype2 + if paramtype2 == "wallmounted" or + paramtype2 == "colorwallmounted" then + local orient = node.param2 % 8 + node.param2 = node.param2 - orient + + wallmounted_substitution[orient + 1] + swap_node(pos, node) count = count + 1 - elseif def.paramtype2 == "facedir" then - node.param2 = facedir_substitution[node.param2] - local meta = get_meta(pos):to_table() - set_node(pos, node) - get_meta(pos):from_table(meta) + elseif paramtype2 == "facedir" or + paramtype2 == "colorfacedir" then + local orient = node.param2 % 32 + node.param2 = node.param2 - orient + + facedir_substitution[orient + 1] + swap_node(pos, node) count = count + 1 end end @@ -634,7 +661,7 @@ function worldedit.clear_objects(pos1, pos2) -- Avoid players and WorldEdit entities if not obj:is_player() and (not entity or not entity.name:find("^worldedit:")) then - local pos = obj:getpos() + local pos = obj:get_pos() if pos.x >= pos1x and pos.x <= pos2x and pos.y >= pos1y and pos.y <= pos2y and pos.z >= pos1z and pos.z <= pos2z then diff --git a/worldedit/worldedit/mod.conf b/worldedit/worldedit/mod.conf new file mode 100644 index 0000000..9563477 --- /dev/null +++ b/worldedit/worldedit/mod.conf @@ -0,0 +1,2 @@ +name = worldedit +description = WorldEdit main functionality & API diff --git a/worldedit/worldedit/serialization.lua b/worldedit/worldedit/serialization.lua index a0848e2..c3793b2 100644 --- a/worldedit/worldedit/serialization.lua +++ b/worldedit/worldedit/serialization.lua @@ -24,7 +24,7 @@ Serialization version history: -- @return Extra header fields as a list of strings, or nil if not supported. -- @return Content (data after header). function worldedit.read_header(value) - if value:find("^[0-9]+[%-:]") then + if value:find("^[0-9]+[,:]") then local header_end = value:find(":", 1, true) local header = value:sub(1, header_end - 1):split(",") local version = tonumber(header[1]) @@ -56,10 +56,19 @@ function worldedit.serialize(pos1, pos2) worldedit.keep_loaded(pos1, pos2) + local get_node, get_meta, hash_node_position = + minetest.get_node, minetest.get_meta, minetest.hash_node_position + + -- Find the positions which have metadata + local has_meta = {} + local meta_positions = minetest.find_nodes_with_meta(pos1, pos2) + for i = 1, #meta_positions do + has_meta[hash_node_position(meta_positions[i])] = true + end + local pos = {x=pos1.x, y=0, z=0} local count = 0 local result = {} - local get_node, get_meta = minetest.get_node, minetest.get_meta while pos.x <= pos2.x do pos.y = pos1.y while pos.y <= pos2.y do @@ -68,20 +77,19 @@ function worldedit.serialize(pos1, pos2) local node = get_node(pos) if node.name ~= "air" and node.name ~= "ignore" then count = count + 1 - local meta = get_meta(pos):to_table() - local meta_empty = true - -- Convert metadata item stacks to item strings - for name, inventory in pairs(meta.inventory) do - for index, stack in ipairs(inventory) do - meta_empty = false - inventory[index] = stack.to_string and stack:to_string() or stack - end - end - for k in pairs(meta) do - if k ~= "inventory" then - meta_empty = false - break + local meta + if has_meta[hash_node_position(pos)] then + meta = get_meta(pos):to_table() + + -- Convert metadata item stacks to item strings + for _, invlist in pairs(meta.inventory) do + for index = 1, #invlist do + local itemstack = invlist[index] + if itemstack.to_string then + invlist[index] = itemstack:to_string() + end + end end end @@ -92,7 +100,7 @@ function worldedit.serialize(pos1, pos2) name = node.name, param1 = node.param1 ~= 0 and node.param1 or nil, param2 = node.param2 ~= 0 and node.param2 or nil, - meta = not meta_empty and meta or nil, + meta = meta, } end pos.z = pos.z + 1 @@ -106,16 +114,44 @@ function worldedit.serialize(pos1, pos2) return LATEST_SERIALIZATION_HEADER .. result, count end - ---- Loads the schematic in `value` into a node list in the latest format. -- Contains code based on [table.save/table.load](http://lua-users.org/wiki/SaveTableToFile) -- by ChillCode, available under the MIT license. +local function deserialize_workaround(content) + local nodes + if not jit then + nodes = minetest.deserialize(content, true) + else + -- XXX: This is a filthy hack that works surprisingly well + -- in LuaJIT, `minetest.deserialize` will fail due to the register limit + nodes = {} + content = content:gsub("^%s*return%s*{", "", 1):gsub("}%s*$", "", 1) -- remove the starting and ending values to leave only the node data + -- remove string contents strings while preserving their length + local escaped = content:gsub("\\\\", "@@"):gsub("\\\"", "@@"):gsub("(\"[^\"]*\")", function(s) return string.rep("@", #s) end) + local startpos, startpos1 = 1, 1 + local endpos + while true do -- go through each individual node entry (except the last) + startpos, endpos = escaped:find("},%s*{", startpos) + if not startpos then + break + end + local current = content:sub(startpos1, startpos) + local entry = minetest.deserialize("return " .. current, true) + table.insert(nodes, entry) + startpos, startpos1 = endpos, endpos + end + local entry = minetest.deserialize("return " .. content:sub(startpos1), true) -- process the last entry + table.insert(nodes, entry) + end + return nodes +end + +--- Loads the schematic in `value` into a node list in the latest format. -- @return A node list in the latest format, or nil on failure. local function load_schematic(value) local version, header, content = worldedit.read_header(value) local nodes = {} if version == 1 or version == 2 then -- Original flat table format - local tables = minetest.deserialize(content) + local tables = minetest.deserialize(content, true) if not tables then return nil end -- Transform the node table into an array of nodes @@ -153,28 +189,7 @@ local function load_schematic(value) }) end elseif version == 4 or version == 5 then -- Nested table format - if not jit then - -- This is broken for larger tables in the current version of LuaJIT - nodes = minetest.deserialize(content) - else - -- XXX: This is a filthy hack that works surprisingly well - in LuaJIT, `minetest.deserialize` will fail due to the register limit - nodes = {} - content = content:gsub("return%s*{", "", 1):gsub("}%s*$", "", 1) -- remove the starting and ending values to leave only the node data - local escaped = content:gsub("\\\\", "@@"):gsub("\\\"", "@@"):gsub("(\"[^\"]*\")", function(s) return string.rep("@", #s) end) - local startpos, startpos1, endpos = 1, 1 - while true do -- go through each individual node entry (except the last) - startpos, endpos = escaped:find("},%s*{", startpos) - if not startpos then - break - end - local current = content:sub(startpos1, startpos) - local entry = minetest.deserialize("return " .. current) - table.insert(nodes, entry) - startpos, startpos1 = endpos, endpos - end - local entry = minetest.deserialize("return " .. content:sub(startpos1)) -- process the last entry - table.insert(nodes, entry) - end + nodes = deserialize_workaround(content) else return nil end @@ -188,7 +203,7 @@ end -- @return The number of nodes. function worldedit.allocate(origin_pos, value) local nodes = load_schematic(value) - if not nodes then return nil end + if not nodes or #nodes == 0 then return nil end return worldedit.allocate_with_nodes(origin_pos, nodes) end @@ -219,6 +234,7 @@ end function worldedit.deserialize(origin_pos, value) local nodes = load_schematic(value) if not nodes then return nil end + if #nodes == 0 then return #nodes end local pos1, pos2 = worldedit.allocate_with_nodes(origin_pos, nodes) worldedit.keep_loaded(pos1, pos2) diff --git a/worldedit/worldedit/visualization.lua b/worldedit/worldedit/visualization.lua index 5ac49f3..326a6c1 100644 --- a/worldedit/worldedit/visualization.lua +++ b/worldedit/worldedit/visualization.lua @@ -6,6 +6,7 @@ minetest.register_node("worldedit:placeholder", { paramtype = "light", sunlight_propagates = true, diggable = false, + pointable = false, walkable = false, groups = {not_in_creative_inventory=1}, }) diff --git a/worldedit/worldedit_brush/depends.txt b/worldedit/worldedit_brush/depends.txt deleted file mode 100644 index f886436..0000000 --- a/worldedit/worldedit_brush/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -worldedit -worldedit_commands diff --git a/worldedit/worldedit_brush/init.lua b/worldedit/worldedit_brush/init.lua index 21de630..78c1bd1 100644 --- a/worldedit/worldedit_brush/init.lua +++ b/worldedit/worldedit_brush/init.lua @@ -1,57 +1,10 @@ -local modname = minetest.get_current_modname() - --- check compatibility if minetest.raycast == nil then - function log_unavailable_error() - minetest.log("error", - "[MOD] " .. modname .. " is not compatible with current game version, " .. - "you can disable it in the game settings!" - ) - minetest.log("verbose", - "[MOD] " .. modname .. " requires a suitable version of 0.4.16-dev or higher, " .. - "that includes support for minetest.raycast() [since 7th July 2017]" - ) - end - - if minetest.is_singleplayer() then - -- delay message until player is connected - minetest.register_on_joinplayer(log_unavailable_error) - else - log_unavailable_error() - end - - -- exit here / do not load this mod - return + error( + "worldedit_brush requires at least Minetest 5.0" + ) end local BRUSH_MAX_DIST = 150 -local BRUSH_ALLOWED_COMMANDS = { - -- basically everything that only needs pos1 - "cube", - "cylinder", - "dome", - "hollowcube", - "hollowcylinder", - "hollowdome", - "hollowpyramid", - "hollowsphere", - "load", - "pyramid", - "sphere", - "spiral", - - "cyl", - "do", - "hcube", - "hcyl", - "hdo", - "hpyr", - "hspr", - "l", - "pyr", - "spr", - "spl", -} local brush_on_use = function(itemstack, placer) local meta = itemstack:get_meta() local name = placer:get_player_name() @@ -62,8 +15,10 @@ local brush_on_use = function(itemstack, placer) "This brush is not bound, use //brush to bind a command to it.") return false end - local cmddef = minetest.registered_chatcommands["/" .. cmd] + + local cmddef = worldedit.registered_commands[cmd] if cmddef == nil then return false end -- shouldn't happen as //brush checks this + local has_privs, missing_privs = minetest.check_player_privs(name, cmddef.privs) if not has_privs then worldedit.player_notify(name, @@ -71,7 +26,8 @@ local brush_on_use = function(itemstack, placer) return false end - local raybegin = vector.add(placer:get_pos(), {x=0, y=2, z=0}) -- player head + local raybegin = vector.add(placer:get_pos(), + {x=0, y=placer:get_properties().eye_height, z=0}) local rayend = vector.add(raybegin, vector.multiply(placer:get_look_dir(), BRUSH_MAX_DIST)) local ray = minetest.raycast(raybegin, rayend, false, true) local pointed_thing = ray:next() @@ -83,20 +39,23 @@ local brush_on_use = function(itemstack, placer) assert(pointed_thing.type == "node") worldedit.pos1[name] = pointed_thing.under worldedit.pos2[name] = nil - worldedit.mark_region(name) - -- is this a horrible hack? oh yes. - worldedit._override_safe_regions = true + worldedit.marker_update(name) + + -- this isn't really clean... local player_notify_old = worldedit.player_notify worldedit.player_notify = function(name, msg) if string.match(msg, "^%d") then return end -- discard "1234 nodes added." return player_notify_old(name, msg) end + assert(cmddef.require_pos < 2) + local parsed = {cmddef.parse(meta:get_string("params"))} + if not table.remove(parsed, 1) then return false end -- shouldn't happen + minetest.log("action", string.format("%s uses WorldEdit brush (//%s) at %s", name, cmd, minetest.pos_to_string(pointed_thing.under))) - cmddef.func(name, meta:get_string("params")) + cmddef.func(name, unpack(parsed)) - worldedit._override_safe_regions = false worldedit.player_notify = player_notify_old return true end @@ -112,21 +71,22 @@ minetest.register_tool(":worldedit:brush", { end, }) -minetest.register_chatcommand("/brush", { +worldedit.register_command("brush", { privs = {worldedit=true}, params = "none/ [parameters]", description = "Assign command to WorldEdit brush item", - func = function(name, param) + parse = function(param) local found, _, cmd, params = param:find("^([^%s]+)%s+(.+)$") if not found then params = "" found, _, cmd = param:find("^(.+)$") end if not found then - worldedit.player_notify(name, "Invalid usage.") - return + return false end - + return true, cmd, params + end, + func = function(name, cmd, params) local itemstack = minetest.get_player_by_name(name):get_wielded_item() if itemstack == nil or itemstack:get_name() ~= "worldedit:brush" then worldedit.player_notify(name, "Not holding brush item.") @@ -139,16 +99,20 @@ minetest.register_chatcommand("/brush", { meta:from_table(nil) worldedit.player_notify(name, "Brush assignment cleared.") else - local cmddef - if table.indexof(BRUSH_ALLOWED_COMMANDS, cmd) ~= -1 then - cmddef = minetest.registered_chatcommands["/" .. cmd] - else - cmddef = nil - end - if cmddef == nil then - worldedit.player_notify(name, "Invalid command for brush use: //" .. cmd) + local cmddef = worldedit.registered_commands[cmd] + if cmddef == nil or cmddef.require_pos ~= 1 then + worldedit.player_notify(name, "//" .. cmd .. " cannot be used with brushes") return end + + -- Try parsing command params so we can give the user feedback + local ok, err = cmddef.parse(params) + if not ok then + err = err or "invalid usage" + worldedit.player_notify(name, "Error with brush command: " .. err) + return + end + meta:set_string("command", cmd) meta:set_string("params", params) local fullcmd = "//" .. cmd .. " " .. params diff --git a/worldedit/worldedit_brush/mod.conf b/worldedit/worldedit_brush/mod.conf new file mode 100644 index 0000000..2974de1 --- /dev/null +++ b/worldedit/worldedit_brush/mod.conf @@ -0,0 +1,3 @@ +name = worldedit_brush +description = WorldEdit brush +depends = worldedit, worldedit_commands diff --git a/worldedit/worldedit_commands/cuboid.lua b/worldedit/worldedit_commands/cuboid.lua index 88f0260..93e45fa 100644 --- a/worldedit/worldedit_commands/cuboid.lua +++ b/worldedit/worldedit_commands/cuboid.lua @@ -1,28 +1,22 @@ -minetest.register_chatcommand("/outset", { - params = "[h|v] ", - description = "outset the selection", +worldedit.register_command("outset", { + params = "[h/v] ", + description = "Outset the selected region.", privs = {worldedit=true}, - func = function(name, param) + require_pos = 2, + parse = function(param) local find, _, dir, amount = param:find("(%a*)%s*([+-]?%d+)") - if find == nil then - return false, "invalid usage: " .. param + return false end - - local pos1 = worldedit.pos1[name] - local pos2 = worldedit.pos2[name] - - if pos1 == nil or pos2 == nil then - return false, - "Undefined region. Region must be defined beforehand." - end - + local hv_test = dir:find("[^hv]+") - if hv_test ~= nil then return false, "Invalid direction." end - + + return true, dir, tonumber(amount) + end, + func = function(name, dir, amount) if dir == "" or dir == "hv" or dir == "vh" then assert(worldedit.cuboid_volumetric_expand(name, amount)) elseif dir == "h" then @@ -36,39 +30,30 @@ minetest.register_chatcommand("/outset", { else return false, "Invalid number of arguments" end - + worldedit.marker_update(name) return true, "Region outset by " .. amount .. " blocks" end, - } -) +}) -minetest.register_chatcommand("/inset", { - params = "[h|v] ", - description = "inset the selection", +worldedit.register_command("inset", { + params = "[h/v] ", + description = "Inset the selected region.", privs = {worldedit=true}, - func = function(name, param) + require_pos = 2, + parse = function(param) local find, _, dir, amount = param:find("(%a*)%s*([+-]?%d+)") - if find == nil then - return false, "invalid usage: " .. param + return false end - - local pos1 = worldedit.pos1[name] - local pos2 = worldedit.pos2[name] - - if pos1 == nil or pos2 == nil then - return false, - "Undefined region. Region must be defined beforehand." - end - - local hv_test = dir:find("[^hv]+") - - if hv_test ~= nil then + if dir:find("[^hv]") ~= nil then return false, "Invalid direction." end - + + return true, dir, tonumber(amount) + end, + func = function(name, dir, amount) if dir == "" or dir == "vh" or dir == "hv" then assert(worldedit.cuboid_volumetric_expand(name, -amount)) elseif dir == "h" then @@ -82,34 +67,27 @@ minetest.register_chatcommand("/inset", { else return false, "Invalid number of arguments" end - + worldedit.marker_update(name) return true, "Region inset by " .. amount .. " blocks" end, - } -) +}) -minetest.register_chatcommand("/shift", { - params = "[x|y|z|?|up|down|left|right|front|back] [+|-]", - description = "Moves the selection region. Does not move contents.", +worldedit.register_command("shift", { + params = "x/y/z/?/up/down/left/right/front/back [+/-]", + description = "Shifts the selection area without moving its contents", privs = {worldedit=true}, - func = function(name, param) - local pos1 = worldedit.pos1[name] - local pos2 = worldedit.pos2[name] + require_pos = 2, + parse = function(param) local find, _, direction, amount = param:find("([%?%l]+)%s*([+-]?%d+)") - if find == nil then - worldedit.player_notify(name, "invalid usage: " .. param) - return + return false end - - if pos1 == nil or pos2 == nil then - worldedit.player_notify(name, - "Undefined region. Region must be defined beforehand.") - return - end - + + return true, direction, tonumber(amount) + end, + func = function(name, direction, amount) local axis, dir if direction == "x" or direction == "y" or direction == "z" then axis, dir = direction, 1 @@ -118,123 +96,171 @@ minetest.register_chatcommand("/shift", { else axis, dir = worldedit.translate_direction(name, direction) end - + if axis == nil or dir == nil then return false, "Invalid if looking straight up or down" end - + assert(worldedit.cuboid_shift(name, axis, amount * dir)) worldedit.marker_update(name) - + return true, "Region shifted by " .. amount .. " nodes" end, - } -) +}) -minetest.register_chatcommand("/expand", { - params = "[+|-] [reverse-amount]", - description = "expand the selection in one or two directions at once", +worldedit.register_command("expand", { + params = "[+/-]x/y/z/?/up/down/left/right/front/back [reverse amount]", + description = "Expands the selection in the selected absolute or relative axis", privs = {worldedit=true}, - func = function(name, param) - local find, _, sign, direction, amount, - rev_amount = param:find("([+-]?)([%?%l]+)%s*(%d+)%s*(%d*)") - - if find == nil then - worldedit.player_notify(name, "invalid use: " .. param) - return - end - - if worldedit.pos1[name] == nil or worldedit.pos2[name] == nil then - worldedit.player_notify(name, - "Undefined region. Region must be defined beforehand.") - return - end - - local absolute = direction:find("[xyz?]") - local dir, axis - - if rev_amount == "" then - rev_amount = 0 - end - - if absolute == nil then - axis, dir = worldedit.translate_direction(name, direction) - - if axis == nil or dir == nil then - return false, "Invalid if looking straight up or down" + require_pos = 2, + parse = function(param) + local find, _, sign, direction, amount, + rev_amount = param:find("([+-]?)([%?%l]+)%s*(%d+)%s*(%d*)") + if find == nil then + return false end - else - if direction == "?" then - axis, dir = worldedit.player_axis(name) + + if rev_amount == "" then + rev_amount = "0" + end + + return true, sign, direction, tonumber(amount), tonumber(rev_amount) + end, + func = function(name, sign, direction, amount, rev_amount) + local absolute = direction:find("[xyz?]") + local dir, axis + + if absolute == nil then + axis, dir = worldedit.translate_direction(name, direction) + + if axis == nil or dir == nil then + return false, "Invalid if looking straight up or down" + end else - axis = direction - dir = 1 + if direction == "?" then + axis, dir = worldedit.player_axis(name) + else + axis = direction + dir = 1 + end end - end - - if sign == "-" then - dir = -dir - end - - worldedit.cuboid_linear_expand(name, axis, dir, amount) - worldedit.cuboid_linear_expand(name, axis, -dir, rev_amount) - worldedit.marker_update(name) - return true, "Region expanded by " .. (amount + rev_amount) .. " nodes" - end, - } -) + + if sign == "-" then + dir = -dir + end + + worldedit.cuboid_linear_expand(name, axis, dir, amount) + worldedit.cuboid_linear_expand(name, axis, -dir, rev_amount) + worldedit.marker_update(name) + return true, "Region expanded by " .. (amount + rev_amount) .. " nodes" + end, +}) -minetest.register_chatcommand("/contract", { - params = "[+|-] [reverse-amount]", - description = "contract the selection in one or two directions at once", +worldedit.register_command("contract", { + params = "[+/-]x/y/z/?/up/down/left/right/front/back [reverse amount]", + description = "Contracts the selection in the selected absolute or relative axis", privs = {worldedit=true}, - func = function(name, param) - local find, _, sign, direction, amount, - rev_amount = param:find("([+-]?)([%?%l]+)%s*(%d+)%s*(%d*)") - - if find == nil then - worldedit.player_notify(name, "invalid use: " .. param) - return - end - - if worldedit.pos1[name] == nil or worldedit.pos2[name] == nil then - worldedit.player_notify(name, - "Undefined region. Region must be defined beforehand.") - return - end - - local absolute = direction:find("[xyz?]") - local dir, axis - - if rev_amount == "" then - rev_amount = 0 - end - - if absolute == nil then - axis, dir = worldedit.translate_direction(name, direction) - - if axis == nil or dir == nil then - return false, "Invalid if looking straight up or down" + require_pos = 2, + parse = function(param) + local find, _, sign, direction, amount, + rev_amount = param:find("([+-]?)([%?%l]+)%s*(%d+)%s*(%d*)") + if find == nil then + return false end - else - if direction == "?" then - axis, dir = worldedit.player_axis(name) + + if rev_amount == "" then + rev_amount = "0" + end + + return true, sign, direction, tonumber(amount), tonumber(rev_amount) + end, + func = function(name, sign, direction, amount, rev_amount) + local absolute = direction:find("[xyz?]") + local dir, axis + + if absolute == nil then + axis, dir = worldedit.translate_direction(name, direction) + + if axis == nil or dir == nil then + return false, "Invalid if looking straight up or down" + end else - axis = direction - dir = 1 + if direction == "?" then + axis, dir = worldedit.player_axis(name) + else + axis = direction + dir = 1 + end end - end - - if sign == "-" then - dir = -dir - end - - worldedit.cuboid_linear_expand(name, axis, dir, -amount) - worldedit.cuboid_linear_expand(name, axis, -dir, -rev_amount) - worldedit.marker_update(name) - return true, "Region contracted by " .. (amount + rev_amount) .. " nodes" - end, - } -) + + if sign == "-" then + dir = -dir + end + + worldedit.cuboid_linear_expand(name, axis, dir, -amount) + worldedit.cuboid_linear_expand(name, axis, -dir, -rev_amount) + worldedit.marker_update(name) + return true, "Region contracted by " .. (amount + rev_amount) .. " nodes" + end, +}) + +worldedit.register_command("cubeapply", { + params = "/( ) [parameters]", + description = "Select a cube with side length around position 1 and run on region", + privs = {worldedit=true}, + require_pos = 1, + parse = function(param) + local found, _, sidex, sidey, sidez, cmd, args = + param:find("^(%d+)%s+(%d+)%s+(%d+)%s+([^%s]+)%s*(.*)$") + if found == nil then + found, _, sidex, cmd, args = param:find("^(%d+)%s+([^%s]+)%s*(.*)$") + if found == nil then + return false + end + sidey = sidex + sidez = sidex + end + sidex = tonumber(sidex) + sidey = tonumber(sidey) + sidez = tonumber(sidez) + if sidex < 1 or sidey < 1 or sidez < 1 then + return false + end + local cmddef = worldedit.registered_commands[cmd] + if cmddef == nil or cmddef.require_pos ~= 2 then + return false, "invalid usage: //" .. cmd .. " cannot be used with cubeapply" + end + -- run parsing of target command + local parsed = {cmddef.parse(args)} + if not table.remove(parsed, 1) then + return false, parsed[1] + end + return true, sidex, sidey, sidez, cmd, parsed + end, + nodes_needed = function(name, sidex, sidey, sidez, cmd, parsed) + -- its not possible to defer to the target command at this point + return sidex * sidey * sidez + end, + func = function(name, sidex, sidey, sidez, cmd, parsed) + local cmddef = assert(worldedit.registered_commands[cmd]) + local success, missing_privs = minetest.check_player_privs(name, cmddef.privs) + if not success then + worldedit.player_notify(name, "Missing privileges: " .. + table.concat(missing_privs, ", ")) + return + end + + -- update region to be the cuboid the user wanted + local half = vector.divide(vector.new(sidex, sidey, sidez), 2) + local sizea, sizeb = vector.apply(half, math.floor), vector.apply(half, math.ceil) + local center = worldedit.pos1[name] + worldedit.pos1[name] = vector.subtract(center, sizea) + worldedit.pos2[name] = vector.add(center, vector.subtract(sizeb, 1)) + worldedit.marker_update(name) + + -- actually run target command + return cmddef.func(name, unpack(parsed)) + end, +}) diff --git a/worldedit/worldedit_commands/depends.txt b/worldedit/worldedit_commands/depends.txt deleted file mode 100644 index df8caff..0000000 --- a/worldedit/worldedit_commands/depends.txt +++ /dev/null @@ -1 +0,0 @@ -worldedit \ No newline at end of file diff --git a/worldedit/worldedit_commands/init.lua b/worldedit/worldedit_commands/init.lua index 61aafc1..1cdb107 100644 --- a/worldedit/worldedit_commands/init.lua +++ b/worldedit/worldedit_commands/init.lua @@ -1,46 +1,161 @@ minetest.register_privilege("worldedit", "Can use WorldEdit commands") -worldedit.set_pos = {} -worldedit.inspect = {} - worldedit.pos1 = {} worldedit.pos2 = {} -if minetest.place_schematic then - worldedit.prob_pos = {} - worldedit.prob_list = {} -end -dofile(minetest.get_modpath("worldedit_commands") .. "/cuboid.lua") -dofile(minetest.get_modpath("worldedit_commands") .. "/mark.lua") -dofile(minetest.get_modpath("worldedit_commands") .. "/wand.lua") -local safe_region, check_region, reset_pending = dofile(minetest.get_modpath("worldedit_commands") .. "/safe.lua") +worldedit.set_pos = {} +worldedit.inspect = {} +worldedit.prob_pos = {} +worldedit.prob_list = {} -local function get_position(name) --position 1 retrieval function for when not using `safe_region` - local pos1 = worldedit.pos1[name] - if pos1 == nil then - worldedit.player_notify(name, "no position 1 selected") - end - return pos1 -end --- normalize_nodename wrapper for convenience purposes -local function get_node(name, nodename) - local node = worldedit.normalize_nodename(nodename) - if not node then - worldedit.player_notify(name, "invalid node name: " .. nodename) - return nil - end - return node -end + +local safe_region, reset_pending = dofile(minetest.get_modpath("worldedit_commands") .. "/safe.lua") function worldedit.player_notify(name, message) minetest.chat_send_player(name, "WorldEdit -!- " .. message, false) end +worldedit.registered_commands = {} + +local function chatcommand_handler(cmd_name, name, param) + local def = assert(worldedit.registered_commands[cmd_name]) + + if def.require_pos == 2 then + local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name] + if pos1 == nil or pos2 == nil then + worldedit.player_notify(name, "no region selected") + return + end + elseif def.require_pos == 1 then + local pos1 = worldedit.pos1[name] + if pos1 == nil then + worldedit.player_notify(name, "no position 1 selected") + return + end + end + + local parsed = {def.parse(param)} + local success = table.remove(parsed, 1) + if not success then + worldedit.player_notify(name, parsed[1] or "invalid usage") + return + end + + if def.nodes_needed then + local count = def.nodes_needed(name, unpack(parsed)) + safe_region(name, count, function() + local success, msg = def.func(name, unpack(parsed)) + if msg then + minetest.chat_send_player(name, msg) + end + end) + else + -- no "safe region" check + local success, msg = def.func(name, unpack(parsed)) + if msg then + minetest.chat_send_player(name, msg) + end + end +end + +-- Registers a chatcommand for WorldEdit +-- name = "about" -- Name of the chat command (without any /) +-- def = { +-- privs = {}, -- Privileges needed +-- params = "", -- Human readable parameter list (optional) +-- -- setting params = "" will automatically provide a parse() if not given +-- description = "", -- Description +-- require_pos = 0, -- Number of positions required to be set (optional) +-- parse = function(param) +-- return true, foo, bar, ... +-- -- or +-- return false +-- -- or +-- return false, "error message" +-- end, +-- nodes_needed = function(name, foo, bar, ...), -- (optional) +-- return n +-- end, +-- func = function(name, foo, bar, ...) +-- return success, "message" +-- end, +-- } +function worldedit.register_command(name, def) + local def = table.copy(def) + assert(name and #name > 0) + assert(def.privs) + def.require_pos = def.require_pos or 0 + assert(def.require_pos >= 0 and def.require_pos < 3) + if def.params == "" and not def.parse then + def.parse = function(param) return true end + else + assert(def.parse) + end + assert(def.nodes_needed == nil or type(def.nodes_needed) == "function") + assert(def.func) + + -- for development + --[[if def.require_pos == 2 and not def.nodes_needed then + minetest.log("warning", "//" .. name .. " might be missing nodes_needed") + end--]] + + minetest.register_chatcommand("/" .. name, { + privs = def.privs, + params = def.params, + description = def.description, + func = function(player_name, param) + return chatcommand_handler(name, player_name, param) + end, + }) + worldedit.registered_commands[name] = def +end + + + +dofile(minetest.get_modpath("worldedit_commands") .. "/cuboid.lua") +dofile(minetest.get_modpath("worldedit_commands") .. "/mark.lua") +dofile(minetest.get_modpath("worldedit_commands") .. "/wand.lua") + + +local function check_region(name) + return worldedit.volume(worldedit.pos1[name], worldedit.pos2[name]) +end + +-- Strips any kind of escape codes (translation, colors) from a string +-- https://github.com/minetest/minetest/blob/53dd7819277c53954d1298dfffa5287c306db8d0/src/util/string.cpp#L777 +local function strip_escapes(input) + local s = function(idx) return input:sub(idx, idx) end + local out = "" + local i = 1 + while i <= #input do + if s(i) == "\027" then -- escape sequence + i = i + 1 + if s(i) == "(" then -- enclosed + i = i + 1 + while i <= #input and s(i) ~= ")" do + if s(i) == "\\" then + i = i + 2 + else + i = i + 1 + end + end + end + else + out = out .. s(i) + end + i = i + 1 + end + --print(("%q -> %q"):format(input, out)) + return out +end + local function string_endswith(full, part) return full:find(part, 1, true) == #full - #part + 1 end +local description_cache = nil + -- normalizes node "description" `nodename`, returning a string (or nil) worldedit.normalize_nodename = function(nodename) nodename = nodename:gsub("^%s*(.-)%s*$", "%1") -- strip spaces @@ -50,26 +165,40 @@ worldedit.normalize_nodename = function(nodename) if minetest.registered_nodes[fullname] or fullname == "air" then -- full name return fullname end - for key, value in pairs(minetest.registered_nodes) do - if string_endswith(key, ":" .. nodename) then -- matches name (w/o mod part) + nodename = nodename:lower() + + for key, _ in pairs(minetest.registered_nodes) do + if string_endswith(key:lower(), ":" .. nodename) then -- matches name (w/o mod part) return key end end - nodename = nodename:lower() -- lowercase both for case insensitive comparison - for key, value in pairs(minetest.registered_nodes) do - local desc = value.description:lower() + + if description_cache == nil then + -- cache stripped descriptions + description_cache = {} + for key, value in pairs(minetest.registered_nodes) do + local desc = strip_escapes(value.description):gsub("\n.*", "", 1):lower() + if desc ~= "" then + description_cache[key] = desc + end + end + end + + for key, desc in pairs(description_cache) do if desc == nodename then -- matches description return key end - if string_endswith(desc, " block") and desc == nodename.." block" then + end + for key, desc in pairs(description_cache) do + if desc == nodename .. " block" then -- fuzzy description match (e.g. "Steel" == "Steel Block") return key end end local match = nil - for key, value in pairs(minetest.registered_nodes) do - if value.description:lower():find(nodename, 1, true) ~= nil then + for key, value in pairs(description_cache) do + if value:find(nodename, 1, true) ~= nil then if match ~= nil then return nil end @@ -93,38 +222,34 @@ function worldedit.player_axis(name) return "z", dir.z > 0 and 1 or -1 end -local function mkdir(path) - if minetest.mkdir then - minetest.mkdir(path) - else - os.execute('mkdir "' .. path .. '"') - end -end - local function check_filename(name) return name:find("^[%w%s%^&'@{}%[%],%$=!%-#%(%)%%%.%+~_]+$") ~= nil end -minetest.register_chatcommand("/about", { +worldedit.register_command("about", { + privs = {}, params = "", description = "Get information about the WorldEdit mod", - func = function(name, param) - worldedit.player_notify(name, "WorldEdit " .. worldedit.version_string .. " is available on this server. Type /help to get a list of commands, or get more information at https://github.com/Uberi/Minetest-WorldEdit/") + func = function(name) + worldedit.player_notify(name, "WorldEdit " .. worldedit.version_string.. + " is available on this server. Type //help to get a list of ".. + "commands, or get more information at ".. + "https://github.com/Uberi/Minetest-WorldEdit") end, }) -- mostly copied from builtin/chatcommands.lua with minor modifications -minetest.register_chatcommand("/help", { +worldedit.register_command("help", { privs = {}, params = "[all/]", description = "Get help for WorldEdit commands", + parse = function(param) + return true, param + end, func = function(name, param) - local function is_we_command(cmd) - return cmd:sub(0, 1) == "/" - end local function format_help_line(cmd, def) - local msg = minetest.colorize("#00ffff", "/"..cmd) + local msg = minetest.colorize("#00ffff", "//"..cmd) if def.params and def.params ~= "" then msg = msg .. " " .. def.params end @@ -140,9 +265,9 @@ minetest.register_chatcommand("/help", { if param == "" then local msg = "" local cmds = {} - for cmd, def in pairs(minetest.chatcommands) do - if is_we_command(cmd) and minetest.check_player_privs(name, def.privs) then - cmds[#cmds + 1] = cmd:sub(2) -- strip the / + for cmd, def in pairs(worldedit.registered_commands) do + if minetest.check_player_privs(name, def.privs) then + cmds[#cmds + 1] = cmd end end table.sort(cmds) @@ -151,34 +276,45 @@ minetest.register_chatcommand("/help", { .. " or '//help all' to list everything." elseif param == "all" then local cmds = {} - for cmd, def in pairs(minetest.chatcommands) do - if is_we_command(cmd) and minetest.check_player_privs(name, def.privs) then + for cmd, def in pairs(worldedit.registered_commands) do + if minetest.check_player_privs(name, def.privs) then cmds[#cmds + 1] = format_help_line(cmd, def) end end table.sort(cmds) return true, "Available commands:\n"..table.concat(cmds, "\n") else - return minetest.chatcommands["help"].func(name, "/" .. param) + local def = worldedit.registered_commands[param] + if not def then + return false, "Command not available: " .. param + else + return true, format_help_line(param, def) + end end end, }) -minetest.register_chatcommand("/inspect", { - params = "on/off/1/0/true/false/yes/no/enable/disable/", +worldedit.register_command("inspect", { + params = "[on/off/1/0/true/false/yes/no/enable/disable]", description = "Enable or disable node inspection", privs = {worldedit=true}, - func = function(name, param) + parse = function(param) if param == "on" or param == "1" or param == "true" or param == "yes" or param == "enable" or param == "" then + return true, true + elseif param == "off" or param == "0" or param == "false" or param == "no" or param == "disable" then + return true, false + end + return false + end, + func = function(name, enable) + if enable then worldedit.inspect[name] = true local axis, sign = worldedit.player_axis(name) worldedit.player_notify(name, string.format("inspector: inspection enabled for %s, currently facing the %s axis", name, axis .. (sign > 0 and "+" or "-"))) - elseif param == "off" or param == "0" or param == "false" or param == "no" or param == "disable" then + else worldedit.inspect[name] = nil worldedit.player_notify(name, "inspector: inspection disabled") - else - worldedit.player_notify(name, "invalid usage: " .. param) end end, }) @@ -209,15 +345,14 @@ minetest.register_on_punchnode(function(pos, node, puncher) end end) -minetest.register_chatcommand("/reset", { +worldedit.register_command("reset", { params = "", description = "Reset the region so that it is empty", privs = {worldedit=true}, - func = function(name, param) + func = function(name) worldedit.pos1[name] = nil worldedit.pos2[name] = nil - worldedit.mark_pos1(name) - worldedit.mark_pos2(name) + worldedit.marker_update(name) worldedit.set_pos[name] = nil --make sure the user does not try to confirm an operation after resetting pos: reset_pending(name) @@ -225,39 +360,37 @@ minetest.register_chatcommand("/reset", { end, }) -minetest.register_chatcommand("/mark", { +worldedit.register_command("mark", { params = "", description = "Show markers at the region positions", privs = {worldedit=true}, - func = function(name, param) - worldedit.mark_pos1(name) - worldedit.mark_pos2(name) + func = function(name) + worldedit.marker_update(name) worldedit.player_notify(name, "region marked") end, }) -minetest.register_chatcommand("/unmark", { +worldedit.register_command("unmark", { params = "", description = "Hide markers if currently shown", privs = {worldedit=true}, - func = function(name, param) + func = function(name) local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name] worldedit.pos1[name] = nil worldedit.pos2[name] = nil - worldedit.mark_pos1(name) - worldedit.mark_pos2(name) + worldedit.marker_update(name) worldedit.pos1[name] = pos1 worldedit.pos2[name] = pos2 worldedit.player_notify(name, "region unmarked") end, }) -minetest.register_chatcommand("/pos1", { +worldedit.register_command("pos1", { params = "", description = "Set WorldEdit region position 1 to the player's location", privs = {worldedit=true}, - func = function(name, param) - local pos = minetest.get_player_by_name(name):getpos() + func = function(name) + local pos = minetest.get_player_by_name(name):get_pos() pos.x, pos.y, pos.z = math.floor(pos.x + 0.5), math.floor(pos.y + 0.5), math.floor(pos.z + 0.5) worldedit.pos1[name] = pos worldedit.mark_pos1(name) @@ -265,12 +398,12 @@ minetest.register_chatcommand("/pos1", { end, }) -minetest.register_chatcommand("/pos2", { +worldedit.register_command("pos2", { params = "", description = "Set WorldEdit region position 2 to the player's location", privs = {worldedit=true}, - func = function(name, param) - local pos = minetest.get_player_by_name(name):getpos() + func = function(name) + local pos = minetest.get_player_by_name(name):get_pos() pos.x, pos.y, pos.z = math.floor(pos.x + 0.5), math.floor(pos.y + 0.5), math.floor(pos.z + 0.5) worldedit.pos2[name] = pos worldedit.mark_pos2(name) @@ -278,10 +411,16 @@ minetest.register_chatcommand("/pos2", { end, }) -minetest.register_chatcommand("/p", { +worldedit.register_command("p", { params = "set/set1/set2/get", description = "Set WorldEdit region, WorldEdit position 1, or WorldEdit position 2 by punching nodes, or display the current WorldEdit region", privs = {worldedit=true}, + parse = function(param) + if param == "set" or param == "set1" or param == "set2" or param == "get" then + return true, param + end + return false, "unknown subcommand: " .. param + end, func = function(name, param) if param == "set" then --set both WorldEdit positions worldedit.set_pos[name] = "pos1" @@ -303,23 +442,22 @@ minetest.register_chatcommand("/p", { else worldedit.player_notify(name, "position 2 not set") end - else - worldedit.player_notify(name, "unknown subcommand: " .. param) end end, }) -minetest.register_chatcommand("/fixedpos", { - params = "set1/set2 x y z", +worldedit.register_command("fixedpos", { + params = "set1/set2 ", description = "Set a WorldEdit region position to the position at (, , )", privs = {worldedit=true}, - func = function(name, param) + parse = function(param) local found, _, flag, x, y, z = param:find("^(set[12])%s+([+-]?%d+)%s+([+-]?%d+)%s+([+-]?%d+)$") if found == nil then - worldedit.player_notify(name, "invalid usage: " .. param) - return + return false end - local pos = {x=tonumber(x), y=tonumber(y), z=tonumber(z)} + return true, flag, {x=tonumber(x), y=tonumber(y), z=tonumber(z)} + end, + func = function(name, flag, pos) if flag == "set1" then worldedit.pos1[name] = pos worldedit.mark_pos1(name) @@ -357,16 +495,13 @@ minetest.register_on_punchnode(function(pos, node, puncher) end end) -minetest.register_chatcommand("/volume", { +worldedit.register_command("volume", { params = "", description = "Display the volume of the current WorldEdit region", privs = {worldedit=true}, - func = function(name, param) + require_pos = 2, + func = function(name) local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name] - if pos1 == nil or pos2 == nil then - worldedit.player_notify(name, "no region selected") - return nil - end local volume = worldedit.volume(pos1, pos2) local abs = math.abs @@ -377,11 +512,13 @@ minetest.register_chatcommand("/volume", { end, }) -minetest.register_chatcommand("/deleteblocks", { +worldedit.register_command("deleteblocks", { params = "", description = "remove all MapBlocks (16x16x16) containing the selected area from the map", privs = {worldedit=true}, - func = safe_region(function(name, param) + require_pos = 2, + nodes_needed = check_region, + func = function(name) local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name] local success = minetest.delete_area(pos1, pos2) if success then @@ -389,46 +526,55 @@ minetest.register_chatcommand("/deleteblocks", { else worldedit.player_notify(name, "There was an error during deletion of the area.") end - end), + end, }) -minetest.register_chatcommand("/set", { +worldedit.register_command("set", { params = "", description = "Set the current WorldEdit region to ", privs = {worldedit=true}, - func = safe_region(function(name, param) - local node = get_node(name, param) - if not node then return end - + require_pos = 2, + parse = function(param) + local node = worldedit.normalize_nodename(param) + if not node then + return false, "invalid node name: " .. param + end + return true, node + end, + nodes_needed = check_region, + func = function(name, node) local count = worldedit.set(worldedit.pos1[name], worldedit.pos2[name], node) worldedit.player_notify(name, count .. " nodes set") - end, check_region), + end, }) -minetest.register_chatcommand("/param2", { +worldedit.register_command("param2", { params = "", description = "Set param2 of all nodes in the current WorldEdit region to ", privs = {worldedit=true}, - func = safe_region(function(name, param) + require_pos = 2, + parse = function(param) local param2 = tonumber(param) if not param2 then - worldedit.player_notify(name, "Invalid or missing param2 argument") - return + return false elseif param2 < 0 or param2 > 255 then - worldedit.player_notify(name, "Param2 is out of range (must be between 0 and 255 inclusive)!") - return + return false, "Param2 is out of range (must be between 0 and 255 inclusive!)" end - + return true, param2 + end, + nodes_needed = check_region, + func = function(name, param2) local count = worldedit.set_param2(worldedit.pos1[name], worldedit.pos2[name], param2) worldedit.player_notify(name, count .. " nodes altered") - end, check_region), + end, }) -minetest.register_chatcommand("/mix", { - params = " [] [ []] ...", +worldedit.register_command("mix", { + params = " [count1] [count2] ...", description = "Fill the current WorldEdit region with a random mix of , ...", privs = {worldedit=true}, - func = safe_region(function(name, param) + require_pos = 2, + parse = function(param) local nodes = {} for nodename in param:gmatch("[^%s]+") do if tonumber(nodename) ~= nil and #nodes > 0 then @@ -437,187 +583,197 @@ minetest.register_chatcommand("/mix", { nodes[#nodes + 1] = last_node end else - local node = get_node(name, nodename) - if not node then return end + local node = worldedit.normalize_nodename(nodename) + if not node then + return false, "invalid node name: " .. nodename + end nodes[#nodes + 1] = node end end - + if #nodes == 0 then + return false + end + return true, nodes + end, + nodes_needed = check_region, + func = function(name, nodes) local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name] local count = worldedit.set(pos1, pos2, nodes) worldedit.player_notify(name, count .. " nodes set") - end, check_region), + end, }) -local check_replace = function(name, param) +local check_replace = function(param) local found, _, searchnode, replacenode = param:find("^([^%s]+)%s+(.+)$") if found == nil then - worldedit.player_notify(name, "invalid usage: " .. param) - return nil + return false end local newsearchnode = worldedit.normalize_nodename(searchnode) if not newsearchnode then - worldedit.player_notify(name, "invalid search node name: " .. searchnode) - return nil + return false, "invalid search node name: " .. searchnode end local newreplacenode = worldedit.normalize_nodename(replacenode) if not newreplacenode then - worldedit.player_notify(name, "invalid replace node name: " .. replacenode) - return nil + return false, "invalid replace node name: " .. replacenode end - return check_region(name, param) + return true, newsearchnode, newreplacenode end -minetest.register_chatcommand("/replace", { +worldedit.register_command("replace", { params = " ", description = "Replace all instances of with in the current WorldEdit region", privs = {worldedit=true}, - func = safe_region(function(name, param) - local found, _, search_node, replace_node = param:find("^([^%s]+)%s+(.+)$") - local norm_search_node = worldedit.normalize_nodename(search_node) - local norm_replace_node = worldedit.normalize_nodename(replace_node) + require_pos = 2, + parse = check_replace, + nodes_needed = check_region, + func = function(name, search_node, replace_node) local count = worldedit.replace(worldedit.pos1[name], worldedit.pos2[name], - norm_search_node, norm_replace_node) + search_node, replace_node) worldedit.player_notify(name, count .. " nodes replaced") - end, check_replace), + end, }) -minetest.register_chatcommand("/replaceinverse", { +worldedit.register_command("replaceinverse", { params = " ", description = "Replace all nodes other than with in the current WorldEdit region", privs = {worldedit=true}, - func = safe_region(function(name, param) - local found, _, search_node, replace_node = param:find("^([^%s]+)%s+(.+)$") - local norm_search_node = worldedit.normalize_nodename(search_node) - local norm_replace_node = worldedit.normalize_nodename(replace_node) + require_pos = 2, + parse = check_replace, + nodes_needed = check_region, + func = function(name, search_node, replace_node) local count = worldedit.replace(worldedit.pos1[name], worldedit.pos2[name], - norm_search_node, norm_replace_node, true) + search_node, replace_node, true) worldedit.player_notify(name, count .. " nodes replaced") - end, check_replace), + end, }) -local check_cube = function(name, param) - if worldedit.pos1[name] == nil then - worldedit.player_notify(name, "no position 1 selected") - return nil - end +local check_cube = function(param) local found, _, w, h, l, nodename = param:find("^(%d+)%s+(%d+)%s+(%d+)%s+(.+)$") if found == nil then - worldedit.player_notify(name, "invalid usage: " .. param) - return nil + return false end - local node = get_node(name, nodename) - if not node then return nil end - return tonumber(w) * tonumber(h) * tonumber(l) + local node = worldedit.normalize_nodename(nodename) + if not node then + return false, "invalid node name: " .. nodename + end + return true, tonumber(w), tonumber(h), tonumber(l), node end -minetest.register_chatcommand("/hollowcube", { +worldedit.register_command("hollowcube", { params = " ", description = "Add a hollow cube with its ground level centered at WorldEdit position 1 with dimensions x x , composed of .", privs = {worldedit=true}, - func = safe_region(function(name, param) - local found, _, w, h, l, nodename = param:find("^(%d+)%s+(%d+)%s+(%d+)%s+(.+)$") - local node = get_node(name, nodename) - local count = worldedit.cube(worldedit.pos1[name], tonumber(w), tonumber(h), tonumber(l), node, true) + require_pos = 1, + parse = check_cube, + nodes_needed = function(name, w, h, l, node) + return w * h * l + end, + func = function(name, w, h, l, node) + local count = worldedit.cube(worldedit.pos1[name], w, h, l, node, true) worldedit.player_notify(name, count .. " nodes added") - end, check_cube), + end, }) -minetest.register_chatcommand("/cube", { +worldedit.register_command("cube", { params = " ", description = "Add a cube with its ground level centered at WorldEdit position 1 with dimensions x x , composed of .", privs = {worldedit=true}, - func = safe_region(function(name, param) - local found, _, w, h, l, nodename = param:find("^(%d+)%s+(%d+)%s+(%d+)%s+(.+)$") - local node = get_node(name, nodename) - local count = worldedit.cube(worldedit.pos1[name], tonumber(w), tonumber(h), tonumber(l), node) + require_pos = 1, + parse = check_cube, + nodes_needed = function(name, w, h, l, node) + return w * h * l + end, + func = function(name, w, h, l, node) + local count = worldedit.cube(worldedit.pos1[name], w, h, l, node) worldedit.player_notify(name, count .. " nodes added") - end, check_cube), + end, }) -local check_sphere = function(name, param) - if worldedit.pos1[name] == nil then - worldedit.player_notify(name, "no position 1 selected") - return nil - end +local check_sphere = function(param) local found, _, radius, nodename = param:find("^(%d+)%s+(.+)$") if found == nil then - worldedit.player_notify(name, "invalid usage: " .. param) - return nil + return false end - local node = get_node(name, nodename) - if not node then return nil end - return math.ceil((4 * math.pi * (tonumber(radius) ^ 3)) / 3) --volume of sphere + local node = worldedit.normalize_nodename(nodename) + if not node then + return false, "invalid node name: " .. nodename + end + return true, tonumber(radius), node end -minetest.register_chatcommand("/hollowsphere", { +worldedit.register_command("hollowsphere", { params = " ", description = "Add hollow sphere centered at WorldEdit position 1 with radius , composed of ", privs = {worldedit=true}, - func = safe_region(function(name, param) - local found, _, radius, nodename = param:find("^(%d+)%s+(.+)$") - local node = get_node(name, nodename) - local count = worldedit.sphere(worldedit.pos1[name], tonumber(radius), node, true) + require_pos = 1, + parse = check_sphere, + nodes_needed = function(name, radius, node) + return math.ceil((4 * math.pi * (radius ^ 3)) / 3) --volume of sphere + end, + func = function(name, radius, node) + local count = worldedit.sphere(worldedit.pos1[name], radius, node, true) worldedit.player_notify(name, count .. " nodes added") - end, check_sphere), + end, }) -minetest.register_chatcommand("/sphere", { +worldedit.register_command("sphere", { params = " ", description = "Add sphere centered at WorldEdit position 1 with radius , composed of ", privs = {worldedit=true}, - func = safe_region(function(name, param) - local found, _, radius, nodename = param:find("^(%d+)%s+(.+)$") - local node = get_node(name, nodename) - local count = worldedit.sphere(worldedit.pos1[name], tonumber(radius), node) + require_pos = 1, + parse = check_sphere, + nodes_needed = function(name, radius, node) + return math.ceil((4 * math.pi * (radius ^ 3)) / 3) --volume of sphere + end, + func = function(name, radius, node) + local count = worldedit.sphere(worldedit.pos1[name], radius, node) worldedit.player_notify(name, count .. " nodes added") - end, check_sphere), + end, }) -local check_dome = function(name, param) - if worldedit.pos1[name] == nil then - worldedit.player_notify(name, "no position 1 selected") - return nil - end +local check_dome = function(param) local found, _, radius, nodename = param:find("^(%d+)%s+(.+)$") if found == nil then - worldedit.player_notify(name, "invalid usage: " .. param) - return nil + return false end - local node = get_node(name, nodename) - if not node then return nil end - return math.ceil((2 * math.pi * (tonumber(radius) ^ 3)) / 3) --volume of dome + local node = worldedit.normalize_nodename(nodename) + if not node then + return false, "invalid node name: " .. nodename + end + return true, tonumber(radius), node end -minetest.register_chatcommand("/hollowdome", { +worldedit.register_command("hollowdome", { params = " ", description = "Add hollow dome centered at WorldEdit position 1 with radius , composed of ", privs = {worldedit=true}, - func = safe_region(function(name, param) - local found, _, radius, nodename = param:find("^(%d+)%s+(.+)$") - local node = get_node(name, nodename) - local count = worldedit.dome(worldedit.pos1[name], tonumber(radius), node, true) + require_pos = 1, + parse = check_dome, + nodes_needed = function(name, radius, node) + return math.ceil((2 * math.pi * (radius ^ 3)) / 3) --volume of dome + end, + func = function(name, radius, node) + local count = worldedit.dome(worldedit.pos1[name], radius, node, true) worldedit.player_notify(name, count .. " nodes added") - end, check_dome), + end, }) -minetest.register_chatcommand("/dome", { +worldedit.register_command("dome", { params = " ", description = "Add dome centered at WorldEdit position 1 with radius , composed of ", privs = {worldedit=true}, - func = safe_region(function(name, param) - local found, _, radius, nodename = param:find("^(%d+)%s+(.+)$") - local node = get_node(name, nodename) - local count = worldedit.dome(worldedit.pos1[name], tonumber(radius), node) + require_pos = 1, + parse = check_dome, + nodes_needed = function(name, radius, node) + return math.ceil((2 * math.pi * (radius ^ 3)) / 3) --volume of dome + end, + func = function(name, radius, node) + local count = worldedit.dome(worldedit.pos1[name], radius, node) worldedit.player_notify(name, count .. " nodes added") - end, check_dome), + end, }) -local check_cylinder = function(name, param) - if worldedit.pos1[name] == nil then - worldedit.player_notify(name, "no position 1 selected") - return nil - end +local check_cylinder = function(param) -- two radii local found, _, axis, length, radius1, radius2, nodename = param:find("^([xyz%?])%s+([+-]?%d+)%s+(%d+)%s+(%d+)%s+(.+)$") if found == nil then @@ -626,152 +782,150 @@ local check_cylinder = function(name, param) radius2 = radius1 end if found == nil then - worldedit.player_notify(name, "invalid usage: " .. param) - return nil + return false end - local node = get_node(name, nodename) - if not node then return nil end - local radius = math.max(tonumber(radius1), tonumber(radius2)) - return math.ceil(math.pi * (radius ^ 2) * tonumber(length)) + local node = worldedit.normalize_nodename(nodename) + if not node then + return false, "invalid node name: " .. nodename + end + return true, axis, tonumber(length), tonumber(radius1), tonumber(radius2), node end -minetest.register_chatcommand("/hollowcylinder", { +worldedit.register_command("hollowcylinder", { params = "x/y/z/? [radius2] ", - description = "Add hollow cylinder at WorldEdit position 1 along the x/y/z/? axis with length , base radius (and top radius [radius2]), composed of ", + description = "Add hollow cylinder at WorldEdit position 1 along the given axis with length , base radius (and top radius [radius2]), composed of ", privs = {worldedit=true}, - func = safe_region(function(name, param) - -- two radii - local found, _, axis, length, radius1, radius2, nodename = param:find("^([xyz%?])%s+([+-]?%d+)%s+(%d+)%s+(%d+)%s+(.+)$") - if found == nil then - -- single radius - found, _, axis, length, radius1, nodename = param:find("^([xyz%?])%s+([+-]?%d+)%s+(%d+)%s+(.+)$") - radius2 = radius1 - end - length = tonumber(length) + require_pos = 1, + parse = check_cylinder, + nodes_needed = function(name, axis, length, radius1, radius2, node) + local radius = math.max(radius1, radius2) + return math.ceil(math.pi * (radius ^ 2) * length) + end, + func = function(name, axis, length, radius1, radius2, node) if axis == "?" then local sign axis, sign = worldedit.player_axis(name) length = length * sign end - local node = get_node(name, nodename) - local count = worldedit.cylinder(worldedit.pos1[name], axis, length, tonumber(radius1), tonumber(radius2), node, true) + local count = worldedit.cylinder(worldedit.pos1[name], axis, length, radius1, radius2, node, true) worldedit.player_notify(name, count .. " nodes added") - end, check_cylinder), + end, }) -minetest.register_chatcommand("/cylinder", { +worldedit.register_command("cylinder", { params = "x/y/z/? [radius2] ", - description = "Add cylinder at WorldEdit position 1 along the x/y/z/? axis with length , base radius (and top radius [radius2]), composed of ", + description = "Add cylinder at WorldEdit position 1 along the given axis with length , base radius (and top radius [radius2]), composed of ", privs = {worldedit=true}, - func = safe_region(function(name, param) - -- two radii - local found, _, axis, length, radius1, radius2, nodename = param:find("^([xyz%?])%s+([+-]?%d+)%s+(%d+)%s+(%d+)%s+(.+)$") - if found == nil then - -- single radius - found, _, axis, length, radius1, nodename = param:find("^([xyz%?])%s+([+-]?%d+)%s+(%d+)%s+(.+)$") - radius2 = radius1 - end - length = tonumber(length) + require_pos = 1, + parse = check_cylinder, + nodes_needed = function(name, axis, length, radius1, radius2, node) + local radius = math.max(radius1, radius2) + return math.ceil(math.pi * (radius ^ 2) * length) + end, + func = function(name, axis, length, radius1, radius2, node) if axis == "?" then local sign axis, sign = worldedit.player_axis(name) length = length * sign end - local node = get_node(name, nodename) - local count = worldedit.cylinder(worldedit.pos1[name], axis, length, tonumber(radius1), tonumber(radius2), node) + local count = worldedit.cylinder(worldedit.pos1[name], axis, length, radius1, radius2, node) worldedit.player_notify(name, count .. " nodes added") - end, check_cylinder), + end, }) -local check_pyramid = function(name, param) - if worldedit.pos1[name] == nil then - worldedit.player_notify(name, "no position 1 selected") - return nil - end +local check_pyramid = function(param) local found, _, axis, height, nodename = param:find("^([xyz%?])%s+([+-]?%d+)%s+(.+)$") if found == nil then - worldedit.player_notify(name, "invalid usage: " .. param) - return nil + return false end - local node = get_node(name, nodename) - if not node then return nil end - height = tonumber(height) - return math.ceil(((height * 2 + 1) ^ 2) * height / 3) + local node = worldedit.normalize_nodename(nodename) + if not node then + return false, "invalid node name: " .. nodename + end + return true, axis, tonumber(height), node end -minetest.register_chatcommand("/hollowpyramid", { +worldedit.register_command("hollowpyramid", { params = "x/y/z/? ", - description = "Add hollow pyramid centered at WorldEdit position 1 along the x/y/z/? axis with height , composed of ", + description = "Add hollow pyramid centered at WorldEdit position 1 along the given axis with height , composed of ", privs = {worldedit=true}, - func = safe_region(function(name, param) - local found, _, axis, height, nodename = param:find("^([xyz%?])%s+([+-]?%d+)%s+(.+)$") - height = tonumber(height) + require_pos = 1, + parse = check_pyramid, + nodes_needed = function(name, axis, height, node) + return math.ceil(((height * 2 + 1) ^ 2) * height / 3) + end, + func = function(name, axis, height, node) if axis == "?" then local sign axis, sign = worldedit.player_axis(name) height = height * sign end - local node = get_node(name, nodename) local count = worldedit.pyramid(worldedit.pos1[name], axis, height, node, true) worldedit.player_notify(name, count .. " nodes added") - end, check_pyramid), + end, }) -minetest.register_chatcommand("/pyramid", { +worldedit.register_command("pyramid", { params = "x/y/z/? ", - description = "Add pyramid centered at WorldEdit position 1 along the x/y/z/? axis with height , composed of ", + description = "Add pyramid centered at WorldEdit position 1 along the given axis with height , composed of ", privs = {worldedit=true}, - func = safe_region(function(name, param) - local found, _, axis, height, nodename = param:find("^([xyz%?])%s+([+-]?%d+)%s+(.+)$") - height = tonumber(height) + require_pos = 1, + parse = check_pyramid, + nodes_needed = function(name, axis, height, node) + return math.ceil(((height * 2 + 1) ^ 2) * height / 3) + end, + func = function(name, axis, height, node) if axis == "?" then local sign axis, sign = worldedit.player_axis(name) height = height * sign end - local node = get_node(name, nodename) local count = worldedit.pyramid(worldedit.pos1[name], axis, height, node) worldedit.player_notify(name, count .. " nodes added") - end, check_pyramid), + end, }) -minetest.register_chatcommand("/spiral", { +worldedit.register_command("spiral", { params = " ", description = "Add spiral centered at WorldEdit position 1 with side length , height , space between walls , composed of ", privs = {worldedit=true}, - func = safe_region(function(name, param) + require_pos = 1, + parse = function(param) local found, _, length, height, space, nodename = param:find("^(%d+)%s+(%d+)%s+(%d+)%s+(.+)$") - local node = get_node(name, nodename) - local count = worldedit.spiral(worldedit.pos1[name], tonumber(length), tonumber(height), tonumber(space), node) + if found == nil then + return false + end + local node = worldedit.normalize_nodename(nodename) + if not node then + return false, "invalid node name: " .. nodename + end + return true, tonumber(length), tonumber(height), tonumber(space), node + end, + nodes_needed = function(name, length, height, space, node) + return (length + space) * height -- TODO: this is not the upper bound + end, + func = function(name, length, height, space, node) + local count = worldedit.spiral(worldedit.pos1[name], length, height, space, node) worldedit.player_notify(name, count .. " nodes added") end, - function(name, param) - if worldedit.pos1[name] == nil then - worldedit.player_notify(name, "no position 1 selected") - return nil - end - local found, _, length, height, space, nodename = param:find("^(%d+)%s+(%d+)%s+(%d+)%s+(.+)$") - if found == nil then - worldedit.player_notify(name, "invalid usage: " .. param) - return nil - end - local node = get_node(name, nodename) - if not node then return nil end - return 1 -- TODO: return an useful value - end), }) -minetest.register_chatcommand("/copy", { +worldedit.register_command("copy", { params = "x/y/z/? ", - description = "Copy the current WorldEdit region along the x/y/z/? axis by nodes", + description = "Copy the current WorldEdit region along the given axis by nodes", privs = {worldedit=true}, - func = safe_region(function(name, param) + require_pos = 2, + parse = function(param) local found, _, axis, amount = param:find("^([xyz%?])%s+([+-]?%d+)$") if found == nil then - worldedit.player_notify(name, "invalid usage: " .. param) - return + return false end - amount = tonumber(amount) + return true, axis, tonumber(amount) + end, + nodes_needed = function(name, axis, amount) + return check_region(name) * 2 + end, + func = function(name, axis, amount) if axis == "?" then local sign axis, sign = worldedit.player_axis(name) @@ -781,147 +935,149 @@ minetest.register_chatcommand("/copy", { local count = worldedit.copy(worldedit.pos1[name], worldedit.pos2[name], axis, amount) worldedit.player_notify(name, count .. " nodes copied") end, - function(name, param) - local volume = check_region(name, param) - return volume and volume * 2 or volume - end), }) -minetest.register_chatcommand("/move", { +worldedit.register_command("move", { params = "x/y/z/? ", - description = "Move the current WorldEdit region along the x/y/z/? axis by nodes", + description = "Move the current WorldEdit region along the given axis by nodes", privs = {worldedit=true}, - func = safe_region(function(name, param) - local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name] + require_pos = 2, + parse = function(param) local found, _, axis, amount = param:find("^([xyz%?])%s+([+-]?%d+)$") if found == nil then - worldedit.player_notify(name, "invalid usage: " .. param) - return + return false end - amount = tonumber(amount) + return true, axis, tonumber(amount) + end, + nodes_needed = function(name, axis, amount) + return check_region(name) * 2 + end, + func = function(name, axis, amount) if axis == "?" then local sign axis, sign = worldedit.player_axis(name) amount = amount * sign end + local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name] local count = worldedit.move(pos1, pos2, axis, amount) pos1[axis] = pos1[axis] + amount pos2[axis] = pos2[axis] + amount - worldedit.mark_pos1(name) - worldedit.mark_pos2(name) + worldedit.marker_update(name) worldedit.player_notify(name, count .. " nodes moved") - end, check_region), + end, }) -minetest.register_chatcommand("/stack", { +worldedit.register_command("stack", { params = "x/y/z/? ", - description = "Stack the current WorldEdit region along the x/y/z/? axis times", + description = "Stack the current WorldEdit region along the given axis times", privs = {worldedit=true}, - func = safe_region(function(name, param) + require_pos = 2, + parse = function(param) local found, _, axis, repetitions = param:find("^([xyz%?])%s+([+-]?%d+)$") - repetitions = tonumber(repetitions) + if found == nil then + return false + end + return true, axis, tonumber(repetitions) + end, + nodes_needed = function(name, axis, repetitions) + return check_region(name) * math.abs(repetitions) + end, + func = function(name, axis, repetitions) if axis == "?" then local sign axis, sign = worldedit.player_axis(name) repetitions = repetitions * sign end - local count = worldedit.stack(worldedit.pos1[name], worldedit.pos2[name], axis, repetitions) - worldedit.player_notify(name, count .. " nodes stacked") + + local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name] + local count = worldedit.volume(pos1, pos2) * math.abs(repetitions) + worldedit.stack(pos1, pos2, axis, repetitions, function() + worldedit.player_notify(name, count .. " nodes stacked") + end) end, - function(name, param) - local found, _, axis, repetitions = param:find("^([xyz%?])%s+([+-]?%d+)$") - if found == nil then - worldedit.player_notify(name, "invalid usage: " .. param) - return - end - local count = check_region(name, param) - if count then return (tonumber(repetitions) + 1) * count end - return nil - end), }) -minetest.register_chatcommand("/stack2", { +worldedit.register_command("stack2", { params = " ", description = "Stack the current WorldEdit region times by offset , , ", privs = {worldedit=true}, - func = function(name, param) - local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name] - if pos1 == nil or pos2 == nil then - worldedit.player_notify(name, "Select a position first!") - return - end + require_pos = 2, + parse = function(param) local repetitions, incs = param:match("(%d+)%s*(.+)") if repetitions == nil then - worldedit.player_notify(name, "invalid count: " .. param) - return + return false, "invalid count: " .. param end - repetitions = tonumber(repetitions) - local x, y, z = incs:match("([+-]?%d+) ([+-]?%d+) ([+-]?%d+)") if x == nil then - worldedit.player_notify(name, "invalid increments: " .. param) - return + return false, "invalid increments: " .. param end - x, y, z = tonumber(x), tonumber(y), tonumber(z) + return true, tonumber(repetitions), {x=tonumber(x), y=tonumber(y), z=tonumber(z)} + end, + nodes_needed = function(name, repetitions, offset) + return check_region(name) * repetitions + end, + func = function(name, repetitions, offset) + local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name] local count = worldedit.volume(pos1, pos2) * repetitions - - return safe_region(function() - worldedit.stack2(pos1, pos2, {x=x, y=y, z=z}, repetitions, - function() worldedit.player_notify(name, count .. " nodes stacked") end) - end, function() - return count - end)(name,param) -- more hax --wip: clean this up a little bit - end + worldedit.stack2(pos1, pos2, offset, repetitions, function() + worldedit.player_notify(name, count .. " nodes stacked") + end) + end, }) -minetest.register_chatcommand("/stretch", { +worldedit.register_command("stretch", { params = " ", description = "Scale the current WorldEdit positions and region by a factor of , , along the X, Y, and Z axes, repectively, with position 1 as the origin", privs = {worldedit=true}, - func = safe_region(function(name, param) - local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name] + require_pos = 2, + parse = function(param) local found, _, stretchx, stretchy, stretchz = param:find("^(%d+)%s+(%d+)%s+(%d+)$") + if found == nil then + return false + end stretchx, stretchy, stretchz = tonumber(stretchx), tonumber(stretchy), tonumber(stretchz) + if stretchx == 0 or stretchy == 0 or stretchz == 0 then + return false, "invalid scaling factors: " .. param + end + return true, stretchx, stretchy, stretchz + end, + nodes_needed = function(name, stretchx, stretchy, stretchz) + return check_region(name) * stretchx * stretchy * stretchz + end, + func = function(name, stretchx, stretchy, stretchz) + local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name] local count, pos1, pos2 = worldedit.stretch(pos1, pos2, stretchx, stretchy, stretchz) --reset markers to scaled positions worldedit.pos1[name] = pos1 worldedit.pos2[name] = pos2 - worldedit.mark_pos1(name) - worldedit.mark_pos2(name) + worldedit.marker_update(name) worldedit.player_notify(name, count .. " nodes stretched") end, - function(name, param) - local found, _, stretchx, stretchy, stretchz = param:find("^(%d+)%s+(%d+)%s+(%d+)$") - if found == nil then - worldedit.player_notify(name, "invalid usage: " .. param) - return nil - end - 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 stretchx * stretchy * stretchz * count - end - return nil - end), }) -minetest.register_chatcommand("/transpose", { +worldedit.register_command("transpose", { params = "x/y/z/? x/y/z/?", - description = "Transpose the current WorldEdit region along the x/y/z/? and x/y/z/? axes", + description = "Transpose the current WorldEdit region along the given axes", privs = {worldedit=true}, - func = safe_region(function(name, param) - local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name] + require_pos = 2, + parse = function(param) local found, _, axis1, axis2 = param:find("^([xyz%?])%s+([xyz%?])$") + if found == nil then + return false + elseif axis1 == axis2 then + return false, "invalid usage: axes must be different" + end + return true, axis1, axis2 + end, + nodes_needed = check_region, + func = function(name, axis1, axis2) + local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name] if axis1 == "?" then axis1 = worldedit.player_axis(name) end if axis2 == "?" then axis2 = worldedit.player_axis(name) end local count, pos1, pos2 = worldedit.transpose(pos1, pos2, axis1, axis2) @@ -929,113 +1085,104 @@ minetest.register_chatcommand("/transpose", { --reset markers to transposed positions worldedit.pos1[name] = pos1 worldedit.pos2[name] = pos2 - worldedit.mark_pos1(name) - worldedit.mark_pos2(name) + worldedit.marker_update(name) worldedit.player_notify(name, count .. " nodes transposed") end, - function(name, param) - local found, _, axis1, axis2 = param:find("^([xyz%?])%s+([xyz%?])$") - if found == nil then - worldedit.player_notify(name, "invalid usage: " .. param) - return nil - end - if axis1 == axis2 then - worldedit.player_notify(name, "invalid usage: axes must be different") - return nil - end - return check_region(name, param) - end), }) -minetest.register_chatcommand("/flip", { +worldedit.register_command("flip", { params = "x/y/z/?", - description = "Flip the current WorldEdit region along the x/y/z/? axis", + description = "Flip the current WorldEdit region along the given axis", privs = {worldedit=true}, - func = safe_region(function(name, param) + require_pos = 2, + parse = function(param) + if param ~= "x" and param ~= "y" and param ~= "z" and param ~= "?" then + return false + end + return true, param + end, + nodes_needed = check_region, + func = function(name, param) if param == "?" then param = worldedit.player_axis(name) end local count = worldedit.flip(worldedit.pos1[name], worldedit.pos2[name], param) worldedit.player_notify(name, count .. " nodes flipped") end, - function(name, param) - if param ~= "x" and param ~= "y" and param ~= "z" and param ~= "?" then - worldedit.player_notify(name, "invalid usage: " .. param) - return nil - end - return check_region(name, param) - end), }) -minetest.register_chatcommand("/rotate", { - params = " ", - description = "Rotate the current WorldEdit region around the axis by angle (90 degree increment)", +worldedit.register_command("rotate", { + params = "x/y/z/? ", + description = "Rotate the current WorldEdit region around the given axis by angle (90 degree increment)", privs = {worldedit=true}, - func = safe_region(function(name, param) - local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name] + require_pos = 2, + parse = function(param) local found, _, axis, angle = param:find("^([xyz%?])%s+([+-]?%d+)$") + if found == nil then + return false + end + angle = tonumber(angle) + if angle % 90 ~= 0 or angle % 360 == 0 then + return false, "invalid usage: angle must be multiple of 90" + end + return true, axis, angle + end, + nodes_needed = check_region, + func = function(name, axis, angle) + local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name] if axis == "?" then axis = worldedit.player_axis(name) end local count, pos1, pos2 = worldedit.rotate(pos1, pos2, axis, angle) --reset markers to rotated positions worldedit.pos1[name] = pos1 worldedit.pos2[name] = pos2 - worldedit.mark_pos1(name) - worldedit.mark_pos2(name) + worldedit.marker_update(name) worldedit.player_notify(name, count .. " nodes rotated") end, - function(name, param) - local found, _, axis, angle = param:find("^([xyz%?])%s+([+-]?%d+)$") - if found == nil then - worldedit.player_notify(name, "invalid usage: " .. param) - return nil - end - if angle % 90 ~= 0 then - worldedit.player_notify(name, "invalid usage: angle must be multiple of 90") - return nil - end - return check_region(name, param) - end), }) -minetest.register_chatcommand("/orient", { +worldedit.register_command("orient", { params = "", description = "Rotate oriented nodes in the current WorldEdit region around the Y axis by angle (90 degree increment)", privs = {worldedit=true}, - func = safe_region(function(name, param) + require_pos = 2, + parse = function(param) local found, _, angle = param:find("^([+-]?%d+)$") + if found == nil then + return false + end + angle = tonumber(angle) + if angle % 90 ~= 0 then + return false, "invalid usage: angle must be multiple of 90" + end + return true, angle + end, + nodes_needed = check_region, + func = function(name, angle) local count = worldedit.orient(worldedit.pos1[name], worldedit.pos2[name], angle) worldedit.player_notify(name, count .. " nodes oriented") end, - function(name, param) - local found, _, angle = param:find("^([+-]?%d+)$") - if found == nil then - worldedit.player_notify(name, "invalid usage: " .. param) - return nil - end - if angle % 90 ~= 0 then - worldedit.player_notify(name, "invalid usage: angle must be multiple of 90") - return nil - end - return check_region(name, param) - end), }) -minetest.register_chatcommand("/fixlight", { +worldedit.register_command("fixlight", { params = "", description = "Fix the lighting in the current WorldEdit region", privs = {worldedit=true}, - func = safe_region(function(name, param) + require_pos = 2, + nodes_needed = check_region, + func = function(name) local count = worldedit.fixlight(worldedit.pos1[name], worldedit.pos2[name]) worldedit.player_notify(name, count .. " nodes updated") - end), + end, }) -minetest.register_chatcommand("/drain", { +worldedit.register_command("drain", { params = "", description = "Remove any fluid node within the current WorldEdit region", privs = {worldedit=true}, - func = safe_region(function(name, param) + require_pos = 2, + nodes_needed = check_region, + func = function(name) -- TODO: make an API function for this local count = 0 local pos1, pos2 = worldedit.sort_pos(worldedit.pos1[name], worldedit.pos2[name]) @@ -1052,70 +1199,190 @@ minetest.register_chatcommand("/drain", { end end worldedit.player_notify(name, count .. " nodes updated") - end), + end, }) -minetest.register_chatcommand("/hide", { +local clearcut_cache + +local function clearcut(pos1, pos2) + -- decide which nodes we consider plants + if clearcut_cache == nil then + clearcut_cache = {} + for name, def in pairs(minetest.registered_nodes) do + local groups = def.groups or {} + if ( + -- the groups say so + groups.flower or groups.grass or groups.flora or groups.plant or + groups.leaves or groups.tree or groups.leafdecay or groups.sapling or + -- drawtype heuristic + (def.is_ground_content and def.buildable_to and + (def.sunlight_propagates or not def.walkable) + and def.drawtype == "plantlike") or + -- if it's flammable, it probably needs to go too + (def.is_ground_content and not def.walkable and groups.flammable) + ) then + clearcut_cache[name] = true + end + end + end + local plants = clearcut_cache + + local count = 0 + local prev, any + + for x = pos1.x, pos2.x do + for z = pos1.z, pos2.z do + prev = false + any = false + -- first pass: remove floating nodes that would be left over + for y = pos1.y, pos2.y do + local n = minetest.get_node({x=x, y=y, z=z}).name + if plants[n] then + prev = true + any = true + elseif prev then + local def = minetest.registered_nodes[n] or {} + local groups = def.groups or {} + if groups.attached_node or (def.buildable_to and groups.falling_node) then + minetest.remove_node({x=x, y=y, z=z}) + count = count + 1 + else + prev = false + end + end + end + + -- second pass: remove plants, top-to-bottom to avoid item drops + if any then + for y = pos2.y, pos1.y, -1 do + local n = minetest.get_node({x=x, y=y, z=z}).name + if plants[n] then + minetest.remove_node({x=x, y=y, z=z}) + count = count + 1 + end + end + end + end + end + + return count +end + +worldedit.register_command("clearcut", { + params = "", + description = "Remove any plant, tree or foilage-like nodes in the selected region", + privs = {worldedit=true}, + require_pos = 2, + nodes_needed = check_region, + func = function(name) + local pos1, pos2 = worldedit.sort_pos(worldedit.pos1[name], worldedit.pos2[name]) + local count = clearcut(pos1, pos2) + worldedit.player_notify(name, count .. " nodes removed") + end, +}) + +worldedit.register_command("hide", { params = "", description = "Hide all nodes in the current WorldEdit region non-destructively", privs = {worldedit=true}, - func = safe_region(function(name, param) + require_pos = 2, + nodes_needed = check_region, + func = function(name) local count = worldedit.hide(worldedit.pos1[name], worldedit.pos2[name]) worldedit.player_notify(name, count .. " nodes hidden") - end), + end, }) -minetest.register_chatcommand("/suppress", { +worldedit.register_command("suppress", { params = "", description = "Suppress all in the current WorldEdit region non-destructively", privs = {worldedit=true}, - func = safe_region(function(name, param) - local node = get_node(name, param) + require_pos = 2, + parse = function(param) + local node = worldedit.normalize_nodename(param) + if not node then + return false, "invalid node name: " .. param + end + return true, node + end, + nodes_needed = check_region, + func = function(name, node) local count = worldedit.suppress(worldedit.pos1[name], worldedit.pos2[name], node) worldedit.player_notify(name, count .. " nodes suppressed") - end, check_region), + end, }) -minetest.register_chatcommand("/highlight", { +worldedit.register_command("highlight", { params = "", description = "Highlight in the current WorldEdit region by hiding everything else non-destructively", privs = {worldedit=true}, - func = safe_region(function(name, param) - local node = get_node(name, param) + require_pos = 2, + parse = function(param) + local node = worldedit.normalize_nodename(param) + if not node then + return false, "invalid node name: " .. param + end + return true, node + end, + nodes_needed = check_region, + func = function(name, node) local count = worldedit.highlight(worldedit.pos1[name], worldedit.pos2[name], node) worldedit.player_notify(name, count .. " nodes highlighted") - end, check_region), + end, }) -minetest.register_chatcommand("/restore", { +worldedit.register_command("restore", { params = "", description = "Restores nodes hidden with WorldEdit in the current WorldEdit region", privs = {worldedit=true}, - func = safe_region(function(name, param) + require_pos = 2, + nodes_needed = check_region, + func = function(name) local count = worldedit.restore(worldedit.pos1[name], worldedit.pos2[name]) worldedit.player_notify(name, count .. " nodes restored") - end), + end, }) -minetest.register_chatcommand("/save", { +local function detect_misaligned_schematic(name, pos1, pos2) + pos1, pos2 = worldedit.sort_pos(pos1, pos2) + -- Check that allocate/save can position the schematic correctly + -- The expected behaviour is that the (0,0,0) corner of the schematic stays + -- sat pos1, this only works when the minimum position is actually present + -- in the schematic. + local node = minetest.get_node(pos1) + local have_node_at_origin = node.name ~= "air" and node.name ~= "ignore" + if not have_node_at_origin then + worldedit.player_notify(name, + "Warning: The schematic contains excessive free space and WILL be ".. + "misaligned when allocated or loaded. To avoid this, shrink your ".. + "area to cover exactly the nodes to be saved." + ) + end +end + +worldedit.register_command("save", { params = "", description = "Save the current WorldEdit region to \"(world folder)/schems/.we\"", privs = {worldedit=true}, - func = safe_region(function(name, param) + require_pos = 2, + parse = function(param) if param == "" then - worldedit.player_notify(name, "invalid usage: " .. param) - return + return false end if not check_filename(param) then - worldedit.player_notify(name, "Disallowed file name: " .. param) - return + return false, "Disallowed file name: " .. param end + return true, param + end, + nodes_needed = check_region, + func = function(name, param) local result, count = worldedit.serialize(worldedit.pos1[name], worldedit.pos2[name]) + detect_misaligned_schematic(name, worldedit.pos1[name], worldedit.pos2[name]) local path = minetest.get_worldpath() .. "/schems" -- Create directory if it does not already exist - mkdir(path) + minetest.mkdir(path) local filename = path .. "/" .. param .. ".we" local file, err = io.open(filename, "wb") @@ -1128,25 +1395,25 @@ minetest.register_chatcommand("/save", { file:close() worldedit.player_notify(name, count .. " nodes saved") - end), + end, }) -minetest.register_chatcommand("/allocate", { +worldedit.register_command("allocate", { params = "", description = "Set the region defined by nodes from \"(world folder)/schems/.we\" as the current WorldEdit region", privs = {worldedit=true}, - func = function(name, param) - local pos = get_position(name) - if pos == nil then return end - + require_pos = 1, + parse = function(param) if param == "" then - worldedit.player_notify(name, "invalid usage: " .. param) - return + return false end if not check_filename(param) then - worldedit.player_notify(name, "Disallowed file name: " .. param) - return + return false, "Disallowed file name: " .. param end + return true, param + end, + func = function(name, param) + local pos = worldedit.pos1[name] local filename = minetest.get_worldpath() .. "/schems/" .. param .. ".we" local file, err = io.open(filename, "rb") @@ -1158,30 +1425,44 @@ minetest.register_chatcommand("/allocate", { file:close() local version = worldedit.read_header(value) - if version == 0 then + if version == nil or version == 0 then worldedit.player_notify(name, "File is invalid!") return elseif version > worldedit.LATEST_SERIALIZATION_VERSION then worldedit.player_notify(name, "File was created with newer version of WorldEdit!") + return end local nodepos1, nodepos2, count = worldedit.allocate(pos, value) + if not nodepos1 then + worldedit.player_notify(name, "Schematic empty, nothing allocated") + return + end + worldedit.pos1[name] = nodepos1 - worldedit.mark_pos1(name) worldedit.pos2[name] = nodepos2 - worldedit.mark_pos2(name) + worldedit.marker_update(name) worldedit.player_notify(name, count .. " nodes allocated") end, }) -minetest.register_chatcommand("/load", { +worldedit.register_command("load", { params = "", description = "Load nodes from \"(world folder)/schems/[.we[m]]\" with position 1 of the current WorldEdit region as the origin", privs = {worldedit=true}, + require_pos = 1, + parse = function(param) + if param == "" then + return false + end + if not check_filename(param) then + return false, "Disallowed file name: " .. param + end + return true, param + end, func = function(name, param) - local pos = get_position(name) - if pos == nil then return end + local pos = worldedit.pos1[name] if param == "" then worldedit.player_notify(name, "invalid usage: " .. param) @@ -1213,7 +1494,7 @@ minetest.register_chatcommand("/load", { file:close() local version = worldedit.read_header(value) - if version == 0 then + if version == nil or version == 0 then worldedit.player_notify(name, "File is invalid!") return elseif version > worldedit.LATEST_SERIALIZATION_VERSION then @@ -1227,10 +1508,13 @@ minetest.register_chatcommand("/load", { end, }) -minetest.register_chatcommand("/lua", { +worldedit.register_command("lua", { params = "", description = "Executes as a Lua chunk in the global namespace", privs = {worldedit=true, server=true}, + parse = function(param) + return true, param + end, func = function(name, param) local err = worldedit.lua(param) if err then @@ -1243,11 +1527,16 @@ minetest.register_chatcommand("/lua", { end, }) -minetest.register_chatcommand("/luatransform", { +worldedit.register_command("luatransform", { params = "", description = "Executes as a Lua chunk in the global namespace with the variable pos available, for each node in the current WorldEdit region", privs = {worldedit=true, server=true}, - func = safe_region(function(name, param) + require_pos = 2, + parse = function(param) + return true, param + end, + nodes_needed = check_region, + func = function(name, param) local err = worldedit.luatransform(worldedit.pos1[name], worldedit.pos2[name], param) if err then worldedit.player_notify(name, "code error: " .. err, false) @@ -1256,72 +1545,80 @@ minetest.register_chatcommand("/luatransform", { worldedit.player_notify(name, "code successfully executed", false) minetest.log("action", name.." executed luatransform "..param) end - end), + end, }) -minetest.register_chatcommand("/mtschemcreate", { +worldedit.register_command("mtschemcreate", { params = "", description = "Save the current WorldEdit region using the Minetest ".. "Schematic format to \"(world folder)/schems/.mts\"", privs = {worldedit=true}, - func = safe_region(function(name, param) - if param == nil then - worldedit.player_notify(name, "No filename specified") - return + require_pos = 2, + parse = function(param) + if param == "" then + return false end if not check_filename(param) then - worldedit.player_notify(name, "Disallowed file name: " .. param) - return + return false, "Disallowed file name: " .. param end - + return true, param + end, + nodes_needed = check_region, + func = function(name, param) local path = minetest.get_worldpath() .. "/schems" -- Create directory if it does not already exist - mkdir(path) + minetest.mkdir(path) local filename = path .. "/" .. param .. ".mts" local ret = minetest.create_schematic(worldedit.pos1[name], worldedit.pos2[name], worldedit.prob_list[name], filename) if ret == nil then - worldedit.player_notify(name, "Failed to create Minetest schematic", false) + worldedit.player_notify(name, "Failed to create Minetest schematic") else - worldedit.player_notify(name, "Saved Minetest schematic to " .. param, false) + worldedit.player_notify(name, "Saved Minetest schematic to " .. param) end worldedit.prob_list[name] = {} - end), + end, }) -minetest.register_chatcommand("/mtschemplace", { +worldedit.register_command("mtschemplace", { params = "", description = "Load nodes from \"(world folder)/schems/.mts\" with position 1 of the current WorldEdit region as the origin", privs = {worldedit=true}, - func = function(name, param) + require_pos = 1, + parse = function(param) if param == "" then - worldedit.player_notify(name, "no filename specified") - return + return false end if not check_filename(param) then - worldedit.player_notify(name, "Disallowed file name: " .. param) - return + return false, "Disallowed file name: " .. param end - - local pos = get_position(name) - if pos == nil then return end + return true, param + end, + func = function(name, param) + local pos = worldedit.pos1[name] local path = minetest.get_worldpath() .. "/schems/" .. param .. ".mts" if minetest.place_schematic(pos, path) == nil then - worldedit.player_notify(name, "failed to place Minetest schematic", false) + worldedit.player_notify(name, "failed to place Minetest schematic") else worldedit.player_notify(name, "placed Minetest schematic " .. param .. - " at " .. minetest.pos_to_string(pos), false) + " at " .. minetest.pos_to_string(pos)) end end, }) -minetest.register_chatcommand("/mtschemprob", { +worldedit.register_command("mtschemprob", { params = "start/finish/get", description = "Begins node probability entry for Minetest schematics, gets the nodes that have probabilities set, or ends node probability entry", privs = {worldedit=true}, + parse = function(param) + if param ~= "start" and param ~= "finish" and param ~= "get" then + return false, "unknown subcommand: " .. param + end + return true, param + end, func = function(name, param) if param == "start" then --start probability setting worldedit.set_pos[name] = "prob" @@ -1342,8 +1639,6 @@ minetest.register_chatcommand("/mtschemprob", { end worldedit.player_notify(name, "currently set node probabilities:") worldedit.player_notify(name, text) - else - worldedit.player_notify(name, "unknown subcommand: " .. param) end end, }) @@ -1357,12 +1652,14 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) end end) -minetest.register_chatcommand("/clearobjects", { +worldedit.register_command("clearobjects", { params = "", description = "Clears all objects within the WorldEdit region", privs = {worldedit=true}, - func = safe_region(function(name, param) + require_pos = 2, + nodes_needed = check_region, + func = function(name) local count = worldedit.clear_objects(worldedit.pos1[name], worldedit.pos2[name]) worldedit.player_notify(name, count .. " objects cleared") - end), + end, }) diff --git a/worldedit/worldedit_commands/mark.lua b/worldedit/worldedit_commands/mark.lua index 9d41bda..a195280 100644 --- a/worldedit/worldedit_commands/mark.lua +++ b/worldedit/worldedit_commands/mark.lua @@ -2,57 +2,60 @@ worldedit.marker1 = {} worldedit.marker2 = {} worldedit.marker_region = {} +local init_sentinel = "new" .. tostring(math.random(99999)) + --marks worldedit region position 1 -worldedit.mark_pos1 = function(name) +worldedit.mark_pos1 = function(name, region_too) local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name] - if pos1 ~= nil then - --make area stay loaded - local manip = minetest.get_voxel_manip() - manip:read_from_map(pos1, pos1) - end if worldedit.marker1[name] ~= nil then --marker already exists worldedit.marker1[name]:remove() --remove marker worldedit.marker1[name] = nil end if pos1 ~= nil then + --make area stay loaded + local manip = minetest.get_voxel_manip() + manip:read_from_map(pos1, pos1) + --add marker - worldedit.marker1[name] = minetest.add_entity(pos1, "worldedit:pos1") + worldedit.marker1[name] = minetest.add_entity(pos1, "worldedit:pos1", init_sentinel) if worldedit.marker1[name] ~= nil then worldedit.marker1[name]:get_luaentity().player_name = name end end - worldedit.mark_region(name) + if region_too == nil or region_too then + worldedit.mark_region(name) + end end --marks worldedit region position 2 -worldedit.mark_pos2 = function(name) +worldedit.mark_pos2 = function(name, region_too) local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name] - if pos2 ~= nil then - --make area stay loaded - local manip = minetest.get_voxel_manip() - manip:read_from_map(pos2, pos2) - end if worldedit.marker2[name] ~= nil then --marker already exists worldedit.marker2[name]:remove() --remove marker worldedit.marker2[name] = nil end if pos2 ~= nil then + --make area stay loaded + local manip = minetest.get_voxel_manip() + manip:read_from_map(pos2, pos2) + --add marker - worldedit.marker2[name] = minetest.add_entity(pos2, "worldedit:pos2") + worldedit.marker2[name] = minetest.add_entity(pos2, "worldedit:pos2", init_sentinel) if worldedit.marker2[name] ~= nil then worldedit.marker2[name]:get_luaentity().player_name = name end end - worldedit.mark_region(name) + if region_too == nil or region_too then + worldedit.mark_region(name) + end end worldedit.mark_region = function(name) local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name] if worldedit.marker_region[name] ~= nil then --marker already exists - --wip: make the area stay loaded somehow for _, entity in ipairs(worldedit.marker_region[name]) do entity:remove() end @@ -64,7 +67,7 @@ worldedit.mark_region = function(name) local vec = vector.subtract(pos2, pos1) local maxside = math.max(vec.x, math.max(vec.y, vec.z)) - local limit = tonumber(minetest.setting_get("active_object_send_range_blocks")) * 16 + local limit = tonumber(minetest.settings:get("active_object_send_range_blocks")) * 16 if maxside > limit * 1.5 then -- The client likely won't be able to see the plane markers as intended anyway, -- thus don't place them and also don't load the area into memory @@ -82,7 +85,8 @@ worldedit.mark_region = function(name) --XY plane markers for _, z in ipairs({pos1.z - 0.5, pos2.z + 0.5}) do - local marker = minetest.add_entity({x=pos1.x + sizex - 0.5, y=pos1.y + sizey - 0.5, z=z}, "worldedit:region_cube") + local entpos = {x=pos1.x + sizex - 0.5, y=pos1.y + sizey - 0.5, z=z} + local marker = minetest.add_entity(entpos, "worldedit:region_cube", init_sentinel) if marker ~= nil then marker:set_properties({ visual_size={x=sizex * 2, y=sizey * 2}, @@ -95,13 +99,14 @@ worldedit.mark_region = function(name) --YZ plane markers for _, x in ipairs({pos1.x - 0.5, pos2.x + 0.5}) do - local marker = minetest.add_entity({x=x, y=pos1.y + sizey - 0.5, z=pos1.z + sizez - 0.5}, "worldedit:region_cube") + local entpos = {x=x, y=pos1.y + sizey - 0.5, z=pos1.z + sizez - 0.5} + local marker = minetest.add_entity(entpos, "worldedit:region_cube", init_sentinel) if marker ~= nil then marker:set_properties({ visual_size={x=sizez * 2, y=sizey * 2}, collisionbox = {-thickness, -sizey, -sizez, thickness, sizey, sizez}, }) - marker:setyaw(math.pi / 2) + marker:set_yaw(math.pi / 2) marker:get_luaentity().player_name = name table.insert(markers, marker) end @@ -111,6 +116,13 @@ worldedit.mark_region = function(name) end end +--convenience function that calls everything +worldedit.marker_update = function(name) + worldedit.mark_pos1(name, false) + worldedit.mark_pos2(name, false) + worldedit.mark_region(name) +end + minetest.register_entity(":worldedit:pos1", { initial_properties = { visual = "cube", @@ -120,9 +132,11 @@ minetest.register_entity(":worldedit:pos1", { "worldedit_pos1.png", "worldedit_pos1.png"}, collisionbox = {-0.55, -0.55, -0.55, 0.55, 0.55, 0.55}, physical = false, + static_save = false, }, - on_step = function(self, dtime) - if worldedit.marker1[self.player_name] == nil then + on_activate = function(self, staticdata, dtime_s) + if staticdata ~= init_sentinel then + -- we were loaded from before static_save = false was added self.object:remove() end end, @@ -130,6 +144,9 @@ minetest.register_entity(":worldedit:pos1", { self.object:remove() worldedit.marker1[self.player_name] = nil end, + on_blast = function(self, damage) + return false, false, {} -- don't damage or knockback + end, }) minetest.register_entity(":worldedit:pos2", { @@ -141,9 +158,11 @@ minetest.register_entity(":worldedit:pos2", { "worldedit_pos2.png", "worldedit_pos2.png"}, collisionbox = {-0.55, -0.55, -0.55, 0.55, 0.55, 0.55}, physical = false, + static_save = false, }, - on_step = function(self, dtime) - if worldedit.marker2[self.player_name] == nil then + on_activate = function(self, staticdata, dtime_s) + if staticdata ~= init_sentinel then + -- we were loaded from before static_save = false was added self.object:remove() end end, @@ -151,20 +170,23 @@ minetest.register_entity(":worldedit:pos2", { self.object:remove() worldedit.marker2[self.player_name] = nil end, + on_blast = function(self, damage) + return false, false, {} -- don't damage or knockback + end, }) minetest.register_entity(":worldedit:region_cube", { initial_properties = { visual = "upright_sprite", - visual_size = {x=1.1, y=1.1}, textures = {"worldedit_cube.png"}, visual_size = {x=10, y=10}, physical = false, + static_save = false, }, - on_step = function(self, dtime) - if worldedit.marker_region[self.player_name] == nil then + on_activate = function(self, staticdata, dtime_s) + if staticdata ~= init_sentinel then + -- we were loaded from before static_save = false was added self.object:remove() - return end end, on_punch = function(self, hitter) @@ -177,5 +199,8 @@ minetest.register_entity(":worldedit:region_cube", { end worldedit.marker_region[self.player_name] = nil end, + on_blast = function(self, damage) + return false, false, {} -- don't damage or knockback + end, }) diff --git a/worldedit/worldedit_commands/mod.conf b/worldedit/worldedit_commands/mod.conf new file mode 100644 index 0000000..28e9ac8 --- /dev/null +++ b/worldedit/worldedit_commands/mod.conf @@ -0,0 +1,3 @@ +name = worldedit_commands +description = WorldEdit chat commands +depends = worldedit diff --git a/worldedit/worldedit_commands/safe.lua b/worldedit/worldedit_commands/safe.lua index 0bd30d7..c83cac8 100644 --- a/worldedit/worldedit_commands/safe.lua +++ b/worldedit/worldedit_commands/safe.lua @@ -1,53 +1,33 @@ local safe_region_callback = {} -local safe_region_param = {} - -worldedit._override_safe_regions = false -- internal use ONLY! - -local function check_region(name, param) - local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name] --obtain positions - if pos1 == nil or pos2 == nil then - worldedit.player_notify(name, "no region selected") - return nil - end - return worldedit.volume(pos1, pos2) -end +--`count` is the number of nodes that would possibly be modified --`callback` is a callback to run when the user confirms ---`nodes_needed` is a function accepting `param`, `pos1`, and `pos2` to calculate the number of nodes needed -local function safe_region(callback, nodes_needed) - --default node volume calculation - nodes_needed = nodes_needed or check_region - - return function(name, param) - --check if the operation applies to a safe number of nodes - local count = nodes_needed(name, param) - if count == nil then return end --invalid command - if worldedit._override_safe_regions or count < 10000 then - return callback(name, param) - end - - --save callback to call later - safe_region_callback[name], safe_region_param[name] = callback, param - worldedit.player_notify(name, "WARNING: this operation could affect up to " .. count .. " nodes; type //y to continue or //n to cancel") +local function safe_region(name, count, callback) + if count < 20000 then + return callback() end + + --save callback to call later + safe_region_callback[name] = callback + worldedit.player_notify(name, "WARNING: this operation could affect up to " .. count .. " nodes; type //y to continue or //n to cancel") end local function reset_pending(name) - safe_region_callback[name], safe_region_param[name] = nil, nil + safe_region_callback[name] = nil end minetest.register_chatcommand("/y", { params = "", description = "Confirm a pending operation", func = function(name) - local callback, param = safe_region_callback[name], safe_region_param[name] + local callback = safe_region_callback[name] if not callback then worldedit.player_notify(name, "no operation pending") return end reset_pending(name) - callback(name, param) + callback(name) end, }) @@ -65,4 +45,4 @@ minetest.register_chatcommand("/n", { }) -return safe_region, check_region, reset_pending +return safe_region, reset_pending diff --git a/worldedit/worldedit_commands/wand.lua b/worldedit/worldedit_commands/wand.lua index c93fa9c..faa77ff 100644 --- a/worldedit/worldedit_commands/wand.lua +++ b/worldedit/worldedit_commands/wand.lua @@ -6,25 +6,58 @@ local function above_or_under(placer, pointed_thing) end end +local punched_air_time = {} + minetest.register_tool(":worldedit:wand", { - description = "WorldEdit Wand tool, Left-click to set 1st position, right-click to set 2nd", + description = "WorldEdit Wand tool\nLeft-click to set 1st position, right-click to set 2nd", inventory_image = "worldedit_wand.png", stack_max = 1, -- there is no need to have more than one liquids_pointable = true, -- ground with only water on can be selected as well on_use = function(itemstack, placer, pointed_thing) - if placer ~= nil and pointed_thing ~= nil and pointed_thing.type == "node" then - local name = placer:get_player_name() + if placer == nil or pointed_thing == nil then return end + local name = placer:get_player_name() + if pointed_thing.type == "node" then + -- set and mark pos1 worldedit.pos1[name] = above_or_under(placer, pointed_thing) worldedit.mark_pos1(name) + elseif pointed_thing.type == "nothing" then + local now = minetest.get_us_time() + if now - (punched_air_time[name] or 0) < 1000 * 1000 then + -- reset markers + worldedit.registered_commands["reset"].func(name) + end + punched_air_time[name] = now + elseif pointed_thing.type == "object" then + local entity = pointed_thing.ref:get_luaentity() + if entity and entity.name == "worldedit:pos2" then + -- set pos1 = pos2 + worldedit.pos1[name] = worldedit.pos2[name] + worldedit.mark_pos1(name) + end end + end, + + on_place = function(itemstack, placer, pointed_thing) + if placer == nil or (pointed_thing or {}).type ~= "node" then + return itemstack + end + local name = placer:get_player_name() + -- set and mark pos2 + worldedit.pos2[name] = above_or_under(placer, pointed_thing) + worldedit.mark_pos2(name) return itemstack -- nothing consumed, nothing changed end, - on_place = function(itemstack, placer, pointed_thing) -- Left Click - if placer ~= nil and pointed_thing ~= nil and pointed_thing.type == "node" then - local name = placer:get_player_name() - worldedit.pos2[name] = above_or_under(placer, pointed_thing) + on_secondary_use = function(itemstack, user, pointed_thing) + if user == nil or (pointed_thing or {}).type ~= "object" then + return itemstack + end + local name = user:get_player_name() + local entity = pointed_thing.ref:get_luaentity() + if entity and entity.name == "worldedit:pos1" then + -- set pos2 = pos1 + worldedit.pos2[name] = worldedit.pos1[name] worldedit.mark_pos2(name) end return itemstack -- nothing consumed, nothing changed diff --git a/worldedit/worldedit_gui/depends.txt b/worldedit/worldedit_gui/depends.txt deleted file mode 100644 index dbc8f19..0000000 --- a/worldedit/worldedit_gui/depends.txt +++ /dev/null @@ -1,7 +0,0 @@ -worldedit -worldedit_commands -unified_inventory? -inventory_plus? -sfinv? -creative? -smart_inventory? diff --git a/worldedit/worldedit_gui/functionality.lua b/worldedit/worldedit_gui/functionality.lua index 912fd59..2efbf9a 100644 --- a/worldedit/worldedit_gui/functionality.lua +++ b/worldedit/worldedit_gui/functionality.lua @@ -52,13 +52,18 @@ end -- display node (or unknown_node image otherwise) at specified pos in formspec local formspec_node = function(pos, nodename) - return nodename and string.format("item_image[%s;1,1;%s]", pos, nodename) - or string.format("image[%s;1,1;worldedit_gui_unknown.png]", pos) + local ndef = nodename and minetest.registered_nodes[nodename] + if nodename and ndef then + return string.format("item_image[%s;1,1;%s]", pos, nodename) .. + string.format("tooltip[%s;1,1;%s]", pos, minetest.formspec_escape(ndef.description)) + else + return string.format("image[%s;1,1;worldedit_gui_unknown.png]", pos) + end end -- two further priv helpers local function we_privs(command) - return minetest.chatcommands["/" .. command].privs + return worldedit.registered_commands[command].privs end local function combine_we_privs(list) @@ -69,11 +74,79 @@ local function combine_we_privs(list) return combine_privs(unpack(args)) end +-- functions that handle value changing & page reshowing (without submitting) +local function copy_changes(name, fields, def) + for field, into in pairs(def) do + if into ~= true and fields[field] then + local value = tostring(fields[field]) + if into == gui_axis1 or into == gui_axis2 then + into[name] = axis_indices[value] + elseif into == gui_angle then + into[name] = angle_indices[value] + else + into[name] = value + end + end + end +end + +local function handle_changes(name, identifier, fields, def) + local any = false + for field, into in pairs(def) do + if fields.key_enter_field == field then + any = true + end + -- first condition: buttons (value not saved) + -- others: dropdowns which will be sent when their value changes + if into == true or into == gui_axis1 or into == gui_axis2 or into == gui_angle then + if fields[field] then + any = true + end + end + end + if not any then + return false + end + + any = false + for field, into in pairs(def) do + if into ~= true and fields[field] then + local value = tostring(fields[field]) + if into == gui_axis1 or into == gui_axis2 then + into[name] = axis_indices[value] + elseif into == gui_angle then + into[name] = angle_indices[value] + else + into[name] = value + end + + if into == gui_nodename1 or into == gui_nodename2 then + any = true + end + end + end + -- Only nodename fields change based on the value, so only re-show the page if necessary + if any then + worldedit.show_page(name, identifier) + end + return true +end + +-- This has the same behaviour as the player invoking the chat command +local function execute_worldedit_command(command_name, player_name, params) + local chatcmd = minetest.registered_chatcommands["/" .. command_name] + assert(chatcmd, "unknown command: " .. command_name) + local _, msg = chatcmd.func(player_name, params) + if msg then + worldedit.player_notify(player_name, msg) + end +end + worldedit.register_gui_function("worldedit_gui_about", { name = "About", privs = {interact=true}, on_select = function(name) - minetest.chatcommands["/about"].func(name, "") + execute_worldedit_command("about", name, "") end, }) @@ -81,7 +154,8 @@ worldedit.register_gui_function("worldedit_gui_inspect", { name = "Toggle Inspect", privs = we_privs("inspect"), on_select = function(name) - minetest.chatcommands["/inspect"].func(name, worldedit.inspect[name] and "disable" or "enable") + execute_worldedit_command("inspect", name, + worldedit.inspect[name] and "disable" or "enable") end, }) @@ -115,47 +189,47 @@ worldedit.register_gui_function("worldedit_gui_region", { worldedit.register_gui_handler("worldedit_gui_region", function(name, fields) if fields.worldedit_gui_p_get then - minetest.chatcommands["/p"].func(name, "get") + execute_worldedit_command("p", name, "get") return true elseif fields.worldedit_gui_p_set1 then - minetest.chatcommands["/p"].func(name, "set1") + execute_worldedit_command("p", name, "set1") return true elseif fields.worldedit_gui_p_set2 then - minetest.chatcommands["/p"].func(name, "set2") + execute_worldedit_command("p", name, "set2") return true elseif fields.worldedit_gui_pos1 then - minetest.chatcommands["/pos1"].func(name, "") + execute_worldedit_command("pos1", name, "") worldedit.show_page(name, "worldedit_gui_region") return true elseif fields.worldedit_gui_pos2 then - minetest.chatcommands["/pos2"].func(name, "") + execute_worldedit_command("pos2", name, "") worldedit.show_page(name, "worldedit_gui_region") return true elseif fields.worldedit_gui_reset then - minetest.chatcommands["/reset"].func(name, "") + execute_worldedit_command("reset", name, "") worldedit.show_page(name, "worldedit_gui_region") return true elseif fields.worldedit_gui_mark then - minetest.chatcommands["/mark"].func(name, "") + execute_worldedit_command("mark", name, "") worldedit.show_page(name, "worldedit_gui_region") return true elseif fields.worldedit_gui_unmark then - minetest.chatcommands["/unmark"].func(name, "") + execute_worldedit_command("unmark", name, "") worldedit.show_page(name, "worldedit_gui_region") return true elseif fields.worldedit_gui_volume then - minetest.chatcommands["/volume"].func(name, "") + execute_worldedit_command("volume", name, "") worldedit.show_page(name, "worldedit_gui_region") return true elseif fields.worldedit_gui_fixedpos_pos1_submit then - minetest.chatcommands["/fixedpos"].func(name, string.format("set1 %s %s %s", + execute_worldedit_command("fixedpos", name, ("set1 %s %s %s"):format( tostring(fields.worldedit_gui_fixedpos_pos1x), tostring(fields.worldedit_gui_fixedpos_pos1y), tostring(fields.worldedit_gui_fixedpos_pos1z))) worldedit.show_page(name, "worldedit_gui_region") return true elseif fields.worldedit_gui_fixedpos_pos2_submit then - minetest.chatcommands["/fixedpos"].func(name, string.format("set2 %s %s %s", + execute_worldedit_command("fixedpos", name, ("set2 %s %s %s"):format( tostring(fields.worldedit_gui_fixedpos_pos2x), tostring(fields.worldedit_gui_fixedpos_pos2y), tostring(fields.worldedit_gui_fixedpos_pos2z))) @@ -173,6 +247,7 @@ worldedit.register_gui_function("worldedit_gui_set", { local nodename = worldedit.normalize_nodename(node) return "size[6.5,3]" .. worldedit.get_formspec_header("worldedit_gui_set") .. string.format("field[0.5,1.5;4,0.8;worldedit_gui_set_node;Name;%s]", minetest.formspec_escape(node)) .. + "field_close_on_enter[worldedit_gui_set_node;false]" .. "button[4,1.18;1.5,0.8;worldedit_gui_set_search;Search]" .. formspec_node("5.5,1.1", nodename) .. "button_exit[0,2.5;3,0.8;worldedit_gui_set_submit;Set Nodes]" @@ -180,18 +255,22 @@ worldedit.register_gui_function("worldedit_gui_set", { }) worldedit.register_gui_handler("worldedit_gui_set", function(name, fields) - if fields.worldedit_gui_set_search or fields.worldedit_gui_set_submit then - gui_nodename1[name] = tostring(fields.worldedit_gui_set_node) + local cg = { + worldedit_gui_set_search = true, + worldedit_gui_set_node = gui_nodename1, + } + local ret = handle_changes(name, "worldedit_gui_set", fields, cg) + if fields.worldedit_gui_set_submit then + copy_changes(name, fields, cg) worldedit.show_page(name, "worldedit_gui_set") - if fields.worldedit_gui_set_submit then - local n = worldedit.normalize_nodename(gui_nodename1[name]) - if n then - minetest.chatcommands["/set"].func(name, n) - end + + local n = worldedit.normalize_nodename(gui_nodename1[name]) + if n then + execute_worldedit_command("set", name, n) end return true end - return false + return ret end) worldedit.register_gui_function("worldedit_gui_replace", { @@ -202,9 +281,11 @@ worldedit.register_gui_function("worldedit_gui_replace", { local search_nodename, replace_nodename = worldedit.normalize_nodename(search), worldedit.normalize_nodename(replace) return "size[6.5,4]" .. worldedit.get_formspec_header("worldedit_gui_replace") .. string.format("field[0.5,1.5;4,0.8;worldedit_gui_replace_search;Name;%s]", minetest.formspec_escape(search)) .. + "field_close_on_enter[worldedit_gui_replace_search;false]" .. "button[4,1.18;1.5,0.8;worldedit_gui_replace_search_search;Search]" .. formspec_node("5.5,1.1", search_nodename) .. string.format("field[0.5,2.5;4,0.8;worldedit_gui_replace_replace;Name;%s]", minetest.formspec_escape(replace)) .. + "field_close_on_enter[worldedit_gui_replace_replace;false]" .. "button[4,2.18;1.5,0.8;worldedit_gui_replace_replace_search;Search]" .. formspec_node("5.5,2.1", replace_nodename) .. "button_exit[0,3.5;3,0.8;worldedit_gui_replace_submit;Replace Nodes]" .. @@ -213,28 +294,29 @@ worldedit.register_gui_function("worldedit_gui_replace", { }) worldedit.register_gui_handler("worldedit_gui_replace", function(name, fields) - if fields.worldedit_gui_replace_search_search or fields.worldedit_gui_replace_replace_search - or fields.worldedit_gui_replace_submit or fields.worldedit_gui_replace_submit_inverse then - gui_nodename1[name] = tostring(fields.worldedit_gui_replace_search) - gui_nodename2[name] = tostring(fields.worldedit_gui_replace_replace) + local cg = { + worldedit_gui_replace_search_search = true, + worldedit_gui_replace_replace_search = true, + worldedit_gui_replace_search = gui_nodename1, + worldedit_gui_replace_replace = gui_nodename2, + } + local ret = handle_changes(name, "worldedit_gui_replace", fields, cg) + if fields.worldedit_gui_replace_submit or fields.worldedit_gui_replace_submit_inverse then + copy_changes(name, fields, cg) worldedit.show_page(name, "worldedit_gui_replace") - local submit = nil - if fields.worldedit_gui_replace_submit then - submit = "replace" - elseif fields.worldedit_gui_replace_submit_inverse then + local submit = "replace" + if fields.worldedit_gui_replace_submit_inverse then submit = "replaceinverse" end - if submit then - local n1 = worldedit.normalize_nodename(gui_nodename1[name]) - local n2 = worldedit.normalize_nodename(gui_nodename2[name]) - if n1 and n2 then - minetest.chatcommands["/"..submit].func(name, string.format("%s %s", n1, n2)) - end + local n1 = worldedit.normalize_nodename(gui_nodename1[name]) + local n2 = worldedit.normalize_nodename(gui_nodename2[name]) + if n1 and n2 then + execute_worldedit_command(submit, name, n1 .. " " .. n2) end return true end - return false + return ret end) worldedit.register_gui_function("worldedit_gui_sphere_dome", { @@ -245,9 +327,11 @@ worldedit.register_gui_function("worldedit_gui_sphere_dome", { local nodename = worldedit.normalize_nodename(node) return "size[6.5,5]" .. worldedit.get_formspec_header("worldedit_gui_sphere_dome") .. string.format("field[0.5,1.5;4,0.8;worldedit_gui_sphere_dome_node;Name;%s]", minetest.formspec_escape(node)) .. + "field_close_on_enter[worldedit_gui_sphere_dome_node;false]" .. "button[4,1.18;1.5,0.8;worldedit_gui_sphere_dome_search;Search]" .. formspec_node("5.5,1.1", nodename) .. string.format("field[0.5,2.5;4,0.8;worldedit_gui_sphere_dome_radius;Radius;%s]", minetest.formspec_escape(radius)) .. + "field_close_on_enter[worldedit_gui_sphere_dome_radius;false]" .. "button_exit[0,3.5;3,0.8;worldedit_gui_sphere_dome_submit_hollow;Hollow Sphere]" .. "button_exit[3.5,3.5;3,0.8;worldedit_gui_sphere_dome_submit_solid;Solid Sphere]" .. "button_exit[0,4.5;3,0.8;worldedit_gui_sphere_dome_submit_hollow_dome;Hollow Dome]" .. @@ -256,32 +340,33 @@ worldedit.register_gui_function("worldedit_gui_sphere_dome", { }) worldedit.register_gui_handler("worldedit_gui_sphere_dome", function(name, fields) - if fields.worldedit_gui_sphere_dome_search - or fields.worldedit_gui_sphere_dome_submit_hollow or fields.worldedit_gui_sphere_dome_submit_solid + local cg = { + worldedit_gui_sphere_dome_search = true, + worldedit_gui_sphere_dome_node = gui_nodename1, + worldedit_gui_sphere_dome_radius = gui_distance2, + } + local ret = handle_changes(name, "worldedit_gui_sphere_dome", fields, cg) + if fields.worldedit_gui_sphere_dome_submit_hollow or fields.worldedit_gui_sphere_dome_submit_solid or fields.worldedit_gui_sphere_dome_submit_hollow_dome or fields.worldedit_gui_sphere_dome_submit_solid_dome then - gui_nodename1[name] = tostring(fields.worldedit_gui_sphere_dome_node) - gui_distance2[name] = tostring(fields.worldedit_gui_sphere_dome_radius) + copy_changes(name, fields, cg) worldedit.show_page(name, "worldedit_gui_sphere_dome") - local submit = nil - if fields.worldedit_gui_sphere_dome_submit_hollow then - submit = "hollowsphere" - elseif fields.worldedit_gui_sphere_dome_submit_solid then + local submit = "hollowsphere" + if fields.worldedit_gui_sphere_dome_submit_solid then submit = "sphere" elseif fields.worldedit_gui_sphere_dome_submit_hollow_dome then submit = "hollowdome" elseif fields.worldedit_gui_sphere_dome_submit_solid_dome then submit = "dome" end - if submit then - local n = worldedit.normalize_nodename(gui_nodename1[name]) - if n then - minetest.chatcommands["/"..submit].func(name, string.format("%s %s", gui_distance2[name], n)) - end + local n = worldedit.normalize_nodename(gui_nodename1[name]) + if n then + execute_worldedit_command(submit, name, + gui_distance2[name] .. " " .. n) end return true end - return false + return ret end) worldedit.register_gui_function("worldedit_gui_cylinder", { @@ -293,12 +378,16 @@ worldedit.register_gui_function("worldedit_gui_cylinder", { local nodename = worldedit.normalize_nodename(node) return "size[6.5,6]" .. worldedit.get_formspec_header("worldedit_gui_cylinder") .. string.format("field[0.5,1.5;4,0.8;worldedit_gui_cylinder_node;Name;%s]", minetest.formspec_escape(node)) .. + "field_close_on_enter[worldedit_gui_cylinder_node;false]" .. "button[4,1.18;1.5,0.8;worldedit_gui_cylinder_search;Search]" .. formspec_node("5.5,1.1", nodename) .. string.format("field[0.5,2.5;4,0.8;worldedit_gui_cylinder_length;Length;%s]", minetest.formspec_escape(length)) .. string.format("dropdown[4,2.18;2.5;worldedit_gui_cylinder_axis;X axis,Y axis,Z axis,Look direction;%d]", axis) .. string.format("field[0.5,3.5;2,0.8;worldedit_gui_cylinder_radius1;Base Radius;%s]", minetest.formspec_escape(radius1)) .. string.format("field[2.5,3.5;2,0.8;worldedit_gui_cylinder_radius2;Top Radius;%s]", minetest.formspec_escape(radius2)) .. + "field_close_on_enter[worldedit_gui_cylinder_length;false]" .. + "field_close_on_enter[worldedit_gui_cylinder_radius1;false]" .. + "field_close_on_enter[worldedit_gui_cylinder_radius2;false]" .. "label[0.25,4;Equal base and top radius creates a cylinder,\n".. "zero top radius creates a cone.\nConsult documentation for more information.]".. "button_exit[0,5.5;3,0.8;worldedit_gui_cylinder_submit_hollow;Hollow Cylinder]" .. @@ -307,36 +396,31 @@ worldedit.register_gui_function("worldedit_gui_cylinder", { }) worldedit.register_gui_handler("worldedit_gui_cylinder", function(name, fields) - if fields.worldedit_gui_cylinder_search - or fields.worldedit_gui_cylinder_submit_hollow or fields.worldedit_gui_cylinder_submit_solid then - gui_nodename1[name] = tostring(fields.worldedit_gui_cylinder_node) - gui_axis1[name] = axis_indices[fields.worldedit_gui_cylinder_axis] - gui_distance1[name] = tostring(fields.worldedit_gui_cylinder_length) - gui_distance2[name] = tostring(fields.worldedit_gui_cylinder_radius1) - gui_distance3[name] = tostring(fields.worldedit_gui_cylinder_radius2) + local cg = { + worldedit_gui_cylinder_search = true, + worldedit_gui_cylinder_node = gui_nodename1, + worldedit_gui_cylinder_axis = gui_axis1, + worldedit_gui_cylinder_length = gui_distance1, + worldedit_gui_cylinder_radius1 = gui_distance2, + worldedit_gui_cylinder_radius2 = gui_distance3, + } + local ret = handle_changes(name, "worldedit_gui_cylinder", fields, cg) + if fields.worldedit_gui_cylinder_submit_hollow or fields.worldedit_gui_cylinder_submit_solid then + copy_changes(name, fields, cg) worldedit.show_page(name, "worldedit_gui_cylinder") - local submit = nil - if fields.worldedit_gui_cylinder_submit_hollow then - submit = "hollowcylinder" - elseif fields.worldedit_gui_cylinder_submit_solid then + local submit = "hollowcylinder" + if fields.worldedit_gui_cylinder_submit_solid then submit = "cylinder" end - if submit then - local n = worldedit.normalize_nodename(gui_nodename1[name]) - if n then - local args = string.format("%s %s %s %s %s", axis_values[gui_axis1[name]], gui_distance1[name], gui_distance2[name], gui_distance3[name], n) - minetest.chatcommands["/"..submit].func(name, args) - end + local n = worldedit.normalize_nodename(gui_nodename1[name]) + if n then + local args = string.format("%s %s %s %s %s", axis_values[gui_axis1[name]], gui_distance1[name], gui_distance2[name], gui_distance3[name], n) + execute_worldedit_command(submit, name, args) end return true end - if fields.worldedit_gui_cylinder_axis then - gui_axis1[name] = axis_indices[fields.worldedit_gui_cylinder_axis] - worldedit.show_page(name, "worldedit_gui_cylinder") - return true - end - return false + return ret end) worldedit.register_gui_function("worldedit_gui_pyramid", { @@ -347,42 +431,42 @@ worldedit.register_gui_function("worldedit_gui_pyramid", { local nodename = worldedit.normalize_nodename(node) return "size[6.5,4]" .. worldedit.get_formspec_header("worldedit_gui_pyramid") .. string.format("field[0.5,1.5;4,0.8;worldedit_gui_pyramid_node;Name;%s]", minetest.formspec_escape(node)) .. + "field_close_on_enter[worldedit_gui_pyramid_node;false]" .. "button[4,1.18;1.5,0.8;worldedit_gui_pyramid_search;Search]" .. formspec_node("5.5,1.1", nodename) .. string.format("field[0.5,2.5;4,0.8;worldedit_gui_pyramid_length;Length;%s]", minetest.formspec_escape(length)) .. string.format("dropdown[4,2.18;2.5;worldedit_gui_pyramid_axis;X axis,Y axis,Z axis,Look direction;%d]", axis) .. + "field_close_on_enter[worldedit_gui_pyramid_length;false]" .. "button_exit[0,3.5;3,0.8;worldedit_gui_pyramid_submit_hollow;Hollow Pyramid]" .. "button_exit[3.5,3.5;3,0.8;worldedit_gui_pyramid_submit_solid;Solid Pyramid]" end, }) worldedit.register_gui_handler("worldedit_gui_pyramid", function(name, fields) - if fields.worldedit_gui_pyramid_search or fields.worldedit_gui_pyramid_submit_solid or fields.worldedit_gui_pyramid_submit_hollow or fields.worldedit_gui_pyramid_axis then - gui_nodename1[name] = tostring(fields.worldedit_gui_pyramid_node) - gui_axis1[name] = axis_indices[fields.worldedit_gui_pyramid_axis] - gui_distance1[name] = tostring(fields.worldedit_gui_pyramid_length) + local cg = { + worldedit_gui_pyramid_search = true, + worldedit_gui_pyramid_node = gui_nodename1, + worldedit_gui_pyramid_axis = gui_axis1, + worldedit_gui_pyramid_length = gui_distance1, + } + local ret = handle_changes(name, "worldedit_gui_pyramid", fields, cg) + if fields.worldedit_gui_pyramid_submit_solid or fields.worldedit_gui_pyramid_submit_hollow then + copy_changes(name, fields, cg) worldedit.show_page(name, "worldedit_gui_pyramid") - local submit = nil - if fields.worldedit_gui_pyramid_submit_solid then - submit = "pyramid" - elseif fields.worldedit_gui_pyramid_submit_hollow then + local submit = "pyramid" + if fields.worldedit_gui_pyramid_submit_hollow then submit = "hollowpyramid" end - if submit then - local n = worldedit.normalize_nodename(gui_nodename1[name]) - if n then - minetest.chatcommands["/"..submit].func(name, string.format("%s %s %s", axis_values[gui_axis1[name]], gui_distance1[name], n)) - end + local n = worldedit.normalize_nodename(gui_nodename1[name]) + if n then + execute_worldedit_command(submit, name, + string.format("%s %s %s", axis_values[gui_axis1[name]], + gui_distance1[name], n)) end return true end - if fields.worldedit_gui_pyramid_axis then - gui_axis1[name] = axis_indices[fields.worldedit_gui_pyramid_axis] - worldedit.show_page(name, "worldedit_gui_pyramid") - return true - end - return false + return ret end) worldedit.register_gui_function("worldedit_gui_spiral", { @@ -393,31 +477,41 @@ worldedit.register_gui_function("worldedit_gui_spiral", { local nodename = worldedit.normalize_nodename(node) return "size[6.5,6]" .. worldedit.get_formspec_header("worldedit_gui_spiral") .. string.format("field[0.5,1.5;4,0.8;worldedit_gui_spiral_node;Name;%s]", minetest.formspec_escape(node)) .. + "field_close_on_enter[worldedit_gui_spiral_node;false]" .. "button[4,1.18;1.5,0.8;worldedit_gui_spiral_search;Search]" .. formspec_node("5.5,1.1", nodename) .. string.format("field[0.5,2.5;4,0.8;worldedit_gui_spiral_length;Side Length;%s]", minetest.formspec_escape(length)) .. string.format("field[0.5,3.5;4,0.8;worldedit_gui_spiral_height;Height;%s]", minetest.formspec_escape(height)) .. string.format("field[0.5,4.5;4,0.8;worldedit_gui_spiral_space;Wall Spacing;%s]", minetest.formspec_escape(space)) .. + "field_close_on_enter[worldedit_gui_spiral_length;false]" .. + "field_close_on_enter[worldedit_gui_spiral_height;false]" .. + "field_close_on_enter[worldedit_gui_spiral_space;false]" .. "button_exit[0,5.5;3,0.8;worldedit_gui_spiral_submit;Spiral]" end, }) worldedit.register_gui_handler("worldedit_gui_spiral", function(name, fields) - if fields.worldedit_gui_spiral_search or fields.worldedit_gui_spiral_submit then - gui_nodename1[name] = fields.worldedit_gui_spiral_node - gui_distance1[name] = tostring(fields.worldedit_gui_spiral_length) - gui_distance2[name] = tostring(fields.worldedit_gui_spiral_height) - gui_distance3[name] = tostring(fields.worldedit_gui_spiral_space) + local cg = { + worldedit_gui_spiral_search = true, + worldedit_gui_spiral_node = gui_nodename1, + worldedit_gui_spiral_length = gui_distance1, + worldedit_gui_spiral_height = gui_distance2, + worldedit_gui_spiral_space = gui_distance3, + } + local ret = handle_changes(name, "worldedit_gui_spiral", fields, cg) + if fields.worldedit_gui_spiral_submit then + copy_changes(name, fields, cg) worldedit.show_page(name, "worldedit_gui_spiral") - if fields.worldedit_gui_spiral_submit then - local n = worldedit.normalize_nodename(gui_nodename1[name]) - if n then - minetest.chatcommands["/spiral"].func(name, string.format("%s %s %s %s", gui_distance1[name], gui_distance2[name], gui_distance3[name], n)) - end + + local n = worldedit.normalize_nodename(gui_nodename1[name]) + if n then + execute_worldedit_command("spiral", name, + string.format("%s %s %s %s", gui_distance1[name], + gui_distance2[name], gui_distance3[name], n)) end return true end - return false + return ret end) worldedit.register_gui_function("worldedit_gui_copy_move", { @@ -429,29 +523,31 @@ worldedit.register_gui_function("worldedit_gui_copy_move", { return "size[6.5,3]" .. worldedit.get_formspec_header("worldedit_gui_copy_move") .. string.format("field[0.5,1.5;4,0.8;worldedit_gui_copy_move_amount;Amount;%s]", minetest.formspec_escape(amount)) .. string.format("dropdown[4,1.18;2.5;worldedit_gui_copy_move_axis;X axis,Y axis,Z axis,Look direction;%d]", axis) .. + "field_close_on_enter[worldedit_gui_copy_move_amount;false]" .. "button_exit[0,2.5;3,0.8;worldedit_gui_copy_move_copy;Copy Region]" .. "button_exit[3.5,2.5;3,0.8;worldedit_gui_copy_move_move;Move Region]" end, }) worldedit.register_gui_handler("worldedit_gui_copy_move", function(name, fields) + local cg = { + worldedit_gui_copy_move_amount = gui_distance1, + worldedit_gui_copy_move_axis = gui_axis1, + } + local ret = handle_changes(name, "worldedit_gui_spiral", fields, cg) if fields.worldedit_gui_copy_move_copy or fields.worldedit_gui_copy_move_move then - gui_axis1[name] = axis_indices[fields.worldedit_gui_copy_move_axis] or 4 - gui_distance1[name] = tostring(fields.worldedit_gui_copy_move_amount) + copy_changes(name, fields, cg) worldedit.show_page(name, "worldedit_gui_copy_move") - if fields.worldedit_gui_copy_move_copy then - minetest.chatcommands["/copy"].func(name, string.format("%s %s", axis_values[gui_axis1[name]], gui_distance1[name])) - else --fields.worldedit_gui_copy_move_move - minetest.chatcommands["/move"].func(name, string.format("%s %s", axis_values[gui_axis1[name]], gui_distance1[name])) + + local submit = "copy" + if fields.worldedit_gui_copy_move_move then + submit = "move" end + execute_worldedit_command(submit, name, + axis_values[gui_axis1[name]] .. " " .. gui_distance1[name]) return true end - if fields.worldedit_gui_copy_move_axis then - gui_axis1[name] = axis_indices[fields.worldedit_gui_copy_move_axis] or 4 - worldedit.show_page(name, "worldedit_gui_copy_move") - return true - end - return false + return ret end) worldedit.register_gui_function("worldedit_gui_stack", { @@ -462,24 +558,26 @@ worldedit.register_gui_function("worldedit_gui_stack", { return "size[6.5,3]" .. worldedit.get_formspec_header("worldedit_gui_stack") .. string.format("field[0.5,1.5;4,0.8;worldedit_gui_stack_count;Count;%s]", minetest.formspec_escape(count)) .. string.format("dropdown[4,1.18;2.5;worldedit_gui_stack_axis;X axis,Y axis,Z axis,Look direction;%d]", axis) .. + "field_close_on_enter[worldedit_gui_stack_count;false]" .. "button_exit[0,2.5;3,0.8;worldedit_gui_stack_submit;Stack]" end, }) worldedit.register_gui_handler("worldedit_gui_stack", function(name, fields) + local cg = { + worldedit_gui_stack_axis = gui_axis1, + worldedit_gui_stack_count = gui_count1, + } + local ret = handle_changes(name, "worldedit_gui_stack", fields, cg) if fields.worldedit_gui_stack_submit then - gui_axis1[name] = axis_indices[fields.worldedit_gui_stack_axis] - gui_count1[name] = tostring(fields.worldedit_gui_stack_count) + copy_changes(name, fields, cg) worldedit.show_page(name, "worldedit_gui_stack") - minetest.chatcommands["/stack"].func(name, string.format("%s %s", axis_values[gui_axis1[name]], gui_count1[name])) + + execute_worldedit_command("stack", name, + axis_values[gui_axis1[name]] .. " " .. gui_count1[name]) return true end - if fields.worldedit_gui_stack_axis then - gui_axis1[name] = axis_indices[fields.worldedit_gui_stack_axis] - worldedit.show_page(name, "worldedit_gui_stack") - return true - end - return false + return ret end) worldedit.register_gui_function("worldedit_gui_stretch", { @@ -491,20 +589,29 @@ worldedit.register_gui_function("worldedit_gui_stretch", { string.format("field[0.5,1.5;4,0.8;worldedit_gui_stretch_x;Stretch X;%s]", minetest.formspec_escape(stretchx)) .. string.format("field[0.5,2.5;4,0.8;worldedit_gui_stretch_y;Stretch Y;%s]", minetest.formspec_escape(stretchy)) .. string.format("field[0.5,3.5;4,0.8;worldedit_gui_stretch_z;Stretch Z;%s]", minetest.formspec_escape(stretchz)) .. + "field_close_on_enter[worldedit_gui_stretch_x;false]" .. + "field_close_on_enter[worldedit_gui_stretch_y;false]" .. + "field_close_on_enter[worldedit_gui_stretch_z;false]" .. "button_exit[0,4.5;3,0.8;worldedit_gui_stretch_submit;Stretch]" end, }) worldedit.register_gui_handler("worldedit_gui_stretch", function(name, fields) + local cg = { + worldedit_gui_stretch_x = gui_count1, + worldedit_gui_stretch_y = gui_count2, + worldedit_gui_stretch_z = gui_count3, + } + local ret = handle_changes(name, "worldedit_gui_stretch", fields, cg) if fields.worldedit_gui_stretch_submit then - gui_count1[name] = tostring(fields.worldedit_gui_stretch_x) - gui_count2[name] = tostring(fields.worldedit_gui_stretch_y) - gui_count3[name] = tostring(fields.worldedit_gui_stretch_z) + copy_changes(name, fields, cg) worldedit.show_page(name, "worldedit_gui_stretch") - minetest.chatcommands["/stretch"].func(name, string.format("%s %s %s", gui_count1[name], gui_count2[name], gui_count3[name])) + + execute_worldedit_command("stretch", name, string.format("%s %s %s", + gui_count1[name], gui_count2[name], gui_count3[name])) return true end - return false + return ret end) worldedit.register_gui_function("worldedit_gui_transpose", { @@ -520,23 +627,19 @@ worldedit.register_gui_function("worldedit_gui_transpose", { }) worldedit.register_gui_handler("worldedit_gui_transpose", function(name, fields) + local cg = { + worldedit_gui_transpose_axis1 = gui_axis1, + worldedit_gui_transpose_axis2 = gui_axis2, + } + local ret = handle_changes(name, "worldedit_gui_transpose", fields, cg) if fields.worldedit_gui_transpose_submit then - gui_axis1[name] = axis_indices[fields.worldedit_gui_transpose_axis1] - worldedit.show_page(name, "worldedit_gui_transpose") - minetest.chatcommands["/transpose"].func(name, string.format("%s %s", axis_values[gui_axis1[name]], axis_values[gui_axis2[name]])) + copy_changes(name, fields, cg) + + execute_worldedit_command("transpose", name, + axis_values[gui_axis1[name]] .. " " .. axis_values[gui_axis2[name]]) return true end - if fields.worldedit_gui_transpose_axis1 then - gui_axis1[name] = axis_indices[fields.worldedit_gui_transpose_axis1] - worldedit.show_page(name, "worldedit_gui_transpose") - return true - end - if fields.worldedit_gui_transpose_axis2 then - gui_axis2[name] = axis_indices[fields.worldedit_gui_transpose_axis2] - worldedit.show_page(name, "worldedit_gui_transpose") - return true - end - return false + return ret end) worldedit.register_gui_function("worldedit_gui_flip", { @@ -551,18 +654,18 @@ worldedit.register_gui_function("worldedit_gui_flip", { }) worldedit.register_gui_handler("worldedit_gui_flip", function(name, fields) + local cg = { + worldedit_gui_flip_axis = gui_axis1 + } + local ret = handle_changes(name, "worldedit_gui_flip", fields, cg) if fields.worldedit_gui_flip_submit then - gui_axis1[name] = axis_indices[fields.worldedit_gui_flip_axis] + copy_changes(name, fields, cg) worldedit.show_page(name, "worldedit_gui_flip") - minetest.chatcommands["/flip"].func(name, axis_values[gui_axis1[name]]) + + execute_worldedit_command("flip", name, axis_values[gui_axis1[name]]) return true end - if fields.worldedit_gui_flip_axis then - gui_axis1[name] = axis_indices[fields.worldedit_gui_flip_axis] - worldedit.show_page(name, "worldedit_gui_flip") - return true - end - return false + return ret end) worldedit.register_gui_function("worldedit_gui_rotate", { @@ -578,24 +681,20 @@ worldedit.register_gui_function("worldedit_gui_rotate", { }) worldedit.register_gui_handler("worldedit_gui_rotate", function(name, fields) + local cg = { + worldedit_gui_rotate_axis = gui_axis1, + worldedit_gui_rotate_angle = gui_angle, + } + local ret = handle_changes(name, "worldedit_gui_rotate", fields, cg) if fields.worldedit_gui_rotate_submit then - gui_axis1[name] = axis_indices[fields.worldedit_gui_rotate_axis] - gui_angle[name] = angle_indices[fields.worldedit_gui_rotate_angle] + copy_changes(name, fields, cg) worldedit.show_page(name, "worldedit_gui_rotate") - minetest.chatcommands["/rotate"].func(name, string.format("%s %s", axis_values[gui_axis1[name]], angle_values[gui_angle[name]])) + + execute_worldedit_command("rotate", name, + axis_values[gui_axis1[name]] .. " " .. angle_values[gui_angle[name]]) return true end - if fields.worldedit_gui_rotate_axis then - gui_axis1[name] = axis_indices[fields.worldedit_gui_rotate_axis] - worldedit.show_page(name, "worldedit_gui_rotate") - return true - end - if fields.worldedit_gui_rotate_angle then - gui_angle[name] = angle_indices[fields.worldedit_gui_rotate_angle] - worldedit.show_page(name, "worldedit_gui_rotate") - return true - end - return false + return ret end) worldedit.register_gui_function("worldedit_gui_orient", { @@ -610,25 +709,26 @@ worldedit.register_gui_function("worldedit_gui_orient", { }) worldedit.register_gui_handler("worldedit_gui_orient", function(name, fields) + local cg = { + worldedit_gui_orient_angle = gui_angle, + } + local ret = handle_changes(name, "worldedit_gui_orient", fields, cg) if fields.worldedit_gui_orient_submit then - gui_angle[name] = angle_indices[fields.worldedit_gui_orient_angle] + copy_changes(name, fields, cg) worldedit.show_page(name, "worldedit_gui_orient") - minetest.chatcommands["/orient"].func(name, tostring(angle_values[gui_angle[name]])) + + execute_worldedit_command("orient", name, + tostring(angle_values[gui_angle[name]])) return true end - if fields.worldedit_gui_orient_angle then - gui_angle[name] = angle_indices[fields.worldedit_gui_orient_angle] - worldedit.show_page(name, "worldedit_gui_orient") - return true - end - return false + return ret end) worldedit.register_gui_function("worldedit_gui_fixlight", { name = "Fix Lighting", privs = we_privs("fixlight"), on_select = function(name) - minetest.chatcommands["/fixlight"].func(name, "") + execute_worldedit_command("fixlight", name, "") end, }) @@ -636,7 +736,7 @@ worldedit.register_gui_function("worldedit_gui_hide", { name = "Hide Region", privs = we_privs("hide"), on_select = function(name) - minetest.chatcommands["/hide"].func(name, "") + execute_worldedit_command("hide", name, "") end, }) @@ -648,6 +748,7 @@ worldedit.register_gui_function("worldedit_gui_suppress", { local nodename = worldedit.normalize_nodename(node) return "size[6.5,3]" .. worldedit.get_formspec_header("worldedit_gui_suppress") .. string.format("field[0.5,1.5;4,0.8;worldedit_gui_suppress_node;Name;%s]", minetest.formspec_escape(node)) .. + "field_close_on_enter[worldedit_gui_suppress_node;false]" .. "button[4,1.18;1.5,0.8;worldedit_gui_suppress_search;Search]" .. formspec_node("5.5,1.1", nodename) .. "button_exit[0,2.5;3,0.8;worldedit_gui_suppress_submit;Suppress Nodes]" @@ -655,18 +756,22 @@ worldedit.register_gui_function("worldedit_gui_suppress", { }) worldedit.register_gui_handler("worldedit_gui_suppress", function(name, fields) - if fields.worldedit_gui_suppress_search or fields.worldedit_gui_suppress_submit then - gui_nodename1[name] = tostring(fields.worldedit_gui_suppress_node) + local cg = { + worldedit_gui_suppress_search = true, + worldedit_gui_suppress_node = gui_nodename1, + } + local ret = handle_changes(name, "worldedit_gui_suppress", fields, cg) + if fields.worldedit_gui_suppress_submit then + copy_changes(name, fields, cg) worldedit.show_page(name, "worldedit_gui_suppress") - if fields.worldedit_gui_suppress_submit then - local n = worldedit.normalize_nodename(gui_nodename1[name]) - if n then - minetest.chatcommands["/suppress"].func(name, n) - end + + local n = worldedit.normalize_nodename(gui_nodename1[name]) + if n then + execute_worldedit_command("suppress", name, n) end return true end - return false + return ret end) worldedit.register_gui_function("worldedit_gui_highlight", { @@ -677,6 +782,7 @@ worldedit.register_gui_function("worldedit_gui_highlight", { local nodename = worldedit.normalize_nodename(node) return "size[6.5,3]" .. worldedit.get_formspec_header("worldedit_gui_highlight") .. string.format("field[0.5,1.5;4,0.8;worldedit_gui_highlight_node;Name;%s]", minetest.formspec_escape(node)) .. + "field_close_on_enter[worldedit_gui_highlight_node;false]" .. "button[4,1.18;1.5,0.8;worldedit_gui_highlight_search;Search]" .. formspec_node("5.5,1.1", nodename) .. "button_exit[0,2.5;3,0.8;worldedit_gui_highlight_submit;Highlight Nodes]" @@ -684,25 +790,29 @@ worldedit.register_gui_function("worldedit_gui_highlight", { }) worldedit.register_gui_handler("worldedit_gui_highlight", function(name, fields) - if fields.worldedit_gui_highlight_search or fields.worldedit_gui_highlight_submit then - gui_nodename1[name] = tostring(fields.worldedit_gui_highlight_node) + local cg = { + worldedit_gui_highlight_search = true, + worldedit_gui_highlight_node = gui_nodename1, + } + local ret = handle_changes(name, "worldedit_gui_highlight", fields, cg) + if fields.worldedit_gui_highlight_submit then + copy_changes(name, fields, cg) worldedit.show_page(name, "worldedit_gui_highlight") - if fields.worldedit_gui_highlight_submit then - local n = worldedit.normalize_nodename(gui_nodename1[name]) - if n then - minetest.chatcommands["/highlight"].func(name, n) - end + + local n = worldedit.normalize_nodename(gui_nodename1[name]) + if n then + execute_worldedit_command("highlight", name, n) end return true end - return false + return ret end) worldedit.register_gui_function("worldedit_gui_restore", { name = "Restore Region", privs = we_privs("restore"), on_select = function(name) - minetest.chatcommands["/restore"].func(name, "") + execute_worldedit_command("restore", name, "") end, }) @@ -713,6 +823,7 @@ worldedit.register_gui_function("worldedit_gui_save_load", { local filename = gui_filename[name] return "size[6,4]" .. worldedit.get_formspec_header("worldedit_gui_save_load") .. string.format("field[0.5,1.5;4,0.8;worldedit_gui_save_filename;Filename;%s]", minetest.formspec_escape(filename)) .. + "field_close_on_enter[worldedit_gui_save_filename;false]" .. "button_exit[0,2.5;3,0.8;worldedit_gui_save_load_submit_save;Save]" .. "button_exit[3,2.5;3,0.8;worldedit_gui_save_load_submit_allocate;Allocate]" .. "button_exit[0,3.5;3,0.8;worldedit_gui_save_load_submit_load;Load]" @@ -723,12 +834,13 @@ worldedit.register_gui_handler("worldedit_gui_save_load", function(name, fields) if fields.worldedit_gui_save_load_submit_save or fields.worldedit_gui_save_load_submit_allocate or fields.worldedit_gui_save_load_submit_load then gui_filename[name] = tostring(fields.worldedit_gui_save_filename) worldedit.show_page(name, "worldedit_gui_save_load") + if fields.worldedit_gui_save_load_submit_save then - minetest.chatcommands["/save"].func(name, gui_filename[name]) + execute_worldedit_command("save", name, gui_filename[name]) elseif fields.worldedit_gui_save_load_submit_allocate then - minetest.chatcommands["/allocate"].func(name, gui_filename[name]) + execute_worldedit_command("allocate", name, gui_filename[name]) else --fields.worldedit_gui_save_load_submit_load - minetest.chatcommands["/load"].func(name, gui_filename[name]) + execute_worldedit_command("load", name, gui_filename[name]) end return true end @@ -736,7 +848,7 @@ worldedit.register_gui_handler("worldedit_gui_save_load", function(name, fields) end) worldedit.register_gui_function("worldedit_gui_cube", { - name = "Cuboid", -- technically the command is misnamed, I know... + name = "Cube", privs = combine_we_privs({"hollowcube", "cube"}), get_formspec = function(name) local width, height, length = gui_distance1[name], gui_distance2[name], gui_distance3[name] @@ -744,47 +856,51 @@ worldedit.register_gui_function("worldedit_gui_cube", { local nodename = worldedit.normalize_nodename(node) return "size[6.5,4]" .. worldedit.get_formspec_header("worldedit_gui_cube") .. string.format("field[0.5,1.5;4,0.8;worldedit_gui_cube_node;Name;%s]", minetest.formspec_escape(node)) .. + "field_close_on_enter[worldedit_gui_cube_node;false]" .. "button[4,1.18;1.5,0.8;worldedit_gui_cube_search;Search]" .. formspec_node("5.5,1.1", nodename) .. string.format("field[0.5,2.5;1,0.8;worldedit_gui_cube_width;Width;%s]", minetest.formspec_escape(width)) .. string.format("field[1.5,2.5;1,0.8;worldedit_gui_cube_height;Height;%s]", minetest.formspec_escape(height)) .. string.format("field[2.5,2.5;1,0.8;worldedit_gui_cube_length;Length;%s]", minetest.formspec_escape(length)) .. + "field_close_on_enter[worldedit_gui_cube_width;false]" .. + "field_close_on_enter[worldedit_gui_cube_height;false]" .. + "field_close_on_enter[worldedit_gui_cube_length;false]" .. "button_exit[0,3.5;3,0.8;worldedit_gui_cube_submit_hollow;Hollow Cuboid]" .. "button_exit[3.5,3.5;3,0.8;worldedit_gui_cube_submit_solid;Solid Cuboid]" end, }) worldedit.register_gui_handler("worldedit_gui_cube", function(name, fields) - if fields.worldedit_gui_cube_search - or fields.worldedit_gui_cube_submit_hollow or fields.worldedit_gui_cube_submit_solid then - gui_nodename1[name] = tostring(fields.worldedit_gui_cube_node) - gui_distance1[name] = tostring(fields.worldedit_gui_cube_width) - gui_distance2[name] = tostring(fields.worldedit_gui_cube_height) - gui_distance3[name] = tostring(fields.worldedit_gui_cube_length) + local cg = { + worldedit_gui_cube_search = true, + worldedit_gui_cube_node = gui_nodename1, + worldedit_gui_cube_width = gui_distance1, + worldedit_gui_cube_height = gui_distance2, + worldedit_gui_cube_length = gui_distance3, + } + local ret = handle_changes(name, "worldedit_gui_cube", fields, cg) + if fields.worldedit_gui_cube_submit_hollow or fields.worldedit_gui_cube_submit_solid then + copy_changes(name, fields, cg) worldedit.show_page(name, "worldedit_gui_cube") - local submit = nil - if fields.worldedit_gui_cube_submit_hollow then - submit = "hollowcube" - elseif fields.worldedit_gui_cube_submit_solid then + local submit = "hollowcube" + if fields.worldedit_gui_cube_submit_solid then submit = "cube" end - if submit then - local n = worldedit.normalize_nodename(gui_nodename1[name]) - if n then - local args = string.format("%s %s %s %s", gui_distance1[name], gui_distance2[name], gui_distance3[name], n) - minetest.chatcommands["/"..submit].func(name, args) - end + local n = worldedit.normalize_nodename(gui_nodename1[name]) + if n then + local args = string.format("%s %s %s %s", gui_distance1[name], gui_distance2[name], gui_distance3[name], n) + execute_worldedit_command(submit, name, args) end return true end - return false + return ret end) worldedit.register_gui_function("worldedit_gui_clearobjects", { name = "Clear Objects", privs = we_privs("clearobjects"), on_select = function(name) - minetest.chatcommands["/clearobjects"].func(name, "") + execute_worldedit_command("clearobjects", name, "") end, }) diff --git a/worldedit/worldedit_gui/init.lua b/worldedit/worldedit_gui/init.lua index b88a82e..08ecc1b 100644 --- a/worldedit/worldedit_gui/init.lua +++ b/worldedit/worldedit_gui/init.lua @@ -70,7 +70,7 @@ local get_formspec = function(name, identifier) end --implement worldedit.show_page(name, page) in different ways depending on the available APIs -if rawget(_G, "unified_inventory") then --unified inventory installed +if minetest.global_exists("unified_inventory") then -- unified inventory installed local old_func = worldedit.register_gui_function worldedit.register_gui_function = function(identifier, options) old_func(identifier, options) @@ -80,6 +80,9 @@ if rawget(_G, "unified_inventory") then --unified inventory installed unified_inventory.register_button("worldedit_gui", { type = "image", image = "inventory_plus_worldedit_gui.png", + condition = function(player) + return minetest.check_player_privs(player:get_player_name(), {worldedit=true}) + end, }) minetest.register_on_player_receive_fields(function(player, formname, fields) @@ -103,7 +106,7 @@ if rawget(_G, "unified_inventory") then --unified inventory installed player:set_inventory_formspec(get_formspec(name, page)) end end -elseif rawget(_G, "inventory_plus") then --inventory++ installed +elseif minetest.global_exists("inventory_plus") then -- inventory++ installed minetest.register_on_joinplayer(function(player) local can_worldedit = minetest.check_player_privs(player:get_player_name(), {worldedit=true}) if can_worldedit then @@ -134,7 +137,7 @@ elseif rawget(_G, "inventory_plus") then --inventory++ installed inventory_plus.set_inventory_formspec(player, get_formspec(name, page)) end end -elseif rawget(_G, "smart_inventory") then -- smart_inventory installed +elseif minetest.global_exists("smart_inventory") then -- smart_inventory installed -- redefinition: Update the code element on inventory page to show the we-page function worldedit.show_page(name, page) local state = smart_inventory.get_page_state("worldedit_gui", name) @@ -183,7 +186,7 @@ elseif rawget(_G, "smart_inventory") then -- smart_inventory installed smartfs_callback = smart_worldedit_gui_callback, sequence = 99 }) -elseif rawget(_G, "sfinv") then --sfinv installed (part of minetest_game since 0.4.15) +elseif minetest.global_exists("sfinv") then -- sfinv installed assert(sfinv.enabled) local orig_get = sfinv.pages["sfinv:crafting"].get sfinv.override_page("sfinv:crafting", { @@ -194,21 +197,13 @@ elseif rawget(_G, "sfinv") then --sfinv installed (part of minetest_game since 0 end }) - --compatibility with pre-0.4.16 sfinv - local set_page = sfinv.set_page or function(player, name) - --assumptions: src pg has no leave callback, dst pg has no enter callback - local ctx = {page=name} - sfinv.contexts[player:get_player_name()] = ctx - sfinv.set_player_inventory_formspec(player, ctx) - end - --show the form when the button is pressed and hide it when done minetest.register_on_player_receive_fields(function(player, formname, fields) if fields.worldedit_gui then --main page worldedit.show_page(player:get_player_name(), "worldedit_gui") return true elseif fields.worldedit_gui_exit then --return to original page - set_page(player, "sfinv:crafting") + sfinv.set_page(player, "sfinv:crafting") return true end return false @@ -222,11 +217,11 @@ elseif rawget(_G, "sfinv") then --sfinv installed (part of minetest_game since 0 end else error( - "worldedit_gui requires a supported \"gui management\" mod to be installed\n".. - "To use the GUI you need to either\n".. - "* Use minetest_game (at least 0.4.15) or a subgame with compatible sfinv\n".. - "* Install Unified Inventory or Inventory++\n".. - "If you do not want to use worldedit_gui, disable it by editing world.mt or from the Main Menu" + "worldedit_gui requires a supported gui management mod to be installed.\n".. + "To use the it you need to either:\n".. + "* use minetest_game or another sfinv-compatible subgame\n".. + "* install Unified Inventory, Inventory++ or Smart Inventory\n".. + "If you don't want to use worldedit_gui, disable it by editing world.mt or from the main menu." ) end diff --git a/worldedit/worldedit_gui/mod.conf b/worldedit/worldedit_gui/mod.conf new file mode 100644 index 0000000..d5b2fd5 --- /dev/null +++ b/worldedit/worldedit_gui/mod.conf @@ -0,0 +1,4 @@ +name = worldedit_gui +description = WorldEdit GUI +depends = worldedit, worldedit_commands +optional_depends = unified_inventory, inventory_plus, sfinv, creative, smart_inventory diff --git a/worldedit/worldedit_shortcommands/depends.txt b/worldedit/worldedit_shortcommands/depends.txt deleted file mode 100644 index de1cb6c..0000000 --- a/worldedit/worldedit_shortcommands/depends.txt +++ /dev/null @@ -1 +0,0 @@ -worldedit_commands diff --git a/worldedit/worldedit_shortcommands/init.lua b/worldedit/worldedit_shortcommands/init.lua index da02b75..5f755cc 100644 --- a/worldedit/worldedit_shortcommands/init.lua +++ b/worldedit/worldedit_shortcommands/init.lua @@ -1,52 +1,52 @@ --provides shorter names for the commands in `worldedit_commands` ---returns true if command could not be aliased, false otherwise -worldedit.alias_chatcommand = function(alias, original_command) - if not minetest.chatcommands[original_command] then - minetest.log("error", "worldedit_shortcommands: original command " .. original_command .. " does not exist") - return true +worldedit.alias_command = function(alias, original) + if not worldedit.registered_commands[original] then + minetest.log("error", "worldedit_shortcommands: original " .. original .. " does not exist") + return end - if minetest.chatcommands[alias] then + if minetest.chatcommands["/" .. alias] then minetest.log("error", "worldedit_shortcommands: alias " .. alias .. " already exists") - return true + return end - minetest.register_chatcommand(alias, minetest.chatcommands[original_command]) - return false + + minetest.register_chatcommand("/" .. alias, minetest.chatcommands["/" .. original]) + worldedit.registered_commands[alias] = worldedit.registered_commands[original] end -worldedit.alias_chatcommand("/i", "/inspect") -worldedit.alias_chatcommand("/rst", "/reset") -worldedit.alias_chatcommand("/mk", "/mark") -worldedit.alias_chatcommand("/umk", "/unmark") -worldedit.alias_chatcommand("/1", "/pos1") -worldedit.alias_chatcommand("/2", "/pos2") -worldedit.alias_chatcommand("/fp", "/fixedpos") -worldedit.alias_chatcommand("/v", "/volume") -worldedit.alias_chatcommand("/s", "/set") -worldedit.alias_chatcommand("/r", "/replace") -worldedit.alias_chatcommand("/ri", "/replaceinverse") -worldedit.alias_chatcommand("/hcube", "/hollowcube") -worldedit.alias_chatcommand("/hspr", "/hollowsphere") -worldedit.alias_chatcommand("/spr", "/sphere") -worldedit.alias_chatcommand("/hdo", "/hollowdome") -worldedit.alias_chatcommand("/do", "/dome") -worldedit.alias_chatcommand("/hcyl", "/hollowcylinder") -worldedit.alias_chatcommand("/cyl", "/cylinder") -worldedit.alias_chatcommand("/hpyr", "/hollowpyramid") -worldedit.alias_chatcommand("/pyr", "/pyramid") -worldedit.alias_chatcommand("/spl", "/spiral") -worldedit.alias_chatcommand("/m", "/move") -worldedit.alias_chatcommand("/c", "/copy") -worldedit.alias_chatcommand("/stk", "/stack") -worldedit.alias_chatcommand("/sch", "/stretch") -worldedit.alias_chatcommand("/tps", "/transpose") -worldedit.alias_chatcommand("/fl", "/flip") -worldedit.alias_chatcommand("/rot", "/rotate") -worldedit.alias_chatcommand("/ort", "/orient") -worldedit.alias_chatcommand("/hi", "/hide") -worldedit.alias_chatcommand("/sup", "/suppress") -worldedit.alias_chatcommand("/hlt", "/highlight") -worldedit.alias_chatcommand("/rsr", "/restore") -worldedit.alias_chatcommand("/l", "/lua") -worldedit.alias_chatcommand("/lt", "/luatransform") -worldedit.alias_chatcommand("/clro", "/clearobjects") +worldedit.alias_command("i", "inspect") +worldedit.alias_command("rst", "reset") +worldedit.alias_command("mk", "mark") +worldedit.alias_command("umk", "unmark") +worldedit.alias_command("1", "pos1") +worldedit.alias_command("2", "pos2") +worldedit.alias_command("fp", "fixedpos") +worldedit.alias_command("v", "volume") +worldedit.alias_command("s", "set") +worldedit.alias_command("r", "replace") +worldedit.alias_command("ri", "replaceinverse") +worldedit.alias_command("hcube", "hollowcube") +worldedit.alias_command("hspr", "hollowsphere") +worldedit.alias_command("spr", "sphere") +worldedit.alias_command("hdo", "hollowdome") +worldedit.alias_command("do", "dome") +worldedit.alias_command("hcyl", "hollowcylinder") +worldedit.alias_command("cyl", "cylinder") +worldedit.alias_command("hpyr", "hollowpyramid") +worldedit.alias_command("pyr", "pyramid") +worldedit.alias_command("spl", "spiral") +worldedit.alias_command("m", "move") +worldedit.alias_command("c", "copy") +worldedit.alias_command("stk", "stack") +worldedit.alias_command("sch", "stretch") +worldedit.alias_command("tps", "transpose") +worldedit.alias_command("fl", "flip") +worldedit.alias_command("rot", "rotate") +worldedit.alias_command("ort", "orient") +worldedit.alias_command("hi", "hide") +worldedit.alias_command("sup", "suppress") +worldedit.alias_command("hlt", "highlight") +worldedit.alias_command("rsr", "restore") +worldedit.alias_command("l", "lua") +worldedit.alias_command("lt", "luatransform") +worldedit.alias_command("clro", "clearobjects") diff --git a/worldedit/worldedit_shortcommands/mod.conf b/worldedit/worldedit_shortcommands/mod.conf new file mode 100644 index 0000000..8df801c --- /dev/null +++ b/worldedit/worldedit_shortcommands/mod.conf @@ -0,0 +1,3 @@ +name = worldedit_shortcommands +description = WorldEdit command short aliases +depends = worldedit_commands