summaryrefslogtreecommitdiff
path: root/car.lua
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2023-08-07 17:56:31 -0500
committercheapie <no-email-for-you@example.com>2023-08-07 17:56:31 -0500
commit22f5bf7d76c2d71ed2f2c6e9e4d084727accbca9 (patch)
tree912f2eedfcd915f19b8a2614e59ce2941604e35a /car.lua
parent12d9182bd5c50013dd76885cf8395b9a1a4f84a6 (diff)
downloadcelevator-22f5bf7d76c2d71ed2f2c6e9e4d084727accbca9.tar
celevator-22f5bf7d76c2d71ed2f2c6e9e4d084727accbca9.tar.gz
celevator-22f5bf7d76c2d71ed2f2c6e9e4d084727accbca9.tar.bz2
celevator-22f5bf7d76c2d71ed2f2c6e9e4d084727accbca9.tar.xz
celevator-22f5bf7d76c2d71ed2f2c6e9e4d084727accbca9.zip
Initial car prototype
No textures yet and all of the nodes have to be placed manually at the moment
Diffstat (limited to 'car.lua')
-rw-r--r--car.lua200
1 files changed, 200 insertions, 0 deletions
diff --git a/car.lua b/car.lua
new file mode 100644
index 0000000..e2202b5
--- /dev/null
+++ b/car.lua
@@ -0,0 +1,200 @@
+local pieces = {
+ {
+ _position = "000",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.6,-0.5,0.5,-0.5,0.5},
+ {-0.5,-0.5,-0.5,-0.45,0.5,0.5},
+ {-0.5,-1.5,-0.5,0.5,-0.6,-0.45},
+ },
+ },
+ },
+ {
+ _position = "001",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.6,-0.5,0.5,-0.5,0.5},
+ {-0.5,-0.5,-0.5,-0.45,0.5,0.5},
+ },
+ },
+ },
+ {
+ _position = "002",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.6,-0.5,0.5,-0.5,0.5},
+ {-0.5,-0.5,-0.5,-0.45,0.5,0.5},
+ {-0.45,-0.5,0.45,0.5,0.5,0.5},
+ },
+ },
+ },
+ {
+ _position = "100",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.6,-0.5,0.5,-0.5,0.5},
+ {0.45,-0.5,-0.5,0.5,0.5,0.5},
+ {-0.5,-1.5,-0.5,0.5,-0.6,-0.45},
+ },
+ },
+ },
+ {
+ _position = "101",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.6,-0.5,0.5,-0.5,0.5},
+ {0.45,-0.5,-0.5,0.5,0.5,0.5},
+ },
+ },
+ },
+ {
+ _position = "102",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.6,-0.5,0.5,-0.5,0.5},
+ {0.45,-0.5,-0.5,0.5,0.5,0.5},
+ {-0.5,-0.5,0.45,0.45,0.5,0.5},
+ },
+ },
+ },
+ {
+ _position = "010",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,-0.5,-0.45,0.5,0.5},
+ },
+ },
+ },
+ {
+ _position = "011",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,-0.5,-0.45,0.5,0.5},
+ },
+ },
+ },
+ {
+ _position = "012",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,-0.5,-0.5,-0.45,0.5,0.5},
+ {-0.45,-0.5,0.45,0.5,0.5,0.5},
+ },
+ },
+ },
+ {
+ _position = "110",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {0.45,-0.5,-0.5,0.5,0.5,0.5},
+ },
+ },
+ },
+ {
+ _position = "111",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {0.45,-0.5,-0.5,0.5,0.5,0.5},
+ },
+ },
+ },
+ {
+ _position = "112",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {0.45,-0.5,-0.5,0.5,0.5,0.5},
+ {-0.5,-0.5,0.45,0.45,0.5,0.5},
+ },
+ },
+ },
+ {
+ _position = "020",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,0.5,-0.5,0.5,0.6,0.5},
+ {-0.5,-0.5,-0.5,-0.45,0.5,0.5},
+ {-0.5,0.6,-0.4,0.5,1,-0.1},
+ },
+ },
+ },
+ {
+ _position = "021",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,0.5,-0.5,0.5,0.6,0.5},
+ {-0.5,-0.5,-0.5,-0.45,0.5,0.5},
+ },
+ },
+ },
+ {
+ _position = "022",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,0.5,-0.5,0.5,0.6,0.5},
+ {-0.5,-0.5,-0.5,-0.45,0.5,0.5},
+ {-0.45,-0.5,0.45,0.5,0.5,0.5},
+ },
+ },
+ },
+ {
+ _position = "120",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,0.5,-0.5,0.5,0.6,0.5},
+ {0.45,-0.5,-0.5,0.5,0.5,0.5},
+ {-0.5,0.6,-0.4,0.5,1,-0.1},
+ },
+ },
+ },
+ {
+ _position = "121",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,0.5,-0.5,0.5,0.6,0.5},
+ {0.45,-0.5,-0.5,0.5,0.5,0.5},
+ },
+ },
+ },
+ {
+ _position = "122",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5,0.5,-0.5,0.5,0.6,0.5},
+ {0.45,-0.5,-0.5,0.5,0.5,0.5},
+ {-0.5,-0.5,0.45,0.45,0.5,0.5},
+ },
+ },
+ },
+}
+
+for _,def in ipairs(pieces) do
+ def.groups = {
+ dig_immediate = 2,
+ }
+ def.tiles = {
+ "celevator_cabinet_sides.png",
+ }
+ def.paramtype = "light"
+ def.paramtype2 = "4dir"
+ def.drawtype = "nodebox"
+ def.description = "Car "..def._position
+ minetest.register_node("celevator:car_"..def._position,def)
+end