From 768edb4d09f651c1ad732bde9c04b50fd69bcf30 Mon Sep 17 00:00:00 2001 From: LNJ Date: Wed, 5 Apr 2017 12:01:23 +0200 Subject: Adjust restore visual lbm, Add new drawers.remove_visuals --- lua/api.lua | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'lua/api.lua') 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 -- cgit v1.2.3