summaryrefslogtreecommitdiff
path: root/drive_entity.lua
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2024-05-10 21:00:30 -0500
committercheapie <no-email-for-you@example.com>2024-05-10 21:00:30 -0500
commit6c908698d72cdac9fbc85a7e3d168fd3f431e2e3 (patch)
tree833548ad00b85e943cc564fef7dec91476aeca9e /drive_entity.lua
parent5ac4571337aea7ea2f9153a3138c3d1db1ff981f (diff)
downloadcelevator-6c908698d72cdac9fbc85a7e3d168fd3f431e2e3.tar
celevator-6c908698d72cdac9fbc85a7e3d168fd3f431e2e3.tar.gz
celevator-6c908698d72cdac9fbc85a7e3d168fd3f431e2e3.tar.bz2
celevator-6c908698d72cdac9fbc85a7e3d168fd3f431e2e3.tar.xz
celevator-6c908698d72cdac9fbc85a7e3d168fd3f431e2e3.zip
Add nudging
Timer can be edited from the parameters menu, entering 0 disables nudging
Diffstat (limited to 'drive_entity.lua')
-rw-r--r--drive_entity.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/drive_entity.lua b/drive_entity.lua
index 2b048d8..728aa47 100644
--- a/drive_entity.lua
+++ b/drive_entity.lua
@@ -632,7 +632,7 @@ function celevator.drives.entity.getstatus(pos,call2)
end
end
-function celevator.drives.entity.movedoors(drivepos,direction)
+function celevator.drives.entity.movedoors(drivepos,direction,nudge)
local drivehash = minetest.hash_node_position(drivepos)
local entitydrives_running = minetest.deserialize(celevator.storage:get_string("entitydrives_running")) or {}
local drivemeta = celevator.get_meta(drivepos)
@@ -657,7 +657,7 @@ function celevator.drives.entity.movedoors(drivepos,direction)
celevator.doors.hwopen(hwdoorpos,drivepos)
drivemeta:set_string("doorstate","opening")
elseif direction == "close" and celevator.get_node(hwdoorpos).name == "celevator:hwdoor_placeholder" then
- celevator.doors.hwclose(hwdoorpos,drivepos)
+ celevator.doors.hwclose(hwdoorpos,drivepos,nudge)
drivemeta:set_string("doorstate","closing")
end
end