diff options
author | cheapie <no-email-for-you@example.com> | 2025-03-16 10:01:15 -0500 |
---|---|---|
committer | cheapie <no-email-for-you@example.com> | 2025-03-16 10:01:15 -0500 |
commit | fc3a3430f635d29af24af1aa3788199668be1376 (patch) | |
tree | f7d33adfe95e4e1a3c4c9d93d71a058b25df54b5 /car.lua | |
parent | b797f8eb6cb73a370e6132e21afd5c1d2e70fdf3 (diff) | |
download | celevator-fc3a3430f635d29af24af1aa3788199668be1376.tar celevator-fc3a3430f635d29af24af1aa3788199668be1376.tar.gz celevator-fc3a3430f635d29af24af1aa3788199668be1376.tar.bz2 celevator-fc3a3430f635d29af24af1aa3788199668be1376.tar.xz celevator-fc3a3430f635d29af24af1aa3788199668be1376.zip |
Add steel doors
Diffstat (limited to 'car.lua')
-rw-r--r-- | car.lua | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -258,7 +258,7 @@ function celevator.car.register(name,defs,size) end end -function celevator.car.spawncar(origin,yaw,carid,name) +function celevator.car.spawncar(origin,yaw,carid,name,doortype) if (not name) or name == "" then name = "standard" end local size = celevator.car.types[name].size local right = vector.rotate_around_axis(vector.new(1,0,0),vector.new(0,1,0),yaw) @@ -276,7 +276,9 @@ function celevator.car.spawncar(origin,yaw,carid,name) param2 = minetest.dir_to_fourdir(minetest.yaw_to_dir(yaw)), } minetest.set_node(pos,node) - if carid then minetest.get_meta(pos):set_int("carid",carid) end + local meta = minetest.get_meta(pos) + if carid then meta:set_int("carid",carid) end + meta:set_string("doortype",doortype or "glass") end end end |