summaryrefslogtreecommitdiff
path: root/digistuff
diff options
context:
space:
mode:
Diffstat (limited to 'digistuff')
-rw-r--r--digistuff/conductors.lua54
-rw-r--r--digistuff/init.lua2
-rw-r--r--digistuff/models/digistuff_wall_knob.obj1043
-rw-r--r--digistuff/switches.lua (renamed from digistuff/button.lua)109
4 files changed, 1202 insertions, 6 deletions
diff --git a/digistuff/conductors.lua b/digistuff/conductors.lua
index dfc8793..d18b641 100644
--- a/digistuff/conductors.lua
+++ b/digistuff/conductors.lua
@@ -5,7 +5,8 @@ digistuff.remove_receiver = function(pos,node)
if rnode.name == "digistuff:receiver" then
rnode.name = "digilines:wire_std_00000000"
minetest.remove_node(rpos)
- minetest.place_node(rpos,rnode)
+ minetest.set_node(rpos,rnode)
+ digilines.update_autoconnect(rpos)
end
end
@@ -125,16 +126,24 @@ minetest.register_node("digistuff:receiver", {
is_ground_content = false,
paramtype = "light",
paramtype2 = "facedir",
+ walkable = false,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
- {-0.05,-0.05,-1.49,0.05,0.05,-0.5},
- {-0.2,-0.2,-0.5,0.2,0.2,-0.4},
- {-0.0625,-0.5,-0.5,0.0625,-0.2,-0.4},
- {-0.0625,-0.5,-0.4,0.0625,-0.4375,0.5},
+ {-0.05,-0.05,-1.49,0.05,0.05,-0.5},
+ {-0.2,-0.2,-0.5,0.2,0.2,-0.4},
+ {-0.0625,-0.5,-0.5,0.0625,-0.2,-0.4},
+ {-0.0625,-0.5,-0.4,0.0625,-0.4375,0.5},
},
},
+ selection_box = {
+ type = "fixed",
+ fixed = {
+ {-0.2,-0.5,-0.5,0.2,0.2,0.5},
+ {-0.075,-0.075,-1.49,0.075,0.075,-0.5},
+ },
+ },
digiline = {
receptor = {},
wire = {
@@ -189,6 +198,12 @@ minetest.register_node("digistuff:vertical_bottom", {
{-0.05,-0.4375,-0.05,0.05,0.5,0.05},
},
},
+ collision_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,-0.5,0.5,-0.4375,0.5},
+ },
+ },
after_place_node = digistuff.vertical_autoconnect,
after_destruct = digistuff.vertical_remove,
digiline = {
@@ -214,6 +229,7 @@ minetest.register_node("digistuff:vertical_middle", {
drop = "digistuff:vertical_bottom",
is_ground_content = false,
paramtype = "light",
+ walkable = false,
drawtype = "nodebox",
node_box = {
type = "fixed",
@@ -277,6 +293,7 @@ minetest.register_node("digistuff:insulated_straight", {
},
paramtype = "light",
paramtype2 = "facedir",
+ walkable = false,
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple,
groups = {dig_immediate = 3,},
is_ground_content = false,
@@ -288,6 +305,12 @@ minetest.register_node("digistuff:insulated_straight", {
{-0.5,-0.5,-0.1,0.5,-0.4,0.1},
},
},
+ selection_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,-0.15,0.5,-0.35,0.15},
+ },
+ },
after_place_node = digilines.update_autoconnect,
after_destruct = digilines.update_autoconnect,
digiline = {
@@ -316,6 +339,7 @@ minetest.register_node("digistuff:insulated_tjunction", {
},
paramtype = "light",
paramtype2 = "facedir",
+ walkable = false,
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple,
groups = {dig_immediate = 3,},
is_ground_content = false,
@@ -328,6 +352,12 @@ minetest.register_node("digistuff:insulated_tjunction", {
{-0.1,-0.5,-0.5,0.1,-0.4,-0.1},
},
},
+ selection_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,-0.5,0.5,-0.35,0.15},
+ },
+ },
after_place_node = digilines.update_autoconnect,
after_destruct = digilines.update_autoconnect,
digiline = {
@@ -357,6 +387,7 @@ minetest.register_node("digistuff:insulated_corner", {
},
paramtype = "light",
paramtype2 = "facedir",
+ walkable = false,
on_rotate = minetest.get_modpath("screwdriver") and screwdriver.rotate_simple,
groups = {dig_immediate = 3,},
is_ground_content = false,
@@ -369,6 +400,12 @@ minetest.register_node("digistuff:insulated_corner", {
{-0.5,-0.5,-0.1,0.1,-0.4,0.1},
},
},
+ selection_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,-0.5,0.15,-0.35,0.15},
+ },
+ },
after_place_node = digilines.update_autoconnect,
after_destruct = digilines.update_autoconnect,
digiline = {
@@ -396,6 +433,7 @@ minetest.register_node("digistuff:insulated_fourway", {
"digistuff_insulated_edge.png",
},
paramtype = "light",
+ walkable = false,
groups = {dig_immediate = 3,},
is_ground_content = false,
paramtype = "light",
@@ -408,6 +446,12 @@ minetest.register_node("digistuff:insulated_fourway", {
{-0.1,-0.5,0.1,0.1,-0.4,0.5},
},
},
+ selection_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,-0.5,0.5,-0.35,0.5},
+ },
+ },
after_place_node = digilines.update_autoconnect,
after_destruct = digilines.update_autoconnect,
digiline = {
diff --git a/digistuff/init.lua b/digistuff/init.lua
index 300a32c..4f336b4 100644
--- a/digistuff/init.lua
+++ b/digistuff/init.lua
@@ -7,7 +7,7 @@ local components = {
"light",
"noteblock",
"camera",
- "button",
+ "switches",
"panel",
"piezo",
"detector",
diff --git a/digistuff/models/digistuff_wall_knob.obj b/digistuff/models/digistuff_wall_knob.obj
new file mode 100644
index 0000000..f43cfef
--- /dev/null
+++ b/digistuff/models/digistuff_wall_knob.obj
@@ -0,0 +1,1043 @@
+# Blender v2.79 (sub 0) OBJ File: 'digilines knob.blend'
+# www.blender.org
+o Cube
+v 0.375000 -0.375000 0.500000
+v 0.375000 0.375000 0.500000
+v -0.375000 -0.375000 0.500000
+v -0.375000 0.375000 0.500000
+v 0.312500 -0.312500 0.375000
+v 0.375000 -0.375000 0.437500
+v 0.312500 0.312500 0.375000
+v 0.375000 0.375000 0.437500
+v -0.312500 -0.312500 0.375000
+v -0.375000 -0.375000 0.437500
+v -0.312500 0.312500 0.375000
+v -0.375000 0.375000 0.437500
+v 0.000000 0.187500 0.375000
+v 0.036580 0.183897 0.312500
+v -0.018378 0.186597 0.375000
+v 0.054429 0.179426 0.312500
+v -0.036579 0.183897 0.375000
+v 0.071754 0.173227 0.312500
+v -0.054428 0.179426 0.375000
+v 0.088387 0.165360 0.312500
+v -0.071753 0.173227 0.375000
+v 0.104170 0.155900 0.312500
+v -0.088387 0.165360 0.375000
+v 0.118949 0.144939 0.312500
+v -0.104169 0.155901 0.375000
+v 0.132583 0.132582 0.312500
+v -0.118949 0.144939 0.375000
+v 0.144940 0.118948 0.312500
+v -0.132583 0.132583 0.375000
+v 0.155901 0.104169 0.312500
+v -0.144939 0.118949 0.375000
+v 0.165360 0.088387 0.312500
+v -0.155901 0.104169 0.375000
+v 0.173228 0.071753 0.312500
+v -0.165360 0.088387 0.375000
+v 0.179426 0.054428 0.312500
+v -0.173227 0.071753 0.375000
+v 0.183897 0.036579 0.312500
+v -0.179426 0.054428 0.375000
+v 0.186597 0.018378 0.312500
+v -0.183897 0.036579 0.375000
+v 0.187500 -0.000000 0.312500
+v -0.186597 0.018378 0.375000
+v 0.186597 -0.018378 0.312500
+v -0.187500 -0.000000 0.375000
+v 0.183897 -0.036579 0.312500
+v -0.186597 -0.018378 0.375000
+v 0.179426 -0.054428 0.312500
+v -0.183897 -0.036580 0.375000
+v 0.173227 -0.071753 0.312500
+v -0.179426 -0.054428 0.375000
+v 0.165360 -0.088387 0.312500
+v -0.173227 -0.071753 0.375000
+v 0.155901 -0.104169 0.312500
+v -0.165360 -0.088387 0.375000
+v 0.144940 -0.118949 0.312500
+v -0.155901 -0.104170 0.375000
+v 0.132583 -0.132582 0.312500
+v -0.144939 -0.118949 0.375000
+v 0.118949 -0.144939 0.312500
+v -0.132582 -0.132583 0.375000
+v 0.104170 -0.155900 0.312500
+v -0.118949 -0.144940 0.375000
+v 0.088387 -0.165360 0.312500
+v -0.104169 -0.155901 0.375000
+v 0.071753 -0.173227 0.312500
+v -0.088387 -0.165360 0.375000
+v 0.054429 -0.179426 0.312500
+v -0.071753 -0.173228 0.375000
+v 0.036580 -0.183897 0.312500
+v -0.054428 -0.179426 0.375000
+v 0.018378 -0.186597 0.312500
+v -0.036579 -0.183897 0.375000
+v 0.000000 -0.187500 0.312500
+v -0.018378 -0.186597 0.375000
+v -0.018378 -0.186597 0.312500
+v 0.000000 -0.187500 0.375000
+v -0.036579 -0.183897 0.312500
+v 0.018378 -0.186597 0.375000
+v -0.054428 -0.179426 0.312500
+v 0.036580 -0.183897 0.375000
+v -0.071753 -0.173228 0.312500
+v 0.054429 -0.179426 0.375000
+v -0.088387 -0.165360 0.312500
+v 0.071753 -0.173227 0.375000
+v -0.104169 -0.155901 0.312500
+v 0.088387 -0.165360 0.375000
+v -0.118949 -0.144940 0.312500
+v 0.104170 -0.155900 0.375000
+v -0.132582 -0.132583 0.312500
+v 0.118949 -0.144939 0.375000
+v -0.144939 -0.118949 0.312500
+v 0.132583 -0.132582 0.375000
+v -0.155901 -0.104170 0.312500
+v 0.144940 -0.118949 0.375000
+v -0.165360 -0.088387 0.312500
+v 0.155901 -0.104169 0.375000
+v -0.173227 -0.071753 0.312500
+v 0.165360 -0.088387 0.375000
+v -0.179426 -0.054428 0.312500
+v 0.173227 -0.071753 0.375000
+v -0.183897 -0.036580 0.312500
+v 0.179426 -0.054428 0.375000
+v -0.186597 -0.018378 0.312500
+v 0.183897 -0.036579 0.375000
+v -0.187500 -0.000000 0.312500
+v 0.186597 -0.018378 0.375000
+v -0.186597 0.018378 0.312500
+v 0.187500 -0.000000 0.375000
+v -0.183897 0.036579 0.312500
+v 0.186597 0.018378 0.375000
+v -0.179426 0.054428 0.312500
+v 0.183897 0.036579 0.375000
+v -0.173227 0.071753 0.312500
+v 0.179426 0.054428 0.375000
+v -0.165360 0.088387 0.312500
+v 0.173228 0.071753 0.375000
+v -0.155901 0.104169 0.312500
+v 0.165360 0.088387 0.375000
+v -0.144939 0.118949 0.312500
+v 0.155901 0.104169 0.375000
+v -0.132583 0.132583 0.312500
+v 0.144940 0.118948 0.375000
+v -0.118949 0.144939 0.312500
+v 0.132583 0.132582 0.375000
+v -0.104169 0.155901 0.312500
+v 0.118949 0.144939 0.375000
+v -0.088387 0.165360 0.312500
+v 0.104170 0.155900 0.375000
+v -0.071753 0.173227 0.312500
+v 0.088387 0.165360 0.375000
+v -0.054428 0.179426 0.312500
+v 0.071754 0.173227 0.375000
+v -0.036579 0.183897 0.312500
+v 0.054429 0.179426 0.375000
+v 0.018379 0.186597 0.312500
+v 0.036580 0.183897 0.375000
+v -0.018378 0.186597 0.312500
+v 0.018379 0.186597 0.375000
+v 0.000000 0.187500 0.312500
+v -0.000000 0.124925 0.187500
+v 0.000000 0.187500 0.250000
+v -0.012245 0.124323 0.187500
+v -0.018378 0.186597 0.250000
+v -0.024372 0.122524 0.187500
+v -0.036579 0.183897 0.250000
+v -0.036264 0.119545 0.187500
+v -0.054428 0.179426 0.250000
+v -0.047807 0.115415 0.187500
+v -0.071753 0.173227 0.250000
+v -0.058889 0.110174 0.187500
+v -0.088387 0.165360 0.250000
+v -0.069404 0.103871 0.187500
+v -0.104169 0.155901 0.250000
+v -0.079251 0.096568 0.187500
+v -0.118949 0.144939 0.250000
+v -0.088335 0.088335 0.187500
+v -0.132583 0.132583 0.250000
+v -0.096568 0.079251 0.187500
+v -0.144939 0.118949 0.250000
+v -0.103871 0.069405 0.187500
+v -0.155901 0.104169 0.250000
+v -0.110174 0.058889 0.187500
+v -0.165360 0.088387 0.250000
+v -0.115415 0.047807 0.187500
+v -0.173227 0.071753 0.250000
+v -0.119545 0.036264 0.187500
+v -0.179426 0.054428 0.250000
+v -0.122524 0.024372 0.187500
+v -0.183897 0.036579 0.250000
+v -0.124323 0.012245 0.187500
+v -0.186597 0.018378 0.250000
+v -0.124925 -0.000000 0.187500
+v -0.187500 -0.000000 0.250000
+v -0.124323 -0.012245 0.187500
+v -0.186597 -0.018378 0.250000
+v -0.122524 -0.024372 0.187500
+v -0.183897 -0.036580 0.250000
+v -0.119545 -0.036264 0.187500
+v -0.179426 -0.054428 0.250000
+v -0.115415 -0.047807 0.187500
+v -0.173227 -0.071753 0.250000
+v -0.110174 -0.058889 0.187500
+v -0.165360 -0.088387 0.250000
+v -0.103871 -0.069404 0.187500
+v -0.155901 -0.104170 0.250000
+v -0.096568 -0.079251 0.187500
+v -0.144939 -0.118949 0.250000
+v -0.088335 -0.088335 0.187500
+v -0.132582 -0.132583 0.250000
+v -0.079251 -0.096568 0.187500
+v -0.118949 -0.144940 0.250000
+v -0.069404 -0.103871 0.187500
+v -0.104169 -0.155901 0.250000
+v -0.058889 -0.110174 0.187500
+v -0.088387 -0.165360 0.250000
+v -0.047806 -0.115415 0.187500
+v -0.071753 -0.173227 0.250000
+v -0.036264 -0.119545 0.187500
+v -0.054428 -0.179426 0.250000
+v -0.024372 -0.122524 0.187500
+v -0.036579 -0.183897 0.250000
+v -0.012245 -0.124323 0.187500
+v -0.018378 -0.186597 0.250000
+v 0.000000 -0.124925 0.187500
+v 0.000000 -0.187500 0.250000
+v 0.012245 -0.124323 0.187500
+v 0.018378 -0.186597 0.250000
+v 0.024372 -0.122524 0.187500
+v 0.036580 -0.183897 0.250000
+v 0.036264 -0.119545 0.187500
+v 0.054429 -0.179426 0.250000
+v 0.047807 -0.115415 0.187500
+v 0.071753 -0.173227 0.250000
+v 0.058889 -0.110174 0.187500
+v 0.088387 -0.165360 0.250000
+v 0.069405 -0.103871 0.187500
+v 0.104170 -0.155900 0.250000
+v 0.079251 -0.096568 0.187500
+v 0.118949 -0.144939 0.250000
+v 0.088335 -0.088335 0.187500
+v 0.132583 -0.132582 0.250000
+v 0.096568 -0.079251 0.187500
+v 0.144940 -0.118949 0.250000
+v 0.103871 -0.069404 0.187500
+v 0.155901 -0.104169 0.250000
+v 0.110174 -0.058889 0.187500
+v 0.165360 -0.088387 0.250000
+v 0.115415 -0.047807 0.187500
+v 0.173227 -0.071753 0.250000
+v 0.119545 -0.036264 0.187500
+v 0.179426 -0.054428 0.250000
+v 0.122524 -0.024372 0.187500
+v 0.183897 -0.036579 0.250000
+v 0.124323 -0.012245 0.187500
+v 0.186597 -0.018378 0.250000
+v 0.124925 -0.000000 0.187500
+v 0.187500 -0.000000 0.250000
+v 0.124323 0.012245 0.187500
+v 0.186597 0.018378 0.250000
+v 0.122524 0.024371 0.187500
+v 0.183897 0.036579 0.250000
+v 0.119545 0.036264 0.187500
+v 0.179426 0.054428 0.250000
+v 0.115415 0.047806 0.187500
+v 0.173228 0.071753 0.250000
+v 0.110174 0.058889 0.187500
+v 0.165360 0.088387 0.250000
+v 0.103871 0.069404 0.187500
+v 0.155901 0.104169 0.250000
+v 0.096568 0.079251 0.187500
+v 0.144940 0.118948 0.250000
+v 0.088335 0.088335 0.187500
+v 0.132583 0.132582 0.250000
+v 0.079252 0.096568 0.187500
+v 0.118949 0.144939 0.250000
+v 0.069405 0.103871 0.187500
+v 0.104170 0.155900 0.250000
+v 0.058889 0.110174 0.187500
+v 0.088387 0.165360 0.250000
+v 0.047807 0.115415 0.187500
+v 0.071754 0.173227 0.250000
+v 0.036264 0.119545 0.187500
+v 0.054429 0.179426 0.250000
+v 0.024372 0.122524 0.187500
+v 0.036580 0.183897 0.250000
+v 0.012245 0.124323 0.187500
+v 0.018379 0.186597 0.250000
+vt 0.812500 0.812500
+vt 0.187500 0.812500
+vt 0.187500 0.187500
+vt 0.812500 0.187500
+vt 1.000000 0.000000
+vt 1.000000 0.062500
+vt 0.000000 0.062500
+vt 0.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.125000 0.875000
+vt 0.875000 0.875000
+vt 0.875000 0.125000
+vt 0.125000 0.125000
+vt 0.000000 0.000000
+vt 0.000000 0.062500
+vt 0.125000 0.875000
+vt 0.125000 0.125000
+vt 0.875000 0.875000
+vt 0.875000 0.125000
+vt 1.000000 0.000000
+vt 1.000000 0.062500
+vt 1.000000 0.000000
+vt 1.000000 0.062500
+vt 0.937500 0.062500
+vt 0.937500 0.000000
+vt 0.812500 0.000000
+vt 0.812500 0.062500
+vt 0.750000 0.062500
+vt 0.750000 0.000000
+vt 0.687500 0.062500
+vt 0.687500 0.000000
+vt 0.625000 0.062500
+vt 0.625000 0.000000
+vt 0.562500 0.062500
+vt 0.562500 0.000000
+vt 0.500000 0.062500
+vt 0.500000 0.000000
+vt 0.437500 0.062500
+vt 0.437500 0.000000
+vt 0.375000 0.062500
+vt 0.375000 0.000000
+vt 0.312500 0.062500
+vt 0.312500 0.000000
+vt 0.250000 0.062500
+vt 0.250000 0.000000
+vt 0.187500 0.062500
+vt 0.187500 0.000000
+vt 0.125000 0.062500
+vt 0.125000 0.000000
+vt 0.062500 0.062500
+vt 0.062500 0.000000
+vt 0.000000 0.062500
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vt 1.000000 0.062500
+vt 0.937500 0.062500
+vt 0.937500 0.000000
+vt 0.875000 0.062500
+vt 0.875000 0.000000
+vt 0.812500 0.062500
+vt 0.812500 0.000000
+vt 0.750000 0.062500
+vt 0.750000 0.000000
+vt 0.687500 0.062500
+vt 0.687500 0.000000
+vt 0.625000 0.062500
+vt 0.625000 0.000000
+vt 0.562500 0.062500
+vt 0.562500 0.000000
+vt 0.500000 0.062500
+vt 0.500000 0.000000
+vt 0.437500 0.062500
+vt 0.437500 0.000000
+vt 0.375000 0.062500
+vt 0.375000 0.000000
+vt 0.312500 0.062500
+vt 0.312500 0.000000
+vt 0.250000 0.062500
+vt 0.250000 0.000000
+vt 0.187500 0.062500
+vt 0.187500 0.000000
+vt 0.125000 0.062500
+vt 0.125000 0.000000
+vt 0.062500 0.062500
+vt 0.062500 0.000000
+vt 0.000000 0.062500
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vt 1.000000 0.062500
+vt 0.937500 0.062500
+vt 0.937500 0.000000
+vt 0.875000 0.062500
+vt 0.875000 0.000000
+vt 0.812500 0.062500
+vt 0.812500 0.000000
+vt 0.750000 0.062500
+vt 0.750000 0.000000
+vt 0.687500 0.062500
+vt 0.687500 0.000000
+vt 0.625000 0.062500
+vt 0.625000 0.000000
+vt 0.562500 0.062500
+vt 0.562500 0.000000
+vt 0.500000 0.062500
+vt 0.500000 0.000000
+vt 0.437500 0.062500
+vt 0.437500 0.000000
+vt 0.375000 0.062500
+vt 0.375000 0.000000
+vt 0.312500 0.062500
+vt 0.312500 0.000000
+vt 0.250000 0.062500
+vt 0.250000 0.000000
+vt 0.187500 0.062500
+vt 0.187500 0.000000
+vt 0.125000 0.062500
+vt 0.125000 0.000000
+vt 0.062500 0.062500
+vt 0.062500 0.000000
+vt 0.000000 0.062500
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vt 1.000000 0.062500
+vt 0.937500 0.062500
+vt 0.937500 0.000000
+vt 0.875000 0.062500
+vt 0.875000 0.000000
+vt 0.812500 0.062500
+vt 0.812500 0.000000
+vt 0.750000 0.062500
+vt 0.750000 0.000000
+vt 0.687500 0.062500
+vt 0.687500 0.000000
+vt 0.625000 0.062500
+vt 0.625000 0.000000
+vt 0.562500 0.062500
+vt 0.562500 0.000000
+vt 0.500000 0.062500
+vt 0.500000 0.000000
+vt 0.437500 0.062500
+vt 0.437500 0.000000
+vt 0.375000 0.062500
+vt 0.375000 0.000000
+vt 0.312500 0.062500
+vt 0.312500 0.000000
+vt 0.250000 0.062500
+vt 0.250000 0.000000
+vt 0.187500 0.062500
+vt 0.187500 0.000000
+vt 0.125000 0.062500
+vt 0.125000 0.000000
+vt 0.062500 0.062500
+vt 0.062500 0.000000
+vt -0.000000 0.062500
+vt -0.000000 0.000000
+vt 0.875000 0.062500
+vt 0.875000 0.000000
+vt 0.937500 0.125000
+vt 0.875000 0.125000
+vt 0.812500 0.125000
+vt 0.750000 0.125000
+vt 0.687500 0.125000
+vt 0.625000 0.125000
+vt 0.562500 0.125000
+vt 0.500000 0.125000
+vt 0.437500 0.125000
+vt 0.375000 0.125000
+vt 0.312500 0.125000
+vt 0.250000 0.125000
+vt 0.187500 0.125000
+vt 0.125000 0.125000
+vt 0.062500 0.125000
+vt 0.000000 0.125000
+vt 1.000000 0.125000
+vt 0.937500 0.125000
+vt 0.875000 0.125000
+vt 0.812500 0.125000
+vt 0.750000 0.125000
+vt 0.687500 0.125000
+vt 0.625000 0.125000
+vt 0.562500 0.125000
+vt 0.500000 0.125000
+vt 0.437500 0.125000
+vt 0.375000 0.125000
+vt 0.312500 0.125000
+vt 0.250000 0.125000
+vt 0.187500 0.125000
+vt 0.125000 0.125000
+vt 0.062500 0.125000
+vt 0.000000 0.125000
+vt 1.000000 0.125000
+vt 0.937500 0.125000
+vt 0.875000 0.125000
+vt 0.812500 0.125000
+vt 0.750000 0.125000
+vt 0.687500 0.125000
+vt 0.625000 0.125000
+vt 0.562500 0.125000
+vt 0.500000 0.125000
+vt 0.437500 0.125000
+vt 0.375000 0.125000
+vt 0.312500 0.125000
+vt 0.250000 0.125000
+vt 0.187500 0.125000
+vt 0.125000 0.125000
+vt 0.062500 0.125000
+vt 0.000000 0.125000
+vt 1.000000 0.125000
+vt 0.937500 0.125000
+vt 0.875000 0.125000
+vt 0.812500 0.125000
+vt 0.750000 0.125000
+vt 0.687500 0.125000
+vt 0.625000 0.125000
+vt 0.562500 0.125000
+vt 0.500000 0.125000
+vt 0.437500 0.125000
+vt 0.375000 0.125000
+vt 0.312500 0.125000
+vt 0.250000 0.125000
+vt 0.187500 0.125000
+vt 0.125000 0.125000
+vt 0.062500 0.125000
+vt -0.000000 0.125000
+vt 1.000000 0.125000
+vt 0.512252 0.624398
+vt 0.500000 0.625000
+vt 0.487747 0.624398
+vt 0.475613 0.622598
+vt 0.463714 0.619617
+vt 0.452164 0.615485
+vt 0.441075 0.610240
+vt 0.430553 0.603933
+vt 0.420700 0.596626
+vt 0.411611 0.588388
+vt 0.403373 0.579299
+vt 0.396066 0.569446
+vt 0.389760 0.558924
+vt 0.384515 0.547835
+vt 0.380382 0.536285
+vt 0.377402 0.524386
+vt 0.375602 0.512252
+vt 0.375000 0.500000
+vt 0.375602 0.487748
+vt 0.377402 0.475614
+vt 0.380382 0.463714
+vt 0.384515 0.452164
+vt 0.389760 0.441075
+vt 0.396066 0.430554
+vt 0.403374 0.420701
+vt 0.411611 0.411612
+vt 0.420701 0.403374
+vt 0.430553 0.396066
+vt 0.441075 0.389760
+vt 0.452164 0.384515
+vt 0.463714 0.380382
+vt 0.475613 0.377402
+vt 0.487748 0.375602
+vt 0.500000 0.375000
+vt 0.512252 0.375602
+vt 0.524386 0.377402
+vt 0.536285 0.380382
+vt 0.547835 0.384515
+vt 0.558924 0.389760
+vt 0.569446 0.396066
+vt 0.579299 0.403374
+vt 0.588388 0.411611
+vt 0.596626 0.420701
+vt 0.603934 0.430554
+vt 0.610240 0.441075
+vt 0.615485 0.452164
+vt 0.619617 0.463714
+vt 0.622598 0.475614
+vt 0.624398 0.487747
+vt 0.625000 0.500000
+vt 0.624398 0.512252
+vt 0.622598 0.524386
+vt 0.619617 0.536285
+vt 0.615485 0.547835
+vt 0.610240 0.558924
+vt 0.603934 0.569446
+vt 0.596626 0.579299
+vt 0.588388 0.588388
+vt 0.579299 0.596626
+vt 0.569446 0.603933
+vt 0.558925 0.610240
+vt 0.547835 0.615485
+vt 0.536286 0.619617
+vt 0.524386 0.622598
+vt 0.875000 0.000000
+vt 0.875000 0.062500
+vt 0.812500 0.062500
+vt 0.812500 0.000000
+vt 0.937500 0.000000
+vt 0.937500 0.062500
+vt 0.062500 0.000000
+vt 0.062500 0.062500
+vt 0.000000 0.062500
+vt 0.000000 0.000000
+vt 0.125000 0.000000
+vt 0.125000 0.062500
+vt 0.187500 0.000000
+vt 0.187500 0.062500
+vt 0.250000 0.000000
+vt 0.250000 0.062500
+vt 0.312500 0.000000
+vt 0.312500 0.062500
+vt 0.375000 0.000000
+vt 0.375000 0.062500
+vt 0.437500 0.000000
+vt 0.437500 0.062500
+vt 0.500000 0.000000
+vt 0.500000 0.062500
+vt 0.562500 0.000000
+vt 0.562500 0.062500
+vt 0.625000 0.000000
+vt 0.625000 0.062500
+vt 0.687500 0.000000
+vt 0.687500 0.062500
+vt 0.750000 0.000000
+vt 0.750000 0.062500
+vt 0.812500 0.000000
+vt 0.812500 0.062500
+vt 0.875000 0.000000
+vt 0.875000 0.062500
+vt 0.937500 0.000000
+vt 0.937500 0.062500
+vt 1.000000 0.000000
+vt 1.000000 0.062500
+vt 0.062500 0.000000
+vt 0.062500 0.062500
+vt 0.000000 0.062500
+vt 0.000000 0.000000
+vt 0.125000 0.000000
+vt 0.125000 0.062500
+vt 0.187500 0.000000
+vt 0.187500 0.062500
+vt 0.250000 0.000000
+vt 0.250000 0.062500
+vt 0.312500 0.000000
+vt 0.312500 0.062500
+vt 0.375000 0.000000
+vt 0.375000 0.062500
+vt 0.437500 0.000000
+vt 0.437500 0.062500
+vt 0.500000 0.000000
+vt 0.500000 0.062500
+vt 0.562500 0.000000
+vt 0.562500 0.062500
+vt 0.625000 0.000000
+vt 0.625000 0.062500
+vt 0.687500 0.000000
+vt 0.687500 0.062500
+vt 0.750000 0.000000
+vt 0.750000 0.062500
+vt 0.812500 0.000000
+vt 0.812500 0.062500
+vt 0.875000 0.000000
+vt 0.875000 0.062500
+vt 0.937500 0.000000
+vt 0.937500 0.062500
+vt 1.000000 0.000000
+vt 1.000000 0.062500
+vt 0.062500 0.000000
+vt 0.062500 0.062500
+vt 0.000000 0.062500
+vt 0.000000 0.000000
+vt 0.125000 0.000000
+vt 0.125000 0.062500
+vt 0.187500 0.000000
+vt 0.187500 0.062500
+vt 0.250000 0.000000
+vt 0.250000 0.062500
+vt 0.312500 0.000000
+vt 0.312500 0.062500
+vt 0.375000 0.000000
+vt 0.375000 0.062500
+vt 0.437500 0.000000
+vt 0.437500 0.062500
+vt 0.500000 0.000000
+vt 0.500000 0.062500
+vt 0.562500 0.000000
+vt 0.562500 0.062500
+vt 0.625000 0.000000
+vt 0.625000 0.062500
+vt 0.687500 0.000000
+vt 0.687500 0.062500
+vt 0.750000 0.000000
+vt 0.750000 0.062500
+vt 0.812500 0.000000
+vt 0.812500 0.062500
+vt 0.875000 0.000000
+vt 0.875000 0.062500
+vt 0.937500 0.000000
+vt 0.937500 0.062500
+vt 1.000000 0.000000
+vt 1.000000 0.062500
+vt 0.062500 0.000000
+vt 0.062500 0.062500
+vt 0.000000 0.062500
+vt 0.000000 0.000000
+vt 0.125000 0.000000
+vt 0.125000 0.062500
+vt 0.187500 0.000000
+vt 0.187500 0.062500
+vt 0.250000 0.000000
+vt 0.250000 0.062500
+vt 0.312500 0.000000
+vt 0.312500 0.062500
+vt 0.375000 0.000000
+vt 0.375000 0.062500
+vt 0.437500 0.000000
+vt 0.437500 0.062500
+vt 0.500000 0.000000
+vt 0.500000 0.062500
+vt 0.562500 0.000000
+vt 0.562500 0.062500
+vt 0.625000 0.000000
+vt 0.625000 0.062500
+vt 0.687500 0.000000
+vt 0.687500 0.062500
+vt 0.750000 0.000000
+vt 0.750000 0.062500
+vt 1.000000 0.000000
+vt 1.000000 0.062500
+vn 0.0000 0.0000 -1.0000
+vn -1.0000 0.0000 0.0000
+vn 1.0000 0.0000 0.0000
+vn 0.0000 -0.0000 1.0000
+vn 0.0000 1.0000 0.0000
+vn 0.7071 0.0000 -0.7071
+vn 0.0000 0.7071 -0.7071
+vn -0.7071 0.0000 -0.7071
+vn 0.0000 -0.7071 -0.7071
+vn 0.0000 -1.0000 0.0000
+vn 0.0491 0.9988 0.0000
+vn -0.2430 0.9700 0.0000
+vn -0.3369 0.9415 0.0000
+vn -0.4276 0.9040 0.0000
+vn -0.5141 0.8577 0.0000
+vn -0.5957 0.8032 0.0000
+vn -0.6716 0.7410 0.0000
+vn -0.7410 0.6716 0.0000
+vn -0.8032 0.5957 0.0000
+vn -0.8577 0.5141 0.0000
+vn -0.9040 0.4276 0.0000
+vn -0.9415 0.3369 0.0000
+vn -0.9700 0.2430 0.0000
+vn -0.9892 0.1467 0.0000
+vn -0.9988 0.0491 0.0000
+vn -0.9988 -0.0491 -0.0000
+vn -0.9892 -0.1467 -0.0000
+vn -0.9700 -0.2430 -0.0000
+vn -0.9415 -0.3369 0.0000
+vn -0.9040 -0.4276 0.0000
+vn -0.8577 -0.5141 0.0000
+vn -0.8032 -0.5957 0.0000
+vn -0.7410 -0.6716 -0.0000
+vn -0.6716 -0.7410 -0.0000
+vn -0.5957 -0.8032 0.0000
+vn -0.5141 -0.8577 -0.0000
+vn -0.4276 -0.9040 0.0000
+vn -0.3369 -0.9415 -0.0000
+vn -0.2430 -0.9700 -0.0000
+vn -0.1467 -0.9892 -0.0000
+vn -0.0491 -0.9988 -0.0000
+vn 0.0491 -0.9988 -0.0000
+vn 0.1467 -0.9892 -0.0000
+vn 0.2430 -0.9700 0.0000
+vn 0.3369 -0.9415 -0.0000
+vn 0.4276 -0.9040 -0.0000
+vn 0.5141 -0.8577 -0.0000
+vn 0.5957 -0.8032 -0.0000
+vn 0.6716 -0.7410 -0.0000
+vn 0.7410 -0.6716 -0.0000
+vn 0.8032 -0.5957 0.0000
+vn 0.8577 -0.5141 0.0000
+vn 0.9040 -0.4276 0.0000
+vn 0.9415 -0.3369 -0.0000
+vn 0.9700 -0.2430 -0.0000
+vn 0.9892 -0.1467 -0.0000
+vn 0.9988 -0.0491 -0.0000
+vn 0.9988 0.0491 0.0000
+vn 0.9892 0.1467 0.0000
+vn 0.9700 0.2430 0.0000
+vn 0.9415 0.3369 0.0000
+vn 0.9040 0.4276 0.0000
+vn 0.8577 0.5141 0.0000
+vn 0.8032 0.5957 0.0000
+vn 0.7410 0.6716 0.0000
+vn 0.6716 0.7409 0.0000
+vn 0.5957 0.8032 0.0000
+vn 0.5141 0.8577 0.0000
+vn 0.4276 0.9040 0.0000
+vn 0.3369 0.9415 0.0000
+vn 0.2430 0.9700 0.0000
+vn 0.1467 0.9892 0.0000
+vn -0.0491 0.9988 0.0000
+vn -0.1467 0.9892 0.0000
+vn -0.0347 0.7063 -0.7071
+vn -0.1038 0.6995 -0.7071
+vn -0.1718 0.6859 -0.7071
+vn -0.2382 0.6658 -0.7071
+vn -0.3023 0.6392 -0.7071
+vn -0.3635 0.6065 -0.7071
+vn -0.4212 0.5680 -0.7071
+vn -0.4749 0.5239 -0.7071
+vn -0.5239 0.4749 -0.7071
+vn -0.5680 0.4212 -0.7071
+vn -0.6065 0.3635 -0.7071
+vn -0.6392 0.3023 -0.7071
+vn -0.6658 0.2382 -0.7071
+vn -0.6859 0.1718 -0.7071
+vn -0.6995 0.1038 -0.7071
+vn -0.7063 0.0347 -0.7071
+vn -0.7063 -0.0347 -0.7071
+vn -0.6995 -0.1038 -0.7071
+vn -0.6859 -0.1718 -0.7071
+vn -0.6658 -0.2382 -0.7071
+vn -0.6392 -0.3023 -0.7071
+vn -0.6065 -0.3635 -0.7071
+vn -0.5680 -0.4212 -0.7071
+vn -0.5239 -0.4749 -0.7071
+vn -0.4749 -0.5239 -0.7071
+vn -0.4212 -0.5680 -0.7071
+vn -0.3635 -0.6065 -0.7071
+vn -0.3023 -0.6392 -0.7071
+vn -0.2382 -0.6658 -0.7071
+vn -0.1718 -0.6859 -0.7071
+vn -0.1038 -0.6995 -0.7071
+vn -0.0347 -0.7063 -0.7071
+vn 0.0347 -0.7063 -0.7071
+vn 0.1038 -0.6995 -0.7071
+vn 0.1718 -0.6859 -0.7071
+vn 0.2382 -0.6658 -0.7071
+vn 0.3023 -0.6392 -0.7071
+vn 0.3635 -0.6065 -0.7071
+vn 0.4212 -0.5680 -0.7071
+vn 0.4749 -0.5239 -0.7071
+vn 0.5239 -0.4749 -0.7071
+vn 0.5680 -0.4212 -0.7071
+vn 0.6065 -0.3635 -0.7071
+vn 0.6392 -0.3023 -0.7071
+vn 0.6658 -0.2382 -0.7071
+vn 0.6859 -0.1718 -0.7071
+vn 0.6995 -0.1038 -0.7071
+vn 0.7063 -0.0347 -0.7071
+vn 0.7063 0.0347 -0.7071
+vn 0.6995 0.1038 -0.7071
+vn 0.6859 0.1718 -0.7071
+vn 0.6658 0.2382 -0.7071
+vn 0.6392 0.3023 -0.7071
+vn 0.6065 0.3635 -0.7071
+vn 0.5680 0.4212 -0.7071
+vn 0.5239 0.4749 -0.7071
+vn 0.4749 0.5239 -0.7071
+vn 0.4212 0.5680 -0.7071
+vn 0.3635 0.6065 -0.7071
+vn 0.3023 0.6392 -0.7071
+vn 0.2382 0.6658 -0.7071
+vn 0.1718 0.6859 -0.7071
+vn 0.1038 0.6995 -0.7071
+vn 0.0347 0.7063 -0.7071
+g Cube_Cube_allsides
+s off
+f 11/1/1 7/2/1 5/3/1 9/4/1
+f 4/5/2 12/6/2 10/7/2 3/8/2
+f 1/9/3 6/10/3 8/11/3 2/12/3
+f 2/13/4 4/14/4 3/15/4 1/16/4
+f 2/17/5 8/18/5 12/6/5 4/5/5
+f 5/3/6 7/2/6 8/19/6 6/20/6
+f 7/2/7 11/1/7 12/21/7 8/19/7
+f 11/1/8 9/4/8 10/22/8 12/21/8
+f 9/4/9 5/3/9 6/20/9 10/22/9
+f 3/23/10 10/24/10 6/10/10 1/9/10
+f 136/25/11 268/26/11 142/27/11 140/28/11
+f 134/29/12 146/30/12 148/31/12 132/32/12
+f 132/32/13 148/31/13 150/33/13 130/34/13
+f 130/34/14 150/33/14 152/35/14 128/36/14
+f 128/36/15 152/35/15 154/37/15 126/38/15
+f 126/38/16 154/37/16 156/39/16 124/40/16
+f 124/40/17 156/39/17 158/41/17 122/42/17
+f 122/42/18 158/41/18 160/43/18 120/44/18
+f 120/44/19 160/43/19 162/45/19 118/46/19
+f 118/46/20 162/45/20 164/47/20 116/48/20
+f 116/48/21 164/47/21 166/49/21 114/50/21
+f 114/50/22 166/49/22 168/51/22 112/52/22
+f 112/52/23 168/51/23 170/53/23 110/54/23
+f 110/54/24 170/53/24 172/55/24 108/56/24
+f 108/57/25 172/58/25 174/59/25 106/60/25
+f 106/60/26 174/59/26 176/61/26 104/62/26
+f 104/62/27 176/61/27 178/63/27 102/64/27
+f 102/64/28 178/63/28 180/65/28 100/66/28
+f 100/66/29 180/65/29 182/67/29 98/68/29
+f 98/68/30 182/67/30 184/69/30 96/70/30
+f 96/70/31 184/69/31 186/71/31 94/72/31
+f 94/72/32 186/71/32 188/73/32 92/74/32
+f 92/74/33 188/73/33 190/75/33 90/76/33
+f 90/76/34 190/75/34 192/77/34 88/78/34
+f 88/78/35 192/77/35 194/79/35 86/80/35
+f 86/80/36 194/79/36 196/81/36 84/82/36
+f 84/82/37 196/81/37 198/83/37 82/84/37
+f 82/84/38 198/83/38 200/85/38 80/86/38
+f 80/86/39 200/85/39 202/87/39 78/88/39
+f 78/88/40 202/87/40 204/89/40 76/90/40
+f 76/91/41 204/92/41 206/93/41 74/94/41
+f 74/94/42 206/93/42 208/95/42 72/96/42
+f 72/96/43 208/95/43 210/97/43 70/98/43
+f 70/98/44 210/97/44 212/99/44 68/100/44
+f 68/100/45 212/99/45 214/101/45 66/102/45
+f 66/102/46 214/101/46 216/103/46 64/104/46
+f 64/104/47 216/103/47 218/105/47 62/106/47
+f 62/106/48 218/105/48 220/107/48 60/108/48
+f 60/108/49 220/107/49 222/109/49 58/110/49
+f 58/110/50 222/109/50 224/111/50 56/112/50
+f 56/112/51 224/111/51 226/113/51 54/114/51
+f 54/114/52 226/113/52 228/115/52 52/116/52
+f 52/116/53 228/115/53 230/117/53 50/118/53
+f 50/118/54 230/117/54 232/119/54 48/120/54
+f 48/120/55 232/119/55 234/121/55 46/122/55
+f 46/122/56 234/121/56 236/123/56 44/124/56
+f 44/125/57 236/126/57 238/127/57 42/128/57
+f 42/128/58 238/127/58 240/129/58 40/130/58
+f 40/130/59 240/129/59 242/131/59 38/132/59
+f 38/132/60 242/131/60 244/133/60 36/134/60
+f 36/134/61 244/133/61 246/135/61 34/136/61
+f 34/136/62 246/135/62 248/137/62 32/138/62
+f 32/138/63 248/137/63 250/139/63 30/140/63
+f 30/140/64 250/139/64 252/141/64 28/142/64
+f 28/142/65 252/141/65 254/143/65 26/144/65
+f 26/144/66 254/143/66 256/145/66 24/146/66
+f 24/146/67 256/145/67 258/147/67 22/148/67
+f 22/148/68 258/147/68 260/149/68 20/150/68
+f 20/150/69 260/149/69 262/151/69 18/152/69
+f 18/152/70 262/151/70 264/153/70 16/154/70
+f 16/154/71 264/153/71 266/155/71 14/156/71
+f 14/156/72 266/155/72 268/157/72 136/158/72
+f 140/28/73 142/27/73 144/159/73 138/160/73
+f 138/160/74 144/159/74 146/30/74 134/29/74
+f 144/159/75 142/27/75 141/161/75 143/162/75
+f 146/30/76 144/159/76 143/162/76 145/163/76
+f 148/31/77 146/30/77 145/163/77 147/164/77
+f 150/33/78 148/31/78 147/164/78 149/165/78
+f 152/35/79 150/33/79 149/165/79 151/166/79
+f 154/37/80 152/35/80 151/166/80 153/167/80
+f 156/39/81 154/37/81 153/167/81 155/168/81
+f 158/41/82 156/39/82 155/168/82 157/169/82
+f 160/43/83 158/41/83 157/169/83 159/170/83
+f 162/45/84 160/43/84 159/170/84 161/171/84
+f 164/47/85 162/45/85 161/171/85 163/172/85
+f 166/49/86 164/47/86 163/172/86 165/173/86
+f 168/51/87 166/49/87 165/173/87 167/174/87
+f 170/53/88 168/51/88 167/174/88 169/175/88
+f 172/55/89 170/53/89 169/175/89 171/176/89
+f 174/59/90 172/58/90 171/177/90 173/178/90
+f 176/61/91 174/59/91 173/178/91 175/179/91
+f 178/63/92 176/61/92 175/179/92 177/180/92
+f 180/65/93 178/63/93 177/180/93 179/181/93
+f 182/67/94 180/65/94 179/181/94 181/182/94
+f 184/69/95 182/67/95 181/182/95 183/183/95
+f 186/71/96 184/69/96 183/183/96 185/184/96
+f 188/73/97 186/71/97 185/184/97 187/185/97
+f 190/75/98 188/73/98 187/185/98 189/186/98
+f 192/77/99 190/75/99 189/186/99 191/187/99
+f 194/79/100 192/77/100 191/187/100 193/188/100
+f 196/81/101 194/79/101 193/188/101 195/189/101
+f 198/83/102 196/81/102 195/189/102 197/190/102
+f 200/85/103 198/83/103 197/190/103 199/191/103
+f 202/87/104 200/85/104 199/191/104 201/192/104
+f 204/89/105 202/87/105 201/192/105 203/193/105
+f 206/93/106 204/92/106 203/194/106 205/195/106
+f 208/95/107 206/93/107 205/195/107 207/196/107
+f 210/97/108 208/95/108 207/196/108 209/197/108
+f 212/99/109 210/97/109 209/197/109 211/198/109
+f 214/101/110 212/99/110 211/198/110 213/199/110
+f 216/103/111 214/101/111 213/199/111 215/200/111
+f 218/105/112 216/103/112 215/200/112 217/201/112
+f 220/107/113 218/105/113 217/201/113 219/202/113
+f 222/109/114 220/107/114 219/202/114 221/203/114
+f 224/111/115 222/109/115 221/203/115 223/204/115
+f 226/113/116 224/111/116 223/204/116 225/205/116
+f 228/115/117 226/113/117 225/205/117 227/206/117
+f 230/117/118 228/115/118 227/206/118 229/207/118
+f 232/119/119 230/117/119 229/207/119 231/208/119
+f 234/121/120 232/119/120 231/208/120 233/209/120
+f 236/123/121 234/121/121 233/209/121 235/210/121
+f 238/127/122 236/126/122 235/211/122 237/212/122
+f 240/129/123 238/127/123 237/212/123 239/213/123
+f 242/131/124 240/129/124 239/213/124 241/214/124
+f 244/133/125 242/131/125 241/214/125 243/215/125
+f 246/135/126 244/133/126 243/215/126 245/216/126
+f 248/137/127 246/135/127 245/216/127 247/217/127
+f 250/139/128 248/137/128 247/217/128 249/218/128
+f 252/141/129 250/139/129 249/218/129 251/219/129
+f 254/143/130 252/141/130 251/219/130 253/220/130
+f 256/145/131 254/143/131 253/220/131 255/221/131
+f 258/147/132 256/145/132 255/221/132 257/222/132
+f 260/149/133 258/147/133 257/222/133 259/223/133
+f 262/151/134 260/149/134 259/223/134 261/224/134
+f 264/153/135 262/151/135 261/224/135 263/225/135
+f 266/155/136 264/153/136 263/225/136 265/226/136
+f 268/157/137 266/155/137 265/226/137 267/227/137
+f 142/27/138 268/26/138 267/228/138 141/161/138
+f 143/229/1 141/230/1 267/231/1 265/232/1 263/233/1 261/234/1 259/235/1 257/236/1 255/237/1 253/238/1 251/239/1 249/240/1 247/241/1 245/242/1 243/243/1 241/244/1 239/245/1 237/246/1 235/247/1 233/248/1 231/249/1 229/250/1 227/251/1 225/252/1 223/253/1 221/254/1 219/255/1 217/256/1 215/257/1 213/258/1 211/259/1 209/260/1 207/261/1 205/262/1 203/263/1 201/264/1 199/265/1 197/266/1 195/267/1 193/268/1 191/269/1 189/270/1 187/271/1 185/272/1 183/273/1 181/274/1 179/275/1 177/276/1 175/277/1 173/278/1 171/279/1 169/280/1 167/281/1 165/282/1 163/283/1 161/284/1 159/285/1 157/286/1 155/287/1 153/288/1 151/289/1 149/290/1 147/291/1 145/292/1
+g Cube_Cube_knob
+f 15/293/74 138/294/74 134/295/74 17/296/74
+f 13/297/73 140/298/73 138/294/73 15/293/73
+f 137/299/72 14/300/72 136/301/72 139/302/72
+f 135/303/71 16/304/71 14/300/71 137/299/71
+f 133/305/70 18/306/70 16/304/70 135/303/70
+f 131/307/69 20/308/69 18/306/69 133/305/69
+f 129/309/68 22/310/68 20/308/68 131/307/68
+f 127/311/67 24/312/67 22/310/67 129/309/67
+f 125/313/66 26/314/66 24/312/66 127/311/66
+f 123/315/65 28/316/65 26/314/65 125/313/65
+f 121/317/64 30/318/64 28/316/64 123/315/64
+f 119/319/63 32/320/63 30/318/63 121/317/63
+f 117/321/62 34/322/62 32/320/62 119/319/62
+f 115/323/61 36/324/61 34/322/61 117/321/61
+f 113/325/60 38/326/60 36/324/60 115/323/60
+f 111/327/59 40/328/59 38/326/59 113/325/59
+f 109/329/58 42/330/58 40/328/58 111/327/58
+f 107/331/57 44/332/57 42/330/57 109/329/57
+f 105/333/56 46/334/56 44/335/56 107/336/56
+f 103/337/55 48/338/55 46/334/55 105/333/55
+f 101/339/54 50/340/54 48/338/54 103/337/54
+f 99/341/53 52/342/53 50/340/53 101/339/53
+f 97/343/52 54/344/52 52/342/52 99/341/52
+f 95/345/51 56/346/51 54/344/51 97/343/51
+f 93/347/50 58/348/50 56/346/50 95/345/50
+f 91/349/49 60/350/49 58/348/49 93/347/49
+f 89/351/48 62/352/48 60/350/48 91/349/48
+f 87/353/47 64/354/47 62/352/47 89/351/47
+f 85/355/46 66/356/46 64/354/46 87/353/46
+f 83/357/45 68/358/45 66/356/45 85/355/45
+f 81/359/44 70/360/44 68/358/44 83/357/44
+f 79/361/43 72/362/43 70/360/43 81/359/43
+f 77/363/42 74/364/42 72/362/42 79/361/42
+f 75/365/41 76/366/41 74/364/41 77/363/41
+f 73/367/40 78/368/40 76/369/40 75/370/40
+f 71/371/39 80/372/39 78/368/39 73/367/39
+f 69/373/38 82/374/38 80/372/38 71/371/38
+f 67/375/37 84/376/37 82/374/37 69/373/37
+f 65/377/36 86/378/36 84/376/36 67/375/36
+f 63/379/35 88/380/35 86/378/35 65/377/35
+f 61/381/34 90/382/34 88/380/34 63/379/34
+f 59/383/33 92/384/33 90/382/33 61/381/33
+f 57/385/32 94/386/32 92/384/32 59/383/32
+f 55/387/31 96/388/31 94/386/31 57/385/31
+f 53/389/30 98/390/30 96/388/30 55/387/30
+f 51/391/29 100/392/29 98/390/29 53/389/29
+f 49/393/28 102/394/28 100/392/28 51/391/28
+f 47/395/27 104/396/27 102/394/27 49/393/27
+f 45/397/26 106/398/26 104/396/26 47/395/26
+f 43/399/25 108/400/25 106/398/25 45/397/25
+f 41/401/24 110/402/24 108/403/24 43/404/24
+f 39/405/23 112/406/23 110/402/23 41/401/23
+f 37/407/22 114/408/22 112/406/22 39/405/22
+f 35/409/21 116/410/21 114/408/21 37/407/21
+f 33/411/20 118/412/20 116/410/20 35/409/20
+f 31/413/19 120/414/19 118/412/19 33/411/19
+f 29/415/18 122/416/18 120/414/18 31/413/18
+f 27/417/17 124/418/17 122/416/17 29/415/17
+f 25/419/16 126/420/16 124/418/16 27/417/16
+f 23/421/15 128/422/15 126/420/15 25/419/15
+f 21/423/14 130/424/14 128/422/14 23/421/14
+f 19/425/13 132/426/13 130/424/13 21/423/13
+f 17/296/12 134/295/12 132/426/12 19/425/12
+f 139/427/11 136/428/11 140/298/11 13/297/11
diff --git a/digistuff/button.lua b/digistuff/switches.lua
index dc2cf3b..d45c38b 100644
--- a/digistuff/button.lua
+++ b/digistuff/switches.lua
@@ -13,6 +13,8 @@ digistuff.button_get_rules = function(node)
{x = 0,y = 0,z = 1},
{x = 0,y = 0,z = -1},
{x = 0,y = 0,z = 2},
+ {x = 0,y = 1,z = 1},
+ {x = 0,y = -1,z = 1},
}
local dir = minetest.facedir_to_dir(node.param2)
rules = digistuff.rotate_rules(rules,dir)
@@ -177,3 +179,110 @@ minetest.register_craft({
{"digilines:wire_std_00000000"}
}
})
+
+minetest.register_node("digistuff:wall_knob", {
+ paramtype = "light",
+ paramtype2 = "facedir",
+ walkable = false,
+ sunlight_propagates = true,
+ digiline =
+ {
+ receptor = {},
+ wire = {
+ rules = digistuff.button_get_rules,
+ },
+ },
+ drawtype = "mesh",
+ mesh = "digistuff_wall_knob.obj",
+ tiles = {
+ "digistuff_digibutton_sides.png",
+ "digistuff_digiline_full.png",
+ },
+ selection_box = {
+ type = "fixed",
+ fixed = {
+ {-0.4,-0.4,0,0.4,0.4,0.5},
+ },
+ },
+ groups = {dig_immediate = 2,digiline_receiver = 1,},
+ description = "Digilines Wall Knob",
+ on_construct = function(pos)
+ local meta = minetest.get_meta(pos)
+ meta:set_int("min",0)
+ meta:set_int("max",14)
+ meta:set_string("formspec","size[8,4;]field[1,1;6,2;channel;Channel;${channel}]field[1,2;3,2;min;Minimum;${min}]field[4,2;3,2;max;Maximum;${max}]button_exit[2.25,3;3,1;submit;Save]")
+ end,
+ after_place_node = digistuff.place_receiver,
+ after_destruct = digistuff.remove_receiver,
+ on_receive_fields = function(pos, formname, fields, sender)
+ local meta = minetest.get_meta(pos)
+ if fields.channel and fields.channel ~= "" then
+ if tonumber(fields.min) and tonumber(fields.max) and math.floor(fields.min) < math.floor(fields.max) then
+ meta:set_string("channel",fields.channel)
+ meta:set_int("min",math.floor(tonumber(fields.min)))
+ meta:set_int("max",math.floor(tonumber(fields.max)))
+ meta:set_int("value",math.floor(tonumber(fields.min)))
+ meta:set_string("infotext",string.format("Current setting: %d\nLeft-click to turn up or right-click to turn down",math.floor(tonumber(fields.min))))
+ meta:set_string("formspec","")
+ minetest.swap_node(pos, {name = "digistuff:wall_knob_configured", param2=minetest.get_node(pos).param2})
+ else
+ minetest.chat_send_player(sender:get_player_name(),"Minimum and maximum must both be numbers, and maximum must be greater than minimum")
+ end
+ else
+ minetest.chat_send_player(sender:get_player_name(),"Please set a channel!")
+ end
+ end,
+ sounds = default and default.node_sound_stone_defaults(),
+})
+
+minetest.register_node("digistuff:wall_knob_configured", {
+ paramtype = "light",
+ paramtype2 = "facedir",
+ walkable = false,
+ sunlight_propagates = true,
+ digiline =
+ {
+ receptor = {},
+ wire = {
+ rules = digistuff.button_get_rules,
+ },
+ },
+ drawtype = "mesh",
+ mesh = "digistuff_wall_knob.obj",
+ tiles = {
+ "digistuff_digibutton_sides.png",
+ "digistuff_digiline_full.png",
+ },
+ selection_box = {
+ type = "fixed",
+ fixed = {
+ {-0.4,-0.4,0,0.4,0.4,0.5},
+ },
+ },
+ groups = {dig_immediate = 2,digiline_receiver = 1,not_in_creative_inventory = 1,},
+ description = "Digilines Wall Knob (configured state - you hacker you!)",
+ drop = "digistuff:wall_knob",
+ after_place_node = digistuff.place_receiver,
+ after_destruct = digistuff.remove_receiver,
+ on_punch = function(pos,node,player)
+ local meta = minetest.get_meta(pos)
+ local max = meta:get_int("max")
+ local value = meta:get_int("value")
+ local full = player:get_player_control().aux1
+ value = full and max or math.min(max,value+1)
+ meta:set_int("value",value)
+ meta:set_string("infotext",string.format("Current setting: %d\nLeft-click to turn up or right-click to turn down",math.floor(tonumber(value))))
+ digiline:receptor_send(pos,digistuff.button_get_rules(node),meta:get_string("channel"),value)
+ end,
+ on_rightclick = function(pos,node,player)
+ local meta = minetest.get_meta(pos)
+ local min = meta:get_int("min")
+ local value = meta:get_int("value")
+ local full = player:get_player_control().aux1
+ value = full and min or math.max(min,value-1)
+ meta:set_int("value",value)
+ meta:set_string("infotext",string.format("Current setting: %d\nLeft-click to turn up or right-click to turn down",math.floor(tonumber(value))))
+ digiline:receptor_send(pos,digistuff.button_get_rules(node),meta:get_string("channel"),value)
+ end,
+ sounds = default and default.node_sound_stone_defaults(),
+})