summaryrefslogtreecommitdiff
path: root/lua/api.lua
diff options
context:
space:
mode:
authorLNJ <git@lnj.li>2017-04-05 12:01:23 +0200
committerLNJ <git@lnj.li>2017-04-05 14:53:16 +0200
commit768edb4d09f651c1ad732bde9c04b50fd69bcf30 (patch)
treee79ccb969d0b479cc45dd3c2834bf120fb6ef5bf /lua/api.lua
parenta53dac2929a2e8b4fa8b07840f0bf0f7a9e367b3 (diff)
Adjust restore visual lbm, Add new drawers.remove_visuals
Diffstat (limited to 'lua/api.lua')
-rwxr-xr-xlua/api.lua12
1 files changed, 2 insertions, 10 deletions
diff --git a/lua/api.lua b/lua/api.lua
index dafb934..71af49b 100755
--- a/lua/api.lua
+++ b/lua/api.lua
@@ -59,20 +59,12 @@ function drawers.drawer_on_construct(pos)
i = i + 1
end
- drawers.spawn_visual(pos)
+ drawers.spawn_visuals(pos)
end
-- destruct drawer
function drawers.drawer_on_destruct(pos)
- local objs = core.get_objects_inside_radius(pos, 0.537)
- if not objs then return end
-
- for _, obj in pairs(objs) do
- if obj and obj:get_luaentity() and
- obj:get_luaentity().name == "drawers:visual" then
- obj:remove()
- end
- end
+ drawers.remove_visuals(pos)
end
-- drop all items