Page 1 of 1

[5.0.0] Deprecated function calls being logged now

Posted: Mon Jul 02, 2018 15:32
by Krock
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 ;)

Re: Deprecated function calls being logged now

Posted: Sat Aug 11, 2018 15:02
by Chem871
What kinds of mods will be affected? Will it change tools? Armor? Food items? Gun mods?

Re: Deprecated function calls being logged now

Posted: Sat Aug 11, 2018 15:37
by Andrey01
Chem871 wrote:What kinds of mods will be affected? Will it change tools? Armor? Food items? Gun mods?
Those ones that use these functions. It will not change stuff, they won`t just work (calls errors those functions are not defined).

Re: [5.0.0] Deprecated function calls being logged now

Posted: Tue Aug 14, 2018 14:35
by Wuzzy
Die, minetest.env, die, die, die!
We have to kill it with fire and nuke it from orbit. It's the only way to be sure. >:-]