summaryrefslogtreecommitdiff
path: root/item_tweaks
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2016-04-01 22:10:20 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2016-04-01 22:42:02 -0400
commit86ad3e7c6a37699f7f8297a387bf08af74e36629 (patch)
treedc368b1eaf2cc09b9df2200250890b3038d8cf2d /item_tweaks
parent888b0ebfec8c2eff9015163549a7e47443cb8665 (diff)
downloaddreambuilder_modpack-86ad3e7c6a37699f7f8297a387bf08af74e36629.tar
dreambuilder_modpack-86ad3e7c6a37699f7f8297a387bf08af74e36629.tar.gz
dreambuilder_modpack-86ad3e7c6a37699f7f8297a387bf08af74e36629.tar.bz2
dreambuilder_modpack-86ad3e7c6a37699f7f8297a387bf08af74e36629.tar.xz
dreambuilder_modpack-86ad3e7c6a37699f7f8297a387bf08af74e36629.zip
Update all core mods
Diffstat (limited to 'item_tweaks')
-rw-r--r--item_tweaks/item_drop.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/item_tweaks/item_drop.lua b/item_tweaks/item_drop.lua
index beed1c7..aa0e9d0 100644
--- a/item_tweaks/item_drop.lua
+++ b/item_tweaks/item_drop.lua
@@ -56,7 +56,7 @@ local function pickup(player, inv, object, pickupRadius)
-- itemstring is serialized item so includes metadata
local lua = object:get_luaentity()
- item = ItemStack(lua.itemstring)
+ local item = ItemStack(lua.itemstring)
if inv and inv:room_for_item("main", item) then
inv:add_item("main", item)
if object:get_luaentity().itemstring ~= "" then
@@ -126,8 +126,8 @@ local function moveTowards(object, player, pickupRadius, attractRadius)
pos1.y = pos1.y+0.5 -- head towards player's belt
local direct = vector.subtract(pos1, pos2)
local R = vector.length(direct)
- v = object:getvelocity()
- stopped = v.x == 0 and v.y == 0 and v.z == 0
+ local v = object:getvelocity()
+ local stopped = v.x == 0 and v.y == 0 and v.z == 0
-- when direction(X) = direction(V) we passed the player
-- so project V onto X. If same, passed. If not, approaching.
-- projection = norm(X) * (length(V) * cos(theta))
@@ -209,7 +209,7 @@ if minetest.setting_get("enable_item_pickup") == "true" then
minetest.after(30, function(object)
-- only if it's still moving
-- but what if it started moving a second time?
- pair = movers[object]
+ local pair = movers[object]
if pair and pair[2] == ticket then
stop(object)
end