summaryrefslogtreecommitdiff
path: root/dispatcherfw.lua
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2024-08-06 12:49:27 -0500
committercheapie <no-email-for-you@example.com>2024-08-06 12:49:27 -0500
commit7dc4d13f599cb15d74f08f7ddd61a3a9ed996006 (patch)
tree360568d726f6c524b2984f4aa1c76d05fde21b8f /dispatcherfw.lua
parentfe4c23ecd06771298e7227462acc0d209f6fbf5f (diff)
downloadcelevator-7dc4d13f599cb15d74f08f7ddd61a3a9ed996006.tar
celevator-7dc4d13f599cb15d74f08f7ddd61a3a9ed996006.tar.gz
celevator-7dc4d13f599cb15d74f08f7ddd61a3a9ed996006.tar.bz2
celevator-7dc4d13f599cb15d74f08f7ddd61a3a9ed996006.tar.xz
celevator-7dc4d13f599cb15d74f08f7ddd61a3a9ed996006.zip
Require floor heights to be at least 1m
Floor heights of 0 lead to ambiguous car positions and strange behavior
Diffstat (limited to 'dispatcherfw.lua')
-rw-r--r--dispatcherfw.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/dispatcherfw.lua b/dispatcherfw.lua
index 428312c..82a4a35 100644
--- a/dispatcherfw.lua
+++ b/dispatcherfw.lua
@@ -394,7 +394,7 @@ elseif event.type == "ui" then
local height = tonumber(event.fields.height)
if height then
height = math.floor(height+0.5)
- mem.params.floorheights[mem.editingfloor] = math.max(0,height)
+ mem.params.floorheights[mem.editingfloor] = math.max(1,height)
end
mem.params.floornames[mem.editingfloor] = string.sub(event.fields.name,1,256)
end