mirror of
https://github.com/mt-mods/pipeworks.git
synced 2024-11-09 17:03:58 +01:00
Add legacy code for items in tubes
This commit is contained in:
parent
d5480f5ff0
commit
d4e14bc891
@ -313,7 +313,18 @@ minetest.register_entity("pipeworks:tubed_item", {
|
||||
end,
|
||||
|
||||
get_staticdata = luaentity.get_staticdata,
|
||||
on_activate = luaentity.on_activate,
|
||||
on_activate = function(self, staticdata) -- Legacy code, should be replaced later by luaentity.on_activate
|
||||
if staticdata == "" or staticdata == nil then
|
||||
return
|
||||
end
|
||||
if staticdata == "toremove" then
|
||||
self.object:remove()
|
||||
return
|
||||
end
|
||||
local item = minetest.deserialize(staticdata)
|
||||
pipeworks.tube_item(self.object:getpos(), item.start_pos, item.velocity, item.itemstring)
|
||||
self.object:remove()
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_entity("pipeworks:color_entity", {
|
||||
|
Loading…
Reference in New Issue
Block a user