diff options
author | LNJ <git@lnj.li> | 2017-04-05 13:17:08 +0200 |
---|---|---|
committer | LNJ <git@lnj.li> | 2017-04-05 14:53:16 +0200 |
commit | ad3bbe8664199c1b27eaece422f23784512e5d05 (patch) | |
tree | 7eca4598fd24cb9bec88c310e227b70cdb23c726 /lua/visual.lua | |
parent | 03e692d72a9772fc6d5ca875ff7416e333cb01fb (diff) |
Adjust pipeworks support (on insert object) for 2x2 drawers
Diffstat (limited to 'lua/visual.lua')
-rwxr-xr-x | lua/visual.lua | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lua/visual.lua b/lua/visual.lua index f0d3cc6..e85bd53 100755 --- a/lua/visual.lua +++ b/lua/visual.lua @@ -70,9 +70,17 @@ core.register_entity("drawers:visual", { -- add self to public drawer visuals -- this is needed because there is no other way to get this class - -- only the underlying ObjectRef + -- only the underlying LuaEntitySAO -- PLEASE contact me, if this is wrong - drawers.drawer_visuals[core.serialize(self.drawer_pos)] = self + local vId = self.visualId + if vId == "" then vId = 1 end + local posstr = core.serialize(self.drawer_pos) + if not drawers.drawer_visuals[posstr] then + drawers.drawer_visuals[posstr] = {[vId] = self} + else + drawers.drawer_visuals[posstr][vId] = self + end + local node = core.get_node(self.drawer_pos) |