summaryrefslogtreecommitdiff
path: root/lua/helpers.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/helpers.lua')
-rwxr-xr-xlua/helpers.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/lua/helpers.lua b/lua/helpers.lua
index 87adbae..3662da2 100755
--- a/lua/helpers.lua
+++ b/lua/helpers.lua
@@ -149,3 +149,13 @@ function drawers.spawn_visual(pos)
end
end
end
+
+function drawers.randomize_pos(pos)
+ local rndpos = table.copy(pos)
+ local x = math.random(-50, 50) * 0.01
+ local z = math.random(-50, 50) * 0.01
+ rndpos.x = rndpos.x + x
+ rndpos.y = rndpos.y + 0.25
+ rndpos.z = rndpos.z + z
+ return rndpos
+end