summaryrefslogtreecommitdiff
path: root/laptop.lua
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2024-09-15 12:38:00 -0500
committercheapie <no-email-for-you@example.com>2024-09-15 12:38:00 -0500
commit00fb4e2e14b39853fe593cd843daf3f4c57675ee (patch)
treecf2a3b70cb8ad6fe6d587338e1ef571303c4905c /laptop.lua
parent873001197a25eaaeefcaea91ebddd424301be809 (diff)
downloadcelevator-00fb4e2e14b39853fe593cd843daf3f4c57675ee.tar
celevator-00fb4e2e14b39853fe593cd843daf3f4c57675ee.tar.gz
celevator-00fb4e2e14b39853fe593cd843daf3f4c57675ee.tar.bz2
celevator-00fb4e2e14b39853fe593cd843daf3f4c57675ee.tar.xz
celevator-00fb4e2e14b39853fe593cd843daf3f4c57675ee.zip
Shorten long lines
Diffstat (limited to 'laptop.lua')
-rw-r--r--laptop.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/laptop.lua b/laptop.lua
index 5a9fe27..7e3d16c 100644
--- a/laptop.lua
+++ b/laptop.lua
@@ -447,8 +447,14 @@ laptop.register_app("celevator",{
local meta = minetest.get_meta(pos)
local cmem = minetest.deserialize(meta:get_string("mem"))
if not cmem then return end
+ local carcallacceptstates = {
+ normal = true,
+ test = true,
+ capture = true,
+ indep = true,
+ }
for i=1,#cmem.params.floornames,1 do
- if fields[string.format("carcall%d",i)] and (cmem.carstate == "normal" or cmem.carstate == "test" or cmem.carstate == "capture" or cmem.carstate == "indep") then
+ if fields[string.format("carcall%d",i)] and carcallacceptstates[cmem.carstate] then
celevator.controller.run(pos,{
type = "remotemsg",
source = 0,