[5.0.0] Deprecated function calls being logged now
Posted: Mon Jul 02, 2018 15:32
minetest.env:
Is legacy, get rid of it. Replace with "minetest." before problems arise.
The "minetest.setting_*" but also setpos, getvelocity and some more functions are deprecated, former are logged since 0.4.16, latter since 5.0.0-dev.
Your mods will still work in 5.0.0-dev, but in a future release these deprecated functions might be dropped in order to clean up the modding API. So please consider updating your mods when you've got some free time to ensure they will also run fine on future Minetest releases.
To ease the update process, here's a script which only replaces equivalent functions, functions which were simply renamed:
MT-replace-deprecated.sh (instructions included)
This script may misbehave in certain situations, so I highly recommend you to check the changes using "git diff" or a similar application.
But that's not all of it. The script does not / cannot handle non-equivalent function changes (such that behave differently or were removed). To name some of them:
ObjectRef:get_entity_name, ObjectRef:*et_look_pitch, ObjectRef:*et_look_yaw
To log these calls in your terminal (if open) and "debug.txt" file, change the minetest.conf setting "deprecated_lua_api_handling" to "log".
Cheers! Keep on modding ;)
Is legacy, get rid of it. Replace with "minetest." before problems arise.
The "minetest.setting_*" but also setpos, getvelocity and some more functions are deprecated, former are logged since 0.4.16, latter since 5.0.0-dev.
Your mods will still work in 5.0.0-dev, but in a future release these deprecated functions might be dropped in order to clean up the modding API. So please consider updating your mods when you've got some free time to ensure they will also run fine on future Minetest releases.
To ease the update process, here's a script which only replaces equivalent functions, functions which were simply renamed:
MT-replace-deprecated.sh (instructions included)
This script may misbehave in certain situations, so I highly recommend you to check the changes using "git diff" or a similar application.
But that's not all of it. The script does not / cannot handle non-equivalent function changes (such that behave differently or were removed). To name some of them:
ObjectRef:get_entity_name, ObjectRef:*et_look_pitch, ObjectRef:*et_look_yaw
To log these calls in your terminal (if open) and "debug.txt" file, change the minetest.conf setting "deprecated_lua_api_handling" to "log".
Cheers! Keep on modding ;)