mirror of
https://github.com/minetest-mods/technic.git
synced 2025-07-01 07:40:37 +02:00
Handle both pipeworks APIs
The new API function is now renamed to pipeworks.tube_inject_item(), so use it under that name. If it is not available, synthesise the new API in terms of the old one.
This commit is contained in:
@ -4,6 +4,13 @@
|
||||
|
||||
technic = technic or {}
|
||||
|
||||
technic.tube_inject_item = pipeworks.tube_inject_item or function (pos, start_pos, velocity, item)
|
||||
local tubed = pipeworks.tube_item(vector.new(pos), item)
|
||||
tubed:get_luaentity().start_pos = vector.new(start_pos)
|
||||
tubed:setvelocity(velocity)
|
||||
tubed:setacceleration(vector.new(0, 0, 0))
|
||||
end
|
||||
|
||||
local load_start = os.clock()
|
||||
local modpath = minetest.get_modpath("technic")
|
||||
technic.modpath = modpath
|
||||
|
Reference in New Issue
Block a user