diff options
author | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2020-05-01 17:34:08 +0200 |
---|---|---|
committer | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2020-05-01 17:34:08 +0200 |
commit | d2c68d4cbab27045ed0b61b55ecbab3f0347803f (patch) | |
tree | 005e229dca64e80481eeb83bbebf72894691487a | |
parent | 12124d0b77f8835e020604c98fbe42ea7683c1eb (diff) | |
download | elevator-d2c68d4cbab27045ed0b61b55ecbab3f0347803f.tar.gz elevator-d2c68d4cbab27045ed0b61b55ecbab3f0347803f.tar.bz2 elevator-d2c68d4cbab27045ed0b61b55ecbab3f0347803f.zip |
move into elevator table
-rw-r--r-- | init.lua | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -1,4 +1,3 @@ - -- Detect optional mods. local armor_path = minetest.get_modpath("3d_armor") @@ -11,8 +10,8 @@ elevator = { VISUAL_INCREASE = 1.75, VERSION = 8, -- Elevator interface/database version. PTIMEOUT = minetest.settings:get("elevator_time") or 120, -- Maximum time a box can go without players nearby. - SLOW_DIST = 16 - SLOW_SPEED = 1.75 + SLOW_DIST = 16, + SLOW_SPEED = 1.75, boxes = {}, -- Elevator boxes in action. lastboxes = {}, -- Player near box timeout. riding = {}, -- Players riding boxes. @@ -56,8 +55,8 @@ elevator.create_box = function(motorhash, pos, target, sender) local delta_y = math.abs(pos.y-target.y) local speed = elevator.SPEED - if (delta_y<SLOW_DIST) then - speed = SLOW_SPEED + if (delta_y<elevator.SLOW_DIST) then + speed = elevator.SLOW_SPEED end |