1
0
mirror of https://codeberg.org/tenplus1/mobs_redo.git synced 2025-06-28 06:30:18 +02:00

better MineClone2 compatibility for api, items and crafts

This commit is contained in:
tenplus1
2023-07-26 13:43:06 +01:00
parent 3106c4c859
commit f31cf75b24
6 changed files with 100 additions and 74 deletions

View File

@ -1,7 +1,19 @@
-- lib_mount by Blert2112 (edited by TenPlus1)
local is_50 = minetest.get_modpath("player_api") -- 5.x compatibility
-- one of these is needed (for now) to ride mobs, otherwise no riding for you
if not minetest.get_modpath("default")
or not minetest.get_modpath("player_api") then
function mobs.attach() end
function mobs.detach() end
function mobs.fly() end
function mobs.drive() end
return
end
local is_50 = minetest.get_modpath("player_api") -- 5.x compatibility
local abs, cos, floor, sin, sqrt, pi =
math.abs, math.cos, math.floor, math.sin, math.sqrt, math.pi